function GetXmlHttpObject()
{ 
	var objXMLHttp=null;
	if (window.XMLHttpRequest)
	{
		objXMLHttp=new XMLHttpRequest()
	}
	else if (window.ActiveXObject)
	{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
	}
		return objXMLHttp
}

//-----------------------------------------------

function user_check(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_username_check.php?user=" + t;
	
	xmlHttp.onreadystatechange=view_username_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_username_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_username').innerHTML=str
		
	}
}
function email_check(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_email_check.php?user=" + t;
	
	xmlHttp.onreadystatechange=view_email_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_email_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_email').innerHTML=str
		
	}
}

function getQuan_x(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_x 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_quan_cbo_x() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_quan_x').innerHTML=str
		
	}
}

function getQuanTT(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_quantt_cbo.php?tinh=" + t;
	
	xmlHttp.onreadystatechange=view_quan_cbott 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_quan_cbott() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('cont_quantt').innerHTML=str
		
	}
}

function kh_check(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_makh_check.php?kh_code=" + t;
	
	xmlHttp.onreadystatechange=view_kh_check
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_kh_check() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('kh_check').innerHTML=str
		
	}
}

function hd_check(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_mahd_check.php?hd_code=" + t;
	//alert url;
	xmlHttp.onreadystatechange=view_hd_check
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_hd_check() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('hd_check').innerHTML=str
		
	}
}
function sp_check(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sp_check.php?sp_name=" + t;
	//alert url;
	xmlHttp.onreadystatechange=view_hd_check
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_sp_check() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('sp_check').innerHTML=str
		
	}
}

function dc_check(t)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_dc_check.php?dc_code=" + t;
	//alert url;
	xmlHttp.onreadystatechange=view_dc_check
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}


function view_dc_check() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('dc_check').innerHTML=str
		
	}
}


function getModel(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_subject_cbo.php?type=" + mad;
	
	xmlHttp.onreadystatechange=view_subject
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_subject() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('subject').innerHTML=str
		
	}
}
function getModel1(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_period_cbo.php?subj=" + mad ;
	
	xmlHttp.onreadystatechange=view_period_cbo
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_period_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('period').innerHTML=str
		
	}
}

//////////////
function getModelused(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_teacher_cbo.php?per=" + mad;
	
	xmlHttp.onreadystatechange=view_teacher_cbo 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_teacher_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('tea').innerHTML=str
	}
}
///////////////////
function getModelsed1(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_Model_cboused1.php?menumadein1=" + mad;
	
	xmlHttp.onreadystatechange=view_Model_cboused1 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_Model_cboused1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('model1').innerHTML=str
	}
}
/////////////////////////

function getData(name)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sosanh.php?menuName=" + name;
	
	xmlHttp.onreadystatechange=view_sosanh 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_sosanh() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('detail').innerHTML=str
		
	}
}
function getData1(name)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sosanh.php?menuName=" + name;
	
	xmlHttp.onreadystatechange=view_sosanh1 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_sosanh1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('detail1').innerHTML=str
	}
}
//////////////////
function getDataused(name)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sosanh_used.php?menuName=" + name;
	
	xmlHttp.onreadystatechange=view_sosanh_used 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_sosanh_used() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('detail').innerHTML=str
		
	}
}
function getDataused1(name)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_sosanh_used.php?menuName=" + name;
	
	xmlHttp.onreadystatechange=view_sosanh_used1 
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_sosanh_used1() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('detail1').innerHTML=str
	}
}
function getModel123(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_subject_cbo.php?sub=" + mad;
	
	xmlHttp.onreadystatechange=view_Model_cbo123
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_Model_cbo123() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('room').innerHTML=str
		
	}
}
function getModel1234(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_Model_cbo1234.php?menuimage=" + mad;
	
	xmlHttp.onreadystatechange=view_Model_cbo1234
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_Model_cbo1234() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('model').innerHTML=str
		
	}
}
function getModel13(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_period_teacher_cbo.php?city=" + mad;
	
	xmlHttp.onreadystatechange=view_period_teacher_cbo
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_period_teacher_cbo() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('period').innerHTML=str
		
	}
}
///////////////////////

function getModel125(mad)
{ 
	xmlHttp=GetXmlHttpObject()
	if (xmlHttp==null)
	{
		alert ("Browser does not support HTTP Request")
		return
	} 
	var url="view_period_teacher_cbo.php?city=" + mad;
	
	xmlHttp.onreadystatechange=view_Model_cbo125
	xmlHttp.open("GET",url,true)
	xmlHttp.send(null)
}
function view_Model_cbo125() 
{ 
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{
		var str=new String();
		str=xmlHttp.responseText;
		document.getElementById('room').innerHTML=str
		
	}
}
/////////////

