function FullScreenControl(){}FullScreenControl.prototype=new GControl();FullScreenControl.prototype.initialize=function(c){var a=document.createElement("div");var b=document.createElement("div");this.setButtonStyle_(b);a.appendChild(b);b.appendChild(document.createTextNode("Fullscreen"));GEvent.addDomListener(b,"click",function(){var i=this.parentNode.parentNode;var g=$(i.id).getWidth();var d=$(i.id).getHeight();var f=0,h=0;if(parseInt(navigator.appVersion)>3){if(navigator.appName=="Netscape"){f=window.innerWidth;h=window.innerHeight;}if(navigator.appName.indexOf("Microsoft")!=-1){f=document.body.offsetWidth;h=document.body.offsetHeight;}}if(""+$(i.id).getAttribute("h")!=""+d){$($(i.id).getAttribute("c")).insertBefore($(i.id),$($(i.id).getAttribute("c")).firstChild);$(i.id).style.width="100%";$(i.id).style.height=$(i.id).getAttribute("h")+"px";$(i.id).style.position="relative";$(i.id).style.left="0px";$(i.id).style.top="0px";c.checkResize();c.disableScrollWheelZoom();this.innerHTML="Fullscreen";}else{c.enableScrollWheelZoom();var e=document.getElementsByTagName("body").item(0);e.insertBefore($(i.id),e.firstChild);$(i.id).style.position="absolute";$(i.id).style.display="block";$(i.id).style.zIndex=99999999;$(i.id).style.width="100%";$(i.id).style.height="100%";$(i.id).style.left="0px";$(i.id).style.top="0px";$(i.id).scrollTo();c.checkResize();this.innerHTML="Normal";}});c.getContainer().appendChild(a);return a;};FullScreenControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_LEFT,new GSize(5,70));};FullScreenControl.prototype.setButtonStyle_=function(a){a.style.color="#000000";a.style.backgroundColor="Yellow";a.style.font="small Arial";a.style.border="1px outset black";a.style.padding="0px";a.style.textAlign="center";a.style.width="75px";a.style.height="20px";a.style.cursor="pointer";};
