// JavaScript Document
function readCookie(name) {
	//get the entire cookie header
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	
	//put each cookie in the array into a temp variable
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		
		//if replacing the name yilds a diff string, we have the cookie... return the value
		var newValue = c.replace(nameEQ, "");
		if (c != newValue) {
			return newValue;
		}
		
	}
	return "";
}	

