function show_menu(label, id, total, ancre) { if (label == 'menu') { setCookieSessionJs('showMenuItem', id); } if(document.all) { var objPuce, objLiens; for(var i = 1; i <= total; ++i) { objPuce = eval('document.all.'+label+'puce'+i); objLiens = eval('document.all.'+label+'liens'+i); if(i == id) { if(objPuce.src.search('croix0.gif') != -1) { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } else if(objPuce.src.search('croix1.gif') != -1) { objLiens.className = 'vis'; objPuce.src = 'http://www.gay-tonik.com/images/croix0.gif'; } } else { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } } if(ancre == 1) { objPuce = eval('document.all.'+label+'puce'+id); objPuce.scrollIntoView(true); } } else if(document.getElementById) { var objPuce, objLiens; for(var i = 1; i <= total; ++i) { objPuce = document.getElementById(label+'puce'+i); objLiens = document.getElementById(label+'liens'+i); if(i == id) { if(objPuce.src.search('croix0.gif') != -1) { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } else if(objPuce.src.search('croix1.gif') != -1) { objLiens.className = 'vis'; objPuce.src = 'http://www.gay-tonik.com/images/croix0.gif'; } } else { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } } if(ancre == 1) { objPuce = document.getElementById(label+'puce'+id); objPuce.scrollIntoView(true); } } return false; } function show_menu_no_count(label, id, ancre) { if (label == 'menu') { setCookieSessionJs('showMenuItem', id); } if(document.all) { var objPuce, objLiens; var i = 1; objPuce = eval('document.all.'+label+'puce'+i); objLiens = eval('document.all.'+label+'liens'+i); while (objPuce && objLiens) { if(i == id) { if(objPuce.src.search('croix0.gif') != -1) { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } else if(objPuce.src.search('croix1.gif') != -1) { objLiens.className = 'vis'; objPuce.src = 'http://www.gay-tonik.com/images/croix0.gif'; } } else { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } ++i; objPuce = eval('document.all.'+label+'puce'+i); objLiens = eval('document.all.'+label+'liens'+i); } if(ancre == 1) { objPuce = eval('document.all.'+label+'puce'+id); //objPuce.scrollIntoView(true); window.scrollTo(objPuce.clientLeft,objPuce.clientTop); } } else if(document.getElementById) { var objPuce, objLiens; var i = 1; objPuce = document.getElementById(label+'puce'+i); objLiens = document.getElementById(label+'liens'+i); while (objPuce && objLiens) { if(i == id) { if(objPuce.src.search('croix0.gif') != -1) { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } else if(objPuce.src.search('croix1.gif') != -1) { objLiens.className = 'vis'; objPuce.src = 'http://www.gay-tonik.com/images/croix0.gif'; } } else { objLiens.className = 'hid'; objPuce.src = 'http://www.gay-tonik.com/images/croix1.gif'; } ++i; objPuce = document.getElementById(label+'puce'+i); objLiens = document.getElementById(label+'liens'+i); } if(ancre == 1) { objPuce = document.getElementById(label+'puce'+id); //objPuce.scrollIntoView(true); window.scrollTo(objPuce.clientLeft,objPuce.clientTop); } } } function printAndClose(){ window.print(); window.close(); } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function copycode(obj) { var textRange = document.body.createTextRange(); textRange.moveToElementText(obj); textRange.execCommand("Copy"); obj.select(); } function popupcentree(page,largeur,hauteur,options) { var top=(screen.height-hauteur)/2; var left=(screen.width-largeur)/2; window.open(page,"","top="+top+",left="+left+",width="+largeur+",height="+hauteur+","+options); } function confirme(lien) { if (confirm ("Voulez vous supprimer définitivement ce compte ?")) { if (confirm ('Attention, ce compte sera detruit.')) { document.location=lien } } } function change_couleur(nomchamp,table,ancien) { var controle=/^([A-Fa-f0-9])+$/; var couleur = document.form.elements[nomchamp].value; if (!controle.test(couleur)) { var couleur = ancien; document.form.elements[nomchamp].value = ancien; } document.form.elements[table].style.backgroundColor=couleur } function addFav(url,lemodule) { var titre= prompt("Donnez un titre à votre favoris :", ""); var titre = escape(titre); if(titre != '' && titre != "null") { var url = escape(url); location.href = 'http://www.gay-tonik.com/membres/favoris/add_favoris.php?interface='+lemodule+'&uri='+url+'&titre='+titre; } } function confirme2(lien) { if (confirm ("Voulez vous supprimer cette URL de vos favoris ?")) { if (confirm ('Attention, ce favoris sera retiré.')) { document.location=lien; } } } function setCookieJs(name,value) { pathval = '/'; mydate = new Date(); oyfn=mydate.getTime()+(365*24*60*60*1000); mydate.setTime(oyfn); pathval="/"; ck = name + "=" + escape(value); ck += "; path=" + pathval; ck += "; expires=" + mydate; ck += "; domain="+window.location.hostname; document.cookie = ck; } function setCookieSessionJs(name,value) { pathval = '/'; pathval="/"; ck = name + "=" + escape(value); ck += "; path=" + pathval; ck += "; domain="+window.location.hostname; document.cookie = ck; } function compare(a, b){ if(a != '' && a == b){ return true; }else{ return false; } } function compteTouche(nomForm){ nomForm.hEmailConf.value = (nomForm.hEmailConf.value * 1) + 1; } function antiCopyPaste(objCourant, nomForm){ if(nomForm.hEmail.value == 1 && nomForm.hEmailConf.value < 5){ objCourant.value=''; nomForm.hEmailConf.value=0; alert("Veuillez saisir votre adresse email sans faire de copier/coller."); return false; } }