function Cookie(){
	this.setCookie=function(name,value,times,path,domain){
		var paths="";
	    if(times!=null){
			var exp  = new Date();
			exp.setTime(exp.getTime() + times*60*1000);
			paths+=";expires=" + exp.toGMTString();
		}
		if(path!=null)paths+=";path="+path;
		if(domain!=null)paths+=";domain="+domain;
        document.cookie = name + "="+ escape (value) + paths;
    }
    this.getCookie=function(name){
        var arr,reg=new RegExp("(^| )"+name+"=([^;]*)(;|$)");
        if(arr=document.cookie.match(reg)) return unescape(arr[2]);
        else return null;
    }
    this.delCookie=function(name){
        var exp = new Date();
        exp.setTime(exp.getTime() - 1);
        var cval=getCookie(name);
        if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
    }
	this.is=function(name){
		if(this.getCookie(name)==null)
			return false;
		else
			return true;
	}
}
