
  var hauteur_cal="100%";
  var largeur_cal="225";
  
  var nom_div1='calendrier';
  var nom_div2='periode';

  function affiche_calendrier(num,act,dur)
  {

	var cont_div1='<iframe frameborder="0" width="100%" height="160" marginwidth="0" marginheight="0"  scrolling="no" frameborder="0" src="skilocation/calendrier/pop2.php?frm=frm&ch=d&datem='+ num +'&dateact='+ act +'&duree=' + dur +'"></iframe>';

	//on s'occupe de la date 'courante' sélectionné


if (window.pageYOffset) {
    var posts = window.pageYOffset;
    var posbs = window.innerHeight;
  } else {
    var posts = document.body.scrollTop;
    var posbs = document.body.clientHeight;
  }


posbs2 = posbs+posts;


    document.getElementById(nom_div1).innerHTML=cont_div1;
    document.getElementById(nom_div1).style.position="relative";
    document.getElementById(nom_div1).style.visibility="visible";  
    document.getElementById(nom_div2).style.position="absolute";
    document.getElementById(nom_div2).style.visibility="hidden"; 
}


function ferme_calendrier()
  {
 document.getElementById(nom_div1).style.visibility="hidden";
 document.getElementById(nom_div1).style.position="absolute";

}

function ouvre_coordo()
  {
 document.getElementById('inscrit').style.display="none";
 document.getElementById('inscrit').style.visibility="hidden";
 document.getElementById('coordo').style.display="inline";
 document.getElementById('coordo').style.visibility="visible";
}

function ouvre_inscrit()
  {
 document.getElementById('coordo').style.display="none";
 document.getElementById('coordo').style.visibility="hidden";
 document.getElementById('inscrit').style.display="inline";
 document.getElementById('inscrit').style.visibility="visible";
}


function XHConn()
{
  var xmlhttp, bComplete = false;
  try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); }
  catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); }
  catch (e) { try { xmlhttp = new XMLHttpRequest(); }
  catch (e) { xmlhttp = false; }}}
  if (!xmlhttp) return null;
  this.connect = function(sURL, sMethod, sVars, fnDone)
  {
    if (!xmlhttp) return false;
    bComplete = false;
    sMethod = sMethod.toUpperCase();

    try {
      if (sMethod == "GET")
      {
        xmlhttp.open(sMethod, sURL+"?"+sVars, true);
        sVars = "";
      }
      else
      {
        xmlhttp.open(sMethod, sURL, true);
        xmlhttp.setRequestHeader("Method", "POST "+sURL+" HTTP/1.1");
        xmlhttp.setRequestHeader("Content-Type",
          "application/x-www-form-urlencoded");
      }
      xmlhttp.onreadystatechange = function(){
        if (xmlhttp.readyState == 4 && !bComplete)
        {
          bComplete = true;
          fnDone(xmlhttp);
        }};
      xmlhttp.send(sVars);
    }
    catch(z) { return false; }
    return true;
  };
  return this;
}

function affiche (url,requete,include)
{
var myConn = new XHConn();
if (!myConn) alert("XMLHTTP non disponible.");
var cacharge = function (oXML) { document.getElementById(include).innerHTML = oXML.responseText; };

document.getElementById(include).innerHTML = "<center><img src='skilocation/images/loading.gif' /></center>";
myConn.connect(url, "GET", requete, cacharge);

var resu = requete.indexOf("selct=1")

if (resu >= "40") {
window.setTimeout("window.location.reload()",300);
}

}


function passew() {

	var e=document.formulaire.email3.value;
	var p=document.formulaire.pass2.value;
	affiche('skilocation/utile.php','dmd=8&email='+e+'&passe='+p,'ident');
	} 


function couleur(obj) {
     obj.style.backgroundColor = "#FFFFFF";
}


function prechargeimg()
{
heavyImage = new Image();
heavyImage.src = "skilocation/images/rouge.gif";
}


