function SMCookie(){
this.prefix="SM:";
this.limit=1000;
this.pCookies=new Array;
var _1=new Date;
_1.setDate(_1.getDate()-2);
this.expDate=_1.toGMTString();
_1.setDate(_1.getDate()+14);
this.persistDate=_1.toGMTString();
var _2=new RegExp(/(\.[^\.]+\.[a-z]+)$/);
var _3=_2.exec(location.hostname);
if(_3!=null){
this.domain=_3[1];
this.host="my"+_3[1];
}
var _4=new Array;
var _5=document.cookie.split("; ");
for(var i=0;i<_5.length;i++){
var _7=_5[i].split("=");
_4[_7[0]]=_7[1];
}
var _8=new Array;
for(cookie in _4){
if(cookie.indexOf(this.prefix)==0){
var _9=cookie.substr(this.prefix.length);
this.pCookies.push(_9);
_8[_9]=_4[cookie];
}
}
var _a="";
for(var i=0;i<_8.length;i++){
_a+=_8[i];
}
this.values=new Array;
if(_a!=""){
_a=decodeURIComponent(_a);
var _5=_a.split("&");
for(var i=0;i<_5.length;i++){
var _7=_5[i].split("=");
this.values[decodeURIComponent(_7[0])]=decodeURIComponent(_7[1]);
}
}
this.get=function(_b){
return this.values[_b];
};
this.set=function(_c,_d){
this.values[_c]=_d;
};
this.clear=function(_e){
delete this.values[_e];
};
this.send=function(){
for(var i=0;i<this.pCookies.length;i++){
var _10=this.prefix+this.pCookies[i]+"=; expires="+this.expDate;
if(this.domain!=undefined){
_10+="; domain="+this.domain;
}
document.cookie=_10;
}
for(var i=0;i<this.pCookies.length;i++){
var _10=this.prefix+this.pCookies[i]+"=; expires="+this.expDate;
if(this.host!=undefined){
_10+="; domain="+this.host;
}
document.cookie=_10;
}
var _11="";
for(var _12 in this.values){
_11+=this.encode(_12)+"="+this.encode(this.values[_12])+"&";
}
if(_11==""){
return;
}
_11=_11.substring(0,_11.length-1);
_11=this.encode(_11);
var _13=0;
while(_13<_11.length){
var _14=this.prefix+(_13/this.limit);
var _10=_14+"="+_11.substring(_13,_13+=this.limit)+"; expires="+this.persistDate;
if(this.host!=undefined){
_10+="; domain="+this.host;
}
document.cookie=_10;
}
};
this.encode=function(str,_16){
var map=new Array;
map["="]="%3D";
map[";"]="%3B";
map["&"]="%26";
map["\""]="%22";
for(chr in map){
var _18=new RegExp(chr,"g");
str=str.replace(_18,map[chr]);
}
return str;
};
}
window.smcookie=new SMCookie;

