var xmlHttp
function GetXmlHttpObject()
{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
	return objXMLHttp
}
//==============================================another function==========================
function showColor(col)
{ 
//alert(col);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="display_color.php"
	url=url+"?color="+col

	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged_color 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged_color() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("scom_col").innerHTML=xmlHttp.responseText 
	} 
}
//==============================================sub category====================================
function showvechile(cid)
{ 
//alert(cid);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="display_vechile.php"
	url=url+"?cid="+cid
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged_subcat
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged_subcat() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("scom_vechile").innerHTML=xmlHttp.responseText 
	} 
}
//============================================show make code End=========================================================
function showmakerepair(vid)
{ 
//alert(cid);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="display_make_repair.php"
	url=url+"?vid="+vid
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=makeChanged_make_repair
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function makeChanged_make_repair() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("scom_make_repair").innerHTML=xmlHttp.responseText 
	} 
}
//===========================================================================================================

//==============================================Show Vehile Repair====================================
function showvechilerepair(vid)
{ 
//alert(vid);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="display_vechile_repair.php"
	url=url+"?vid="+vid
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged_subcat_repair
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged_subcat_repair() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("scom_vechile_repair").innerHTML=xmlHttp.responseText 
	} 
}
//---========================================show make code=========================================================

function showmake(cid)
{ 
//alert(cid);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="display_make.php"
	url=url+"?cid="+cid
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=makeChanged_make
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

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

//============================================show make code End=========================================================

//============================================= show state =======================================
function showstate(cid)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="display_state.php"
	url=url+"?cid="+cid
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged_state
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

function stateChanged_state() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById("scom_state").innerHTML=xmlHttp.responseText 
	} 
}
//=====================================================================================================================

function showstate_repair(cid)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="display_state.php"
	url=url+"?cid="+cid
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=stateChanged_state_repair
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

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

//========================================================================================================
function show_discount(val_id)
{ 
//alert(val);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="price_discount.php"
	url=url+"?val_id="+val_id
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=discount
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

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



//========================================================================================================

function show_memberform(mode)
{ 
//alert(mode);
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
var url="get_form.php"
	url=url+"?mode="+mode
	url=url+"&sid="+Math.random()
	//alert(url);
	xmlHttp.onreadystatechange=disply_form
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}

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





