This is my script to set a cookie for total visits from user. The Script worked fine in IE4 but now with IE5 I get an error in the bolded line that says "Invalid Character" does anyone know of another way of doing it where IE5 will not error?
c=""; visits=0;
lastHere=document.cookie.indexOf("lastBeenHere");
charInd=document.cookie.indexOf("¬");
newCindex=(document.cookie.indexOf(";") != -1) ? document.cookie.indexOf(";") : document.cookie.length;
lastTime=document.cookie.substring(charInd+1,newCindex);
addOnce=(document.cookie.substring(lastHere+13,charInd) == "0") ? "" : "s";
newInfo=(lastHere == -1) ? "" : ", last time was <em><b>"+ lastTime+ "</b></em>";
if (lastHere != -1) {
var visits = eval(document.cookie.substring(lastHere,charInd))+1
}
now=new Date();
past=new Date();
now.setTime(now.getTime()+ 365*24*60*60*1000);
document.cookie="lastBeenHere="+ visits+ "¬"+ past+ "; expires="+ now.toGMTString();


------------------
L8Rz
WhiteKnight