var xmlDoc;
var oXMLHTTP;
var strDivName;
var strComboName;
var otherFunctionCalls;
function fnAjaxCombo(sURL,strDivName1,strComboName1,otherFunctionCalls1) 
{
//	alert(sURL);
	strDivName	=strDivName1;
	strComboName = strComboName1;
	otherFunctionCalls = otherFunctionCalls1;
	//alert(otherFunctionCalls);
	if (otherFunctionCalls==null || otherFunctionCalls=='undefined')
	{
		//alert("valid cond");	
		otherFunctionCalls=" ";
	}
	document.body.style.cursor='wait';
	document.getElementById(strDivName).innerHTML = "<select name='"+strComboName+"' style='font-family: Verdana; font-size: 10pt; border: 1.0 solid #808080'></SELECT>";
	GetXmlHttpObject();
	//var oXMLHTTP=new ActiveXObject("Microsoft.XMLHTTP");
//	alert("2");
	if (oXMLHTTP!=null)
	{
//		alert("3");
		oXMLHTTP.onreadystatechange=state_Change;
//		alert("9");
		oXMLHTTP.open( "GET", sURL, true );
//		alert("10");
		oXMLHTTP.send(null);
//		alert("11");
		
	}
	else
	{
		alert("Your browser does not support XMLHTTP.")
		document.body.style.cursor='auto';
	}
	document.body.style.cursor='auto';
}

function state_Change()
{
//	alert("4");
	if (oXMLHTTP.readyState==4)
	{
//		alert("5");
		if (oXMLHTTP.status==200)
		{
//			alert("6");
			if (oXMLHTTP.responseText != "") 
			{
//				alert("7");
				var Options = oXMLHTTP.responseText;
//				alert(Options);
				document.getElementById(strDivName).innerHTML = "<select name='"+strComboName+"' " + otherFunctionCalls +"    style='font-family: Verdana; font-size: 10pt; border: 1.0 solid #808080'>" + Options + "</SELECT>";
				//document.getElementById("ShibirDates").innerHTML ="BAPA";
//				alert("8");
				//document.getElementById("ShibirDates").innerHTML = Options;

				
			}
			else
			{
//				alert("No data found");
				document.getElementById(strDivName).innerHTML = "<select name='"+strComboName+"' style='font-family: Verdana; font-size: 10pt; border: 1.0 solid #808080'><option value=''>None</option></SELECT>";
				//document.getElementById(strDivName).innerHTML = "<option value=''>None</option>";
			}
		}
	}
}
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");
		}
	  }*/

		// code for Mozilla, etc.
		if (window.XMLHttpRequest)
		{
		  oXMLHTTP=new XMLHttpRequest()
		}
		// code for IE
		else if (window.ActiveXObject)
		{
			oXMLHTTP=new ActiveXObject("Microsoft.XMLHTTP");
			//alert("created");
		}

	//return xmlHttp;
}


function fnAjaxXML(sURL) 
{
	//alert(sURL);

	document.body.style.cursor='wait';
	//document.getElementById(strDivName).innerHTML = "<select name='"+strComboName+"' style='font-family: Verdana; font-size: 10pt; border: 1.0 solid #808080'></SELECT>";
	
	GetXmlHttpObject();
	//var oXMLHTTP=new ActiveXObject("Microsoft.XMLHTTP");
	//alert("2");
	if (oXMLHTTP!=null)
	{
		//alert("3");
		oXMLHTTP.onreadystatechange=xml_call;
//		alert("9");
		oXMLHTTP.open( "GET", sURL, false );
//		alert("10");
		oXMLHTTP.send(null);
//		alert("11");
		
	}
	else
	{
		alert("Your browser does not support XMLHTTP.")
		document.body.style.cursor='auto';
	}
	document.body.style.cursor='auto';
}

function xml_call()
		{
			//alert("4");
			if (oXMLHTTP.readyState==4)
			{
				//alert("5");
				if (oXMLHTTP.status==200)
				{
					//alert("6");
					if (oXMLHTTP.responseText != "") 
					{
						//alert("7");
						
						xmlDoc=oXMLHTTP.responseXML.documentElement;
						//alert(xmlDoc);
					}
					else
					{
						//alert("No data found");
						//return "null string";
					}
				}
			}
		}

