<!--Begin Hiding

var bigq = "";
var south = "";

function vars() {
	
	if (parent.document.location.search) {
		callingURL=parent.document.location.search;
		if (callingURL.indexOf('?') != -1) {
			bigq=callingURL.substring(callingURL.lastIndexOf('?')+1,callingURL.length);
		}
	}
	
}

function css() {
	//vars();
	if (bigq == "pf") {
		document.writeln('<link rel=\"StyleSheet\" type=\"text\/css\" href=\"' + level + 'css\/pf.css\">');
	}
	else {
		document.writeln('<link rel=\"StyleSheet\" type=\"text\/css\" href=\"' + level + 'css\/main.css\">');
	}
	document.write('<body marginheight=0 marginwidth=0 leftmargin=0 topmargin=0 rightmargin=0>');
}

function header() {
	if (bigq == "pf") {
		document.write('<table width=\"650\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">'
		+ '<tr><td width=\"50%\" align=\"left\"><a class=\"mini\" href=\"' + parent.document.location + 'no\">Back<\/a><\/td>'
		+ '<td width=\"50%\" align=\"right\"><a class=\"mini\" href=\"javascript:window.print()\">Print<\/a><\/td><\/tr>'
		+ '<tr><td colspan=\"2\" width=\"100%\" align=\"center\"><a class=\"logo\" href=\"' + level + 'index.htm">EquinoxEmpires<\/a><\/td><\/tr><\/table><br>'
		+ '<table width=\"650\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td>');
	}
	else {
		document.write('<table background=\"' + level + 'images\/topsoil.jpg\" width=\"100%\" height=30 cellpadding=\"0\" cellspacing=\"0\" border=\"0\">');
		document.write('<tr><td valign=\"top\" align=\"left\" width=300>');
		document.write('<img border=\"0\" src=\"' + level + 'images\/ee_logo.jpg\" height=\"30\" width=\"300\" alt=\"Equinox Empires\"><\/td>');
		document.write('<td align=left valign=top width=1><img border=\"0\" src=\"' + level + 'images\/topsoil.jpg\" height=\"30\" width=\"10\" alt=\" \">'
		+ '<\/td>');

		if (document.layers) {
  			document.write('<td align=right valign=top> ');
  		}
  		else {
  			document.write('<td valign=top align=right width=100%>');
  		}
		document.write('<a href=\"' + level + 'contact.htm\"><img border=0 src="' + level + 'images/contact_.jpg\" height=30 width=30 alt=\"Contact Us\"><\/a><\/td><\/tr><\/table>');
		//begin main table
		document.write('<center>');
	}
}

function footer() {
	
	if (bigq == "pf") {
		document.write('<\/td><\/tr><tr><td class=\"mini\"><br>&nbsp;<br>All materials herein, unless otherwise specified, are &#169; 2001&#150;2004 <a href=\"mailto:equinoxempires@equinoxempires.com\" class=\"mini\">EquinoxEmpires<\/a>.<\/td><\/tr><\/table>');
	}
	else {
		document.write('<\/center><br><table class=\"mini\" ');
		if (document.layers) {
			document.write('width=\"101%\"');
		}
		else {
			document.write('width=\"100%\"');
		}
		document.write(' cellpadding=\"0\" cellspacing=\"0\" border=\"0\">'
		//+ '<tr><td colspan=\"3\" class=\"mini\" align=\"center\"><hr><\/td><\/tr>'
		//+ '<tr><td width=\"100\" align=\"left\">&nbsp;&nbsp;<a class=\"minia\" href=\"javascript:history.go(-1)\">Back<\/a><\/td><td width=\"200\"align=\"left\"><span class=\"mini\">Last Modified: '
		//+ '&nbsp;' + last_mod
		//+ '<\/span><\/td><td align=\"right\"><span class=\"mini\" align=\"right\">Location: &nbsp;http:\/\/www.equinoxempires.com'+location.pathname+'&nbsp;&nbsp;<\/span><\/td><\/tr>'
		+ '<tr><td colspan=\"3\" class=\"mini\" align=\"center\"><hr width=50%><\/td><\/tr>'
		+ '<tr><td colspan=\"3\" class=\"mini\" align=\"center\">');
		if (south == "1") {
			document.write('These pages are for informative use only at the discretion of the person visiting them. They are not an official South University publication, nor are they affiliated with that institution.<br>');	
		}
		document.write('All writings, names, and materials herein, unless otherwise specified, are &#169; 2001&#150;2007 <a href=\"mailto:equinoxempires@equinoxempires.com\" class=\"minia\">Equinox Empires<\/a>.<br>'
		+ 'This site has been optimized for display settings of 800x600 or greater.<br>This site has been optimized for use with <a href=\"http:\/\/www.microsoft.com\" class=\"minia\">Microsoft Internet Explorer<\/a> 4.x+ or <a href=\"http:\/\/www.netscape.com\" class=\"minia\">Netscape Navigator<\/a> 7.x+.<br>'
		+ 'You can read our <a href=\"' + level + 'security.htm\" class=\"minia\">Privacy/Security Statement here<\/a>.<\/table>');
	}
	
	theObjects = document.getElementsByTagName("object");
	for (var i = 0; i < theObjects.length; i++) { 
		theObjects[i].outerHTML = theObjects[i].outerHTML; 
	}
	theEmbeds = document.getElementsByTagName("embed");
	for (var i = 0; i < theEmbeds.length; i++) { 
		theEmbeds[i].outerHTML = theEmbeds[i].outerHTML; 
	}
	
}

function imageChange(imageID,imageName,imageID2,imageName2) { 
	document.images[imageID].src = eval(imageName + ".src");
	document.images[imageID2].src = eval(imageName2 + ".src");
}

