function charger(nom_div,url)
{
    if (window.XMLHttpRequest)
       xhr_object = new XMLHttpRequest();

    else if(window.ActiveXObject)
        xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
    else
        return(false);

    xhr_object.open("GET", url, false);
    xhr_object.send(null);
    if (xhr_object.readyState == 4 && (xhr_object.status == 200 || xhr_object.status == 0))
    {
         document.getElementById(nom_div).innerHTML = xhr_object.responseText;
    }
    else 
        return(false);
}

/* CALENDRIER */
function calendrier(mois,annee,annee_soiree,mois_soiree,jour_soiree)
{
	if (window.XMLHttpRequest)
		xhr_object = new XMLHttpRequest();
	else if(window.ActiveXObject)
		xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
	else
		return(false);
	
	var url = "template/include/calendar.php?month="+mois+"&year="+annee+"&annee_soiree="+annee_soiree+"&mois_soiree="+mois_soiree+"&jour_soiree="+jour_soiree;

	xhr_object.open("GET", url, false);
	xhr_object.send(null);
		
	if (xhr_object.readyState == 4 && (xhr_object.status == 200 || xhr_object.status == 0))
		document.getElementById('calendrier_bloc').innerHTML = xhr_object.responseText;
	else 
		return(false);
	
}

/* popup */
function popup(strURL,strType,strHeight,strWidth) 
{
	closeWin();
	var strOptions="";
	if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
	if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
	if (strType=="scroll") strOptions="status,height="+strHeight+",width="+strWidth+",scrollbars";
	newWin = window.open(strURL, 'newWin', strOptions);
	newWin.focus();
}
var newWin = null;
function closeWin(){
	if (newWin != null){
		if(!newWin.closed)
			newWin.close();
	}
}

function Write_Object_no(URL,width,height)

{

  //URL DU SWF A CHERCHER

  document.write('<center>');

  document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + width + '" height="' + height + '">');

  document.write('<param name=movie value="' + URL + document.location.search +'">');

  document.write('<param name=quality value=high>');

  document.write('<embed src="' + URL + document.location.search + '" quality=high wmode="transparent" type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');

  document.write('</embed>');

  document.write('</object>');

  document.write('</center>');

}

function doBlink() {
  var blink = document.all.tags("blink")
  for (var i=0; i < blink.length; i++)
	  blink[i].style.visibility = blink[i].style.visibility == "" ? "hidden" : "" 
}

function startBlink() 
{
  if (document.all)
    setInterval("doBlink()",1000)
}

function sablier() {
	document.body.style.cursor="wait"; 
	startBlink() ;
}

/*---------------------------------*/

