//popUp the Card Window
	function popWin(winPop,winName,winProps){
		var screenW = (screen.width) -20;
		var screenC = (screenW /2) - 330;
		var propStrg = winProps + screenC;
		open(winPop,winName,propStrg);
}

ns4 = (document.layers)? true:false 
ie4 = (document.all)? true:false 

// Show/Hide functions for non-pointer layer/objects 
function show(id) { 
   try{
        if (ns4) document.layers[id].visibility = "show" 
        else document.all[id].style.visibility = "visible" 
        document.all[id].style.display = "block"
    }catch(error){
    
    }
} 

function hide(id) { 
   try{
    if (ns4) document.layers[id].visibility = "hide" 
    else document.all[id].style.visibility = "hidden" 
    document.all[id].style.display = "none"
  }catch(error){
    //alert('error');
  }
} 

  function findLoc(obj) {
        var curleft = curtop = 0;
        if(obj.length > 0)
            obj = document.getElementById(obj);
        if (obj.offsetParent) {
            curleft = obj.offsetLeft
            curtop = obj.offsetTop
            while (obj = obj.offsetParent) {
                curleft += obj.offsetLeft
                curtop += obj.offsetTop
            }
        }
        return [curleft,curtop];
    }

function showWait(obj, id){
    setOverlayHeight();
	e=document.getElementById('overlay');
	e.style.visibility='visible';
	e=document.getElementById(id);

    if(null != obj)
    {
        var clickPos = findLoc(obj);
        e.style.top = (clickPos[1] - 100) + 'px';
        if(clickPos[0] > 350 )
            e.style.left = (clickPos[0] - 250) + 'px';
        else
            e.style.left = clickPos[0] + 'px';
     }
    e.style.visibility='visible';     
} 

function showWaitHome(id){
    setOverlayHeight();
	e=document.getElementById('overlay');
	e.style.visibility='visible';
	e=document.getElementById(id);
    e.style.visibility='visible';
} 

function setOverlayHeight()
{
    var overlay = document.getElementById('overlay');
    var htmlheight = document.body.scrollHeight; 
    var windowheight = window.screen.height; 
    if(null != null != overlay)
    {
        if ( htmlheight > windowheight )
        {
            overlay.style.height = htmlheight + 'px';
        }
        else
            overlay.style.height = windowheight + 'px';
    }
}

