function hidediv(divname) {
	document.getElementById(divname).style.visibility = 'hidden';
	document.getElementById(divname).style.display = 'none'
}

function showdiv(divname) {
	document.getElementById(divname).style.visibility = 'visible';
	document.getElementById(divname).style.display = 'block'
}

function showhidediv(divname)
{
	if (document.getElementById(divname).style.visibility == 'hidden')
	{
		showdiv(divname);
	}
	else
	{
		hidediv(divname);
	}
}


function showhidehelpdiv(uid,divname)
{
	if (document.getElementById(divname).style.visibility == 'hidden')
	{
		showdiv(divname);
		disablehelptext(uid, divname, 0);
	}
	else
	{
		hidediv(divname);
		disablehelptext(uid, divname, 1);
	}
}

function disablehelptext(uid, helptext, val)
{
	var xmlHttp;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
    xmlHttp.open("GET","disablehelptext.php?val="+val+"&uid="+uid+"&helptext="+helptext,true);
    xmlHttp.send(null);

}

function newWindow(mypage, myname, title, w, h, scroll) {
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable';
	win = window.open(mypage, myname, winprops);
	//win.document.title = 'Help Tip for ' + title;
	if (parseInt(navigator.appVersion) >= 4)
	{
		win.window.focus();
	}
}

function hidediv_innerhtml(divname, spanname) {
	document.getElementById(divname).style.visibility = 'hidden';
	document.getElementById(divname).style.display = 'none'
	document.getElementById(spanname).innerHTML='[+]';
}

function showdiv_innerhtml(divname, spanname) {
	document.getElementById(divname).style.visibility = 'visible';
	document.getElementById(divname).style.display = 'block'
	document.getElementById(spanname).innerHTML='[-]';
}

function showhidediv_innerhtml(divname, spanname)
{
	if (document.getElementById(divname).style.visibility == 'hidden')
	{
		showdiv_innerhtml(divname, spanname);
	}
	else
	{
		hidediv_innerhtml(divname, spanname);
	}
}
