var DHTML = (document.getElementById || document.all || document.layers);
    
function getObj(name)
{
	if (document.getElementById)
	{
		this.obj = document.getElementById(name);
		this.style = document.getElementById(name).style;
	}
	else if (document.all)
	{
		this.obj = document.all[name];
		this.style = document.all[name].style;
	}
		else if (document.layers)
	{
		this.obj = document.layers[name];
		this.style = document.layers[name];
	}
}

function invi(selectedlayer,flag)
{
	if (!DHTML) return;
	var x = new getObj(selectedlayer);
	x.style.display = (flag) ? 'none' : 'block'
}


function openWindow(URL,winWidth,winHeight)
{
	var openWidth;
	var openHeight;

	if (winWidth > 0)
	{
		openWidth = winWidth;
		openHeight = winHeight;
		strSize = ",width=" + openWidth + ",height=" + openHeight + ",top=200,left=150";
	}
	else
	{
		openWidth = screen.width - 15;
		openHeight = screen.Height - 65;
		strSize = ",width=" + openWidth + ",height=" + openHeight + ",top=0,left=0";
	}
	window.open(URL,"","location=no,menubar=no,directories=no,toolbar=no,status=no,resizable=yes,scrollbars=yes" + strSize);
}