// bump  invoke via <script src=bump.js defer ></script> 

function setCookie (name, value){  // 6 months =24 * 7 *26 = 4368 (about)   60*60 milliseconds
 var expDate = (new Date(      (new Date()).getTime()    +   4368*3600000)).toGMTString(); 
 document.cookie = name + "=" + value +  ";expires=" + expDate + ";path=/" ;
// did he accept a persistant cookie ?  nope a try session cookie (i.e. date=0)
if ( document.cookie == null ) { document.cookie = name + "=" + value + ";path=/"  }; // omit date     
}

function getCookieValue(name) {	//    or  .FALSE.
  var firstChar, lastChar;
  var CookieString = document.cookie;    // make it a string 
  firstChar  = CookieString.indexOf(name);  if(firstChar == -1) return false;
  firstChar += name.length + 1;
  lastChar = CookieString.indexOf(";", firstChar);  if(lastChar == -1) lastChar = CookieString.length; 
                                                       // no ending ; so must be last n=v pair
  return CookieString.substring(firstChar, lastChar);  
}  	
	
var User, Cnt, LastVisit, now ;   //-------- bump counter & set lastvisit
now = new Date().getTime(); 
if(    !(  getCookieValue("U") )   ){  setCookie("U",now); setCookie("C",0);  };  // new user; assign him U#### aka firstVisit
User= getCookieValue("U");   Cnt = getCookieValue("C"); LastVisit = getCookieValue("L");
Cnt = parseInt( Cnt );  /* Junk? How? */    if(isNaN(Cnt) ) {Cnt =1000;setCookie("U",now);}; if(Cnt>9999) Cnt%=1000;  
Cnt++; 
setCookie("U",User );   // UserID is put back out with new expire         
setCookie("C",Cnt  );   // Cnt 
setCookie("L",now  );   // LastVisit 	(note that   var LastVisit is not now )
setCookie("V","040820" );  // Version
//     ///  end of bump.js ///      ////// 
