edu=window.edu||{};edu.Overlay=new function(){this.getWindowSize=function(){var G,F;if(self.innerHeight){G=self.innerWidth;F=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){G=document.documentElement.clientWidth;F=document.documentElement.clientHeight}else{if(document.body){G=document.body.clientWidth;F=document.body.clientHeight}}}return[G,F]};var C,E,D;var B=[0,0];this.Enabled=false;this.Show=function(L,K,H){if(this.Enabled){this.Hide()}if(!C){C=$("<div></div>").attr("id","overlay").css({position:"fixed",top:0,"z-index":200,width:"100%"}).get(0);E=$("<div></div>").hide().get(0);C.appendChild(E)}$(C).css({"background-color":K||"#000","opacity":H||0.5});D=L;$("#aspnetForm").get(0).appendChild(C);$("#aspnetForm").get(0).appendChild(L);C.style.display="block";this.Enabled=true;B=this.getWindowSize();C.style.height=(B[1]+"px");L.style.display="block";L.style.zIndex="201";L.style.position="fixed";var G=!isNaN(parseInt(L.style.width))?parseInt(L.style.width):300;var F=!isNaN(parseInt(L.style.height))?parseInt(L.style.height):300;L.style.top=((B[1]/2)-(F/2))+"px";L.style.left=((B[0]/2)-(G/2))+"px";var I=this;var J=function(){var M=I.getWindowSize();if(B[1]!=M[1]){B=M;C.style.height=(B[1]+"px");L.style.top=((B[1]/2)-(F/2))+"px";L.style.left=((B[0]/2)-(G/2))+"px"}if(I.Enabled){setTimeout(J,500)}};J()};this.Hide=function(){if(this.Enabled){this.Enabled=false;D.style.display="none";C.style.display="none";E.appendChild(D)}};this.ShowWait=function(F){if($("#overlayWait").length==0){$("<div></div>").css({display:"none",width:400,height:66,color:"#000","font-size":"25px","text-align":"center"}).attr("id","overlayWait").html('<img src="/Images/ajax-loader.gif"><br />'+(F||"Please Wait")).appendTo("body")}edu.Overlay.Show($("#overlayWait").get(0),"#FFF")};function A(H,F){if($("#eduOverlay").length==0){var G="";if($("#ctl00_MainStyle").attr("href")=="/Theme/EduDesk2.css"){G="/Controls/OverlaySkin/Benchmark.css"}else{if($("#ctl00_MainStyle").attr("href")=="/Theme/TestWizard.css"){G="/Controls/OverlaySkin/TestWizard.css"}else{G="/Controls/OverlaySkin/Wizard.css"}}edu.Overlay.ShowWait();$("head").append("<link>");css=$("head").children(":last");css.attr({rel:"stylesheet",type:"text/css",href:G});$("<div></div>").appendTo("body").load("/Controls/OverlaySkin/",function(){H.apply(edu.Overlay,F)});return false}}this.ShowThemed=function(G){if(A(this.ShowThemed,[G])===false){return}var M=$("#"+G);var K=$("#"+G+"_content");var J=$("#"+G+"_icon");var L=parseInt(M.css("width"));var I=parseInt(M.css("height"));$("#eduOverlay").css({width:L,height:I});var H=$("#eduOverlay_content");H.children().each(function(){$(this).hide()});H.css("height",I-70);K.show().appendTo(H);var F=$("#eduOverlay_icons");F.children().each(function(){$(this).hide()});J.show().appendTo(F);edu.Overlay.Show($("#eduOverlay").get(0))};this.Alert=function(I,J,H,G,F){if(A(this.Alert,arguments)===false){return}$("#eduOverlayAlert").css({width:H||500,height:G||100});$("#eduOverlayAlert_content").html(I);$("#eduOverlayAlertOk").html(F||"Ok");$("#eduOverlayAlertOk").unbind().click(function(){edu.Overlay.Hide();if(J){J()}});edu.Overlay.ShowThemed("eduOverlayAlert")};this.Confirm=function(H,K,G,F,J,I){if(A(this.Confirm,arguments)===false){return}$("#eduOverlayConfirm").css({width:G||"500px",height:F||"100px"});$("#eduOverlayConfirm_content").html(H);$("#eduOverlayConfirmYes").text(J||"Yes").unbind().click(function(){edu.Overlay.Hide();K(true)});$("#eduOverlayConfirmNo").text(I||"No").unbind().click(function(){edu.Overlay.Hide();K(false)});edu.Overlay.ShowThemed("eduOverlayConfirm")}};