function $(){//get id
	if(typeof(arguments[0])=="object")return arguments[0];
	else return document.getElementById(arguments[0]);
}
function Ajax(url,async,T,sends,func,sData){
	sts=Array("未初始化","初始化","发送数据","数据传送中","完成","未知状态")
	try{xh=new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){try{xh=new XMLHttpRequest();}catch(e){xh=new ActiveXObject("Microsoft.XMLHTTP");}}
	xh.onreadystatechange=function(){
		if(xh.readyState==4){
			if(xh.status==200){
				func(xh.responseText);
			}
		}
	}
	xh.open(sends,url,async);
	if(async) window.setTimeout("function(){xh.abort();}",T*1000);
	xh.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	if ((sData!=null)&&(sData!='')){xh.send(sData);}else{xh.send(null);}
	//xh=null;
}
var HL = HL || {};    
HL.Cookie = {    
    Get:function(name){    
        var cv = document.cookie.split("; ");//使用"; "分割Cookie    
        var cva = [], cvat = [], cvam = [], temp;    
        for(i=0; i<cv.length; i++){    
            temp = cv[i].split("=");    
            if(temp[0].indexOf("_divide_") > 0){    
                cvam[temp[0]] = temp[1];    
            }else{    
                if(temp[0] != "") cvat[i] = [temp[0], temp[1]];    
            }    
        }    
        for(i=0; i<cvat.length; i++){    
            if(cvat[i]){    
                if(cvat[i][1].substr(0,8) != "^divide|"){    
                    cva[cvat[i][0]] = unescape(cvat[i][1]);    
                }else{    
                    var sta = cvat[i][1].indexOf("$"), tot = cvat[i][1].substring(8,sta);    
                    cva[cvat[i][0]] = cvat[i][1].substring(sta+1);    
                    for(j=1; j<tot; j++){    
                        cva[cvat[i][0]] += cvam[cvat[i][0]+"_divide_"+j];    
                    }    
                    cva[cvat[i][0]] = unescape(cva[cvat[i][0]]);    
                }    
            }    
        }    
        if(name) return cva[name]!=undefined?cva[name]:"";//如果有name则输出这个name的Cookie值    
        else return cva;//如果没有name则输出以名称为key，值为Value的数组    
    },    
    Set:function(name, value, expires, path, domain, secure, divide){//保存成功则返回true，保存失败返回false    
        if(!divide) var value = escape(value);    
        if(!name || !value) return false;//如果没有name和value则返回false    
        if(name == "" || value == "") return false;//如果name和value为空则返回false    
        /*对于过期时间的处理*/   
        if(expires){    
            /*如果是数字则换算成GMT时间，当前时间加上以秒为单位的expires*/   
            if(/^[0-9]+$/.test(expires)){    
                var today = new Date();    
                expires = new Date(today.getTime()+expires*1000).toGMTString();    
            /*判断expires格式是否正确，不正确则赋值为undefined*/   
            }else if(!/^wed, \d{2} \w{3} \d{4} \d{2}\:\d{2}\:\d{2} GMT$/.test(expires)){    
                expires = undefined;    
            }    
        }    
        if(name.indexOf("_divide_")< 1 && !divide){    
            this.Del(name, path, domain);//删除前一次存入的Cookie    
        }    
        var cv = name+"="+value+";"   
               + ((expires) ? " expires="+expires+";" : "")    
               + ((path) ? "path="+path+";" : "")    
               + ((domain) ? "domain="+domain+";" : "")    
               + ((secure && secure != 0) ? "secure" : "");    
        if(cv.length < 4096){    
            document.cookie = cv;//写入cookie    
        }else{    
            var max = Math.floor(value.length/3800)+1;    
            for(i=0; i<max; i++){    
                if(i == 0){    
                    this.Set(name, '^divide|'+max+'$'+value.substr(0,3800), expires, path, domain, secure, true);    
                }else{    
                    this.Set(name+"_divide_"+i, value.substr(i*3800,3800), expires, path, domain, secure, true);    
                }    
            }    
        }    
        return true;    
    },    
    Del:function(name, path, domain){//删除成功返回true，删除失败返回false     
        if(!name) return false;  
        if(name == "") return false;
        if(!this.Get(name)) return false;   
        if(escape(this.Get(name)).length > 3800){    
            var max = Math.floor(escape(this.Get(name)).length/3800)+1;    
            for(i=1; i<max; i++){    
                document.cookie = name+"_divide_"+i+"=;"   
                              + ((path) ? "path="+path+";" : "")    
                              + ((domain) ? "domain="+domain+";" : "")    
                              + "expires=Thu, 01-Jan-1970 00:00:01 GMT;";    
            }    
        }    
        document.cookie = name+"=;"   
                          + ((path) ? "path="+path+";" : "")    
                          + ((domain) ? "domain="+domain+";" : "")    
                          + "expires=Thu, 01-Jan-1970 00:00:01 GMT;";    
        return true;    
    }    
} 
