 // 2006-2007 EINDEN Studio (info@einden.com) Tous droits réservés. //////////////////////
// ///////////////////////////////////////////////////////////////////////////////////////

// Fonctions Search /////////////////////////////////////////////////////////////////////
function recherche_focus() { if(document.getElementById('page_recherche_string').value=="Recherche") document.getElementById('page_recherche_string').value=""; }
function recherche_blur()  { if(!document.getElementById('page_recherche_string').value) document.getElementById('page_recherche_string').value="Recherche"; }


// Fonctions Vérification Formulaire /////////////////////////////////////////////////////
function contacts_verifier()
{
   if(document.form.nom.value.length<3)          { alert("Veuillez saisir votre nom !"); return false; }
   if(document.form.prenom.value.length<3)       { alert("Veuillez saisir votre prénom !"); return false; }
   if(document.form.email.value.length<3)        { alert("Veuillez saisir votre e-mail !"); return false; }   
   if(!document.form.destinataire.selectedIndex) { alert("Veuillez sélectionner un destinataire !"); return false; }   
 
   return true;	
}

function obtenir_documentation()
{
   var form=document.formulaire_form;	
	
   if(form.doc_prenom.value.length<3)       { alert("Veuillez saisir votre prénom !"); return false }	
   if(form.doc_nom.value.length<3)          { alert("Veuillez saisir votre nom !"); return false }
   if(form.doc_email.value.length<3)        { alert("Veuillez saisir votre e-mail !"); return false } 
   if(form.doc_confirmer.value!=form.doc_email.value)  { alert("Votre e-mail et sa confirmation sont différents !"); return false }       
   if(form.doc_organisme.value.length<3)     { alert("Veuillez saisir votre collectivité ou organisme !"); return false }
   if(form.doc_codepostal.value.length<3)   { alert("Veuillez saisir votre code postal !"); return false }	
	
   return true;		
}

function abonnement()
{
   var form=document.formulaire_form;
	
   if(form.abn_prenom.value.length<3)       { alert("Veuillez saisir votre prénom !"); return false }	
   if(form.abn_nom.value.length<3)          { alert("Veuillez saisir votre nom !"); return false }
   if(form.abn_email.value.length<3)        { alert("Veuillez saisir votre e-mail !"); return false } 
   if(form.abn_confirmer.value!=form.abn_email.value)  { alert("Votre e-mail et sa confirmation sont différents !"); return false }       
   if(form.abn_organisme.value.length<3)     { alert("Veuillez saisir votre collectivité ou organisme !"); return false }
   if(form.abn_codepostal.value.length<3)   { alert("Veuillez saisir votre code postal !"); return false }

   return true;		
}

function devenir_partenaire()
{
   var form=document.formulaire_form;
	
   if(form.part_prenom.value.length<3)       { alert("Veuillez saisir votre prénom !"); return false }	
   if(form.part_nom.value.length<3)          { alert("Veuillez saisir votre nom !"); return false }
   if(form.part_societe.value.length<3)      { alert("Veuillez saisir le nom de votre société !"); return false }
   if(form.part_fonction.value.length<3)     { alert("Veuillez saisir votre fonction !"); return false }
   if(form.part_codepostal.value.length<3)   { alert("Veuillez saisir votre code postal !"); return false }
   if(form.part_telephone.value.length<3)    { alert("Veuillez saisir votre téléphone !"); return false }    
   if(form.part_email.value.length<3)        { alert("Veuillez saisir votre e-mail !"); return false } 
   if(form.part_confirmer.value!=form.part_email.value)  { alert("Votre e-mail et sa confirmation sont différents !"); return false }   

   return true;		
}

var screenshot_inc=-1;

function LoadScreenShot(change)
{
  window.focus();
  change=parseInt(change);

  if((!change || change=='NaN') && screenshot_inc<screenshot_list.length-2) screenshot_inc++;
  else if(change && screenshot_inc>0) screenshot_inc--;
  
  document.getElementById('screenshot_previous').style.visibility=(!screenshot_inc)?'hidden':'visible';
  document.getElementById('screenshot_next').style.visibility=(screenshot_inc==screenshot_list.length-2)?'hidden':'visible';

  document.getElementById('screenshot').src=screenshot_dir+screenshot_list[screenshot_inc];
}

