function photoLandscape(theURL,winName,features) { 
  window.open(theURL,'photolandscape','width=580,height=435');
}

function openExternal(theURL){
	var external=window.open(theURL,'external','width=760,height=450,toolbar,location,directories,status,scrollbars,menubar,resizable,');
	external.focus();
}

function openMatrix(theURL){
	var matrix=window.open(theURL,'video','width=400,height=280,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=no,');
	matrix.focus();
}

function openGame(theURL){
	var game=window.open(theURL,'game','width=127,height=127,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=no,');
	game.focus();
}

function openHelp(theURL){
	var help=window.open(theURL,'help','width=275,height=125,toolbar=no,location=no,directories=no,status=no,scrollbars=no,menubar=no,resizable=no,');
	help.focus();
}

function submitonce(theform)
{
//if IE 4+ or NS 6+
	if (document.all||document.getElementById)
	{
		//screen thru every element in the form, and hunt down "submit" and "reset"
		for (i=0;i<theform.length;i++)
		{
			var tempobj=theform.elements[i]
			if(tempobj.type.toLowerCase()=="submit"||tempobj.type.toLowerCase()=="reset")
				//disable em
				tempobj.disabled=true
		}
	}
}

function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return "";
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

function SetCookie(cookieName,cookieValue,nDays) {
 var today = new Date();
 var expire = new Date();
 if (nDays==null || nDays==0) nDays=1;
 expire.setTime(today.getTime() + 3600000*24*nDays);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString();
}