function PreLoad_Sub (sub,end) { var tmp,base,last,arch; last=(sub/1 + end/1); arch=[]; for(tmp=(sub/1 + 1);tmp<=last;++tmp ) { arch[tmp]=new Image(); arch[tmp].src="/images/topnav_"+tmp+"_roll.gif"; } } function ThisNav () { return NavCalc(CookieMaster()); } // this function gives us 100 sub nav images, and I guess unlimited states? function NavCalc (id) { if(id>=100) { return Math.floor((id/100)); } else { return id; } } // end NavCalc function CacheInit () { Preload("7","/images/topnav_","_roll.gif"); var bogus=new Image(); bogus.src="/images/coupon_roll.gif"; } function CoupRollin () { document.images["coupon_here"].src="/images/coupon_roll.gif"; } function CoupRollout () { document.images["coupon_here"].src="/images/coupon_off.gif"; } function LogoLink (url) { var base,jar,marker,alt; marker=CookieMaster(); if(marker!=0){alt="Home";}else{alt="";} base="\""+alt+"\""; if(marker!=0) { jar=""+base+""; } else { jar=base; } document.write(jar); } function ImCon () { var base="\"\""; document.write(base); } function Singlerollin (id) { if(CookieMaster()!=id) { if(ThisNav()!=NavCalc(id)) { document.images["topnav_1"].src="/images/topnav_1_roll.gif"; } else { document.images["topnav_1"].src="/images/topnav_1_4th.gif"; } document.images["ContactUs"].src="/images/contact_roll.gif"; } } function Singlerollout (id) { if(CookieMaster()!=id) { if(ThisNav()!=NavCalc(id)) { document.images["topnav_1"].src="/images/topnav_1_off.gif"; } else { document.images["topnav_1"].src="/images/topnav_1_on.gif"; } document.images["ContactUs"].src="/images/contact_off.gif"; } } function Preload (count,start,stop) { // preload the images into the browser cashe, but don't create any variables! var ourloop,eos; eos=[]; for(ourloop=1;ourloop=100)) { document.images[base].src="/images/"+base+"_roll.gif"; } else { document.images[base].src="/images/"+base+"_4th.gif"; } } else { Singlerollin(id); } } } function Rollout (id) { if(id!=CookieMaster()) { if(id!=1){ var base,end; base="topnav_"+id; if((ThisNav()!=NavCalc(id))||(id>=100)) { document.images[base].src="/images/topnav_"+id+"_off.gif"; } else { document.images[base].src="/images/"+base+"_on.gif"; } } else { Singlerollout(id); } } } function CookieShaper (id) { var shape="NavMain="+id; document.cookie=shape; } function CookieMaster () { var mycookie,GetCookie,info; GetCookie=/NavMain=(\w*)/; if(document.cookie) { mycookie=document.cookie; info=mycookie.match(GetCookie); if(info) { if(info.length==0) { CookieShaper(""); } else { return info[1]; } } } } // end CookieMaster function Img (id) { var base; base="/images/topnav_"+id; if(id<100) { if(CookieMaster()==id) { base=base+"_4th.gif"; } else { if(ThisNav()!=NavCalc(id)) { base=base+"_off.gif"; } else { base=base+"_on.gif";} } } else { if(CookieMaster()==id) { base=base+"_roll.gif"; } else { base=base+"_off.gif"; } } document.write("\"\""); }