var xmlHttpEvent;var xmlHttp;function createXMLHttpRequestEvent(){if(window.ActiveXObject){xmlHttpEvent=new ActiveXObject("Microsoft.XMLHTTP")}else if(window.XMLHttpRequest){xmlHttpEvent=new XMLHttpRequest()}}function selectEventDate(data,uri){createXMLHttpRequestEvent();xmlHttpEvent.onreadystatechange=getEventDate;xmlHttpEvent.open("GET","/_event.php?xData="+data+"&xURI="+uri,true);xmlHttpEvent.send(null)}function getEventDate(){if(xmlHttpEvent.readyState==4){if(xmlHttpEvent.status==200){document.getElementById("eventAll").innerHTML=xmlHttpEvent.responseText}}}function createXMLHttpRequest(){if(window.ActiveXObject){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}else if(window.XMLHttpRequest){xmlHttp=new XMLHttpRequest()}}function getContentData(cate_path,sortBy,orderBy,limitPerPage,key,cateID){createXMLHttpRequest();xmlHttp.onreadystatechange=getContentDataList;xmlHttp.open("GET","/_getContent.php?cate_path="+cate_path+"&sortBy="+sortBy+"&orderBy="+orderBy+"&limitPerPage="+limitPerPage+"&keyword="+key+"&cateID="+cateID,true);xmlHttp.send(null)}function getContentDataList(){if(xmlHttp.readyState==4){if(xmlHttp.status==200){document.getElementById("contentZone").innerHTML=xmlHttp.responseText}}}function activeTabbar(obj){var totalTab=10;for(var i=0;i<totalTab;i++){if(eval("document.getElementById(\"tabMenu"+i+"\")")!=null){eval("document.getElementById(\"tabMenu"+i+"\").className = ''")}}obj.className="active"}function searchEventGo(xPage,data){var encodeSearchURI=xPage+"date_"+data;window.location.href=encodeSearchURI}

var xmlHttp1;
var xmlHttp2;
function createXMLHttpRequest1(){
	if(window.ActiveXObject){
		xmlHttp1=new ActiveXObject("Microsoft.XMLHTTP")
	}else if(window.XMLHttpRequest){
		xmlHttp1=new XMLHttpRequest()
	}
}

function createXMLHttpRequest2(){
	if(window.ActiveXObject){
		xmlHttp2=new ActiveXObject("Microsoft.XMLHTTP")
	}else if(window.XMLHttpRequest){
		xmlHttp2=new XMLHttpRequest()
	}
}

function getSelectBudget(type){
	createXMLHttpRequest1();
	xmlHttp1.onreadystatechange = getBudget;
	xmlHttp1.open("GET", "/_getBudget.php?xType="+type, true);
	xmlHttp1.send(null);
}

function getBudget(){
	if(xmlHttp1.readyState==4){
		if(xmlHttp1.status==200){
			document.getElementById("budget_length").innerHTML=xmlHttp1.responseText
		}
	}
}


function getSelectBudgetProperty(type){
	createXMLHttpRequest2();
	xmlHttp2.onreadystatechange = getBudgetProperty;
	xmlHttp2.open("GET", "/_getBudget.php?xType="+type+"&xHide=1", true);
	xmlHttp2.send(null);
}

function getBudgetProperty(){
	if(xmlHttp2.readyState==4){
		if(xmlHttp2.status==200){
			document.getElementById("_budget").innerHTML=xmlHttp2.responseText
		}
	}
}

function getContentDataByGeoMain(cate_path,sortBy, orderBy, limitPerPage,geography){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = getContentDataList;
	xmlHttp.open("GET", "/_getContent_main.php?cate_path="+cate_path+"&sortBy="+sortBy+"&orderBy="+orderBy+"&limitPerPage="+limitPerPage+"&geography="+geography, true);
	xmlHttp.send(null);
}

function getContentDataByProvinceMain(cate_path,sortBy, orderBy, limitPerPage,province){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = getContentDataList;
	xmlHttp.open("GET", "/_getContent_main.php?cate_path="+cate_path+"&sortBy="+sortBy+"&orderBy="+orderBy+"&limitPerPage="+limitPerPage+"&province="+province, true);
	xmlHttp.send(null);
}

function getContentDataByChildCateMain(cate_path,sortBy, orderBy, limitPerPage,child_cateID){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = getContentDataList;
	xmlHttp.open("GET", "/_getContent_main.php?cate_path="+cate_path+"&sortBy="+sortBy+"&orderBy="+orderBy+"&limitPerPage="+limitPerPage+"&child_cate="+child_cateID, true);
	xmlHttp.send(null);
}


function getContentDataByGeo(cate_path,sortBy, orderBy, limitPerPage,geography){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = getContentDataList;
	xmlHttp.open("GET", "/_getContent.php?cate_path="+cate_path+"&sortBy="+sortBy+"&orderBy="+orderBy+"&limitPerPage="+limitPerPage+"&geography="+geography, true);
	xmlHttp.send(null);
}

function getContentDataByProvince(cate_path,sortBy, orderBy, limitPerPage,province){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = getContentDataList;
	xmlHttp.open("GET", "/_getContent.php?cate_path="+cate_path+"&sortBy="+sortBy+"&orderBy="+orderBy+"&limitPerPage="+limitPerPage+"&province="+province, true);
	xmlHttp.send(null);
}

function getContentDataByChildCate(cate_path,sortBy, orderBy, limitPerPage,child_cateID){
	createXMLHttpRequest();
	xmlHttp.onreadystatechange = getContentDataList;
	xmlHttp.open("GET", "/_getContent.php?cate_path="+cate_path+"&sortBy="+sortBy+"&orderBy="+orderBy+"&limitPerPage="+limitPerPage+"&child_cate="+child_cateID, true);
	xmlHttp.send(null);
}
//----start-----member directory 
function confirmListing(channel, id, type , page ){
	var liID = document.getElementById('content_'+id);
		if (confirm("Are you sure you wish to delete this content?")) {
			deleteContentData(channel, id ,type , page);
			liID.style.display = "none";	
		}
}

function deleteContentData(channel, id, type , page){
	createXMLHttpRequest();
	xmlHttp.open("GET","/member/dirprocess/?xChannel="+channel+"&xType="+type+"&xContentID="+id+"&xAction=delete&xPage="+page,true);
	xmlHttp.send();
}
//----end-----member directory 

