function chg_bg(varpostab,clc){ // fonction qui change le fond (numéro id dans le tableau, lancement defil) // définition des différents fonds dans un tableau var img_bg = new Array("/client_space/img_files/home3.jpg","/client_space/img_files/IMG_3509.jpg","/client_space/img_files/IMG_3796.jpg","/client_space/img_files/home.jpg","/client_space/img_files/IMG_20100220_1415.jpg"); var img_bg_l = img_bg.length //verification de l'image actuelle var new_img_temp; for(i=1;i<=img_bg_l;i++){ if(varpostab == i){ if(i == img_bg_l){ j=0; }else{ j=i; } new_img_temp = img_bg[j];// on définie l'image suivante newvarpostab = j+1; } } //changement du fond par un fade jQuery('#ac_bgimage').animate({ opacity:0 },600, function(){document.getElementById("ac_bgimage").src=new_img_temp;}); jQuery('#ac_bgimage').animate({ opacity:1 },1000); //changement toutes les 10s defil = setTimeout("chg_bg(newvarpostab,0)",10000); if(clc == 1){ clearTimeout(defil); // reinit des 10s si changement forcé } /* //changement par fleche de gauche if(((varpostab*1)-1) < 1){ varpostab_G = img_bg_l; }else{ varpostab_G = (varpostab*1)-1; } document.getElementById("varpostabG").value = varpostab_G;// on envoi la valeur à un hidden //changement par fleche de droite if(((varpostab*1)+1) > img_bg_l){ varpostab_D = 1; }else{ varpostab_D = (varpostab*1)+1; } document.getElementById("varpostabD").value = varpostab_D;// on envoi la valeur à un hidden */ } function open_rub(val){ var n_menu = 5; // nombre de menu principal document.getElementById("opcl_"+val).value=1; close_content(); for(j=1;j<=n_menu;j++){ if(j == val){ jQuery("#menu_link_"+j).animate({opacity:0},400); jQuery("#smenu_"+j).slideDown(500); }else{ jQuery("#menu_link_"+j).animate({opacity:1},400); document.getElementById("opcl_"+j).value=0; jQuery("#smenu_"+j).slideUp(500); close_bg(j); } } } function open_bg(val){ jQuery("#bg_menu_"+val).animate({backgroundPosition:"0px"},300); jQuery("#img_menu_"+val).animate({opacity:0},300); } function close_bg(val){ if(document.getElementById("opcl_"+val).value==0){ jQuery("#bg_menu_"+val).animate({backgroundPosition:"410px"},200); jQuery("#img_menu_"+val).animate({opacity:1},200); } } function opcl_menu(){ if(document.getElementById("opcl_menu").value==0){// fermeture du menu jQuery("#bloc_g").hide(200); jQuery("#ch_menu").animate({right:0},200); document.getElementById("opcl_menu").value=1; }else{ jQuery("#bloc_g").show(200); jQuery("#ch_menu").animate({right:411},200); document.getElementById("opcl_menu").value=0; } } function opcl_credit(){ if(document.getElementById("opcl_credit").value==0){// fermeture du menu jQuery("#bloc_d").hide(100); jQuery("#ch_credit").animate({left:0},100); document.getElementById("opcl_credit").value=1; }else{ jQuery("#bloc_d").show(100); jQuery("#ch_credit").animate({left:217},100); document.getElementById("opcl_credit").value=0; } } function show_content(val){ close_content(); jQuery("#content_"+val).slideDown(200); } function show_contact(){ close_content(); jQuery("#content_contact").slideDown(200); } function show_client(){ close_content(); jQuery("#content_client").slideDown(200); } function close_content(){ close_contact(); close_client(); n_content = 100; for(j=1;j<=n_content;j++){ jQuery("#content_"+j).slideUp(200); } } function close_contact(){ jQuery("#content_contact").slideUp(200); } function close_client(){ jQuery("#content_client").slideUp(200); } function envjax(nom,val){ jQuery.ajax({ url: 'verif_client_access.php', type : 'POST', data : 'logi='+nom+'&mdp='+val, success: function(ret) { //$('#rep_client_space').fadeIn("slow"); jQuery('#rep_client_space').html(ret); } }); } function hide_connect_error(){ document.getElementById("logi").className='input_ok'; document.getElementById("mdp").className='input_ok'; document.getElementById("rep_client_space").innerHTML=''; } function show_connect_error(){ document.fclient.logi.value=''; document.fclient.mdp.value=''; document.getElementById('logi').className='input_error'; document.getElementById('mdp').className='input_error'; } function envjax_mail(prenom,nom,mail,objet,message){ jQuery.ajax({ url: 'verif_mail.php', type : 'POST', data : 'prenom='+prenom+'&nom='+nom+'&mail='+mail+'&objet='+objet+'&message='+message, success: function(ret) { jQuery('#rep_mail').html(ret); } }); } function hide_mail_error(val){ document.getElementById(val).className='input_ok'; } function show_mail_error(val){ document.getElementById(val).className='input_error'; }