/* This routine takes into account ISO 8601 standard 
   had to really modify it for internet explorer and netscape
*/

var today = new Date()
var today1 = today.toString()


	    expireDate = new Date
	    expireDate.setMonth(expireDate.getMonth()+6)
	   
		hitCt = eval(cookieVal("pageHit"))
		hitCt++
		lastVisit = cookieVal("pageVisit")
		if (lastVisit == 0) {
			lastVisit = ""
		}
lastvisit=lastVisit

if ((navigator.appName == "Netscape") ) {
today2 = today1.substr(53,4)+" "+today1.substr(4,4)+today1.substr(8,3)+"("+today1.substr(0,3)+") "+today1.substr(11,17)
}


if (navigator.appName == "Microsoft Internet Explorer") {
todaytest = today1.substr(8,2)
  if (length.todaytest==2) {
  today2 = today1.substr(24,5)+" "+today1.substr(4,4)+today1.substr(9,2)+" ("+today1.substr(0,3)+") "+today1.substr(11,13)
  }
  else {
  today2 = today1.substr(23,4)+" "+today1.substr(4,4)+"0"+today1.substr(8,1)+" ("+today1.substr(0,3)+") "+today1.substr(10,13)
  }
}


/* debugging print 
document.open()
document.write("<font size=3>"+today1+"<br>"+today2+"<br>")
document.close()
*/

		
		document.cookie = "pageHit="+hitCt+";expires=" + expireDate.toGMTString()
                document.cookie = "pageVisit="+today2+";expires=" + expireDate.toGMTString()
		
		function cookieVal(cookieName) {
			thisCookie = document.cookie.split("; ")
	  	    for (i=0; i<thisCookie.length; i++) {
	  	        if (cookieName == thisCookie[i].split("=")[0]) {
	  	        	return thisCookie[i].split("=")[1]
	  	        }
	   	    }
			return 0
		}