// Template Cookies and Overview animation functions// needs collapsexpand.js to workvar cookie_set = false;function writeCookie(name, value, hours){  var expire = "";  if(hours != null){    expire = new Date((new Date()).getTime() + hours * 3600000);    expire = "; expires=" + expire.toGMTString();	}	document.cookie = window.location.pathname + ":" + name + "=" + escape(value) + expire;}function readCookie(name){  var cookieValue = "";  var search = window.location.pathname + ":" + name + "=";  if(document.cookie.length > 0){     offset = document.cookie.indexOf(search);    if (offset != -1){       offset += search.length;      end = document.cookie.indexOf(";", offset);      if (end == -1) end = document.cookie.length;      cookieValue = unescape(document.cookie.substring(offset, end))    }  }  return cookieValue;}function deleteCookie(name) {	if ( readCookie(name) ) document.cookie = window.location.pathname + ":" + name + "=;expires=Thu, 01-Jan-1970 00:00:01 GMT";}//save the current state of features divs and a record of the visit for an hour.function saveState() {	writeCookie("visited", "yes", 1);	for (var i=1; i < 10; i++) {		writeCookie("prod_feature" + eval(i), getState("prod_feature" + eval(i)), 1);	}}var exptimer;var ovHgt = 1;var pauseTime = 500; // milliseconds to pause before expanding overview// function for animated expansion of the overviewfunction expOverview() {	clearTimeout(pausetimer);	var ov = document.getElementById("overview");	(ovHgt > 50)? ovHgt += 50 : ovHgt += ovHgt;	if (ovHgt > 450) { //this value depends on the intial height of the section.		clearTimeout(exptimer);		ov.style.height = "auto";		return false;	} else if (ovHgt == 8) { //this shifts the padding during the animation and not at the end		ov.style.padding = "10px";		ov.style.height = ovHgt+"px";		exptimer=setTimeout("expOverview()",50);	} else {		ov.style.height = ovHgt+"px";		exptimer=setTimeout("expOverview()",50);	}}function pauseExp() {		nullLinks(); // remove title hover text	var wrn = document.getElementById("ckstate");	var anchor_link = window.location.href.split("#")[1]; //get anchor link from URL string	writeCookie('test','none',1);	if (readCookie('test')) {	// check to see if cookies are disabled		wrn.style.display = "none";		cookie_set = true;		deleteCookie('test');	} else {		wrn.style.display = "block";		wrn.innerHTML = 'For a better browser experience, please enable cookies. <a href="javascript:void(0);" onmouseover="doPopUp(event, popup000, 280)" onmouseout="hideTip()" class="rollover">Why is this important?</a>';	}	var ov = document.getElementById("overview");	ov.style.display = "block";	if ((cookie_set && readCookie("visited") == "yes") || anchor_link != null) { //restore previous state of collapsable sections & skip animated opening		ov.style.padding = "10px";		ov.style.height = "auto";		ov.style.overflow = "visible";		for (var i=1; i < 10; i++) {			forceState(readCookie("prod_feature" + eval(i)), "prod_feature" + eval(i), "ex_title" + eval(i));		}		if (anchor_link != null) { // named anchor link present			if (findA(anchor_link)) {				var divId = document.anchors[findA(anchor_link)].parentNode.getAttribute("id");				if (divId != null) { // named anchor is within a div					var featNum = divId.substr(divId.lastIndexOf("e")+1);					forceState("block", divId, "ex_title" + eval(featNum)); // force expansion of div to show anchor				}			}			document.anchors[findA(anchor_link)].scrollIntoView(); //necessary for IE to position anchor at top of window		}	} else { // use default state of sections & animate the expansion of the overview		defaultState();		pausetimer=setTimeout("expOverview()", pauseTime);	}}function findA(aName) { // finds a specific anchor in the anchor array 	for (var i=0; i < document.anchors.length; i++) {		if (document.anchors[i].name == aName) return i;	}	return false;}