var xmlHttp

function fillcombos(type,id)
{ 
//	alert(type+'='+id);
	if (id==0)	return;
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		 alert ("Browser does not support HTTP Request")
		 return
	}
	var url="getcombos.php"
	url=url+"?type="+type
	url=url+"&id="+id
	xmlHttp.onreadystatechange=stateChanged 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
    { 
		 //document.getElementById("txtHint").innerHTML=xmlHttp.responseText 
		 vresponse=xmlHttp.responseText;
		 vresponse=vresponse.split("|");
		 vtype=vresponse[0];
		 voptions=vresponse[1];
//		 alert(vresponse);
		 if (vtype=='certification')	document.getElementById('cmbCertification').innerHTML=voptions;
		 else
		 if (vtype=='exam')				document.getElementById('cmbExam').innerHTML=voptions;
		 
    } 
}



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");
  }
 }
return xmlHttp;
}