/*  Window JavaScript ext Prototype
 *--------------------------------------------------------------------------*/
if(!Prototype){throw ("Need prototype...")}else{if(parseFloat(Prototype.Version.substr(0,3))<1.6){throw ("Wrong version of prototype...")}}if(Prototype.Browser.IE){Prototype.Browser.IE=parseFloat(navigator.appVersion.split("MSIE")[1])}Object.extend(Prototype,{OS:{Win:!navigator.platform.indexOf("Win"),Mac:!navigator.platform.indexOf("Mac"),MacIntel:navigator.platform=="MacIntel",MacPPC:navigator.platform=="MacPPC"}});document.detectDoctype=function(){var A=/\s+(X?HTML)\s+([\d\.]+)\s*([^\/]+)*\//gi;if(Prototype.Browser.IE){return A.exec(document.all[0].nodeValue)}else{return A.exec(document.doctype.publicId)}};Object.extend(window,{callWindow:function(B){var A=(Prototype.Browser.IE)?16:0;B=B||{};B.url=(B.url)?B.url:"";B.width=(B.width)?B.width:"100";B.height=(B.height)?B.height:"100";B.scrollbars=(B.scrollbars)?B.scrollbars:0;if(B.scrollbars==1||B.scrollbars=="yes"){B.width+=A}var D=(window.getDimensions().windowHeight-B.height)/2;var C=(window.getDimensions().windowWidth-B.width-A)/2;window.open(B.url,B.target,"width="+B.width+",height="+B.height+",top="+D+",left="+C+",status=0,toolbar=no,menubar=no,location=no,scrollbars="+B.scrollbars)},setResolution:function(C,D,E){C=$(C);if(C!=null){var A=this.getDimensions().windowWidth;var B=this.getDimensions().windowHeight;C.width=(A<=D)?D:"100%";C.height=(B<=E)?E:"100%"}},getDimensions:function(){var B=document.body,C=document.documentElement,E,A,D,F;if(window.innerHeight&&window.scrollMaxY){E=B.scrollWidth;A=window.innerHeight+window.scrollMaxY}else{if(B.scrollHeight>B.offsetHeight){E=B.scrollWidth;A=B.scrollHeight}else{E=B.offsetWidth;A=B.offsetHeight}}if(self.innerHeight){D=self.innerWidth;F=self.innerHeight}else{if(C&&C.clientHeight){D=C.scrollWidth;F=C.scrollHeight}else{if(B){D=B.clientWidth;F=B.clientHeight}}}if(A<F){pageHeight=F}else{pageHeight=A}if(E<D){pageWidth=D}else{pageWidth=E}return{pageWidth:pageWidth,pageHeight:pageHeight,windowWidth:D,windowHeight:F}},getPageScroll:function(){var B,A;if(self.pageYOffset){A=self.pageYOffset;B=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){A=document.documentElement.scrollTop;B=document.documentElement.scrollLeft}else{if(document.body){A=document.body.scrollTop;B=document.body.scrollLeft}}}return{top:A,left:B}}});