function showPopup(ctrl, parentCtrl, leftShift, topShift) 
{ 
    var leftCoord = 0;
    var topCoord = 0;
    
    parentCtrl = $get(parentCtrl);
    var parent = parentCtrl;
    while (parent) 
    {
        leftCoord += parent.offsetLeft;
        topCoord += parent.offsetTop;
        parent = parent.offsetParent;
    }

    leftCoord += parseInt(leftShift);
    topCoord += parseInt(topShift);
     
    var popupDiv = $get(ctrl);

    popupDiv.style.position = 'absolute';
    popupDiv.onmouseover = function() { if (parentCtrl.timeout) clearTimeout(parentCtrl.timeout) }
    popupDiv.onmouseout = function() { parentCtrl.timeout = setTimeout('hidePopup("' + ctrl + '")', 500) };
        
    popupDiv.style.left = leftCoord + 'px';
    popupDiv.style.top = topCoord + 'px';
    popupDiv.className = '' ;
    parentCtrl.onmouseout = function() { parentCtrl.timeout = setTimeout('hidePopup("' + ctrl + '")', 500) };
    
	return void (0);
}

function hidePopup(ctrl) 
{
    $get(ctrl).className = 'DisplayNone';
}


function exposeItem(id)
{    
   obj = document.getElementById(id);
   if (obj != null)
    obj.style.display = (obj.style.display == "" ? "none" : "");            
}

function openNewWin(url, name, scr, w, h)
{
	var w1 = window.open(url, name, 'toolbar=no,location=no,status=no,menubar=no,resizable=yes,directories=no,scrollbars=yes,width='+w+',height='+h+'');
	w1.focus();
}



IE = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ));
var MapWin;
function OpenMap(url, width, height) {
if (IE && (MapWin)) { MapWin.close(); }
	else {
		MapWin=window.open (url, "Map", "width=1,height=1");
		MapWin.close();
	}
MapWin=window.open (url, "Map", "width="+width+",height="+height+",resizable=0");
MapWin.focus();
}
