var xmlHttp

function getLocationByCourse(strCourseId)
{
	 if (strCourseId.length==0)
	{ 
		document.getElementById("div_location").innerHTML=""
		document.getElementById("div_date").innerHTML=""
		document.getElementById("div_status").innerHTML="<input type=hidden name='course_detail'>"
	return
	}
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="ajax/getLocationByCourse.php";	
	url=url+"?cid="+strCourseId	;
	url=url+"&sid="+Math.random();
	url=url+"&tmstmp="+new Date().getTime();
	xmlHttp.onreadystatechange = stateChangedForLocation 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
} 

function stateChangedForLocation() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 		
		document.getElementById("div_date").innerHTML=""
		document.getElementById("div_status").innerHTML="<input type=hidden name='course_detail'>"
		document.getElementById("div_location").innerHTML=xmlHttp.responseText 
	} 
} 

