
$(function(){
	 I=false;
	 C=false;
	 E=false

	
	$(document).bind('keydown', function(e){
					
		if(e.keyCode==73)  {I=true; setTimeout('I=false',500);} 
		if(e.keyCode==67)  {C=true; setTimeout('C=false',500);} 
		if(e.keyCode==69)  {E=true; setTimeout('E=false',500);} 
		
		iceOpen()
		
		
	})
	
})

function iceOpen(){
	if (I && C && E) {
		if(top.document.location.href.indexOf('/ice/')==-1){
			url=document.location.href.split('/');
			URL='http://'+url[2]+'/ice/'
			id=document.location.href.match(/-([0-9]+)\.html/);
			if(!id) id=new Array(0,1);
			document.location.href=URL+'index.php?page='+id[1]+'&ICE=open';
			
		}
		else{
			
			url=document.location.href.split('/');
			URL='http://'+url[2]+'/'
			id=document.location.href.match(/-([0-9]+)\.html/);
			if(!id) id=new Array(null,'-1.html');
			top.document.location.href=URL+'page'+id[0]+'?ICE=close';
			
		}
	}
}
