// JavaScript Document
function GetXmlHttpObject()
{
	var xmlHttp=null;
	try
	{
		// Firefox, Opera 8.0+, Safari
		xmlHttp=new XMLHttpRequest();
	}
	catch (e)
	{
		// Internet Explorer
		try
		{
			xmlHttp=new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch (e)
		{
			xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
		}
	}
	
	if (xmlHttp==null)
 	{
  		alert ("Your browser does not support AJAX!");
		return;
  	}
	else
		return xmlHttp;
}

function showAssesment(ac)
{	
	var xmlHttp = GetXmlHttpObject();
	
			document.getElementById("cat").innerHTML="Loading...";
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==1)	//Loading
		{
			document.getElementById("cat").innerHTML="Loading...";
		}
		if(xmlHttp.readyState==4)	//Complete
		{
			document.getElementById("cat").innerHTML = xmlHttp.responseText
		}
	}
	url = "assesment_result.php?ac="+ac;
	xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
}
function showCourses(ac)
{	
	var xmlHttp = GetXmlHttpObject();
	
			document.getElementById("cat1").innerHTML="Loading...";
	xmlHttp.onreadystatechange=function()
	{
		if(xmlHttp.readyState==1)	//Loading
		{
			document.getElementById("cat1").innerHTML="Loading...";
		}
		if(xmlHttp.readyState==4)	//Complete
		{
			document.getElementById("cat1").innerHTML = xmlHttp.responseText
		}
	}
	url = "course_result.php?ac="+ac;
	xmlHttp.open("GET",url,true);
		xmlHttp.send(null);
}