// cookies.js
var today = new Date();
var expiry = new Date(today.getTime() + 1 * 24 * 60 * 60 * 1000);

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;
	if( (document.cookie == null) || (document.cookie.length == null)){
		return null;
	}
	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" : "");
	}
	
/*

<script language="javascript" type="text/javascript">
function showUnder(scale) {
	var expdate = new Date ();
	var surveyCookieName = "TRIPODPOPUNDER";
 	var surveyPercentOffered = 100;
 	var surveyLocation = "/adm/popunder/tripod_popunder.html?"+"member_name=lhsalumni&path=index.html&client_ip=216.6.133.57&ts=1041051250&ad_type=EMBED&category=jobs&search_string=livingston%20high%20school&id=aac31927a4eff498131e04809f630946";
 	var popupNewWindow = true;

  	expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000));
	var stored_value = GetCookie(surveyCookieName);
	if (stored_value == null){
		SetCookie(surveyCookieName, "under", expdate, "/", ".tripod.com");
		trUnder = window.open(surveyLocation,'under','height=300,width=720,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
		trUnder.blur();
  	}
}

function showInsite(){
	var expdate = new Date ();
	var surveyCookieName = "TRIPODINSITE";
 	var percentOfferedSurvey = 100;
 	var showSurvey = "livingston%20high%20school";
 	var surveyLocation = "/adm/redirect/cgi/adm/popunder/insite.html?"+"member_name=lhsalumni&path=index.html&client_ip=216.6.133.57&ts=1041051250&ad_type=EMBED&category=jobs&search_string=livingston%20high%20school&id=aac31927a4eff498131e04809f630946"+"&member_url="+document.location;
 	var popupNewWindow = true;
	

  	expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000));
	var stored_value = GetCookie(surveyCookieName);
	if (stored_value == null && showSurvey != "(none)"){
		SetCookie(surveyCookieName, "insite", expdate, "/", ".tripod.com");
		trInsite = window.open(surveyLocation,'insite','height=300,width=450,toolbar=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
		trInsite.blur();
  	}
}

showUnder();
showInsite();
< /script>
*/