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 ShowCard() {
	if (document.booking_form.card.checked == true) { 
		document.getElementById("cardblock").style.display = "block";
	} else {
		document.getElementById("cardblock").style.display = "none";		
	}
}

function exposeItem(id)
{    
   obj = document.getElementById(id);
   if (obj != null)
    obj.style.display = (obj.style.display == "" ? "none" : "");            
}

