function setStyle()
{
	if(document.getElementById("floater")==null) return;
	
        if(self.innerWidth) x=self.innerWidth;
        else if(document.documentElement && document.documentElement.clientWidth) x=document.documentElement.clientWidth;
        else if(document.body) x=document.body.clientWidth;

	if(document.body.offsetWidth)
	{
		x1=document.body.offsetWidth;
		if(x1<x) x=x1;
	}
	x-=24; //Body margin
        if(x<=0) return;
        ma= (x%206)/2;
	//ma-=0;
	//if(ma<0) ma+=103;
        ma=ma.toFixed(0);
	//if(ma<40) return;

        document.getElementById("floater").style.margin = "0px "+ma+"px 0px "+ma+"px";
	document.getElementById("ftable").style.width = (x-(2*ma)-5)+"px";
}

function keypress(event)
{
	//33=pageup 34=pagedown 36=home 61=+ 51=# 109=- 85=u
	if(event.which==61 | event.which==107) { if(document.getElementById("i_nlink")!=null) window.location.href=document.getElementById("i_nlink").href; }
	else if(event.which==51 | event.which==109 | event.which==191 ) { if(document.getElementById("i_plink")!=null) window.location.href=document.getElementById("i_plink").href; }
	else if(event.which==85) { if(document.getElementById("i_ulink")!=null) window.location.href=document.getElementById("i_ulink").href; }
	else if(event.which==90) { if(document.getElementById("i_zlink")!=null) window.location.href=document.getElementById("i_zlink").href; }
	else if(event.which==69) { if(document.getElementById("i_elink")!=null) window.location.href=document.getElementById("i_elink").href; }
	//document.getElementById("i_ulink").innerHTML=event.which;
	return true;
}

//window.captureEvents(Event.RESIZE|Event.LOAD);
window.onresize = setStyle;
window.onload = setStyle;
document.onkeydown = keypress;
