	function ToggleDisplay(Items)
	{
		if ((document.getElementById(Items).style.display == "") || (document.getElementById(Items).style.display == "none"))	
		{
			document.getElementById(Items).style.display = "block";
			document.getElementById(Items).style.visibility = "visible";
		}
		else 
		{
			document.getElementById(Items).style.display = "none";
			document.getElementById(Items).style.visibility = "hidden";
		}
	}
	function fPopupWindow(location, popW, popH)
	{
		var w = 480, h = 340
		if (document.all) 
		{
			/* the following is only available after onLoad */
			w = document.body.clientWidth;
			h = document.body.clientHeight;
		}
		else if (document.layers) 
		{
			w = window.innerWidth;
			h = window.innerHeight;
		}
		var leftPos = (w-popW)/2, topPos = (h-popH)/2;		
		popup = window.open(location,'submitter','width=' + popW + ',height=' + popH + ',scrollbars=0,top=' + topPos + ',left=' + leftPos);            
	}

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=");
  if (c_start!=-1)
    {
    c_start=c_start + c_name.length+1;
    c_end=document.cookie.indexOf(";",c_start);
    if (c_end==-1) c_end=document.cookie.length;
    return unescape(document.cookie.substring(c_start,c_end));
    }
  }
return "";
}

function setCookie(c_name,value,hour)
{
var exdate=new Date();
exdate.setDate(exdate.getDate());
exdate.setHours(hour);
exdate.setMinutes(00);
exdate.setSeconds(00);
document.cookie=c_name+ "=" +escape(value)+
((hour==null) ? "" : ";expires="+exdate.toGMTString());
}

function checkCookie()
{
username=getCookie('username');
if (username!=null && username!="")
  {
  alert('Welcome again '+username+'!');
  }
else
  {
  username=prompt('Please enter your name:',"");
  if (username!=null && username!="")
    {
    setCookie('username',username,365);
    }
  }
}	
