function doPageHistory(title,ref,flag) { myHistory = getCookie("pagehistory") list = new Array(); if ((myHistory == null) || (myHistory == "")) { setCookie("pagehistory",title+"@"+ref,365) document.writeln("-") return true } else { list = myHistory.split("@") // Check if the list should be diplayed or not if (flag) { document.writeln("") counter=1 for (i=0;i") counter++ } document.writeln("
"+counter+". "+list[i]+" 
") } for (i=0;i 10) { list = list.slice(0,10); } // Add current page to list setCookie("pagehistory",list.join("@"),365) } } // Cookie functions function setCookie(cookieName, cookieVal, days) { if (!days) days = 1; var expDate = new Date(); expDate.setTime(expDate.getTime() + days*24*60*60*1000); var expDateString = expDate.toGMTString(); document.cookie = cookieName + "="+escape(cookieVal) + ";path=/;expires="+expDateString; } function getCookie(cookieName) { cookieName = cookieName+"="; var allCookies = document.cookie; if (allCookies.length > 0) { var start = allCookies.indexOf(cookieName); if (start != -1) { start = start + cookieName.length; var end = allCookies.indexOf(";",start); if (end == -1) end = allCookies.length; return unescape(allCookies.substring(start,end)); } } return null; } function delCookie(cookieName) { document.cookie = cookieName + "=" + ";path=/;expires=Thu, 01-Jan-70 00:00:01 GMT"; } // Generates a 30 digit random number used for tracking individual users in statistics id = getCookie('session') if (id == null) { id = "" for (i=0;i<30;i++) { tempid = Math.random()*10 tempid = Math.floor(tempid) id = id + tempid } setCookie('session',id,365) }