//取cookie函数
function getcookie(name){
var str=document.cookie.match(eval('/(^| )'+name+'\=(.*)(;|$)/i'));
return unescape(RegExp.$2);
}
//置cookie函数
function setcookie(name,value,min,path,domain){
if(typeof(min)=="undefined"||typeof(min)==null) min=5;
var pathstr="";
var domainstr="";
if(typeof(path)!="undefined") pathstr=";path="+path;
if(typeof(domain)!="undefined") pathstr=";domain="+domain;
var time=new Date();
time.setTime(time.getTime()+(min*60*1000));
document.cookie=name+"="+escape(value)+";expires="+time.toGMTString()+pathstr+domainstr;
}