// JavaScript Document
function changetitle(title,user,smalltext,helplink)
{
	parent.window.document.getElementById("page_heading").firstChild.nodeValue=title;
	if (user!="") {
		parent.window.document.getElementById("page_user").firstChild.nodeValue="Username: "+user;
		// parent.window.document.getElementById("log_button").src="logout.gif";
	}
	if (user=="NONE") {
		parent.window.document.getElementById("page_user").firstChild.nodeValue="";
		// parent.window.document.getElementById("log_button").src="login.gif";
	}

	if (smalltext) {
		parent.window.document.getElementById("page_heading_small").firstChild.nodeValue=smalltext;
	}
	if (helplink)
	{
		parent.window.document.getElementById("helplink").href="help.php?page="+helplink;
		parent.window.document.getElementById("helplink").style.visibility="visible";
	}
	else
	{
		parent.window.document.getElementById("helplink").style.visibility="hidden";
	}
	parent.parent.window.document.title="FACE Project - "+title;
}

function menu_over(which)
{
	document.getElementById(which).style.backgroundColor='#EEEEEE';
	document.getElementById(which).style.color='#333333';
}

function menu_out(which)
{
	document.getElementById(which).style.backgroundColor='';
	document.getElementById(which).style.color='';
}

function logout()
{
	d=confirm("Are you sure you want to log out?");
	if (d)
	{
		parent.frames["leftFrame"].islogged=0;
		parent.frames['mainFrame'].document.getElementById('innerframe').src="index.php";
	}
}

/* function loginout()
{
	if (parent.frames["leftFrame"].islogged==1)

	{
		d=confirm("Are you sure you want to log out?");
		if (d)
		{
			parent.frames["leftFrame"].islogged=0;
			parent.frames['mainFrame'].document.getElementById('innerframe').src="index.php";
		}
	}
	else
	{
		parent.frames['mainFrame'].document.getElementById('innerframe').src="index.php";
	}
}
*/

