//THIS WAS FOR THE GENERAL SURVEY POP-UP
//if (readCookie("visitstatus") != "beenhere") {
//	createCookie("visitstatus","beenhere",1000)
//	window.open("/survey.htm","Survey_Popup","height=300,width=450,status=no,toolbar=no,menubar=no");
//}
eraseCookie("visitstatus");

//THIS WAS FOR THE TRAVELING EXHIBITS SURVEY POP-UP
//if (readCookie("TEsurvey_popup") != "viewed") {
//	createCookie("TEsurvey_popup","viewed",1000)
//	window.open("/texhib-survey.htm","Survey_Popup","height=300,width=450,status=no,toolbar=no,menubar=no");
//}
eraseCookie("TEsurvey_popup");


function createCookie(name,value,days)
{
	if (days)
	{
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name)
{
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++)
	{
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name)
{
	createCookie(name,"",-1);
}


function openWindow(url, name, param)
{
    popupWin = window.open(url, name, param);
}

function sendevent(event,action,validate)
{
	var ret = true;

	if(typeof(validate) != 'undefined')
	{
		if (validate != '')
			eval(" ret=" + validate + "()");
	}
	if (ret == true)
	{
		document.forms[0].event.value = event;
		document.forms[0].action = action;
		document.forms[0].method = 'post';
		document.forms[0].submit();
		return(true);
	}
	return(false);
}