
﻿function PopupImage(img) {
titre="Agrandissement";
w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='Mon image'>");
w.document.write("</TD></TR></TABLE>");
w.document.write("</BODY></HTML>");
w.document.close();
}
function verif () {
switch(BrowserDetect.browser)
{
case "Firefox":
alert ('Utilisateur de Firefox, glissez l\'icone à gauche de l\'adresse url dans la petite maison de démarrage' );
break;
case "Opera":
alert ('Utilisateur d\'Opéra, tapez [CLTR] F12 puis tapez l\'adresse de la page dans le champs prévu à cet effet' );
break;
case "Safari":
alert ('Utilisateur de Safari, glissez l\'icon à gauche de l\'adresse url dans la petite maison de démarrage' );
break;
}
}
function regions_pays_recherche(id_regions,nom_pays) {
document.forms['recherche_cat_dossier'].region_search.value=id_regions;
document.forms['recherche_cat_dossier'].pays_recherche.value=nom_pays;
document.forms['recherche_cat_dossier'].submit();
}
function affiche_sous_rubriques(rubrique)
{
a=getElementsByClass("sous_rubriques", rubrique);
for (i = 0; i < a.length; i++) {
if (a[i].style.display=='none')
{
a[i].style.display='';
}
else
{
a[i].style.display='none';
}
}
}
function getElementsByClass(searchClass, node, tag)
{
var classElements = new Array();
if ( node == null ) node = document;
if ( tag == null ) tag = '*';
var els = node.getElementsByTagName(tag);
var elsLen = els.length;
var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
for (i = 0, j = 0; i < elsLen; i++)
{
if ( pattern.test(els[i].className) )
{
classElements[j] = els[i];
j++;
}
}
return classElements;
}
function etendreBloc(elt_id, bool, label_id){
var elt = document.getElementById(elt_id);
var bloc = getElementsByClass( 'air_recherche_contenu_region_block', elt, 'div' );
bloc = bloc[0].getElementsByTagName('div');
bloc = bloc[0];
if( bool == false )
bloc.style.height='';
else
bloc.style.height=bool+'px';
if( label_id != false )
{
var r_label_id = label_id == 'plus' ? 'moins' : 'plus';
document.getElementById( elt_id + '-' + label_id).style.display='block';
document.getElementById( elt_id + '-' + r_label_id).style.display='none';
}
return false;
}
function visibilite(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (thingId == 'id_texte1')
{
targetElement_value='id_texte2';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_texte2') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('france1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('france2') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('europe1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('europe2') ;
targetElement_non_active.style.display = "none" ;
}
else
{
targetElement_value='id_texte1';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_texte1') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('france1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('france2') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('europe1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('europe2') ;
targetElement_non_active.style.display = "" ;
}
}
function visibilite(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (thingId == 'id_texte1')
{
targetElement_value='id_texte2';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_texte2') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('france1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('france2') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('europe1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('europe2') ;
targetElement_non_active.style.display = "none" ;
}
if (thingId == 'id_texte2')
{
targetElement_value='id_texte1';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_texte1') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('france1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('france2') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('europe1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('europe2') ;
targetElement_non_active.style.display = "" ;
}
if (thingId == 'id_texte_rech1')
{
targetElement_value='id_texte_rech2';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_texte_rech2') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('carte1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('carte2') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('critere1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('critere2') ;
targetElement_non_active.style.display = "none" ;
}
if (thingId == 'id_texte_rech2')
{
targetElement_value='id_texte_rech1';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_texte_rech1') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('carte1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('carte2') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('critere1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('critere2') ;
targetElement_non_active.style.display = "" ;
}
if (thingId == 'carnet_text')
{
targetElement_value='carnet_text';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('carnet') ;
targetElement_value.style.display = "none" ;
}
if (thingId == 'carnet_text_moin')
{
targetElement_value = document.getElementById('carnet_text') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('carnet') ;
targetElement_value.style.display = "" ;
}
if (thingId == 'com_text')
{
targetElement_value='com_text';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('com') ;
targetElement_value.style.display = "none" ;
}
if (thingId == 'com_text_moin')
{
targetElement_value = document.getElementById('com_text') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('com') ;
targetElement_value.style.display = "" ;
}
if (thingId == 'even_text')
{
targetElement_value='even_text';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('even') ;
targetElement_value.style.display = "none" ;
}
if (thingId == 'even_text_moin')
{
targetElement_value = document.getElementById('even_text') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('even') ;
targetElement_value.style.display = "" ;
}
if (thingId == 'album_text')
{
targetElement_value='album_text';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('album') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('moins_france') ;
targetElement_value.style.display = "" ;
}
if (thingId == 'album_text_france_moin')
{
targetElement_value = document.getElementById('album_text') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('moins_france') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('album') ;
targetElement_value.style.display = "" ;
}
if (thingId == 'pays_text')
{
targetElement_value='pays_text';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('pays') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('moins_pays') ;
targetElement_value.style.display = "" ;
}
if (thingId == 'album_text_pays_moin')
{
targetElement_value = document.getElementById('pays_text') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('moins_pays') ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById('pays') ;
targetElement_value.style.display = "" ;
}
}
function form_supp_com(valeur)
{
if (confirm('Voulez-vous vraiment supprimer cet \351l\351ment ainsi que son contenu ?'))
{
document.com_form_supp.valeur_supprimer.value=valeur;
document.forms['com_form_supp'].submit();
}
}
function etoile(valeur, nbre)
{
nbre_radio = nbre - 1;
document.getElementById(valeur).value=nbre;
for ( var i=1; i<=5; i++ )
{
id_etoile_1=valeur+i+'_active';
id_etoile_2=valeur+i;
targetElement_value = document.getElementById(id_etoile_1) ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById(id_etoile_2) ;
targetElement_value.style.display = "" ;
}
for ( var i=1; i<=nbre; i++ )
{
id_etoile_1=valeur+i+'_active';
id_etoile_2=valeur+i;
targetElement_value = document.getElementById(id_etoile_1) ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById(id_etoile_2) ;
targetElement_value.style.display = "none" ;
}
}
function etoile2(valeur, nbre)
{
nbre_radio = nbre - 1;
document.getElementById(valeur).value=nbre;
for ( var i=1; i<=5; i++ )
{
id_etoile_3=valeur+i+'_av';
id_etoile_1=valeur+i+'_active';
id_etoile_2=valeur+i;
targetElement_value = document.getElementById(id_etoile_3) ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById(id_etoile_1) ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById(id_etoile_2) ;
targetElement_value.style.display = "" ;
}
for ( var i=1; i<=nbre; i++ )
{
if ( i == nbre)
{
id_etoile_3=valeur+i+'_av';
id_etoile_1=valeur+i+'_active';
id_etoile_2=valeur+i;
targetElement_value = document.getElementById(id_etoile_1) ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById(id_etoile_2) ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById(id_etoile_3) ;
targetElement_value.style.display = "none" ;
}
else
{
id_etoile_3=valeur+i+'_av';
id_etoile_1=valeur+i+'_active';
id_etoile_2=valeur+i;
targetElement_value = document.getElementById(id_etoile_1) ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById(id_etoile_2) ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById(id_etoile_3) ;
targetElement_value.style.display = "" ;
}
}
}
function changeBackground(ad, cpte, carous_cpte, imag, imag_act, lien){
document.getElementById("carroussel").innerHTML = "<img src='"+ad+"'>"; //"url("+ad+")";
for ( var i=1; i<=carous_cpte; i++ )
{
if (i == cpte)
{
targetElement = document.getElementById('carou_'+i) ;
targetElement.style.display = "" ;
document.getElementById('img_'+i).src = imag_act;
document.getElementById('lien_carroussel').href = lien;
}
else
{
targetElement = document.getElementById('carou_'+i) ;
targetElement.style.display = "none" ;
document.getElementById('img_'+i).src = imag;
}
}
}
function verifier(){
if((document.decouvrir.cat1.value == 'Categories')||(document.decouvrir.marq.value == 'Modeles')||(document.decouvrir.gam.value == 'Marques'))
{
alert ('Veuillez s\351lectionner une option dans tous les champs avant de lancer la recherche ');
document.decouvrir.cat1.focus();
return false;
}
}
function aire_pays(num_pays, count_pays, count_com){
document.form_air.region.options[0].selected=true;
document.form_air.commune.options[0].selected=true;
for ( var i=1; i <= count_pays; i++ )
{
regions = document.form_air.region.options[i].value
pays= document.form_air.region.options[i].id
if( num_pays == 0 )
{
targetElement_value = document.getElementById(regions) ;
targetElement_value.style.display = "" ;
}
else
{
if(pays != num_pays)
{
targetElement_value = document.getElementById( regions ) ;
targetElement_value.style.display = "none" ;
}
else
{
targetElement_value = document.getElementById(regions) ;
targetElement_value.style.display = "" ;
}
}
}
for ( var i=1; i<=count_com; i++ )
{
regions = document.form_air.commune.options[i].value
pays= document.form_air.commune.options[i].id
if(num_pays == 0)
{
targetElement_value = document.getElementById(regions) ;
targetElement_value.style.display = "" ;
}
else
{
if( pays != num_pays )
{
targetElement_value = document.getElementById(regions) ;
targetElement_value.style.display = "none" ;
}
else
{
targetElement_value = document.getElementById(regions) ;
targetElement_value.style.display = "" ;
}
}
}
}
function aire_region(num_region, count_regions, count_com, num_pays, count_pays)
{
document.form_air.commune.options[0].selected=true;
for ( var i=1; i<=count_com; i++ )
{
regions= document.form_air.commune.options[i].label;
departement= document.form_air.commune.options[i].value;
if(regions != num_region)
{
targetElement_value = document.getElementById(departement) ;
targetElement_value.style.display = "none" ;
}
else
{
targetElement_value = document.getElementById(departement) ;
targetElement_value.style.display = "" ;
}
}
for ( var i=1; i<=count_pays; i++ )
{
pays= document.form_air.pays.options[i].id;
if(pays == num_pays)
{
document.form_air.pays.options[i].selected=true;
}
}
}
function aire_com(num_region, count_regions, num_pays, count_pays)
{
for ( var i=1; i<=count_regions; i++ )
{
region= document.form_air.region.options[i].value;
if(region == num_region)
{
document.form_air.region.options[i].selected=true;
}
}
for ( var i=1; i<=count_pays; i++ )
{
pays= document.form_air.pays.options[i].id;
if(pays == num_pays)
{
document.form_air.pays.options[i].selected=true;
}
}
}
function reset_recherche(){
var d=document.form_air;
d.commune.options[0].selected=true;
d.region.options[0].selected=true;
d.pays.options[0].selected=true;
var types = document.getElementsByName('t[]');
for(i=0; i<types.length; i++)
types[i].checked = true;
types = document.getElementsByName('s[]');
for(i=0; i<types.length; i++)
types[i].checked = true;
}
function tri_air(valeur){
document.form_tri.submit()
}
function test_form_air(){
pays= document.form_air.pays.value;
region= document.form_air.region.value;
commune= document.form_air.commune.value;
if(pays  == 'Pays')
{
targetElement_value = document.getElementById("pays_1") ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById("pays_2") ;
targetElement_value.style.display = "" ;
targetElement_value.style.fontSize = 10+"px" ;
document.form_air.pays.focus();
var act_form=1;
}
else
{
targetElement_value = document.getElementById("pays_1") ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById("pays_2") ;
targetElement_value.style.display = "none" ;
}
if(region  == 'Region')
{
targetElement_value = document.getElementById("region_1") ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById("region_2") ;
targetElement_value.style.display = "" ;
targetElement_value.style.fontSize = 10+"px" ;
document.form_air.pays.focus();
var act_form=1;
}
else
{
targetElement_value = document.getElementById("region_1") ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById("region_2") ;
targetElement_value.style.display = "none" ;
}
if(commune  == 'Commune')
{
targetElement_value = document.getElementById("commune_1") ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById("commune_2") ;
targetElement_value.style.display = "" ;
targetElement_value.style.fontSize = 10+"px" ;
document.form_air.pays.focus();
var act_form=1;
}
else
{
targetElement_value = document.getElementById("commune_1") ;
targetElement_value.style.display = "none" ;
targetElement_value = document.getElementById("commune_2") ;
targetElement_value.style.display = "none" ;
}
if(act_form  == 1)
{
return false;
}
}
function verifier_champ_rech(){
var tmp = false;
if ( 	document.form_com.interet1.checked ||
document.form_com.interet2.checked ||
document.form_com.interet3.checked ||
document.form_com.interet4.checked
)
tmp = true;
if( ( document.form_com.pseudo.value == 'Pseudo' ) &&
( tmp === false ) &&
( document.form_com.departement.value == 'departement' )
)
{
alert ('S\351lectionner au moins un crit\350re');
return false;
}
}
function categorie_dossiers(id_cat) {
document.forms['recherche_cat_dossier'].cat_dossier.value=id_cat;
document.forms['recherche_cat_dossier'].submit();
}
function from_cat(name, even){
if(even)
{
document.cat_form2.option_statut2.value=name;
document.forms['cat_form2'].submit();
}
else{
document.cat_form.option_statut.value=name;
document.forms['cat_form'].submit();
}
}
function action(v) {
window.open(v,'_self');
}
function videos(id) {
document.forms['galerie_video'].video.value=id;
document.forms['galerie_video'].submit();
}
function afficher_video(video) {
document.getElementById("zonephoto").innerHTML='<object height="331" width="440"><param value="'+video+'" name="movie"/><param name="WMODE" value="transparent" /><param value="true" name="allowFullScreen"/><param value="always" name="allowScriptAccess"/><embed WMODE="transparent" height="331" width="450" allowscriptaccess="always" allowfullscreen="true" type="application/x-mplayer2" src="'+video+'" /></object><div id="photo_legende">Test legende</div>';
}
function imprimer() {
if (navigator.appVersion.indexOf("Mac",0)>0) {
alert("Cette fonction n\'est pas compatible avec votre ordinateur.\n\nUtilisez plutot la combinaison de touches \"Pomme-P\"");
}
else {
window.print();
}
}
function from_ag(id_for) {
document.forms['frm_'+id_for].submit();
}
function visibilite_region(thingId)
{
var targetElement;
targetElement = document.getElementById(thingId) ;
if (thingId == 'id_france1')
{
targetElement_value='id_europe2';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_europe2') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('region_france1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('region_france2') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('region_europe1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('region_europe2') ;
targetElement_non_active.style.display = "none" ;
}
else
{
targetElement_value='id_france1';
targetElement.style.display = "" ;
targetElement_value = document.getElementById('id_france1') ;
targetElement_value.style.display = "none" ;
targetElement_non_active = document.getElementById('region_france1') ;
targetElement_non_active.style.display = "" ;
targetElement_non_active = document.getElementById('region_france2') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('region_europe1') ;
targetElement_non_active.style.display = "none" ;
targetElement_non_active = document.getElementById('region_europe2') ;
targetElement_non_active.style.display = "" ;
}
}
function deplier_region(id,img,img2)
{
var liste_region;
liste_region = document.getElementById(id) ;
liste_region.style.overflow="visible";
liste_region.style.height="auto";
liste_region.style.color="#A7050C";
document.getElementById("region_plus").innerHTML='<img  src="'+img+'"} border="0" alt="" /> <a href="javascript:ferme_region(\'region_suite\',\''+img+'\',\''+img2+'\');">Moins de r&eacute;gions</a>	';
}
function ferme_region(id,img,img2)
{
var liste_region;
liste_region = document.getElementById(id) ;
liste_region.style.overflow="hidden";
liste_region.style.height="55px";
liste_region.style.color="#A7050C";
document.getElementById("region_plus").innerHTML='<img  src="'+img2+'" border="0" alt="" /> <a href="javascript:deplier_region(\'region_suite\',\''+img+'\',\''+img2+'\');">Plus de r&eacute;gions</a>	';
}
function deplier_pays(id,img,img2)
{
var liste_region;
liste_region = document.getElementById(id) ;
liste_region.style.overflow="visible";
liste_region.style.color="#A7050C";
liste_region.style.height="auto";
document.getElementById("pays_plus").innerHTML='<img  src="'+img+'"} border="0" alt="" /> <a href="javascript:ferme_pays(\'pays_suite\',\''+img+'\',\''+img2+'\');">Moins de pays</a>	';
}
function ferme_pays(id,img,img2)
{
var liste_region;
liste_region = document.getElementById(id) ;
liste_region.style.overflow="hidden";
liste_region.style.color="#A7050C";
liste_region.style.height="55px";
document.getElementById("pays_plus").innerHTML='<img  src="'+img2+'" border="0" alt="" /> <a href="javascript:deplier_pays(\'pays_suite\',\''+img+'\',\''+img2+'\');">Plus de pays</a>	';
}
function detail_emplacement(adresse)
{
window.location=adresse;
}
function afficher_image(images,adresse,legende) {
var oStringObject = new String(adresse);
document.getElementById("zonephoto").innerHTML='<a href="'+oStringObject.slice(9)+'"><img src="'+images+'" width="320" height="190" /> </a><div id="photo_legende">' +legende+ '</div>';
}
function reset_form() {
document.recherche_carnet_voyage.pays.options[0].selected=true;
document.recherche_carnet_voyage.region.options[0].selected=true;
document.recherche_carnet_voyage.departement.options[0].selected=true;
document.getElementById("region").innerHTML='<select name="region" ><option value="0">R&eacute;gion</option></select>';
document.getElementById("departement").innerHTML='<select name="departement" ><option value="0">D&eacute;partement</option></select>';
document.recherche_carnet_voyage.pseudo.value='Saisir un pseudo';
document.recherche_carnet_voyage.ville.value='saisir un nom de ville';
document.recherche_carnet_voyage.duree_voyage[0].checked=false;
document.recherche_carnet_voyage.duree_voyage[1].checked=false;
}
function regions_pays_recherche(id_regions,nom_pays) {
document.forms['recherche_cat_dossier'].region_search.value=id_regions;
document.forms['recherche_cat_dossier'].pays_recherche.value=nom_pays;
document.forms['recherche_cat_dossier'].submit();
}
function verifier_formulaire()
{
if((document.recherche_carnet_voyage.pseudo.value == 'Saisir un pseudo') && (document.recherche_carnet_voyage.ville.value == 'saisir un nom de ville') && (document.recherche_carnet_voyage.pays.value == '0') && (document.recherche_carnet_voyage.region.value == '0') && (document.recherche_carnet_voyage.departement.value == '0') && (document.recherche_carnet_voyage.duree_voyage[0].checked==false) && (document.recherche_carnet_voyage.duree_voyage[1].checked==false))
{
document.getElementById("erreur").style.color='red';
document.getElementById("erreur").innerHTML ='* Veuillez choisir au moins un crit&egrave;re';
document.recherche_carnet_voyage.pays.focus();
return false;
}
}
function verifier_essai()
{
if( (document.essai.type.value == '0') && (document.essai.marque.value == '0') && (document.essai.gamme.value == '0') && (document.essai.modele.value == '0') && (document.essai.millesime.value == '0'))
{
document.getElementById("error").style.color='red';
document.getElementById("error").innerHTML ='* Veuillez choisir au moins un crit&egrave;re';
document.essai.type.focus();
return false;
}
else {
document.forms['essai'].action = "content/view/plain/(marque)/"+ document.essai.marque.value + " ";
}
}
function verifier_aire_form( formObject )
{
if((document.form_air.pays.value == '0') || (document.form_air.region.value == '0'))
{
document.getElementById("erreur_saisi").style.color='red';
document.getElementById("erreur_saisi").innerHTML ='* Le pays et La r&eacute;gion sont obligatoires';
document.form_air.pays.focus();
return false;
}
var uniqueid = formObject.id.split('-');
if( document.getElementById( 'ville-' + uniqueid[1] ).value.toLowerCase() == 'saisir un nom de ville' )
{
document.getElementById( 'ville-' + uniqueid[1] ).value = null;
}
}
function visibilite_zone( container, index )
{
var ongletArray = document.getElementById( container ).childNodes;
var j = 0;
for( i=0; i < ongletArray.length; i++ )
{
if( ongletArray[i].nodeName == 'DIV' ){
if( j != index )
{
ongletArray[i].style.display = 'none';
document.getElementById( container + '-' + ( j+1 ) + '-titre' ).style.display = 'none';
document.getElementById( container + '-' + ( j+1 ) + '-titre-active' ).style.display = '';
}
else
{
ongletArray[i].style.display = 'block';
document.getElementById( container + '-' + ( j+1) + '-titre' ).style.display = '';
document.getElementById( container + '-' + ( j+1 ) + '-titre-active' ).style.display = 'none';
}
j++;
}
}
}
function visibilite_zone2( container, index )
{
var ongletArray = document.getElementById( container ).childNodes;
var j = 0;
for( i=0; i < ongletArray.length; i++ )
{
if( ongletArray[i].nodeName == 'DIV' ){
if( j != index )
{
ongletArray[i].style.display = 'none';
document.getElementById( container + '-' + ( j+1 ) + '-titre-active' ).className = '';
}
else
{
ongletArray[i].style.display = 'block';
document.getElementById( container + '-' + ( j+1 ) + '-titre-active' ).className = 'active';
}
j++;
}
}
}
function createRequest()
{
var  xmlHttp = false;
if(window.XMLHttpRequest){
xmlHttp=new XMLHttpRequest();
}else{
try{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}catch (e) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (e2) {
xmlHttp = false;
}
}
}
return xmlHttp;
}
function updateForm( Objet )
{
document.getElementById("erreur_saisi").innerHTML ='';
var params = Objet.id.split('-');
if( params.length != 2 ) return;
var tBloc = params[0] == 'pays' ? 'region' : 'departement';
var inBloc = params[0] == 'pays' ? 'Région' : 'Département';
if( Objet.value == '0' )
{
if( params[0] == 'pays' )
{
s = document.getElementById('departement-' + params[1]);
while (s.firstChild)
s.removeChild(s.firstChild);
o = document.createElement('option');
o.setAttribute('value', 0);
o.appendChild(document.createTextNode('Département'));
s.appendChild(o);
s = document.getElementById('region-' + params[1]);
while (s.firstChild)
s.removeChild(s.firstChild);
o = document.createElement('option');
o.setAttribute('value', 0);
o.appendChild(document.createTextNode('Région'));
s.appendChild(o);
}
else if( params[0] == 'region' )
{
document.getElementById('departement-' + params[1]).innerHTML = "<option value='0'>D&eacute;partement</option>" ;
s = document.getElementById('departement-' + params[1]);
while (s.firstChild)
s.removeChild(s.firstChild);
o = document.createElement('option');
o.setAttribute('value', 0);
o.appendChild(document.createTextNode('Département'));
s.appendChild(o);
}
return;
}
if( ( params[0] == 'region' ) && ( document.getElementById( 'pays-'+ params[1] ).value.toLowerCase() != 'france' ) )
{
s = document.getElementById('departement-' + params[1]);
while (s.firstChild)
s.removeChild(s.firstChild);
o = document.createElement('option');
o.setAttribute('value', 0);
o.appendChild(document.createTextNode('Département'));
s.appendChild(o);
document.getElementById('departement-' + params[1]).disabled=true;
return;
}
else if( document.getElementById('departement-' + params[1]).disabled )
{
document.getElementById('departement-' + params[1]).disabled = false;
}
tBloc += '-' + params[1];
var rd = Math.random()*1000;
var objetXMLHttp = createRequest();
if( !objetXMLHttp ) return;
var target_path = EZURL + '/requete_Ajax/aire_update?name=' + Objet.value + '&fetchtype=name&identifier=' + params[0] + '&random_var=' + rd;
objetXMLHttp.open( "GET", target_path );
objetXMLHttp.onreadystatechange = function(){
if ( this.readyState == 4 )
{
s = document.getElementById(tBloc);
while (s.firstChild)
s.removeChild(s.firstChild);
o = document.createElement('option');
o.setAttribute('value', 0);
o.appendChild(document.createTextNode(inBloc));
s.appendChild(o);
o_list = this.responseText.split('><');
for (i = 0 ; i < o_list.length ; i++) {
o = document.createElement('option');
m = o_list[i].match(/value="([^"]*)">([^<]*)</);
o.setAttribute('value', m[1]);
o.appendChild(document.createTextNode(m[2]));
s.appendChild(o);
}
}
}
objetXMLHttp.send(null);
}
function favoris(URL, NOM) {
if ( navigator.appName != 'Microsoft Internet Explorer' ) {
window.sidebar.addPanel(NOM, URL ,"");
} else {
window.external.AddFavorite(URL,NOM);
}
}
function bookmarksite(title, url){
if (document.all)
window.external.AddFavorite(url, title);
else if (window.sidebar)
window.sidebar.addPanel(title, url, "")
}
current = 0;
function next()
{
targetElement_value = document.getElementById('button_pre_1') ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById('button_pre_2') ;
targetElement_value.style.display = "none" ;
if (document.slideform.slide[current+1])
{
document.images.show.src = document.slideform.slide[current+1].value;
lien=document.slideform.ad_img.value;
current_img=current+1;
document.lien_form.action= lien+current_img;
document.slideform.slide.selectedIndex = ++current;
if ((document.slideform.nbre_photo.value - 1) == current)
{
targetElement_value = document.getElementById('button_next_2') ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById('button_next_1') ;
targetElement_value.style.display = "none" ;
}
}
return false;
}
function previous()
{
targetElement_value = document.getElementById('button_next_1') ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById('button_next_2') ;
targetElement_value.style.display = "none" ;
if (current-1 >= 0)
{
document.images.show.src = document.slideform.slide[current-1].value;
lien=document.slideform.ad_img.value;
current_img=current+1;
document.lien_form.action= lien+current_img;
document.slideform.slide.selectedIndex = --current;
if (current == 0)
{
targetElement_value = document.getElementById('button_pre_2') ;
targetElement_value.style.display = "" ;
targetElement_value = document.getElementById('button_pre_1') ;
targetElement_value.style.display = "none" ;
}
}
return false;
}
function form_edit_com(node_id,object_id)
{
document.com_form_modif.ContentNodeID.value=node_id;
document.com_form_modif.ContentObjectID.value=object_id;
document.com_form_modif.EditButton.value="Edit";
document.com_form_modif.ContentObjectLanguageCode.value="fre-FR";
document.forms['com_form_modif'].submit();
}
function verifier_album()
{
var annuler = document.editform.RedirectURIAfterPublish.value;
document.editform.RedirectIfDiscarded.value = annuler;
var valeur_action = document.forms['editform'].action;
var nouveau_url = valeur_action.split('/content');
document.forms['editform'].action = nouveau_url[0] + document.editform.RedirectIfDiscarded.value +"/(nul)/1 ";
}
function setHomepage( pageurl )
{
if (document.all)
{
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage(pageurl);
}
else if (window.sidebar)
{
if(window.netscape)
{
try
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
}
catch(e)
{
alert("Vos paramètres de sécurité actuel ne permettent pas de mettre cette page comme la page par défaut");
}
}
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
prefs.setCharPref('browser.startup.homepage',pageurl);
}
}
function decryptEmail( id_elt )
{
elt = document.getElementById(id_elt);
elt.href = 'mailto:' + elt.innerHTML.replace( '<span class="no-spam">spam@no-spam</span>', '' );
}

