<!-- Hide from JavaScript-Impaired Browsers
//  3-Mar-1996 Copyright (C) 1996 by Geoff Inglis.
// You may use these
//  routines in your pages (commercial or 
// noncommercial) as long as
// you include these four lines. You may not
// Re-sell this code. 
//  ** Here is the CookieName *
TheCookieName='crumble';
function WriteOneBigCookie(){
numD=prompt('Enter number of days till Cookie Expires. Else expiration date will be set for 30 days','30');
var exp=new Date();
exp.setTime(exp.getTime()+(numD*24*3600000)); 
document.tester.ExpDate.value=exp.toLocaleString();
var WC=exp;
WC=WC+'`'+document.tester.bx.value;
WC=WC+'`'+document.tester.ExpDate.value;
document.cookie=TheCookieName+"="+
escape(WC)+";expires="+exp.toGMTString();
alert('Your information has been stored for '+numD+' days.');
}
function UpdateForm(){
MCA(GetCookie(TheCookieName));
alert('FYI:'+FYI[0]);if(FYI[0] !="*"){
document.tester.ExpDate.value=FYI[2];
document.tester.bx.value=FYI[1];
}}
function fCMS(theName){
var idxl="";
for(var i=0; i<theName.options.length; i++){
if(theName.options[i].selected==true)
idxl=idxl+","+i; 
}
return (idxl=="")?idxl="*":idxl;
}
function sCMS(formObj,tL){
for(var i=0; i<formObj.options.length; i++){
formObj.options[i].selected=false;}
var ilen=0;
while(ilen<tL.length-1){
var ixs=tL.indexOf(',',ilen);
if(ixs==-1) return;
ilen=tL.indexOf(',',ixs+1);
if(ilen==-1)ilen=tL.length;
var indx=parseInt(tL.substring(ixs+1,ilen),10);
formObj.options[indx].selected=true;
}}
function GetCookie(CookieName){
var cna=CookieName+"=";
var i=0;
while(i<document.cookie.length){
var j=i+cna.length;
if(document.cookie.substring(i,j)==cna){
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 DEC(name){
var exp=new Date();
exp.setTime(exp.getTime()-2*86400001);
document.cookie=name+"=*; expires="+exp.toGMTString();
}
function MCA(cV){
var i=0, indx=0, cim=0;
FYI=new Array();
if(cV==null){FYI[0]="*"; return
}
if(cV=="*"){FYI[0]="*"; return
}
while (cim <cV.length){
cim=(cV.indexOf("`", indx)>0)
?cV.indexOf("`", indx):cV.length;
FYI[i]=cV.substring(indx, cim); i++;
indx=cim+1;}}
function cb(){document.tester.bx.value=' ';
if(document.tester.bx.value.length!=0){
document.tester.bx.value='';
document.tester.ExpDate.value="";
}
}
// End Hiding -->
