/**********************************************
	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 vyomAJAXCities(value)
{		
	if (value == 0)
	{
		updatepage("<font class='smalltext'> Retrieving Cities...</font>","cityList");
		strURL = "getCities.asp?id=" + value;
		vyomAJAXProcessor(strURL,"cityList");
	}
}*/

	
function updatepage(str,divName){
	document.getElementById(divName).innerHTML = str;
}

function date(xxxxx) {
	 var maintainplus = '';
 	var numval = xxxxx.value
 	if ( numval.charAt(0)=='+' ){ var maintainplus = '+';}
 	curphonevar = numval.replace(/[\\A-Za-z!"£$%^&*+_={};:'@#~,.¦\/<>?|`¬\]\[]/g,'');
 	xxxxx.value = maintainplus + curphonevar;
 	var maintainplus = '';
 	xxxxx.focus;
}

//***********************displaying read message***************

function onestopmbajobs()
{
	strURL = "/ad-min/mail/mba-jobs.asp?id=" + document.forms['frm'].course.value;
	vyomAJAXProcessor(strURL,"course1");
}
function vyomAJAXstate()
{	 
	updatepage("<IMG SRC='/images/loading1.gif'>","state1");
	strURL = "/user-management/country.asp?id=" + document.forms['regFrm'].country.value;
	vyomAJAXProcessor(strURL,"state1");
}
function vyomAJAXRegister()
{	 
	updatepage("<IMG SRC='/images/loading1.gif'>","result1");
	strURL = "/ad-min/university/getCountryRegistration.asp?id=" + document.forms['frm'].cmbCountry.value;
	vyomAJAXProcessor(strURL,"result1");
}
function vyomCity()
{   
	
	updatepage("<IMG SRC='/images/loading1.gif'>","result12");
	strURL = "/user-management/getcity.asp?id=" + document.forms['regFrm'].state.value;
	vyomAJAXProcessor(strURL,"result12");
}
function vyomRead()
{   
	strURL = "/mba-interview-questions/readMore.asp?id=" + document.forms['read'].readId.value;
	vyomAJAXProcessor(strURL,"read");
}


