function ReadCookie(cookieName) {
 var theCookie=""+document.cookie;
 var ind=theCookie.indexOf(cookieName);
 if (ind==-1 || cookieName=="") return ""; 
 var ind1=theCookie.indexOf(';',ind);
 if (ind1==-1) ind1=theCookie.length; 
 return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

function checkForEmail(defaultText, txtBoxId, checkBoxId) {
 defaultText = (defaultText == null) ? '' : defaultText;
 txtBoxId =  (txtBoxId == null) ? 'cEmail1' : txtBoxId;
 txtBox = document.getElementById(txtBoxId + '');
 checkBoxId =  (checkBoxId == null) ? 'rememberMe' : txtBoxId;
 
 if (ReadCookie('customerEmailSaved') == '' ) {
 	txtBox.value = defaultText;
 } else {
 	txtBox.value = ReadCookie('customerEmailSaved');
	document.getElementById(checkBoxId).checked = true;
 }
 
}
