function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null;

if (navigator.userAgent.indexOf("MSIE")>=0)
{ 
var strName="Msxml2.XMLHTTP";
if (navigator.appVersion.indexOf("MSIE 5.5")>=0)
{
strName="Microsoft.XMLHTTP";
} 
try
{ 
objXmlHttp=new ActiveXObject(strName);
objXmlHttp.onreadystatechange=handler;
return objXmlHttp;
} 
catch(e)
{ 
alert("Error. Scripting for ActiveX might be disabled");
return;
} 
} 
if (navigator.userAgent.indexOf("Mozilla")>=0)
{
objXmlHttp=new XMLHttpRequest();
objXmlHttp.onload=handler;
objXmlHttp.onerror=handler;
return objXmlHttp;
}
} 
//=============== Load Caste =======================================
function Getmsg(id)
{ 
//alert(id);
//alert(pwd);
var url="ajaxexp.asp?ID="+ id;
//alert(url);
xmlHttp=GetXmlHttpObject(stateChanged1);
xmlHttp.open("GET", url , true);
xmlHttp.send(null);
} 

function stateChanged1() 
{ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
{
 
	document.getElementById('caste1').innerHTML=xmlHttp.responseText;
 
}

}



//=============== Load Caste =======================================
function Getsubcast(id,eid)
{ 
var url="ajax.asp?typ=ssc&ID="  + id +"&eid=" +eid;

 
xmlHttp=GetXmlHttpObject(castestateChanged);
xmlHttp.open("GET", url , true);
xmlHttp.send(null);
} 
function castestateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{  
	  document.getElementById('subcaste_load').innerHTML =xmlHttp.responseText; 
 	}
} 
//=============== Load Exp Caste =======================================
function Getexpcaste(id,eid,sid)
{ 

//alert(pwd);
var url="ajaxexp.asp?typ=sec&ID="  + id +"&eid=" +eid;
 

xmlHttp=GetXmlHttpObject(expstateChanged);
xmlHttp.open("GET", url , true);
xmlHttp.send(null);
} 
function expstateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	  document.getElementById('expcaste_load').innerHTML =xmlHttp.responseText; 
	}
} 
//=============== Load Exp sub Caste =======================================
function Getexpsubcaste(id,eid)
{ 
var url="ajaxexp.asp?typ=sesc&ID="  + id+"&eid=" +eid;

 //alert(url);
xmlHttp=GetXmlHttpObject(expcastestateChanged);
xmlHttp.open("GET", url , true);
xmlHttp.send(null);
} 
function expcastestateChanged() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{   
	  document.getElementById('expsubcaste_load').innerHTML =xmlHttp.responseText; 
 	}
} 