var rwSetup = new rwSetup(); var rwImage = new Image; function rwSetup() { this.rwVersion = "0.9.6"; this.rwProfile = "parkers"; this.rwTagServerGIF = "www.sptag.com/rwtag.gif"; this.rwCheckMetaTags = true; this.rwSendTitle = true; this.rwSendURL = true; this.rwSequence = false; this.rwCookieName = "rwtag"; this.rwCookieCreate = false; this.rwCookieDays = 3650; this.rwCookieDomain = null; this.rwCookieEnabledCheck = true; this.rwDebug = false } function rwAddTag(B, A, D) { if (typeof B == "string" && B.length > 0) { var C = "http" + (window.location.protocol.indexOf("https:") == 0 ? "s" : "") + "://" + rwSetup.rwTagServerGIF; C = C + "?" + (typeof A == "string" && A.length > 0 ? A + "&" : "") + rwParameters(); C = C + "&rw.ul=" + escape(location.href.substring(0, location.href.lastIndexOf("/") + 1) + B) + "&rw.rf=" + escape(location.href); if (typeof D == "string" && D.length > 0 && rwSetup.rwSendTitle) { C = C + "&rw.ti=" + escape(D) } return rwTagServer(C) } return null } function rwCookieTag() { var A = rwSetup.rwCookieName; var E = "/"; var G = rwSetup.rwCookieDomain; var F = rwSetup.rwCookieDays; var C = ""; if (A.length == 0) { return "" } C = rwGetCookieLastValue(A); if (typeof C == "string" && C.length > 0) { return "rw.ck=" + C } if (rwSetup.rwCookieCreate == false) { return "rw.ck=" } else { var B = new Date().getTime(); var C = "rwtag." + location.href.length + "." + navigator.userAgent.length + "." + B; var D = null; if (F > 0) { D = new Date(); D.setDate(D.getDate() + parseInt(F)); D = D.toGMTString() } rwSetCookie(A, C, D, E, G, null); C = ""; C = rwGetCookieLastValue(A); if (typeof C == "string") { return "rw.ck=" + C + "&rw.ckcreated=" + B } else { return "rw.ck=" } } return "" } function rwMetaTags() { var D = ""; var C; if (document.all) { C = document.all.tags("meta") } else { if (document.documentElement) { C = document.getElementsByTagName("meta") } } if (typeof C != "undefined") { for (var B = 1; B <= C.length; B++) { var A = C.item(B - 1); if (A.name) { if (A.name.indexOf("rw.") == 0) { D = D + "&" + A.name + "=" + escape(A.content) } } } } return D } function rwParameters() { var B = new Date(); var C = "rw.pf=" + rwSetup.rwProfile + "&rw.nw=" + B.getTime(); if (rwSetup.rwCookieName.length > 0) { C = C + "&" + rwCookieTag() } if (rwSetup.rwCookieEnabledCheck == true && rwIsCookieEnabled() == false) { C = C + "&rw.ckstatus=disabled" } if (rwSetup.rwSequence == true) { var A = rwGetCookieLastValue("rwsequence"); if (typeof A == "string" && A.length > 0) { A = "" + (parseInt(A) + 1); rwTagHTML = C + "&rw.sq=" + A; rwSetCookie("rwsequence", A, null, "/", rwSetup.rwCookieDomain, null) } else { A = "1"; rwSetCookie("rwsequence", A, null, "/", rwSetup.rwCookieDomain, null); rwTagHTML = C + "&rw.sq=" + A } } return C } function rwTag(A) { return rwTagServer(rwURL(A)) } function rwTagServer(B) { var A = B; if (A.length > 2048 && navigator.userAgent.indexOf("MSIE") >= 0) { A = A.substring(0, 2040) + "&rw.End=1" } if (document.images) { rwImage.src = A } else { A = '<IMG BORDER="0" NAME="rwtag" WIDTH="1" HEIGHT="1" SRC="' + A + ' " >'; document.write(A) } if (rwSetup.rwDebug == true) { document.write("<br/><b>" + A + "</b>") } return A } function rwURL(A) { var B = ""; if (typeof rwTagPrefix == "string" && rwTagPrefix.length > 0) { B = rwTagPrefix } if (typeof A == "string" && A.length > 0) { B = (B.length > 0 ? B + "&" : "") + A } B = "?" + (B.length > 0 ? B + "&" : "") + rwParameters(); B = "http" + (window.location.protocol.indexOf("https:") == 0 ? "s" : "") + "://" + rwSetup.rwTagServerGIF + B; if (rwSetup.rwSendURL == true) { B = B + "&rw.ul=" + escape(location.href) } B = B + "&rw.rf=" + escape(window.document.referrer); if (rwSetup.rwCheckMetaTags == true) { B = B + rwMetaTags() } if (rwSetup.rwSendTitle == true) { B = B + "&rw.ti=" + escape(document.title) } return B } function rwIsCookieEnabled() { var A = (typeof document.cookie == "string" && document.cookie.length > 0 ? true : false); if (A == false && typeof document.cookie == "string") { document.cookie = "rwCheckCookie=testing"; if (document.cookie == "rwCheckCookie=testing") { A = true } } return A } function rwGetCookieLastValue(A) { if (typeof A == "string" && A.length > 0) { var D = "; " + A + "="; var E = "; " + document.cookie; var B = E.lastIndexOf(D); if (B > -1) { B = B + D.length; var C = E.indexOf(";", B); D = E.substring(B, (C < 0 ? E.length : C)); return unescape(D) } } return "" } function rwSetCookie(B, D, A, F, C, E) { document.cookie = B + "=" + escape(D) + ((A) ? "; expires=" + A : "") + ((F) ? "; path=" + F : "") + ((C) ? "; domain=" + C : "") + ((E) ? "; secure" : "") };