function createRequestObject()
{	var request_o; //declare the variable to hold the object.
	var browser = navigator.appName; //find the browser name
	if(browser == "Microsoft Internet Explorer")
		request_o = new ActiveXObject("Microsoft.XMLHTTP");
	else		
		request_o = new XMLHttpRequest();	
	return request_o; //return the object
}
/******************** BEGIN : EXAMPLE Dont Edit ******************************************
var http = createRequestObject(); 
function getStudents()
{	http.open('get', 'ajax_test.php?action=get_student&id=' 
			+ document.frmStudent.course.value);
	http.onreadystatechange = handleStudents; 
	http.send(null);
}
function handleStudents()
{	if(http.readyState == 4)
	{	var response = http.responseText;		
		document.getElementById('student_list').innerHTML = response;
	}
}
/******************** END : EXAMPLE Dont Edit ******************************************/
var http = createRequestObject(); 
			//************************ BEGIN : StateOptions *********************************
	
function getLocation()
{	
	
	http.open('get', 'ajax_test.php?action=getLocation&d_id='+ document.frmdate.d_id.value);
	http.onreadystatechange = handlegetLocation; 
	http.send(null);
}
function handlegetLocation()
{	
	if(http.readyState == 4)
	{	var response = http.responseText;		
		document.getElementById('show_location').innerHTML = response;
	}
}		
		
		
//**********************************END ***** Search [to get location select]***************************/	
		
function getLocation1()
{	
		
	http.open('get', 'ajax_test.php?action=getLocation1&hr_id='+ document.frmdate.hr_id.value);
	http.onreadystatechange = handlegetLocation1; 
	http.send(null);
}
function handlegetLocation1()
{	
	if(http.readyState == 4)
	{	var response = http.responseText;		
		document.getElementById('show_location1').innerHTML = response;
	}
}				
		
		
		
		

