var opacity_level=5;showBG=function(){var F=getElem("ibox_w");if(!F){F=CreateModal()}F.style.opacity=0;F.style.filter="alpha(opacity=0)";setBGOpacity=setOpacity;for(var D=0;D<=opacity_level;D++){setTimeout("setIboxOpacity('ibox_w',"+D+")",1*D)}F.style.display="";var C=new getPageSize1();var E=new getScrollPos();var B=navigator.userAgent;var A=getPageSizeNew();if(B.indexOf("MSIE ")!=-1){F.style.width=C.width+"px"}F.style.height=A[1]+"px"};CreateModal=function(){var B=document.createElement("DIV");B.id="ibox_w";B.style.display="block";B.className="ibox_w";var C=document.createElement("DIV");C.id="ibox";C.style.display="block";C.className="ibox_wrapper";var A=document.getElementsByTagName("body");A[0].appendChild(C);A[0].appendChild(B);return B};hideBG=function(A){var C=getElem("ibox_w");var B=getElem("ibox");C.style.display="none";B.style.display="none"};showIbox=function(C,E){var D=getElem(C);var G=getElem("ibox");G.innerHTML=D.innerHTML;D.style.display="none";if(E.height){G.style.height=E.height+"px"}else{G.style.height="auto"}if(E.width){G.style.width=E.width+"px"}else{G.style.width="450px"}G.style.display="block";G.style.visibility="hidden";posToCenter(G);G.style.visibility="visible";var A=getElem("ibox");if(A){A.style.display="block"}G.style.opacity=0;G.style.filter="alpha(opacity=0)";var F=10;setIboxOpacity=setOpacity;for(var B=0;B<=F;B++){setTimeout("setIboxOpacity('ibox',"+B+")",30*B)}return true};hideIbox=function(A){hideBG(A);window.onscroll=null};setOpacity=function(B,A){var C=getElem(B);C.style.opacity=A/10;C.style.filter="alpha(opacity="+A*10+")"};resizeImageToScreen=function(C){var B=new getPageSize1();var A=B.width-100;var D=B.height-100;if(C.width>A){C.height=C.height*(A/C.width);C.width=A;if(C.height>D){C.width=C.width*(D/C.height);C.height=D}}else{if(C.height>D){C.width=C.width*(D/C.height);C.height=D;if(C.width>A){C.height=C.height*(A/C.width);C.width=A}}}return C};maintPos=function(){var F=getElem("ibox");var E=getElem("ibox_w");var C=new getPageSize1();var D=new getScrollPos();var B=navigator.userAgent;var A=getPageSizeNew();if(B.indexOf("MSIE ")!=-1){E.style.width=C.width+"px"}if(B.indexOf("Opera/9")!=-1){E.style.height=document.body.scrollHeight+"px"}else{E.style.height=A[1]+"px"}posToCenter(F)};posToCenter=function(D){var F=new getScrollPos();var B=new getPageSize1();var C=new getElementSize(D);var A=Math.round(B.width/2)-(C.width/2)+F.scrollX;var E=Math.round(B.height/2)-(C.height/2)+F.scrollY;D.style.left=A+"px";D.style.top=E+"px"};getScrollPos=function(){var A=document.documentElement;this.scrollX=self.pageXOffset||(A&&A.scrollLeft)||document.body.scrollLeft;this.scrollY=self.pageYOffset||(A&&A.scrollTop)||document.body.scrollTop};getPageSize1=function(){var A=document.documentElement;this.width=self.innerWidth||(A&&A.clientWidth)||document.body.clientWidth;this.height=self.innerHeight||(A&&A.clientHeight)||document.body.clientHeight};function getPageSizeNew(){var C,A;if(window.innerHeight&&window.scrollMaxY){C=document.body.scrollWidth;A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){C=document.body.scrollWidth;A=document.body.scrollHeight}else{C=document.body.offsetWidth;A=document.body.offsetHeight}}var B,D;if(self.innerHeight){B=self.innerWidth;D=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientWidth;D=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientWidth;D=document.body.clientHeight}}}if(A<D){pageHeight=D}else{pageHeight=A}if(C<B){pageWidth=B}else{pageWidth=C}arrayPageSize=new Array(pageWidth,pageHeight,B,D);return arrayPageSize}getElementSize=function(A){this.width=A.offsetWidth||A.style.pixelWidth;this.height=A.offsetHeight||A.style.pixelHeight};getElem=function(A){return document.getElementById(A)};showModalWin=function(C,B,A){showBG();window.onscroll=new maintPos();window.onresize=new maintPos();showIbox(C,createIboxSize(B,A))};createIboxSize=function(B,A){var C=new Array();C.height=A;C.width=B;return C};