function getCookie(str)
{
var tmp,reg=new RegExp(“(^| )”+str+”=([^;]*)(;|$)”,”gi”);
if(tmp=reg.exec(document.cookie))
return(tmp[2]);
return null;
}
function setCookie(name,value)
{
document.cookie=name+ “=” + value;
}
function getCookie(str)
{
var tmp,reg=new RegExp(“(^| )”+str+”=([^;]*)(;|$)”,”gi”);
if(tmp=reg.exec(document.cookie))
return(tmp[2]);
return null;
}
function setCookie(name,value)
{
document.cookie=name+ “=” + value;
}