TheCookieName ='Sanisty.V.Told.Billa';


function WriteOneBigCookie () {
var blinko = prompt('How many days would you like this cookie stored?','');
numDays = blinko;var expire = new Date ();
expire.setTime (expire.getTime() + (numDays * 24 * 3600000));
var WholeCookie=expire;
WholeCookie=WholeCookie+'`+document.TestForm1.area.value;
WholeCookie=WholeCookie+'`+document.TestForm1.area2.value;
document.cookie=TheCookieName+"="+escape(WholeCookie)+";
expires="+expire.toGMTString(); alert('Your Info Has Been Stored.'); }


function UpdateForm () {
MakeCookieArray(GetCookie(TheCookieName));
//alert('ckArray: ' + ckArray[0]);

if (ckArray[0] != "*") {
document.TestForm1.ExpDate.value=ckArray[0];
document.TestForm1.area.value=ckArray[1];
document.TestForm1.area2.value=ckArray[2];
}
}


function GetCookie (CookieName) {
var cname = CookieName + "=";
var i = 0;
while (i < document.cookie.length) {
var j = i + cname.length;
if(document.cookie.substring(i,j)==cname){
var leng = document.cookie.indexOf (";", j);
if (leng == -1) leng=document.cookie.length;
return unescape(document.cookie.substring(j,leng));
}
i = document.cookie.indexOf(" ", i) + 1;
if (i == 0) break;
}
return "*";
}


function DelEatCookie (name) {
var expire = new Date();
expire.setTime (expire.getTime()-2*86400001);
document.cookie=name+"=*;expires="+
expire.toGMTString();
}


function MakeCookieArray(cookieValue) {
var i = 0,indx = 0, citemlen =0;
ckArray = new Array();
if ( cookieValue == null ){
ckArray[0]= "*";return
}
if ( cookieValue == "*" ) {
ckArray[0]= "*";return
}
while (citemlen < cookieValue.length)
{
citemlen=(cookieValue.indexOf("`", indx)>0)
?cookieValue.indexOf("`",indx):cookieValue.length;
ckArray[i]= cookieValue.substring(indx,citemlen);
i++; indx = citemlen + 1;
}
}