function xlAjax(url,pars,method,obj,func,asynchronous){
	var xmlHttp;  
	if(window.ActiveXObject){  
		try {  
			xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");  
		}  
		catch(e) {  
			xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");  
		} 
	} else if(window.XMLHttpRequest) {  
		xmlHttp = new XMLHttpRequest();  
	}    
	if(method.toLowerCase() == "get") {  
		url = url+"?"+pars;  
		xmlHttp.open("GET",url,asynchronous);  
		xmlHttp.send(null);  
	}  else  {  
		xmlHttp.open("POST",url,asynchronous);
		xmlHttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");  
		xmlHttp.send(pars);  
	}
	xmlHttp.onreadystatechange = function()  {  
		
		if(xmlHttp.readyState == 4 && xmlHttp.status == 200)  {   
			if(obj)obj.innerHTML = xmlHttp.responseText;
			if(func)func(xmlHttp.responseText);
		}  
	}
}

function collectInit(type,id){
	usrname=readCookie('usrname');
	xlAjax('http://anime.xunlei.com/proxy/collection/init/'+type+'/'+id+'/?rd='+rand(100000),null,'GET',null,collectFill,1);
	//xlAjax()  收藏
	//收藏人数
	//收藏状态
}


function loginCheck(url){
	usrname=readCookie('usrname');
	if (usrname == '') {
		collectAction=1;
		//add~
		document.domain = "xunlei.com";
		global_login_frm_show(this,true,url);
		return false;
	} else {
		return usrname;
	}
}

