function GetXmlHttpObject()
{ 
	var objXMLHttp=null;
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
		return objXMLHttp
}

//-----------------------------------------------

function getSP1(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sp_cbo_1.php?cat_id=" + t;
	
	xmlHttp.onreadystatechange=view_sp_cbo_left 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_sp_cbo_left () 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_SP1').innerHTML=str
		
	}
}
function getSP1_Detail(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sosanh_detail_left.php?pro_code=" + t;
	
	xmlHttp.onreadystatechange=view_sp_cbo_left_detail 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_sp_cbo_left_detail () 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_SP1_Detail').innerHTML=str
		
	}
}
function getSP2(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sp_cbo_2.php?cat_id=" + t;
	
	xmlHttp.onreadystatechange=view_sp_cbo_right
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_sp_cbo_right () 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_SP2').innerHTML=str
		
	}
}
function getSP2_Detail(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sosanh_detail_right.php?pro_code=" + t;
	
	xmlHttp.onreadystatechange=view_sp_cbo_right_detail 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_sp_cbo_right_detail () 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_SP2_Detail').innerHTML=str
		
	}
}
function getQuan(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_quan_cbo.php?tinh=" + t;
	
	xmlHttp.onreadystatechange=view_quan_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_quan_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_quan').innerHTML=str
		
	}
}
function getTruong(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_truonghoc_cbo.php?quan=" + t;
	
	xmlHttp.onreadystatechange=view_truong_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_truong_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_truong').innerHTML=str
		
	}
}
function getKhuvuc(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_tinh_cbo.php?mien=" + t;
	
	xmlHttp.onreadystatechange=view_khuvuc_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_khuvuc_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_khuvuc').innerHTML=str
		
	}
}
function getNH(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_nhanhieu_cbo.php?nh=" + t;
	
	xmlHttp.onreadystatechange=view_nhanhieu_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_nhanhieu_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_nhanhieu').innerHTML=str
		
	}
}

function getThanhvien(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_thanhvien_cbo.php?loai=" + t;
	
	xmlHttp.onreadystatechange=view_thanhvien_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_thanhvien_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_tv').innerHTML=str
		
	}
}

function getKythuat(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_kythuat_v.php?n_cat=" + t;
	
	xmlHttp.onreadystatechange=view_kythuat_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_kythuat_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('kythuat').innerHTML=str
		
	}
}
