
function getObject(id,itemid){
new Ajax.Updater('inp2', "index.php?option=com_content&task=view&action=content_inline&id="+id+"&Itemid="+itemid, {asynchronous:true, evalScripts:true, method:'GET'});
}


function test(id){
$('nom_id').value = id
return id;
}




function getXhr(id,itemid) {
	
	var xhr = null;
	
	//firefox
	if (window.XMLHttpRequest) {
	xhr = new XMLHttpRequest();
	}
	
	//ie
	else if (window.ActiveXObject) {
	try {
	xhr = new ActiveXObject("Msxml2.XMLHTTP");
	}
	catch (e) {
	xhr = new ActiveXObject("Microsoft.XMLHTTP");
	}
	}
	
	//non supporté
	else {
	alert("Fonction non supportée par le navigateur");
	xhr = false;
	}
	
	return (xhr);
	}
	
	function getTrack()
	{
	var xhr = getXhr();
	
	//on définit l'appel de la fonction au retour serveur
	xhr.onreadystatechange = function() {
	
	if (xhr.readyState == 4 && xhr.status == 200) {
	var resultat = xhr.responseText;
	document.getElementById('inp2').innerHTML=resultat;
	}
	
	};
	
	//on appelle le fichier reponse.txt
	xhr.open("GET","index.php?option=com_content&task=view&id="+eval(id)+"&Itemid="+eval(itemid),true);
	xhr.send(null);
}




