// JavaScript Document

function xmlhttpPost(strURL,strResponse) {
    var xmlHttpReq = false;
    var self = this;

    if (window.XMLHttpRequest) {
        self.xmlHttpReq = new XMLHttpRequest();
    }
    else if (window.ActiveXObject) {
        self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
    }
	self.xmlHttpReq.open('GET',strURL, true);
	self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	self.xmlHttpReq.onreadystatechange = function() {
        if (self.xmlHttpReq.readyState == 4) {
			temp = self.xmlHttpReq.responseText;
			//document.write(temp);
			sendResponse(strResponse);
		}
    }
    self.xmlHttpReq.send(null);
}

function sendResponse(strResponse){
	//alert(strResponse);
	if (strResponse=='villaSearch')
		villaSearchRsp(temp);
	else if (strResponse=='villaList')
		shortListRsp(temp);
	else if (strResponse=='addVillaList')
		addShortListRsp(temp);
	else if (strResponse=='addVillaList2')
		addShortListRsp2(temp);
	else if (strResponse=='villaListView')
		shortListViewRsp(temp);
	else if (strResponse=='carSelect')
		carLoadRsp(temp);
	else if (strResponse=='golfSelect')
		golfListRsp(temp);
	else if (strResponse=='golfadd')
		golfShortlistResp(golfShortlistResp);
}
