	/**********************************************
	VYOM AJAX PROCESSOR
	(c) Vyom Technosoft Pvt. Ltd.
	Author - Amit Mathur, 18 Jun 2006

	Unauthorised copying or distribution is
	prohibited.
	***********************************************/

	function vyomAJAXProcessor(strURL,divName)
	{
		var xmlHttpReq = false;
		var self = this;
		// Mozilla/Safari
		if (window.XMLHttpRequest) {
			self.xmlHttpReq = new XMLHttpRequest();
		}
		// IE
		else if (window.ActiveXObject) {
			self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
		}
		self.xmlHttpReq.open('POST', strURL, true);
		self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		self.xmlHttpReq.onreadystatechange = function() {
			if (self.xmlHttpReq.readyState == 4) {
				updatepage(self.xmlHttpReq.responseText,divName);
			}
		}
		self.xmlHttpReq.send(strURL);
	}
	function updatepage(str,divName){
		document.getElementById(divName).innerHTML = str;
	}


	function vyomAJAXStates()
	{
		//alert(document.forms['form'].country.value)
		updatepage("<font class='textbox'>Retrieving States...</font>","result");
		strURL = "/state.asp?id=" + document.forms['form'].country.value;
		vyomAJAXProcessor(strURL,"result");
	}

	function vyomAJAXCities()
	{
		//alert(document.regFrm.state.value)
		updatepage("<font class='textbox'>Retrieving Cities...</font>","result1");
		strURL = "/city.asp?id=" + document.forms['form'].state.value;
		vyomAJAXProcessor(strURL,"result1");
	}

	function vyomAJAXCompanies()
	{
		//alert(document.myform.referralCompany.value)
		updatepage("<font class='textbox'>Retrieving ...</font>","result3");
		strURL = "/company.asp?id=" + document.forms['myform'].referralCompany.value;
		vyomAJAXProcessor(strURL,"result3");
	}

	