/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

function fAjaxGet(sUrl,sFn)
{
	var xhr_object = null;
	if(window.XMLHttpRequest) // Firefox
      {xhr_object = new XMLHttpRequest(); }
	else if(window.ActiveXObject) // Internet Explorer
      {xhr_object = new ActiveXObject("Microsoft.XMLHTTP");}
	else	{ alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
		      return;
			}

	xhr_object.open("GET", sUrl , true);

	xhr_object.onreadystatechange = function()
		{
	      if(xhr_object.readyState == 4)
			{
				sFn(xhr_object.responseText);


			}
	   }
	   xhr_object.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	   xhr_object.send(null);
}
function $(sId)
{
    return document.getElementById(sId);
}
function affPopUp(sUrl)
{
w=window.open(sUrl,'page','width=600,height=400');
w.focus();
}
function fJsAfficheListe(sListe)
{
    $('liste').innerHTML=sListe;
}
  // this function is need to work around
  // a bug in IE related to element attributes

function writeTo(object)
{
    
    sMail="imotordev";
    sMail+="@";
    sMail+="orange";
    sMail+=".fr";
    alert('Votre client de messagerie va etre lance\nNotre adresse Email :\n '+sMail);
	sMail="mailto:"+sMail;
    object.href=sMail;
}


