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=(L.style.width)?parseInt(L.style.width):300;var F=(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{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(J){if(A(this.ShowThemed,[J])===false){return}var K=$("#"+J);var G=$("#"+J+"_content");var F=$("#"+J+"_icon");$("#eduOverlay").css({width:K.css("width"),height:K.css("height")});var I=$("#eduOverlay_content");I.children().each(function(){$(this).hide()});I.css("height",parseInt(K.css("height"))-70);G.show().appendTo(I);var H=$("#eduOverlay_icons");H.children().each(function(){$(this).hide()});F.show().appendTo(H);edu.Overlay.Show($("#eduOverlay").get(0))};this.Alert=function(H,I,G,F){if(A(this.Alert,arguments)===false){return}$("#eduOverlayAlert").css({width:G||500,height:F||100});$("#eduOverlayAlert_content").html(H);$("#eduOverlayAlertOk").unbind().click(function(){edu.Overlay.Hide();if(I){I()}});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")}};