var locmngr={get:function(id){var cke=document.cookie.split("; ");
var ckeIdx=[];
for(var i=0;
i<cke.length;
i++){var tmpCke=cke[i].split("="),val="";
for(var j=1;
j<tmpCke.length;
j++){val+="="+tmpCke[j];
}ckeIdx[tmpCke[0]]=val.substr(1);
}if(ckeIdx[id]){return ckeIdx[id];
}else{return"";
}},set:function(cName,cVal,cDomain){var exp=new Date();
exp.setFullYear(exp.getFullYear()+1);
document.cookie=cName+"="+cVal+"; expires="+exp.toGMTString()+"; path=/; domain="+cDomain;
},del:function(cName,cDomain){var exp=new Date();
exp.setTime(exp.getTime()-1);
document.cookie=cName+="=; expires="+exp.toGMTString()+"; path=/; domain="+cDomain;
},dfltloc:{dfltLocDomain:"aol.com",cookieName:"defaultlocation",cookieVersion:"1.0",setDfltLoc:function(address,city,state,zip,lng,lat){if(address.indexOf("|")!=-1){address=address.replace("|","");
}if(city.indexOf("|")!=-1){city=city.replace("|","");
}if(state.indexOf("|")!=-1){state=state.replace("|","");
}if(zip.indexOf("|")!=-1){zip=zip.replace("|","");
}if(lng.indexOf("|")!=-1){lng=lng.replace("|","");
}if(lat.indexOf("|")!=-1){lat=lat.replace("|","");
}if(isNaN(lng.substr(0,10))){lng="";
}if(isNaN(lat.substr(0,10))){lat="";
}locmngr.set(this.cookieName,this.cookieVersion+"|"+address.substr(0,30)+"|"+city.substr(0,16)+"|"+state.substr(0,2)+"|"+zip.substr(0,5)+"|"+lng.substr(0,10)+"|"+lat.substr(0,10),this.dfltLocDomain);
},deleteDfltLoc:function(){locmngr.del(this.cookieName,this.dfltLocDomain);
},getDfltLoc:function(){return locmngr.get(this.cookieName);
},setDfltLocItem:function(which,what){var items=this.getDfltLoc().split("|");
if(what.indexOf("|")!=-1){what=what.replace("|","");
}items[which]=what;
this.setDfltLoc(items.join("|"));
},getDfltLocItem:function(which){var items=this.getDfltLoc().split("|");
if(!items||!items[which]){return"";
}return items[which];
},getVersion:function(s){this.getDfltLocItem(0);
},getAddress:function(){return this.getDfltLocItem(1);
},setAddress:function(s){this.setDfltLocItem(1,s.substr(0,30));
},getCity:function(){return this.getDfltLocItem(2);
},setCity:function(s){this.setDfltLocItem(2,s.substr(0,16));
},getState:function(){return this.getDfltLocItem(3);
},setState:function(s){this.setDfltLocItem(3,s.substr(0,2));
},getZip:function(){return this.getDfltLocItem(4);
},setZip:function(s){this.setDfltLocItem(4,s.substr(0,5));
},getLongitude:function(){return this.getDfltLocItem(5);
},setLongitude:function(s){var lng="";
if(!isNaN(s.substr(0,10))){lng=s.substr(0,10);
}this.setDfltLocItem(5,lng);
},getLatitude:function(){return this.getDfltLocItem(6);
},setLatitude:function(s){var lat="";
if(!isNaN(s.substr(0,10))){lat=s.substr(0,10);
}this.setDfltLocItem(6,lat);
}}};
