var xmlHttp

function showCalender(req_month,year,today) {
	//alert(req_month);
	var url="calender.php?req_month=" + req_month + "&year=" + year + "&today=" + today
	//showContactTimer1(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowCalender)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 
function stateshowCalender() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtshowCalender").innerHTML=xmlHttp.responseText 
	} 
} 

function showTabs(str,icid,srch){
	//alert(str);
	//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowTabs)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

function stateshowTabs(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtArea").innerHTML=xmlHttp.responseText 
	} 
} 
function showTabs1(str,icid,srch){
	//alert(str);
	//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowTabs1)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

function stateshowTabs1(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtArea1").innerHTML=xmlHttp.responseText 
	} 
}
function showTabs2(str,icid,srch){
	//alert(str);
	//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowTabs2)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

function stateshowTabs2(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtArea2").innerHTML=xmlHttp.responseText 
	} 
}
function showTabs3(str,icid,srch){
	//alert(str);
	//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowTabs3)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

function stateshowTabs3(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtArea3").innerHTML=xmlHttp.responseText 
	} 
}
function showTabs4(str,icid,srch){
	//alert(str);
	//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowTabs4)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

function stateshowTabs4(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtArea4").innerHTML=xmlHttp.responseText 
	} 
}
function showTabs5(str,icid,srch){
	//alert(str);
	//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowTabs5)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

function stateshowTabs5(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtArea5").innerHTML=xmlHttp.responseText 
	} 
}
function showTabs6(str,icid,srch){
	//alert(str);
	//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshowTabs6)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

function stateshowTabs6(){ 
if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtArea6").innerHTML=xmlHttp.responseText 
	} 
}
//show_model
function show_model(str,icid,srch){ 
//alert(str);
//alert(iCID);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshow_model)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

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

//index
function show_brandin(str,icid,srch){
	//alert(str);
	//alert(iCID);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshow_brandin)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

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

//modelindex
function show_modelin(str,icid,srch){
	//alert(str);
	
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stshow_modelin)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

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


//show_category
function show_landhouse(str,icid,srch){ 
//alert(str);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshow_landhouse)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

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

//show automobile brand
function show_autobrand(str,icid,srch){ 
//alert(icid);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshow_autobrand)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 

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

//show automobile model
function show_automodel(str,icid,srch){ 
//alert(str);
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateshow_automodel)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
} 


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

//device2 change
function showDevice2(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedProvince2)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedProvince2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtDeviceCart").innerHTML=xmlHttp.responseText 
	} 
} 
//FP change
function showProduct(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedProduct)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedProduct() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtProduct").innerHTML=xmlHttp.responseText 
	} 
} 
////Compatible Device change
function showComDeviceModel(str,icid,srch)
{ 
	
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar	
	xmlHttp=GetXmlHttpObject(stateComDeviceModel)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateComDeviceModel() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtComDeviceModel").innerHTML=xmlHttp.responseText 
	} 
} 
////Compatible Device model change
function showComDeviceModelSess(str,icid,srch)
{ 
	
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar	
	xmlHttp=GetXmlHttpObject(stateComDeviceModelSess)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateComDeviceModelSess() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtComDeviceModelSess").innerHTML=xmlHttp.responseText 
	} 
} 
//District change
function showPageDistrict(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedDistrict)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedDistrict() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtRegion").innerHTML=xmlHttp.responseText 
	} 
} 
// International
function showPageInternational(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedInternational)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

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

// area of work
function showPageAreaofWork(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedAreaofWork)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedAreaofWork() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtAreaofWork").innerHTML=xmlHttp.responseText
		document.getElementById("txtExtUser").innerHTML="<a href=\"javascript:showPageExtUser('ExtUser','Y','$srch')\"><u>Add</u></a>" 
	} 
} 
// area of work2
function showPageAreaofWork2(str,icid,srch)
{ 	
	
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedAreaofWork2)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	//showPageAreaofWork("AreaofWork","N","")	
	
} 

function stateChangedAreaofWork2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtAreaofWork2").innerHTML=xmlHttp.responseText
		document.getElementById("txtAreaofWork").innerHTML="<a href=\"javascript:showPageAreaofWork('AreaofWork','Y','$srch')\"><u>Add another</u></a>" 
		document.getElementById("txtExtUser").innerHTML="<a href=\"javascript:showPageExtUser('ExtUser','Y','$srch')\"><u>Add</u></a>" 
	} 
} 

// ExtUser
function showPageExtUser(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedExtUser)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedExtUser() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtExtUser").innerHTML=xmlHttp.responseText 
		document.getElementById("txtAreaofWork").innerHTML="<a href=\"javascript:showPageAreaofWork('AreaofWork','Y','$srch')\"><u>Add</u></a>" 
	} 
} 
// ExtUser2
function showPageExtUser2(str,icid,srch)
{ 	
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedExtUser2)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedExtUser2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtExtUser2").innerHTML=xmlHttp.responseText 
		document.getElementById("txtExtUser").innerHTML="<a href=\"javascript:showPageExtUser('ExtUser','Y','$srch')\"><u>Add another</u></a>" 
		document.getElementById("txtAreaofWork").innerHTML="<a href=\"javascript:showPageAreaofWork('AreaofWork','Y','$srch')\"><u>Add</u></a>" 
	} 
} 
//end
// OperationRegion
function showPageOperationRegion(str,icid,srch)
{ 
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedOperationRegion)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedOperationRegion() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtOperationRegion").innerHTML=xmlHttp.responseText 
		document.getElementById("txtAreaofWork").innerHTML="<a href=\"javascript:showPageAreaofWork('AreaofWork','Y','$srch')\"><u>Add</u></a>" 
	} 
} 
// OperationRegion2
function showPageOperationRegion2(str,icid,srch)
{ 	
	var url="getpage.php?sid=" + Math.random() + "&q=" + str + "&iCID=" + icid + "&srch=" + srch	
	//showContactTimer(); // quickly begin the load bar
	xmlHttp=GetXmlHttpObject(stateChangedOperationRegion2)
	xmlHttp.open("GET", url , true)
	xmlHttp.send(null)
	
} 

function stateChangedOperationRegion2() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("txtOperationRegion2").innerHTML=xmlHttp.responseText 
		document.getElementById("txtExtUser").innerHTML="<a href=\"javascript:showPageExtUser('ExtUser','Y','$srch')\"><u>Add</u></a>" 
		document.getElementById("txtAreaofWork").innerHTML="<a href=\"javascript:showPageAreaofWork('AreaofWork','Y','$srch')\"><u>Add</u></a>" 
	} 
} 
//end

function GetXmlHttpObject(handler)
{ 
var objXmlHttp=null

if (navigator.userAgent.indexOf("Opera")>=0)
{
alert("This example doesn't work in Opera") 
return 
}
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
}
} 

function showContactTimer () {
	var loader = document.getElementById('loadBar');
	loader.style.display = 'block';
	sentTimer = setTimeout("hideContactTimer()",1000);
}
function hideContactTimer () {
	var loader = document.getElementById('loadBar');
	loader.style.display = "none";
}

function showContactTimer1 () {
	var loader = document.getElementById('loadBar1');
	//loader.style.display = 'block';
	sentTimer = setTimeout("hideContactTimer1()",1000);
}
function hideContactTimer1 () {
	var loader = document.getElementById('loadBar1');
	//loader.style.display = "none";
}



 


