// JavaScript Document
var request=null;
function favoriteAdd(pid,type,field) {
	if(field==null || field=="" || field==".") {
		field="www.";
	}
	xmlhttp = GetXmlHttp();
	var queryString = "pid="+pid+"&type="+type;
	var url = "http://"+field+"yipiw.com/shop/user_favorite_ajax.php";
	xmlhttp.open("POST",url,true);
	xmlhttp.onreadystatechange = function() {parseData()};				
	xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
	xmlhttp.send(queryString);
}
function parseData() {
	if(xmlhttp.readyState == 1) {
		//document.getElementById('Submit_check_user').innerHTML = "<img src=templates/systemadmin/images/loading_black.gif>";
	}
	if(xmlhttp.readyState == 4) {
		if(xmlhttp.status == 200) {
			//document.getElementById("username_check").innerHTML=xmlhttp.responseText;
			alert(xmlhttp.responseText);
			return;
		}
	}
}

