/**********************************************
	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 vyomAJAXCategories()
	{
		
		updatepage("<font class='specialtext'>Checking...</font>","result3");
		strURL = "/ad-min/getCategories.asp?id=" + frmResources.states.value;
		vyomAJAXProcessor(strURL,"result3");
	}

function vyomAJAXStates()
	{
		
		updatepage("<font class='specialtext'>Checking...</font>","result3");
		strURL = "/ad-min/getCategories.asp?id=" + frm.stateStream.value;
		vyomAJAXProcessor(strURL,"result3");
	}
function vyomAJAXCities()
	{
		updatepage("<font class='specialtext'>Checking...</font>","result4");
		strURL = "/greRegister.asp?id=" + document.forms['form'].country.value;
		vyomAJAXProcessor(strURL,"result4");
	}
function vyomAJAXModify()
	{
		
		updatepage("<font class='specialtext'>Checking...</font>","result5");
		strURL = "/ad-min/getModify.asp?id=" + frmResources.states.value;
		vyomAJAXProcessor(strURL,"result5");
	}
	function vyomAJAXTab(value)
	{
		var date = new Date();
		var secs = date.getMilliseconds;

		updatepage("<br><br> <table align=center><tr><td><font class=bigText> Loading </font></td></tr></table> <br> <center> <img src='/images/loading12.gif'></center><br><br>","result");
		strURL = "getJobs.asp?id=" + value + "&rnd=" + secs;
		vyomAJAXProcessor(strURL,"result");
	}

	function vyomAJAXTab2(value)
	{
		var date = new Date();
		var secs = date.getMilliseconds;

		updatepage("<br><br> <table align=center><tr><td><font class=bigText> Loading </font></td></tr></table> <br> <center> <img src='/images/loading12.gif'></center><br><br>","result1");
		strURL = "getSite.asp?id=" + value + "&rnd=" + secs;
		vyomAJAXProcessor(strURL,"result1");
	}

	function vyomAJAXTab3(value)
	{
		var date = new Date();
		var secs = date.getMilliseconds;

		updatepage("<br><br> <table align=center><tr><td><font class=bigText> Loading </font></td></tr></table> <br> <center> <img src='/images/loading12.gif'></center><br><br>","result2");
		strURL = "getSite1.asp?id=" + value + "&rnd=" + secs;
		vyomAJAXProcessor(strURL,"result2");
	}

	function vyomAJAXTab4(value)
	{
		var date = new Date();
		var secs = date.getMilliseconds;

		updatepage("<br><br> <table align=center><tr><td><font class=bigText> Loading </font></td></tr></table> <br> <center> <img src='/images/loading12.gif'></center><br><br>","result3");
		strURL = "getJobs1.asp?id=" + value + "&rnd=" + secs;
		vyomAJAXProcessor(strURL,"result3");
	}

	
	function updatepage(str,divName){
		document.getElementById(divName).innerHTML = str;
	}

	function vyomAJAXCheckUser()
	{    
		updatepage("<font class='specialtext'>Checking...</font>","result");
		strURL = "/candidates/checkUser.asp?email=" + document.forms['frmUserRegistration'].txtEmail.value;
		vyomAJAXProcessor(strURL,"result");
	}
function onestopmbajobs()
		{
			strURL = "/ad-min/gre-mail/gremodel.asp?id=" + document.forms['frm'].course.value;
			vyomAJAXProcessor(strURL,"course1");
		}

