
var __hdlWin=null
function WindowDetail(URL,WScale,HScale)
{
   
	W=Math.round(screen.availWidth * WScale)
	H=Math.round(screen.availHeight * HScale)
	L=screen.availWidth - W -50
	
	if (__hdlWin != null && ! __hdlWin.closed) {
		__hdlWin.focus()
	}
	else
		__hdlWin=window.open(URL,null,"toolbar=0,scrollbars=1,resizable=1,width=" + W + ",Height=" + H + ",top=10,left="+L)
}

function WindowDetailFixed(URL,W,H)
{      
	L=screen.availWidth - W -50
	if (__hdlWin != null && ! __hdlWin.closed) {
		__hdlWin.focus()
	}
	else
		__hdlWin=window.open(URL,null,"toolbar=0,scrollbars=1,resizable=1,width=" + W + ",Height=" + H + ",top=10,left="+L)
}


function EnterToClick(enterObjId, clickObjId)
{
	//return;
	
	var el =  document.getElementById(enterObjId)
	//alert("Hi "+enterObjId)
	if (el)
	{
	if (el.addEventListener)
		el.addEventListener("keypress", function(event) {
			if (event.keyCode==13)
			{
				document.getElementById(clickObjId).click();
				return false;
			}
		}, true);
	else
		el.attachEvent('onkeypress', function() {
			if (event.keyCode==13)
			{
				document.getElementById(clickObjId).click();
				return false;
			}
		});
		
	}
	else
	{return;}
    
}



