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 SetCookie(cookieName,cookieValue,nHours) {
 var today = new Date();
 var expire = new Date();
 if (nHours==null || nHours==0) nHours=1;
 expire.setTime(today.getTime() + 3600000*nHours);
 document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString()+";path=/";
}
function TestCookie () {
 if (ReadCookie('ezbootest') == "")
 {
    var testValue=Math.floor(1000*Math.random());
    SetCookie('ezbootest',testValue);
    if (testValue==ReadCookie('ezbootest')) 
       return "yes"
    else
       return "no"
 }
 else
 {
    return "yes"
 }
}

