AppTui.Cookie = {
getCookie: function(name)
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if (arr != null)
{
return window.unescape(arr[2]);
}
return null;
},
setCookie:function(name,value,expires,path,domain,secure){
var expDays = expires*24*60*60*1000;
var expDate = new Date();
expDate.setTime(expDate.getTime()+expDays);
var expString = expires ? "; expires="+expDate.toGMTString() : "";
var pathString = "; path="+(path||"/");
var domain = domain ? "; domain="+domain : "";
document.cookie = name + "=" + escape(value) + expString + domain + pathString + (secure?"; secure":"");
}
};
getCookie: function(name)
{
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if (arr != null)
{
return window.unescape(arr[2]);
}
return null;
},
setCookie:function(name,value,expires,path,domain,secure){
var expDays = expires*24*60*60*1000;
var expDate = new Date();
expDate.setTime(expDate.getTime()+expDays);
var expString = expires ? "; expires="+expDate.toGMTString() : "";
var pathString = "; path="+(path||"/");
var domain = domain ? "; domain="+domain : "";
document.cookie = name + "=" + escape(value) + expString + domain + pathString + (secure?"; secure":"");
}
};