// JavaScript Document
var xmlHttp

function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}
function hid_div1(divid)
{
	var vdivaid=document.getElementById(divid);
		
	document.getElementById(divid).style.display="none";
}
function show_div1_js(divid)
{
			document.getElementById("tax_for1").style.display="block";
			hid_div1("tax_for2"); 
}
function show_div2_js(divid)
{
			document.getElementById("tax_for2").style.display="block";
			hid_div1("tax_for1"); 
}
function show_div1(pagename,divid)
	{

			
	
		xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=pagename+"&divid="+divid;

	xmlHttp.onreadystatechange=onchange_tab1
	xmlHttp.open("GET",url,true)
	
      xmlHttp.send(null);
			
		var vdivaid=document.getElementById(divid);
				
		//document.getElementById(divid).style.display="block";
		//hid_div1("tax_for2");
	}

	function onchange_tab1() 
	{ 
	
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
		
			document.getElementById("tax_for1").innerHTML=xmlHttp.responseText 
				document.getElementById("tax_for1").style.display="block";
			hid_div1("tax_for2"); 
		} 
	
	}
	function show_div2(pagename,divid)
	{

		xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url=pagename+"&divid="+divid;

	xmlHttp.onreadystatechange=onchange_tab2
	xmlHttp.open("GET",url,true)
	
      xmlHttp.send(null);
			
		var vdivaid=document.getElementById(divid);
			
		//document.getElementById(divid).style.display="block";
				
	}

	function onchange_tab2() 
	{ 
	
		if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
		{ 
		
			document.getElementById("tax_for2").innerHTML=xmlHttp.responseText 
				document.getElementById("tax_for2").style.display="block";
			hid_div1("tax_for1");
		} 
	
	}
//============== Model ================
function getAjaxPageS(cid)
{ 
 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="stateagax.php"
	parameters="cid="+cid
	xmlHttp.onreadystatechange=onchange_st
	xmlHttp.open("POST",url,true)
		xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);

}
function getAjaxPageC_S(cid,stid)
{ 
 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="cust_stateagax.php"
	parameters="cid="+cid+"&sel_state="+stid;
	
	xmlHttp.onreadystatechange=onchange_st
	xmlHttp.open("POST",url,true)
		xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);

}


function getAjaxPagefeat(pid,uid)
{ 
 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="featureajax.php"
	parameters="pid="+pid+"&uid="+uid
	//	alert(parameters);
	xmlHttp.onreadystatechange=onchange_feature_id
	xmlHttp.open("POST",url,true)
		xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);

}

function onchange_feature_id() 
{ 
	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("feature_id").innerHTML=xmlHttp.responseText 
	} 
	
}



function onchange_st() 
{ 
	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("stateid").innerHTML=xmlHttp.responseText 
	} 
	
}



function getAjaxPageE(email)
{ 
 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="emailajax.php"
	parameters="email="+email
	xmlHttp.onreadystatechange=onchange_email
	xmlHttp.open("POST",url,true)
		xmlHttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
      xmlHttp.setRequestHeader("Content-length", parameters.length);
      xmlHttp.setRequestHeader("Connection", "close");
      xmlHttp.send(parameters);

}


function onchange_email() 
{ 
	
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
	document.getElementById("email_id").innerHTML=xmlHttp.responseText 
	} 
	
}








