﻿//<![CDATA[
function getUserLocation() {
V = RC("EINSuserInfo_zipCode") || "Anonymous";
if (V != null) { return V; }
return "Anonymous";
}
//[C]REATE [C]OOKIE
function CC(name, value, days) {
if (days) {var date = new Date(); date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); var expires = "; expires=" + date.toGMTString();}
else { var expires = ""; }
document.cookie = name + "=" + value + expires + "; path=/";
}
//[R]EAD [C]OOKIE
function RC(name) {var nameEQ = name + "=";var ca = document.cookie.split(';');
for (var i = 0; i < ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') c = c.substring(1, c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
}return null;}
//[E]RASE [C]OOKIE
function EC(name) {CC(name, "", -1);}
//READ ALL PUBLIC COOKIES
var page_ReadCookies = {
init: function () {
this.zipCode = RC('EINSuserInfo_zipCode');
this.emailAddress = RC('EINSuserInfo_emailAddress');
this.productID = RC('EINSuserInfo_productID');
this.productName = RC('EINSuserInfo_productName');
this.categoryName = RC('EINSuserInfo_categoryName');
this.requestQuote = RC('EINSuserInfo_requestQuote');
this.origReferrer = RC('EINSuserInfo_origReferrer');
this.newReferrer = RC('EINSuserInfo_newReferrer');
this.sessionID = RC('EINSuserInfo_sessionID');
this.visitorID = RC('EINSuserInfo_visitorID');
this.categoryID = RC('EINSuserInfo_categoryID');
    }
}
function quotepage_getME() {FN="ctl00_ContentPlaceHolder1_";
fn_CTF("txtZipCode",1,255,"EINSuserInfo_zipCode",FN);
fn_CTF("textbox_ZipCode",1,255,"EINSuserInfo_zipCode",FN);
fn_CTF("txtEmail",1,255,"EINSuserInfo_emailAddress",FN);
fn_CTF("hiddenProductID",1,255,"EINSuserInfo_productID",FN);
return null;
}
function quotepage_putME() {DTE=90;FN="ctl00_ContentPlaceHolder1_";
fn_FTC("txtZipCode",5,5,"EINSuserInfo_zipCode",DTE,FN);
fn_FTC("textbox_ZipCode",5,5,"EINSuserInfo_zipCode",DTE,FN);
fn_FTC("txtEmail",1,255,"EINSuserInfo_emailAddress",DTE,FN);
fn_FTC("hiddenProductID",1,255,"EINSuserInfo_productID",DTE,FN);
return null;
}
//[F]orms[T]o[C]ookies(fName,fLengthMin, fLengthMax,cName,cExpires)
function fn_FTC(a,b,c,d,e,FN) {FN=(FN||"");FF=FN+a;
if (document.getElementById(FF)) {FFV=document.getElementById(FF).value;
if (FFV.length >= b && FFV.length <= c) {CC(d,FFV,e);
}}}
//[C]ookies[T]o[F]orms(fName,fLengthMin, fLengthMax,cName,cExpires)
function fn_CTF(a,b,c,d,e) {FN=(FN||"");FF=FN+a;V=RC(d);
if (V && document.getElementById(FF)) {document.getElementById(FF).value = V;}
}
//]]>
