
// sets or reads a cookie to determine what word to highlight
// (c) Craig Housley. Updated 24-May-2005

	var highlight = getcookieval("highlight=")
	
	var expdate = new Date();
	expdate.setTime(expdate.getTime() + (1000*3600*1) ); // 1000ms*3600s*1h = 1hr
			
	function setCookie(word, loc) {
		document.cookie = 'highlight=' + word + '; expires='  + expdate.toGMTString() + '; path=/';
		window.location = loc;
	}

	function getcookieval(offset) {
        var start = document.cookie.indexOf(offset)+offset.length
		var end = document.cookie.indexOf(";", start)
		if (end == -1) end = document.cookie.length
        return unescape(document.cookie.substring(start, end))
	}
