/** *	FILENAME:  cookie.js *	Functions: *		saveCookie(name, value, domain) *		readCookie(name) *		deleteCookie(name, domain) */
/** * Name: saveCookie * Description: * Set's the cookie with the given values, domain is optional */ function saveCookie(name, value) {    	var date = new Date();	//TODO(remove later):Temporary Fix:To override KIDS Header with TEACHERS DEFAULT Header	if (name == "header" && value == "kids") { value = "teacherDefault";}	date.setTime(date.getTime() + (365*100*24*60*60*1000)); //setting persistance cookie for 100 years	document.cookie = name + "="+value+";expires="+date.toGMTString()+"; path=/" + ((__domain__) ? "; domain=" + __domain__ : "");}
/** * Name: readCookie * Description: * Returns the value of the cookie with the given name */function readCookie(name) {	var name_value = 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(name_value) == 0)		{			return c.substring(name_value.length,c.length);		}	}	return null}
/** * Name: deleteCookie * Description: * Delete's the cookie with the given name, domain is optional */function deleteCookie(name) {		saveCookie(name, "", -1, __domain__)}/** * Name: cls * Description: * Clears the text field on focus for default value */function cls(field){	if (field.value == "Enter Email Address" || field.value == "Enter Your Email Address") field.value = "";}