function setCookie(name, value, expire)
{ document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString())) ;}
function getCookie(Name)
{ var search = Name + "="
if (document.cookie.length > 0) { offset = document.cookie.indexOf(search)
if (offset != -1) { offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1) end = document.cookie.length
return unescape(document.cookie.substring(offset, end)) ;} }
}
function fixDate(date) { var base = new Date(0); var skew = base.getTime(); if (skew > 0)
date.setTime(date.getTime() - skew);}
function Cookie(document,name,hours,path,domain,secure) { this.$doc = document
this.$name = name
if (hours) this.$expiration=new Date((new Date()).getTime()+hours*3600000); else this.$expiration = null
if (path) this.$path = path; else this.$path = '/'
if (domain) this.$domain = domain; else this.$domain = dom
if (secure) this.$secure = true; else this.$secure = false
}
function CookieWrite() { var cookieval=""
for(var prop in this) { if ((prop.charAt(0) == '$') || ((typeof this[prop]) == 'function') || prop == '') continue
if (cookieval != "") cookieval += '&'
cookieval+=prop+":"+escape(this[prop])
}
var cookie=this.$name+"="+cookieval
if (this.$expiration) cookie+='; expires=' + this.$expiration.toGMTString()
if (this.$path) cookie+='; path=' + this.$path
if (this.$domain) cookie+='; domain=' + this.$domain
if (this.$secure) cookie+='; secure'
this.$doc.cookie=cookie
}
function CookieRead() { var allcookies=this.$doc.cookie
if (allcookies=="") { return false
}
var start= allcookies.indexOf(this.$name+'=')
if (start== -1) { return false
}
start += this.$name.length+1
var end=allcookies.indexOf(';',start)
if (end == -1) end=allcookies.length
var cookieval = allcookies.substring(start,end)
var a = cookieval.split('&')
for (var i=0;i < a.length;i++) a[i]=a[i].split(':')
for (var i=0;i < a.length;i++) this[a[i][0]]=unescape(a[i][1])
return true
}
function CookieDelete() { var cookie = this.$name+'='
if (this.$path) cookie+='; path='+this.$path
if (this.$domain) cookie+='; domain='+this.$domain
cookie+='; expires=Fri, 02-Jan-1970 00:00:00 GMT'
this.$doc.cookie=cookie
}
new Cookie()
Cookie.prototype.write = CookieWrite
Cookie.prototype.del = CookieDelete
Cookie.prototype.read = CookieRead
var dom = window.location.hostname; pREF = getCookie("pref"); if (pREF == null)
{ var mypCookie = new Cookie(document,"pref", 10000); if (document.referrer.indexOf(dom) == -1) { mypCookie.preferrer = document.referrer;}
mypCookie.write(); mypCookie.read(); var pREF = mypCookie.preferrer || "n/a";}
pQUE = getCookie("pque"); if (pQUE == null)
{ var myqCookie = new Cookie(document,"pque", 10000); myqCookie.pque = window.location.search.substring(1); myqCookie.write(); myqCookie.read(); var pQUE = myqCookie.pque || "";}
pDAT = getCookie("pdat"); if (pDAT == null)
{ var myrCookie = new Cookie(document,"pdat", 10000); myrCookie.pdat = new Date(); myrCookie.write(); myrCookie.read(); var pDAT = myrCookie.pdat || "";}
pPAG = getCookie("ppag"); if (pPAG == null)
{ var mysCookie = new Cookie(document,"ppag", 10000); mysCookie.ppag = window.location.href; mysCookie.write(); mysCookie.read(); var pPAG = mysCookie.ppag || "";}
var f1 = pREF.split("preferrer:"); var pREFf = f1[1]; var f2 = pQUE.split("pque:"); var pQUEf = f2[1]; var f3 = pDAT.split("pdat:"); var pDATf = f3[1]; var f4 = pPAG.split("ppag:"); var pPAGf = f4[1]; var now = new Date(); fixDate(now); now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000); var hits = getCookie("counter"); if (!hits) { hits = 1;} else { hits = parseInt(hits) + 1;}
setCookie("counter", hits, now); hits = getCookie("counter"); var myCookie = new Cookie(document,"session",0); myCookie.inref = document.referrer; myCookie.que = window.location.search.substring(1); myCookie.pag = window.location; myCookie.res = screen.width+" X "+screen.height; myCookie.col = window.screen.colorDepth; myCookie.bro = navigator.userAgent; myCookie.pla = navigator.platform; var IP = '<!--#echo var="REMOTE_ADDR"-->'; if (document.referrer.indexOf(dom) == -1) { myCookie.referrer = document.referrer; myCookie.write();}
myCookie.read(); var REF = myCookie.referrer || ""; var QUE = myCookie.que || ""; var inREF = document.referrer || ""; var PAG = myCookie.pag || ""; var RES = myCookie.res || ""; var COL = myCookie.col || ""; var BRO = myCookie.bro || ""; var PLA = myCookie.pla || ""; 
