overlayer=new overlay(100);function overlay(A){this.id="overlay";this.imgFolder="/img/";this.id_div=null;this.zIndex=A;this.stack=new Array();this.create=function(){if(Browser.isIE){var F=document.createElement("iframe");F.id=this.id;F.frameBorder="0";F.setAttribute("src",'javascript:""');var C=F.style;C.borderWidth="0px";C.borderColor="white";C.height="100%";C.margin="0px";C.position="absolute";C.zIndex=this.zIndex;C.top="0px";C.left="0px";C.backgroundColor="red";C.width=parseInt(top.document.body.clientWidth)+parseInt(document.body.leftMargin)+"px";var G=(top.document.body.scrollHeight?top.document.body.scrollHeight:top.document.body.offsetHeight);G=parseInt(G)+parseInt(document.body.topMargin);G=G+100;C.height=G+"px";C.display="none";C.filter="progid:DXImageTransform.Microsoft.Alpha(opacity=30)";document.body.appendChild(F);F=null;var E=document.createElement("div");this.id_div=E.id="overlay_div_IE";var B=E.style;B.display="none";B.position="absolute";B.zIndex=this.zIndex;B.borderWidth="0";B.left=C.left;B.top=C.top;B.width=C.width;B.height=C.height;B.backgroundColor="black";document.body.appendChild(E);setOpacity(this.id_div,"50");C=B=E=null}else{var F=document.createElement("img");F.id=this.id;var D=((Browser.isGecko)||(Browser.isIE5up&&Browser.isMac)||(Browser.isOpera&&Browser.isWin&&Browser.versionMajor>=6)||(Browser.isOpera&&Browser.isUnix&&Browser.versionMajor>=6)||(Browser.isOpera&&Browser.isMac&&Browser.versionMajor>=5)||(Browser.isOmniweb&&Browser.versionMinor>=3.1)||(Browser.isIcab&&Browser.versionMinor>=1.9)||(Browser.isWebtv)||(Browser.isDreamcast));var C=F.style;C.display="none";C.left="0px";C.top="0px";C.zIndex=this.zIndex;C.position="absolute";F.setAttribute("src",this.imgFolder+"bkg-error"+(D?".png":".gif"));C.width=document.body.scrollWidth+"px";if(Browser.isFirefox){C.height=Math.max(document.body.scrollHeight,document.body.offsetHeight)+10+"px"}else{C.height=Math.max(document.body.scrollHeight,document.body.offsetHeight)+"px"}document.body.appendChild(F);F=null}};this.show=function(D){if(!$(this.id)){this.create()}if(D){this.zIndex=D}this.set_zIndex(this.zIndex);this.stack.push(this.zIndex);if(Browser.isIE){$(this.id).style.display="block"}else{$(this.id).style.display=""}if($("overlay_div_IE")){$("overlay_div_IE").style.display=""}var B=getWindowSize();var C=Position.get(this.id).height;if(C<B.height){$(this.id).style.height=B.height+"px";if(Browser.isIE){$("overlay_div_IE").style.height=B.height+"px"}}};this.set_zIndex=this.setLayer=function(B){if(B){this.zIndex=B;$(this.id).style.zIndex=this.zIndex;if(Browser.isIE){$("overlay_div_IE").style.zIndex=this.zIndex}}};this.hide=this.dispose=function(){if(this.stack.length>0){this.stack.pop()}if(this.stack.length==0){$(this.id).style.display="none";if($("overlay_div_IE")){$("overlay_div_IE").style.display="none"}}else{this.zIndex=this.stack[this.stack.length-1];this.set_zIndex(this.zIndex)}};this.block=function(B){this.show(B)};this.freeze=function(B){this.show(B)};this.overlay=function(B){this.show(B)};this.unBlock=function(){this.hide()};this.unFreeze=function(){this.hide()};this.isOverlayed=function(){if($(this.id).style.display=="none"){return false}else{return true}};this.getMAXLayer=function(E,B){if(B){var B=B}else{var B=0}if(!E){return this.getMAXLayer(document.body,0)}else{if(E.style){if(E.style.zIndex){if(E.style.display!="none"){if(B<=Number(E.style.zIndex)){B=Number(E.style.zIndex)}}}}var D=E.childNodes;for(var C=0;C<D.length;C++){B=this.getMAXLayer(D.item(C),B)}return B}};this.showMAX=function(){this.show(this.getMAXLayer()+1)}};
