/***********************************************************************************************/
/******** Helper Methods  **********************************************************************/
/***********************************************************************************************/

/***Get object for the given object name regardless of browsers*************/ 
/***Should be used instead of getElementById*********************************/
function getEl(id)
{
	if (document.getElementById)  {
		return document.getElementById(id);
	} else if (document.all)  {
		return document.all[id];
	} else if (document.layers)  {
		return document.layers[id];
	}
}

/***Use when you want to refresh the parent page. ***************************/ 
function refreshParent()
{
	var p = window.parent;
	//IE browser
	//if(p == null) if((p = window.document.parentWindow) != null) p = p.parent;
	if(p == null) return;
	//p.refesh();
	p.location.reload();
}

/***Use when you want to show an element ***************************/ 
function hDisplayShow(lname)
{
	getEl(lname).style.display = "block";
}


/***Use when you want to hide an element. ***************************/ 
function hDisplayHide(lname)
{
	getEl(lname).style.display = "none";
}  


/***Use when you want to open a popup window. Added 10/17/2007 - Rizky *******/ 
function openWindow(which, name, width,  height)
{
if (width == null)
{
width = 480;
}
if (height == null)
{
height = 320;
}
	Window=window.open(which, name,"width="+width +",height=" + height +",status=yes,scrollbars=yes,resizable=yes,location=0,menubar=yes,toolbar=no");
	Window.focus();
}

    var screenWidth, screenHeight;
	if (self.innerHeight) // all except Explorer
	{
		screenWidth = self.innerWidth;
		screenHeight = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		screenWidth = document.documentElement.clientWidth;
		screenHeight = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		screenWidth = document.body.clientWidth;
		screenHeight = document.body.clientHeight;
	}
