var mouseX,mouseY,xdiff,ydiff;var infoLayer=null;mouse.prototype.mouseMoved=m_mouseMoved;var ms_m=null;function mouse(){	this.x=0;	this.y=0;	this.buttonDown=false;}function initMouse(){	if(Gl_browser.ie){		document.onmousemove=ms_getmouseXYIE;		document.ondragstart=ms_null;		document.ondrag=ms_null;		document.onselectstart=ms_null	}else{		document.onmousemove=ms_getmouseXYDom2;	}	ms_m=new mouse();}function ms_null(){return false}function ms_mu(evnt){	ms_m.buttonDown=false;	return true}function ms_getmouseXYIE(){	ms_m.x=event.clientX+document.body.scrollLeft;	ms_m.y=event.clientY+document.body.scrollTop;	ms_m.mouseMoved();}function ms_getmouseXYDom2(event){if (event.pageX || event.pageY) 	{		ms_m.x = event.pageX;		ms_m.y = event.pageY;	}	else if (event.clientX || event.clientY) 	{		ms_m.x = event.clientX + document.body.scrollLeft			+ document.documentElement.scrollLeft;		ms_m.y = event.clientY + document.body.scrollTop			+ document.documentElement.scrollTop;	}	ms_m.mouseMoved();}function m_mouseMoved(){	mouseY = (this.y)-10;	mouseX = (this.x)-15;	return true}function infoUp(tables){	if(!infoLayer)return;	if(infoLayer.x>=0)return;	var winWidth=Gl_get_window_width();	var winHeight=Gl_get_window_height();	var scrollY=Gl_get_window_scrollY();	xdiff=50;	ydiff=-28;	infoLayer.setOpacity(1);	infoLayer.write(tables);	if(mouseY+infoLayer.height>winHeight+scrollY)ydiff=(infoLayer.height+28)*-1;	if(mouseX>winWidth-210)xdiff=-170;	document.getElementById('infoTop').style.left=mouseX+xdiff;	document.getElementById('infoTop').style.top=mouseY+ydiff;	infoLayer.moveTo(mouseX+xdiff,(mouseY+ydiff)+28);	document.getElementById('infoBottom').style.left=mouseX+xdiff;	document.getElementById('infoBottom').style.top=((mouseY+ydiff)+28)+infoLayer.height;}function infoHide(){	if(!infoLayer)return;	infoLayer.moveTo(-1000,0);	document.getElementById('infoTop').style.left=-1000;	document.getElementById('infoBottom').style.left=-1000;}function mainLoop(){	setTimeout("mainLoop()",20);	if(infoLayer){		if(infoLayer.x>=0){			document.getElementById('infoTop').style.left=mouseX+xdiff;			document.getElementById('infoTop').style.top=mouseY+ydiff;			infoLayer.moveTo(mouseX+xdiff,(mouseY+ydiff)+28);			document.getElementById('infoBottom').style.left=mouseX+xdiff;			document.getElementById('infoBottom').style.top=((mouseY+ydiff)+28)+infoLayer.height;			if(infoLayer.opacity<80)infoLayer.setOpacity(infoLayer.opacity+5);		}	}}// Heavily cut back gamelib core code, now suitable for layers onlyvar Gl_n=0,Gl_STT=null,Gl_callBack='',Gl_fps=0,Gl_layers=new Array(),Gl_totalpreimages=0,Gl_interval=null,Gl_ticker=0,Gl_layer_index=0,Gl_iebuffer=null,Gl_ieframe=null,Gl_firstlayer=true,Gl_f=new Array(),Gl_flength=0,Gl_timerSpeed=40,Gl_browser=null,Gl_onSpecialItem=false,Gl_loadQueue=new Array(),Gl_loadwait=null,Gl_loadIndex=-4,Gl_loading=false,Gl_loadTimer=null,Gl_loadCL=null,Gl_loadTime=0,Gl_running=false,Gl_widgetsInUse=false;function Gl_get_window_width(){if(Gl_browser.ie)return windowwidth=document.body.offsetWidth;elsereturn windowwidth=window.innerWidth}function Gl_get_window_height(){if(Gl_browser.ie)return windowheight=document.body.offsetHeight;elsereturn windowheight=window.innerHeight}function Gl_get_window_scrollY(){if(Gl_browser.ie)return document.body.scrollTop;else if(Gl_browser.dom2)return window.scrollY;elsereturn window.pageYOffset}function Gl_layer(Gl_xstart,Gl_ystart,Gl_w,Gl_html){this.on=true;this.mouse=true;this.x=Gl_xstart;this.y=Gl_ystart;this.z=Gl_layer_index;this.xmax=1000;this.xmin=0;this.ymax=1000;this.ymin=0;this.URL="";this.lock=new Array();this.lockxoff=new Array();this.lockyoff=new Array();this.innerHTML=Gl_html;this.opacity=100;this.clipleft=0;this.clipright=0;this.cliptop=0;this.clipbottom=0;this.clipped=false;this.alive=true;this.index=Gl_layer_index;if(Gl_browser.ie){if(Gl_firstlayer){if(Gl_browser.version>5){Gl_iebuffer=document.createElement('<iframe name="buffer" id="buffer"></iframe>');document.body.appendChild(Gl_iebuffer);Gl_iebuffer.style.left="-10px";Gl_iebuffer.style.top="-10px";Gl_iebuffer.style.visibility="hidden"}else{document.body.insertAdjacentHTML("BeforeEnd",'<iframe name="buffer" id="buffer" src="" style="position:absolute;left:-100;top:-100;width:10;height:10;visibility:hidden"></iframe>');Gl_iebuffer=document.all.buffer}Gl_ieframe=document.frames['buffer'];Gl_firstlayer=false}this.raw=genDiv(Gl_xstart,Gl_ystart,Gl_w,"Adiv",Gl_layer_index,Gl_html);this.ob=this.raw.style;this.width=this.raw.clientWidth;this.height=this.raw.clientHeight;this.write=Gl_layerwriteIE;this.append=Gl_layerappendIE;this.moveTo=Gl_movetoIE;this.clip=Gl_obclipIE;this.resizeTo=Gl_layerresizeIE;this.setBgcolor=Gl_setbgcolorIE;this.setBackground=Gl_setbackgroundIE;this.setOpacity=Gl_setOpacityIE}else if(Gl_browser.dom2){var addTo=document.getElementsByTagName("body").item(0);if(Gl_firstlayer){var f=document.createElement("IFRAME");f.setAttribute("id",'buffer');f.setAttribute("name",'buffer');f.setAttribute("style","position:absolute;left:0px;top:-20px;width:1px;height:1px;visibility:hidden");f.setAttribute("src",'');f.src='';f.id='buffer';f.name='buffer';f.width=1;f.height=1;f.style.position="absolute";f.style.overflow="hidden";f.style.visibility="hidden";addTo.appendChild(f);f.style.left='0px';f.style.top='-20px';Gl_iebuffer=document.getElementById('buffer');Gl_firstlayer=false}this.raw=genDiv(Gl_xstart,Gl_ystart,Gl_w,"Adiv",Gl_layer_index,Gl_html,addTo);this.ob=this.raw.style;this.width=this.raw.offsetWidth;this.height=this.raw.offsetHeight;this.write=Gl_layerwriteDOM2;this.append=Gl_layerappendIE;this.moveTo=Gl_movetoDOM2;this.setBgcolor=Gl_setbgcolorIE;this.clip=Gl_obclipDOM2;this.setOpacity=Gl_setOpacityDOM2;this.setBackground=Gl_setbackgroundIE;this.resizeTo=Gl_layerresizeDOM2}else if(Gl_browser.ns4){this.raw=genDiv(Gl_xstart,Gl_ystart,Gl_w,"Adiv",Gl_layer_index,Gl_html);this.ob=this.raw;this.width=this.ob.clip.width;this.height=this.ob.clip.height;this.write=Gl_layerwriteNS;this.append=Gl_layerappendNS;this.moveTo=Gl_movetoNS;this.clip=Gl_obclipNS;this.resizeTo=Gl_layerresizeNS;this.setBgcolor=Gl_setbgcolorNS;this.setBackground=Gl_setbackgroundNS;this.setOpacity=Gl_null}this.load=Gl_load;this.lockLayer=Gl_locklayer;this.unlockLayer=Gl_unlocklayer;this.moveLocks=Gl_moveLocks;this.setZ=Gl_setz;this.hide=Gl_hide;this.show=Gl_show;this.setXlimits=Gl_setxlimits;this.setYlimits=Gl_setylimits;this.Gl_index=Gl_layer_index++;Gl_layers[Gl_layers.length]=this;return this}function genDiv(x,y,w,baseName,index,html,parent){var ob;if(Gl_browser.ns4){if(!parent)document[baseName+index]=ob=new Layer(w);elsedocument[baseName+index]=ob=new Layer(w,parent);ob.name=index;ob.height=0;ob.left=x;ob.top=y;ob.layers=new Array();ob.zIndex=index;ob.visibility="show";ob.document.open();ob.document.write(html);ob.document.close();return ob}else if(Gl_browser.ie){if(parent)parent.insertAdjacentHTML("BeforeEnd",'<div id="'+baseName+index+'" style="position:absolute;left:'+x+';top:'+y+';width:'+w+';visibility:visible;z-index:'+index+'">\n'+html+'\n</div>\n');elsedocument.body.insertAdjacentHTML("BeforeEnd",'<div id="'+baseName+index+'" style="position:absolute;left:'+x+';top:'+y+';width:'+w+';visibility:visible;overflow:hidden;z-index:'+index+'">\n'+html+'\n</div>\n');return document.all[baseName+index]}else if(Gl_browser.dom2){var obj=document.createElement('DIV');obj.setAttribute("style","position:absolute;left:-1000;top:-1000;overflow:hidden;z-index:"+index);obj.setAttribute("id",baseName+index);obj.style.left=-1000;obj.innerHTML=html+"\n";if(parent)parent.appendChild(obj);elsedocument.getElementsByTagName("body").item(0).appendChild(obj);obj.style.position="absolute";obj.style.left=x+"px";obj.style.top=y+"px";obj.style.width=w+'px';return document.getElementById(baseName+index)}}function Gl_setbackgroundNS(Gl_i){this.ob.background.src=Gl_i}function Gl_setbackgroundIE(Gl_i){this.ob.backgroundImage="url("+Gl_i+")"}function Gl_layerresizeIE(Gl_w,Gl_h){this.ob.width=Gl_w;this.ob.height=Gl_h;this.ob.clip="rect(0 "+Gl_w+" "+Gl_h+" 0)";this.width=Gl_w;this.height=Gl_h;this.clipped=true;this.cliptop=0;this.clipbottom=Gl_h;this.clipleft=0;this.clipright=Gl_w}function Gl_layerresizeNS(Gl_w,Gl_h){this.ob.width=Gl_w;this.ob.height=Gl_h;this.ob.clip.left=0;this.ob.clip.right=Gl_w;this.ob.clip.top=0;this.ob.clip.bottom=Gl_h;this.width=Gl_w;this.height=Gl_h;this.clipped=true;this.cliptop=0;this.clipbottom=Gl_h;this.clipleft=0;this.clipright=Gl_w}function Gl_layerresizeDOM2(Gl_w,Gl_h){this.ob.width=Gl_w+'px';this.ob.height=Gl_h+'px';this.ob.clip="rect(0px,"+Gl_w+"px,"+Gl_h+"px,0)";this.width=Gl_w;this.height=Gl_h;this.clipped=true;this.cliptop=0;this.clipbottom=Gl_h;this.clipleft=0;this.clipright=Gl_w}function Gl_layerwriteIE(Gl_txt){this.innerHTML=Gl_txt;if(!this.clipped){this.resizeTo(0,0);this.raw.innerHTML=Gl_txt+"\n";this.width=this.raw.scrollWidth;this.height=this.raw.scrollHeight;this.resizeTo(this.width,this.height);this.clipped=false;this.moveTo(this.x,this.y);}elsethis.raw.innerHTML=Gl_txt+"\n";}function Gl_layerwriteDOM2(Gl_txt){this.innerHTML=Gl_txt;if(!this.clipped){this.raw.innerHTML=Gl_txt;setTimeout('Gl_layerwriteDOM2delay('+this.index+')',10);}elsethis.raw.innerHTML=Gl_txt+"\n";}function Gl_layerwriteDOM2delay(ix){var l=Gl_layers[ix];l.width=l.raw.offsetWidth;l.height=l.raw.offsetHeight;l.ob.width=l.width;var html='';l.clipped=false;l.moveTo(l.x,l.y);}function Gl_layerappendIE(Gl_txt,Gl_pos){if(Gl_pos && Gl_pos<this.innerHTML.length){var Gl_tmp=this.innerHTML.substring(0,Gl_pos)+Gl_txt+this.innerHTML.substring(Gl_pos,this.innerHTML.length);this.innerHTML=Gl_tmp;this.raw.innerHTML=Gl_tmp}else{this.innerHTML+=Gl_txt;this.raw.innerHTML=this.innerHTML}if(!this.clipped){this.width=this.raw.clientWidth;this.height=this.raw.clientHeight;this.moveTo(this.x,this.y)}}function Gl_layerappendNS(Gl_txt,Gl_pos){if(Gl_pos && Gl_pos<this.innerHTML.length){var Gl_tmp=this.innerHTML.substring(0,Gl_pos)+Gl_txt+this.innerHTML.substring(Gl_pos,this.innerHTML.length);this.innerHTML=Gl_tmp}elsethis.innerHTML+=Gl_txt;this.ob.document.open();this.ob.document.write(this.innerHTML);this.ob.document.close();if(!this.clipped){this.width=this.raw.clip.width;this.height=this.raw.clip.height;this.moveTo(this.x,this.y)}}function Gl_layerwriteNS(Gl_txt){this.ob.width=0;this.ob.height=0;this.ob.document.open();this.ob.document.write(Gl_txt);this.ob.document.close();this.innerHTML=Gl_txt;if(!this.clipped){this.width=this.raw.clip.width;this.height=this.raw.clip.height;this.moveTo(this.x,this.y)}}function Gl_movetoNS(Gl_x,Gl_y){if(Gl_x>this.xmax-this.width)Gl_x=this.xmax-this.width;if(Gl_y>this.ymax-this.height)Gl_y=this.ymax-this.height;if(Gl_x<this.xmin)Gl_x=this.xmin;if(Gl_y<this.ymin)Gl_y=this.ymin;this.ob.moveTo(Gl_x,Gl_y);this.x=Gl_x;this.y=Gl_y;if(this.lock.length>0)this.moveLocks();}function Gl_movetoIE(Gl_x,Gl_y){if(Gl_x>this.xmax-this.width)Gl_x=this.xmax-this.width;if(Gl_y>this.ymax-this.height)Gl_y=this.ymax-this.height;if(Gl_x<this.xmin)Gl_x=this.xmin;if(Gl_y<this.ymin)Gl_y=this.ymin;this.ob.posTop=Gl_y;this.ob.posLeft=Gl_x;this.x=Gl_x;this.y=Gl_y;if(this.lock.length>0)this.moveLocks();}function Gl_movetoDOM2(Gl_x,Gl_y){if(Gl_x>this.xmax-this.width)Gl_x=this.xmax-this.width;if(Gl_y>this.ymax-this.height)Gl_y=this.ymax-this.height;if(Gl_x<this.xmin)Gl_x=this.xmin;if(Gl_y<this.ymin)Gl_y=this.ymin;this.ob.top=Gl_y;this.ob.left=Gl_x;this.x=Gl_x;this.y=Gl_y;if(this.lock.length>0)this.moveLocks();}function Gl_moveLocks(){var n;for(n=0;n<this.lock.length;n++)this.lock[n].moveTo(this.x+this.lockxoff[n],this.y+this.lockyoff[n])}function Gl_setxlimits(x1,x2){this.xmin=x1;this.xmax=x2;if(this.x<this.xmin)this.x=this.xmin;else if(this.x+this.width>this.xmax)this.x=this.xmax-this.width;this.moveTo(this.x,this.y)}function Gl_setylimits(y1,y2){this.ymin=y1;this.ymax=y2;if(this.y<this.ymin)this.y=this.ymin;else if(this.y+this.height>this.ymax)this.y=this.ymax-this.height;this.moveTo(this.x,this.y)}function Gl_setz(Gl_z){this.ob.zIndex=Gl_z;this.z=Gl_z}function Gl_show(){this.ob.visibility="visible"}function Gl_hide(){this.ob.visibility="hidden"}function Gl_get_heightIE(){return this.raw.clientHeight}function Gl_get_heightNS(){return this.raw.clip.height}function Gl_get_widthIE(){return this.raw.clientWidth}function Gl_get_widthNS(){return this.raw.clip.width}function Gl_obclipNS(Gl_left,Gl_right,Gl_top,Gl_bottom){this.ob.clip.left=Gl_left;this.ob.clip.right=Gl_right;this.ob.clip.top=Gl_top;this.ob.clip.bottom=Gl_bottom;this.clipleft=Gl_left;this.cliptop=Gl_top;this.clipright=Gl_right;this.clipbottom=Gl_bottom;this.clipped=true}function Gl_obclipIE(Gl_left,Gl_right,Gl_top,Gl_bottom){this.ob.clip="rect("+Gl_top+","+Gl_right+","+Gl_bottom+","+Gl_left+")";this.clipleft=Gl_left;this.cliptop=Gl_top;this.clipright=Gl_right;this.clipbottom=Gl_bottom;this.clipped=true}function Gl_obclipDOM2(Gl_left,Gl_right,Gl_top,Gl_bottom){this.ob.clip="rect("+Gl_top+"px,"+Gl_right+"px,"+Gl_bottom+"px,"+Gl_left+"px)";this.clipleft=Gl_left;this.cliptop=Gl_top;this.clipright=Gl_right;this.clipbottom=Gl_bottom;this.clipped=true}function Gl_loaderAdd(l,f,nc,mt){Gl_app="";Gl_loadQueue[Gl_loadQueue.length]=l;Gl_loadQueue[Gl_loadQueue.length]=f;Gl_loadQueue[Gl_loadQueue.length]=nc;Gl_loadQueue[Gl_loadQueue.length]=mt||60;if(!Gl_loading)Gl_loadKick()}function Gl_loadKick(){var url='';Gl_loadIndex+=4;if(Gl_loadIndex>=Gl_loadQueue.length){Gl_loadIndex=-4;Gl_loading=false;Gl_loadQueue=new Array();return}Gl_loading=true;Gl_loadCL=Gl_loadQueue[Gl_loadIndex];Gl_loadCL.URL=Gl_loadQueue[Gl_loadIndex+1];Gl_loadTime=Gl_loadQueue[Gl_loadIndex+3];url=Gl_loadQueue[Gl_loadIndex+1]+(Gl_loadQueue[Gl_loadIndex+2]?'?'+Math.random():'');if(Gl_browser.ie){if(Gl_ieframe.document.body)Gl_ieframe.document.body.innerHTML="";setTimeout('Gl_iebuffer.src="'+url+'"',400)}else if(Gl_browser.dom2){Gl_iebuffer.innerHTML="";Gl_iebuffer.src=url}else if(Gl_browser.ns4){Gl_loadCL.ob.height=0;Gl_loadCL.ob.load(url,Gl_loadCL.width)}Gl_loadTimer=setTimeout('Gl_loadWait()',500)}function Gl_loadWait(){if(Gl_loadTime--==0){Gl_loadKick();return}if(Gl_browser.ie&&Gl_ieframe.document.readyState.toLowerCase()=='complete'){Gl_loadCL.raw.innerHTML="";Gl_loadCL.ob.height=0;Gl_loadCL.ob.clientHeight=0;Gl_loadCL.ob.scrollHeight=0;Gl_loadCL.raw.innerHTML=Gl_ieframe.document.body.innerHTML;Gl_loadCL.innerHTML=Gl_ieframe.document.body.innerHTML;Gl_loadCL.width=Gl_loadCL.raw.scrollWidth;Gl_loadCL.height=Gl_loadCL.raw.scrollHeight;Gl_loadCL.ob.height=Gl_loadCL.height;Gl_loadCL.ob.width=Gl_loadCL.width;Gl_loadCL.moveTo(Gl_loadCL.x,Gl_loadCL.y);Gl_loadCL.clipped=false;window.status="Done";Gl_loadKick();return}else if(!Gl_browser.ie&&Gl_browser.dom2&&(window.document.readyState==null||window.document.readyState=="complete")){var Gl_in=""+window.frames["buffer"].document.body.innerHTML;Gl_loadCL.raw.innerHTML=Gl_in;Gl_loadCL.innerHTML=Gl_in;Gl_loadCL.width=Gl_loadCL.raw.offsetWidth;Gl_loadCL.height=Gl_loadCL.raw.offsetHeight;Gl_loadCL.moveTo(Gl_loadCL.x,Gl_loadCL.y);Gl_loadCL.clipped=false;window.status="Done";Gl_loadKick();return}else if(Gl_browser.ns4&&Gl_loadCL.ob.clip.height>0){Gl_loadCL.width=Gl_loadCL.ob.clip.width;Gl_loadCL.height=Gl_loadCL.ob.clip.height;Gl_loadCL.innerHTML="";Gl_loadCL.moveTo(Gl_loadCL.x,Gl_loadCL.y);Gl_loadCL.clipped=false;window.status="Done";Gl_loadKick();return}setTimeout('Gl_loadWait()',1000)}function Gl_load(Gl_file,Gl_st,Gl_mt){Gl_loaderAdd(this,Gl_file,Gl_st,Gl_mt)}function Gl_setbgcolorIE(Gl_a){this.ob.backgroundColor=Gl_a}function Gl_setbgcolorNS(Gl_a){this.ob.bgColor=Gl_a}function Gl_setOpacityIE(Gl_a){if(Gl_a<100&&Gl_a>0){this.ob.filter="alpha(opacity="+Gl_a+")";this.opacity=Gl_a}else{this.ob.filter="";this.opacity=100}}function Gl_setOpacityDOM2(Gl_a){if(Gl_a<100&&Gl_a>0){this.ob.MozOpacity=Gl_a/100;this.opacity=Gl_a}}function Gl_locklayer(Gl_a){var n;for(n=0;n<this.lock.length;n++){if(this.lock[n]==Gl_a){this.lockxoff[n]=Gl_a.x-this.x;this.lockyoff[n]=Gl_a.y-this.yreturn;}}this.lock[this.lock.length]=Gl_a;this.lockxoff[this.lockxoff.length]=Gl_a.x-this.x;this.lockyoff[this.lockyoff.length]=Gl_a.y-this.y}function Gl_unlocklayer(Gl_a){var n,g,l;if(!Gl_a){this.lock=new Array();return;}for(n=0;n<this.lock.length;n++){if(this.lock[n]==Gl_a){for(g=n;g<this.lock.length-1;g++)this.lock[g]=this.lock[g+1];l=this.lock.length;this.lock[this.lock.length-1]=null;this.lock.length=l-1;return;}}}function Gl_null(){return;}function Gl_getBrowser(){this.version=1;this.ie=this.ie5=this.ie6=this.ns=this.ns4=this.ns6=this.unix=this.webtv=this.apple=this.dom2=false;this.panic=true;var ua=navigator.userAgent.toLowerCase();var ver=parseInt(navigator.appVersion);if(ua.indexOf('opera')!=-1)return this;if(ua.indexOf('webtv')!=-1&&document.all){this.webtv=true;return this}if(ua.indexOf('mac')!=-1||ua.indexOf('apple')!=-1)this.apple=true;if(navigator.userAgent.indexOf('X11')!=-1)this.unix=true;if(ua.indexOf("msie")!=-1){if(document.all){this.version=4;this.ie=true;this.panic=false}if(ua.indexOf("msie 5")!=-1){this.version=5;this.ie5=true;this.dom2=true;this.panic=false;}if(ua.indexOf("msie 6")!=-1){this.version=6;this.ie6=true;this.dom2=true;this.panic=false}if(ua.indexOf("msie 7")!=-1){this.version=7;this.ie7=true;this.dom2=true;this.panic=false}}else if(ua.indexOf("mozilla")!=-1){this.ns=true;if(ver==4){this.version=4;this.ns4=true;this.panic=false}else if(!this.ie&&this.ns&&(ver>4)){this.version=6;this.ns6=true;this.dom2=true;this.panic=false}}if(document.getElementById){if(this.version==1)this.version=6;this.dom2=true;this.panic=false}return this}function Gl_styleSheet(){var html='<style type="text/css">\n';html+='</style>';document.write(html)}Gl_browser=new Gl_getBrowser();Gl_styleSheet();initMouse();