// JavaScript Document

function ShowRef(koi){
	url = "showref.php";
	
	myRequest.open("GET", url+"?id="+koi, true); //ask our XMLHTTPRequest object to open a server connection
	myRequest.onreadystatechange = function(){
		if(myRequest.readyState == 4) { // we are only interested in readyState of 4, i.e. "loaded"
			if(myRequest.status == 200) { // if server HTTP response is "OK"
				document.getElementById('LayerRef').style.display = "block";
				document.getElementById('LayerRef').innerHTML = myRequest.responseText;
			} else {
				alert("An error has occurred: " + myRequest.statusText); // issue an error message for any other HTTP response
			}
		}
	}
	myRequest.send(null);// and finally send the request
}


function RefClose(){
	document.getElementById('LayerRef').innerHTML="";
	document.getElementById('LayerRef').style.display = "none";
	
}

function protectmail(origine,lien){
	learo="benjaminsisko";
	lepoint="jonathanarcher";
	origine=origine.split(learo);
	origine[0]+="@";
	origine=origine[0].concat(origine[1]);
	origine=origine.split(lepoint);
	origine[0]+=".";
	origine=origine[0].concat(origine[1]);
	if(lien){
		return '<a href="'+lien+'">'+origine+'</a>';
	}else{
		return '<a href="mailto:'+origine+'">'+origine+'</a>';
	}
}





function HideIntro(){
	document.getElementById('intro').style.display = "none";
}

function ShowFlash(url,largeur,hauteur){
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" name="bout-home-pub" width="'+largeur+'" height="'+hauteur+'" align="middle">');
	document.write('<param name="allowScriptAccess" value="sameDomain" />');
	document.write('<param name="allowFullScreen" value="false" />');
	document.write('<param name="menu" value="false" />');
	document.write('<param name="movie" value="'+url+'" />');
	document.write('<param name="quality" value="high" /><param name="wmode" value="transparent" />');
	document.write('<param name="bgcolor" value="#163c40" />');
	document.write('<param name="LOOP" value="false"><param name="PLAY" value="false">');
	document.write('<embed src="'+url+'" width="'+largeur+'" height="'+hauteur+'" loop="false" align="middle" quality="high" wmode="transparent" bgcolor="#163c40" name="bout-home-pub" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" play="false" />');
	document.write('</object>');
}


//AJAX ===============================================================================
function getXMLHTTPRequest(){
var req = false;
try
  {
   req = new XMLHttpRequest(); /* e.g. Firefox */
  }
catch(err1)
  {
  try
    {
     req = new ActiveXObject("Msxml2.XMLHTTP");
  /* some versions IE */
    }
  catch(err2)
    {
    try
      {
       req = new ActiveXObject("Microsoft.XMLHTTP");
  /* some versions IE */
      }
      catch(err3)
        {
         req = false;
        }
    }
  }
return req;
}
var myRequest = getXMLHTTPRequest();







