function update_categs_useri(CatID,subcatID,db_cat,db_subcat,db_tip_oferta){
	id_camp_err='msg_err_cat';
	xmlHttp=GetXmlHttpObject();
	xmlHttp.open('post','contul_meu/form_adauga_anunt_cat.php');
	xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	xmlHttp.onreadystatechange=insertError;
	xmlHttp.send('CatID=' + CatID + '&subcatID=' + subcatID + '&db_cat=' + db_cat + '&db_subcat=' + db_subcat + '&db_tip_oferta=' + db_tip_oferta);
	}

function update_categs(CatID,subcatID){
	id_camp_err='msg_err_cat';
	
	xmlHttp=GetXmlHttpObject();
	xmlHttp.open('post','form_adauga_anunt_cat.php');
	xmlHttp.setRequestHeader('Content-type','application/x-www-form-urlencoded');
	xmlHttp.onreadystatechange=insertError;
	xmlHttp.send('CatID=' + CatID + '&subcatID=' + subcatID);
	}
function insertError() 
{
	if (xmlHttp.readyState==4 || xmlHttp.readyState=="complete")
	{ 
		document.getElementById(id_camp_err).innerHTML=xmlHttp.responseText 
	
	} 
} 

function GetXmlHttpObject()
	{ 
	var objXMLHttp=null
	if (window.XMLHttpRequest) //penru mozilla
		{
		objXMLHttp=new XMLHttpRequest()
		}
	else if (window.ActiveXObject) //pentru internet explorer
		{
		objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP")
		}
	return objXMLHttp
	} 
