<!--JQUERY//-->
function loadAjax(MyUrl,DivContent){
document.getElementById(DivContent).innerHTML='<br/><div align="center"><img src="/images/anim_ajax1_big.gif" alt="" /><div id="contentLoading"><!--Loading...--></div></div><br/>';

jQuery(function($) {
$("#"+DivContent).load(MyUrl);
});
$("#"+DivContent).animate({
   left: 50, opacity: 'show'
 }, 500);
//$("#"+DivContent).slideDown("slow");

$().ajaxSend(function(r,s){
$("#contentLoading").show();
});

$().ajaxStop(function(r,s){
$("#contentLoading").fadeOut("fast");
});

}


function getContent(url,divname){
	var xhr_object = null;
	var contentString ='NO CONTENT';
	if(window.XMLHttpRequest) // Firefox
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // Internet Explorer
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else { // XMLHttpRequest non supporté par le navigateur
		alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		return;
	}
		xhr_object.open("GET", url, true);
		xhr_object.onreadystatechange = function() {
		if(xhr_object.readyState == 4){
			//alert(xhr_object.responseText);
			contentString = xhr_object.responseText;
			document.getElementById(divname).innerHTML = contentString;
		}
	}
	xhr_object.send(null);
}
function OpenBrWindow(theURL,winName,features, myWidth, myHeight, isCenter) { //v3.0
  if(window.screen)if(isCenter)if(isCenter=="true"){
    var myLeft = (screen.width-myWidth)/2;
    var myTop = (screen.height-myHeight)/2;
    features+=(features!='')?',':'';
    features+=',left='+myLeft+',top='+myTop;
  }
  neo=window.open(theURL,winName,features+((features!='')?',':'')+'width='+myWidth+',height='+myHeight);
  if(neo.window.focus){neo.window.focus();}
}
function changeUrlAjaxIframe(url,divname){
	//if(window.readyState==4){
	//document.getElementById(divname).innerHTML ='<img src="images/loading.gif" alt="" />';
	var xhr_object = null;
	var contentString ='NO CONTENT';
	if(window.XMLHttpRequest) // Firefox
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject) // Internet Explorer
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else { // XMLHttpRequest non supporté par le navigateur
		alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		return;
	}
	xhr_object.open("GET", url, true); //async
	//xhr_object.open("GET", url, false); //sync
	//http://www.xul.fr/XMLHttpRequest.html
	xhr_object.onreadystatechange = function() {
		if(xhr_object.readyState == 4){
			contentString = xhr_object.responseText;
			window.parent.document.getElementById(divname).innerHTML = contentString;
		}
		//while(xhr_object.readyState == 4){}// Utile pour forcer l'attente de fin de script (probleme asynchrone!!!)

	}
	xhr_object.send(null);
	//}
}
