function nameDefined(ckie,nme) { var splitValues var i for (i=0;i') document.write("You've visited this page ") if(counter==1) document.write("the first time.") else document.write(counter+" times.") document.writeln('') } function readCookie() { var cookie=document.cookie counter=0 var chkdCookie=delBlanks(cookie) //are on the client computer var nvpair=chkdCookie.split(";") if(nameDefined(nvpair,"pageCount")) counter=parseInt(getCookieValue(nvpair,"pageCount")) ++counter var futdate = new Date() var expdate = futdate.getTime() expdate += 3600000 * 24 *30 //expires in 1 hour futdate.setTime(expdate) var newCookie="pageCount="+counter newCookie += "; expires=" + futdate.toGMTString() window.document.cookie=newCookie }