/* saisie.js */

function splashScreen(){
	testCookie = litCook();
	if(testCookie == ''){
	var splash = document.getElementById('splash');
	
	splash.innerHTML += '<p style="background-color:#932091; padding-bottom:20px; width:730px;  z-index:2000; position:absolute;margin-right:30px; font-family:trebuchet,arial,verdana,sans-serif; font-size:0.9em"><a href="#" style="color:#FFF;"onclick="return goToIndex();">Passer l\'intro  </a></p>';
	
	// splash.style.width = '960px';
	// splash.style.height= '650px';
	splash.style.backgroundColor= '#FFF';

	//Déclencher un compteur pour faire disparaitre l'animation
	window.setTimeout('goToIndex()', 35000);
	

	askCook();
	}
	else{
		goToIndex();
	}

}

function goToIndex(){
	window.location = "/socrif/Accueil";
	/*var splash = document.getElementById('splash');
	var shadowBox = document.getElementById('shadowBox');
	
	splash.innerHTML = '';
	splash.style.width = '';
	splash.style.height= '';
	splash.style.backgroundColor= '';

	shadowBox.style.width = '';
	shadowBox.style.height= '';
	shadowBox.style.backgroundColor= '';*/
}


  function askCook() {
      c='noSplash';
      cre_cook0('splash',c);
      }

   function litCook() {
	nom = 'splash';
      c=lit_cook(nom);
      if(c != "") return c;
	else return '';
      }

 function lit_cook(nom) {
      var deb,fin
      deb = document.cookie.indexOf(nom + "=")
      if (deb >= 0) {
         deb += nom.length + 1
         fin = document.cookie.indexOf(";",deb)
         if (fin < 0) fin = document.cookie.length
         return unescape(document.cookie.substring(deb,fin))
         }
      return ""
      }

  function cre_cook0(nom,contenu) {
      document.cookie = nom + "=" + escape(contenu)
      }

  function setPermissions(){

      jQuery.ajax({
          type:      'POST',
          url:       "<?php echo url_for('gestion_inscrits/setPermissions', true) ?>",
          success:   function ()
              {
              alert("Votre demande a bien Ã©tÃ© prise en compte");
          },
              error:   function ()
              {
                  alert("Votre demande n'a pas Ã©tÃ© prise en compte dÃ» Ã  une erreur technique.");
              }
      });
	return false;
}  
function setAdherent(){
		//alert('hello';)
	return false;
}  
