﻿// JScript File

  var popUp = true;
  
  
  function doOnLoad(){
       
      for(var i = 0; i < document.links.length; i++)
      {
        //alert(document.links[i].onclick);
           if (document.links[i].onclick==null)
            { 
               document.links[i].onclick =popupOff;
              
            }
            else
            {
                //else call the popupOff from the already existing OnClick eventHandlers. This is done in the .js files.
            }
           
      }
      popUp = true;
}

   function popupOff(){
        popUp = false;
    }
    
   

function HideWaitWindow()
	{
		PleaseWaitWindow.style.display = "none";
		WaitShield.style.display = "none";
		WaitShield.style.width = "0px";
		WaitShield.style.height = "0px";
	}
	
	function DisplayWaitWindow()
	{
	   // var PleaseWaitWindow=document.getElementById("PleaseWaitWindow");
	    //var WaitShield=document.getElementById("WaitShield");
		var windowY = 0;
		var windowX = 0;
	
		var newLocationY = document.body.clientHeight;
		var newLocationX = document.body.clientWidth;
		
		WaitShield.style.width = "100%";
		WaitShield.style.height = "100%";
	
		PleaseWaitWindow.style.left = newLocationX + "px";
		PleaseWaitWindow.style.top = newLocationY + "px";
		PleaseWaitWindow.style.width = windowX + "px";
		PleaseWaitWindow.style.height = windowY + "px";
		WaitShield.style.display = "block";
		PleaseWaitWindow.style.display = "block"; 
		alert(PleaseWaitWindow.style.display);
	}
	
	function doOnUnLoad()
   {
      if(popUp){ 
            window.open("/windows/dasPopup.aspx","","width=520,height=500");
        };
   }