function imageChange2(imageID3, imageName3) {
	document.images[imageID3].src = eval(imageName3 + ".src");
}

function newWindow(pageref) {
remoteWindow=window.open(level + pageref,'remoteWin','top=20,left=20,width=335,height=220,toolbar=no,location=no,scrollbars=yes');
}

function getCookieVal(offset) {
	var endstr = document.cookie.indexOf(";",offset);
	if (endstr == -1) { endstr = document.cookie.length; }
	return unescape(document.cookie.substring(offset, endstr));
}

function getCookie(name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {
		var j = i + alen;
		if (document.cookie.substring(i,j) == arg) {
			return getCookieVal(j);
		}
		i = document.cookie.indexOf(" ",i) + 1;
		if (i == 0) break;
	}
	return null;
}

function deleteCookie(name,path,domain) {
	if (getCookie(name)) {
		document.cookie = name + "=" + 
		((path) ? "; path=" + path : "") + 
		((domain) ? "; domain=" + domain : "") + 
		"; expires=Thu, 01-Jan-70 00:00:01 GMT";
	}
}

function setCookie(name, value,expires,path,domain,secure) {
	document.cookie = name + "=" + escape(value) + 
	((expires) ? "; expires=" + expires.toGMTString() : "") + 
	((path) ? "; path=" + path : "") + 
	((domain) ? "; domain=" + domain : "") + 
	((secure) ? "; secure" : "");
}

function searchIt() {
	if(document.searchform.dest.options[document.searchform.dest.selectedIndex].value == 'site') {
		location.href=level + "search.htm" + "?srch=" + document.searchform.srch.value; 
	}
	else if(document.searchform.dest.options[document.searchform.dest.selectedIndex].value == 'music') {
		location.href=level + "records/shop.htm" + "?srch=" + document.searchform.srch.value + "&cat=&prc=&pres=lt&col=-1";
	} else {
		location.href=level + "shop.htm" + "?srch=" + document.searchform.srch.value + "&cat=&prc=&pres=lt&col=-1"; 
	}
}

function logoff() {
	tempstr = sn + pw;
	tempstr = tempstr.toLowerCase();
	setCookie(tempstr, getCookie("login"), expiry);
	deleteCookie("login");
	document.location = document.location;
}

function logtest() {
	if (getCookie("login") != null) {
		sn = getCookie("login").substring(getCookie("login").indexOf('sn=') + 3, getCookie("login").indexOf('|'));
		pw = getCookie("login").substring(getCookie("login").indexOf('pw=') + 3, getCookie("login").indexOf('=pw|') - 3);
		return true;
	}	
	else return false;	
}

function gap() {
	document.write('<img border=\"0\" src=\"' + level + 'images\/sideblank.jpg\" width=\"120\" height=\"1\" align=\"top\" alt=\" \"><br>');	
}
function dometop() {
	document.write('<img border=\"0\" src=\"' + level + 'images\/dome_top.jpg\" width=\"120\" height=\"30\" align=\"top\" alt=\" \"><br>');	
}
function domebot() {
	document.write('<img border=\"0\" src=\"' + level + 'images\/dome_bot.jpg\" width=\"120\" height=\"30\" align=\"top\" alt=\" \"><br>');	
}
function domebar() {
	document.write('<img border=\"0\" src=\"' + level + 'images\/sidebar.jpg\" width=\"120\" height=\"1\" align=\"top\" alt=\" \"><br>');	
}


function petitionMe(contactForm) {
	if (contactForm.fname.value == "") {
		alert("Invalid first name!");
		contactForm.fname.select();
		contactForm.fname.focus();
	} else if (contactForm.lname.value == "") {
		alert("Invalid last name!");
		contactForm.lname.select();
		contactForm.lname.focus();
	} else if (contactForm.city.value == "") {
		alert("Invalid city name!");
		contactForm.city.select();
		contactForm.city.focus();
	} else if (contactForm.state.value == "") {
		alert("Invalid state choice!");
		contactForm.state.select();
		contactForm.state.focus();
	} else {
		contactForm.submit();
	}
}

function submitMe(contactForm) {
	if (!validEmailMe(contactForm.econtact.value)) {
		alert("Invalid recipient e-mail address!");
		contactForm.econtact.select();
		contactForm.econtact.focus();
	} else if (!validEmailMe(contactForm.scontact.value)) {
		alert("Invalid sender e-mail address!");
		contactForm.econtact.select();
		contactForm.econtact.focus();
	} else if (contactForm.sender.value == "") {
		alert("Invalid sender name!");
		contactForm.sender.select();
		contactForm.sender.focus();
	} else if (contactForm.recip.value == "") {
		alert("Invalid recipient name!");
		contactForm.recip.select();
		contactForm.recip.focus();
	} else {
		contactForm.submit();
	}
}	

function validEmailMe(email) {
	invalidChars = " /:,;";
	if (email == "") {
		return false;
	}
	if (email == "name@address.com") {
		return false;
	}
	
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i);
		if (email.indexOf(badChar,0) > -1) {
			return false;
		}
	}
	atPos = email.indexOf("@",1)
	if (atPos == -1) {
		return false;
	}
	if (email.indexOf("@",atPos+1) != -1) {
		return false;
	}
	periodPos = email.indexOf(".",atPos)
	if (periodPos == -1) {
		return false;
	}
	if (periodPos+3 > email.length) {
		return false;
	}
	return true;
}

function feedMe(str2) {
	if (str2 != null) {
		location.href = level + "feedback.htm?ordnum=" + str2;
	} else {
		location.href = level + "feedback.htm";	
	}
}

function redir(form) { 
	var index=form.dest.selectedIndex;
	location='http:\/\/www.equinoxempires.com\/' + form.dest.options[index].value;
}

//-->