var menus_actifs=new Array();menus_actifs[0]=false;menus_actifs[1]=false;menus_actifs[2]=false;menus_actifs[3]=false;menus_actifs[4]=false;var prechargement=new Array();var hauteur=0;var largeur=0;var precharge=new Array();var delai=0;var texte_entre="";var texte_champ="";var antiflood=false;var id_elem_courant=-1;var type_elem_courant="";var reponse_courante="";var largeur_courante=0;var hauteur_courante=0;var elem_a_deplacer=null;var posY=-1000;var depl_element=false;var posSourisX;var posSourisY;var decalageElementX=0;var decalageElementY=0;var noms_menus=new Array("images","mangas","videos","jeux","xxx","partenaires");var NOTE_0="/thm/"+themeSite+"/img/note_mini_0.png";var NOTE_05="/thm/"+themeSite+"/img/note_mini_0.5.png";var NOTE_1="/thm/"+themeSite+"/img/note_mini_1.png";var NOTE_15="/thm/"+themeSite+"/img/note_mini_1.5.png";var NOTE_2="/thm/"+themeSite+"/img/note_mini_2.png";var NOTE_25="/thm/"+themeSite+"/img/note_mini_2.5.png";var NOTE_3="/thm/"+themeSite+"/img/note_mini_3.png";var NOTE_35="/thm/"+themeSite+"/img/note_mini_3.5.png";var NOTE_4="/thm/"+themeSite+"/img/note_mini_4.png";var NOTE_45="/thm/"+themeSite+"/img/note_mini_4.5.png";var NOTE_5="/thm/"+themeSite+"/img/note_mini_5.png";var ETOILE_VIDE="/thm/"+themeSite+"/img/etoile_vide.png";var ETOILE_PLEINE="/thm/"+themeSite+"/img/etoile_pleine.png";var ETOILE_DEMI="/thm/"+themeSite+"/img/etoile_demi.png";function precharger(){var a=new Array(NOTE_0,NOTE_05,NOTE_1,NOTE_15,NOTE_2,NOTE_25,NOTE_3,NOTE_35,NOTE_4,NOTE_45,NOTE_5,ETOILE_VIDE,ETOILE_PLEINE,ETOILE_DEMI);for(var b=0;b<a.length;b++){prechargement[b]=new Image();prechargement[b].src=a[b]}}var NUM_STARS=5;var UPDATE_FREQ=4;var RESET_DELAY=3;if(langueSite=="fr"){var SAVING_MSG="Enregistrement...";var VOTE_MSG="Vote enregistr&eacute;. Merci.";var DEJAVOTE_MSG="Vous avez déjà voté.";var PASCONNECTE_MSG="Vous devez être connecté pour voter.";var ERROR_MSG="Erreur !";var VOTE_MESSAGES=new Array("Pourri (Commentez SVP)","Correct","Bon","Super bon","Excellent")}else{var SAVING_MSG="Casting vote...";var VOTE_MSG="Vote cast. Thanks.";var DEJAVOTE_MSG="You can't vote twice.";var PASCONNECTE_MSG="You must be connected to vote.";var ERROR_MSG="Error!";var VOTE_MESSAGES=new Array("Poor (Please comment)","Correct","Good","Very Good","Excellent")}var peut_voter=true;var ajax_req=null;var reset_counter=0;function agrandImage(b){var a=new Image();a.src=b.src;largeur_courante=b.width;hauteur_courante=b.height;b.width=a.width;b.height=a.height}function razImage(a){a.width=largeur_courante;a.height=hauteur_courante}function precharger(){}function recupImgNote(d,a,c,e){if(c>1){var b='<img alt="'+d+"/5 ("+c+' votes)" src="/theme/'+e+"/img/note_mini_"+a+'.png" />'}else{var b='<img alt="'+d+"/5 ("+c+' vote)" src="/theme/'+e+"/img/note_mini_"+a+'.png" />'}return b}function recupCoordGauche(a){var b=0;var c=$("#"+a).get(0);if(c.offsetParent){b=c.offsetLeft;while(c=c.offsetParent){b+=c.offsetLeft}}return b}function recupCoordHaut(b){var a=0;var c=$("#"+b).get(0);if(c.offsetParent){a=c.offsetTop;while(c=c.offsetParent){a+=c.offsetTop}}return a}function recup_position_souris(a){posSourisX=(navigator.appName.substring(0,3)=="Net")?a.pageX:event.x+document.body.scrollLeft;posSourisY=(navigator.appName.substring(0,3)=="Net")?a.pageY:event.y+document.body.scrollTop}function demarrerDeplacement(b,a){elem_a_deplacer=$("#"+b).get(0);$("#"+b).fadeTo(1,0.7);depl_element=true;recup_position_souris(a);decalageElementX=posSourisX-elem_a_deplacer.offsetLeft;decalageElementY=posSourisY-elem_a_deplacer.offsetTop}function arreterDeplacement(){$("#"+elem_a_deplacer.id).fadeTo(1,1);depl_element=false}function selection(){return depl_element}function deplacement(c){var b;var a;if(depl_element==true){recup_position_souris(c);b=posSourisX-decalageElementX;a=posSourisY-decalageElementY;elem_a_deplacer.style.left=b+"px";elem_a_deplacer.style.top=a+"px"}}function regenererImage(c){var b=new Date();var a=b.getMilliseconds();$.ajax({data:"type="+c,type:"get",url:"ajax/captcha.php",dataType:"html",success:function(d,e){$("#captcha").get(0).src="ajax/captcha.php?type="+c+"&ms="+a}})}function survol_etoile(a){if(!peut_voter){return}remplir_etoiles(a);changer_message(VOTE_MESSAGES[a-1]);reset_counter=0}function sortie_etoile(a){if(!peut_voter){return}reset_counter=RESET_DELAY}function clic_etoile(c,b,a){if(!peut_voter){return}changer_message(SAVING_MSG);$.ajax({data:"type="+b+"&id="+c+"&vote="+a,type:"get",url:"ajax/vote_elem.php",dataType:"html",success:function(f,g){var e=f;var d=parseInt(e);switch(d){case 0:changer_message(ERROR_MSG);break;case 1:changer_message(PASCONNECTE_MSG);break;case 2:changer_message(DEJAVOTE_MSG);break;case 3:changer_message(VOTE_MSG);break;default:changer_message(ERROR_MSG);break}peut_voter=false}})}function remplir_etoiles(c){if("undefined"==typeof(document.images)){return}var e=NUM_STARS/(NUM_STARS*2+1);var d=0;for(var a=1;a<=NUM_STARS;a++){var b=ETOILE_VIDE;d+=e;if(c>d){b=ETOILE_DEMI}d+=e;if(c>d){b=ETOILE_PLEINE}document.images["etoile"+a].src=b}}function changer_message(a){if("undefined"==typeof(document.images)){return}var b=$("#vote_span").get(0);if(b){b.innerHTML=a}}function voteSondage(a){$.ajax({data:a,type:"post",url:"ajax/vote_sondage.php",dataType:"html",success:function(d,e){var c=d;var b=parseInt(c);if(b==0){alert(ERROR_MSG)}else{if(b==2){alert(DEJAVOTE_MSG)}else{$("#sondage").html(c)}}}})}function voirResultats(a){$.ajax({data:a,type:"post",url:"ajax/vote_sondage.php?voir=1",dataType:"html",success:function(c,d){var b=c;$("#sondage").html(b)}})}function afficherMenu(c){var d=$("#lien_"+c);$("#menu_"+c).get(0).style.left=recupCoordGauche("lien_"+c)+"px";$("#menu_"+c).get(0).style.top=(recupCoordHaut("lien_"+c)+18)+"px";$("#menu_"+c).show();var e=0;for(var b=0;b<noms_menus.length;b++){if(noms_menus[b]==c){e=b;menus_actifs[b]=true}}for(var a=0;a<menus_actifs.length;a++){if(a!=e){if(menus_actifs[a]==true){menus_actifs[a]=false;$("#menu_"+noms_menus[a]).hide()}}}}function cacher(){$("#infobulle").hide()}function afficherDebloc(a){window.open(a,"popup_debloc","resizable=no, menubar=no, status=no, scrollbars=yes, menubar=no, top=150, left=150, width=300, height=250")}function resultatRecherche(a){var b=$("#texte_recherche").val();if(b.length>2){texte_champ=b;delai=setTimeout("rechercher()",800)}else{$("#resultat_recherche").hide()}}function rechercher(){if(texte_champ!=texte_entre){texte_entre=texte_champ;if(!antiflood){antiflood=true;$.ajax({data:$("#frm_recherche").serialize(),type:"post",url:"ajax/recherche.php",dataType:"html",success:function(b,c){var a=b;if(a!="nrs"){$("#resultat_recherche").show();$("#resultat_recherche").get(0).style.left=recupCoordGauche("texte_recherche")+"px";$("#resultat_recherche").get(0).style.top=(recupCoordHaut("texte_recherche")+20)+"px";$("#resultat_recherche").html(a)}antiflood=false}})}}else{$("#resultat_recherche").show();$("#resultat_recherche").get(0).style.left=recupCoordGauche("texte_recherche")+"px";$("#resultat_recherche").get(0).style.top=(recupCoordHaut("texte_recherche")+20)+"px"}}function verifInscription(a,c){var d=0;var b="";if(a.nom_utilisateur.value.length<4){d++;if(langueSite=="fr"){b+="- Le nom d'utilisateur doit faire plus de 3 caractères\n"}else{b+="- Username must be more than 3 characters long\n"}}if(a.mdp.value.length<5){d++;if(langueSite=="fr"){b+="- Le mot de passe doit faire plus de 4 caractères\n"}else{b+="- Password must be more than 4 characters long\n"}}else{if(a.mdp.value!=a.mdp_bis.value){d++;if(langueSite=="fr"){b+="- Vous devez indiquer 2 fois le même mot de passe\n"}else{b+="- You must indicate twice the same password\n"}}}if(a.email.value.length<3){d++;if(langueSite=="fr"){b+="- L'adresse e-mail ne peut pas être vide\n"}else{b+="- The e-mail address can't be empty\n"}}else{if(a.email.value.search(/^[^._-][a-z0-9._-]+[^._-]@[a-z0-9._-]+([a-z0-9]+[^._-])?[.-]+[a-z]{2,4}$/)==-1){nb_erreurs++;if(langueSite=="fr"){b+="- L'adresse e-mail est invalide\n"}else{b+="- The e-mail address is invalid\n"}}}if(d>0){if(langueSite=="fr"){alert(d+" erreur(s) : \n"+b+"\nVous devez corriger ces erreurs avant de pouvoir continuer")}else{alert(d+" error(s): \n"+b+"\nYou must correct those errors before continuing")}}else{a.submit()}}function verifMAJProfil(a,c){var d=0;var b="";if(a.mdp_actuel.value!=""){if(a.mdp_actuel.value.length<5){d++;b+="- Le mot de passe doit faire plus de 4 caractères\n"}else{if(a.nouveau_mdp.value.length<5){d++;b+="- Le nouveau mot de passe doit faire plus de 4 caractères\n"}else{if(a.nouveau_mdp.value!=a.nouveau_mdp_bis.value){d++;b+="- Vous devez indiquer 2 fois le même mot de passe\n"}}}}if(d>0){if(langueSite=="fr"){alert(d+" erreur(s) : \n"+b+"\nVous devez corriger ces erreurs avant de pouvoir continuer")}else{alert(d+" error(s): \n"+b+"\nYou must correct those errors before continuing")}}else{a.submit()}}function verifRAZMdp(a,c){var d=0;var b="";if(a.pseudo.value.length<4){d++;b+="- Vous devez indiquer un pseudo\n"}if(d>0){if(langueSite=="fr"){alert("Vous devez corriger cette erreur avant de pouvoir continuer")}else{alert("You must correct this error before continuing")}}else{a.submit()}}function verifContact(a,c){var d=0;var b="";if(a.nom.value.length<4){d++;if(langueSite=="fr"){b+="- Vous devez indiquer un nom ou un pseudo\n"}else{b+="- You must indicate a name or nickname\n"}}if(a.message_contact.value.length<4){d++;if(langueSite=="fr"){b+="- Vous devez indiquer un message\n"}else{b+="- You must indicate a message\n"}}if(a.email.value.length<3){d++;if(langueSite=="fr"){b+="- L'adresse e-mail ne peut pas être vide\n"}else{b+="- The e-mail address can't be empty\n"}}else{if(a.email.value.search(/^[^._-][a-z0-9._-]+[^._-]@[a-z0-9._-]+([a-z0-9]+[^._-])?[.-]+[a-z]{2,4}$/)==-1){nb_erreurs++;if(langueSite=="fr"){b+="- L'adresse e-mail est invalide\n"}else{b+="- The e-mail address is invalid\n"}}}if(d>0){alert("Erreur : \n"+b+"\nVous devez corriger cette erreur avant de pouvoir continuer")}else{a.submit()}}function verifLogin(a,c){var d=0;var b="";if(a.pseudo.value.length<4){d++;if(langueSite=="fr"){b+="- Le nom d'utilisateur doit faire plus de 3 caractères\n"}else{b+="- Username must be more than 3 characters long\n"}}if(a.mdp.value.length<5){d++;if(langueSite=="fr"){b+="- Le mot de passe doit faire plus de 4 caractères\n"}else{b+="- Password must be more than 4 characters long\n"}}if(d>0){if(langueSite=="fr"){alert(d+" erreur(s) : \n"+b+"\nVous devez corriger ces erreurs avant de pouvoir continuer")}else{alert(d+" error(s): \n"+b+"\nYou must correct those errors before continuing")}}else{a.submit()}}function verifRecherche(a,b){if(a.texte_recherche.value.length<2){if(langueSite=="fr"){alert("Vous devez indiquer un mot d'au moins 2 caractères")}else{alert("The keyword must be at least 2 characters long")}}else{a.submit()}}function verifSuggestion(a,b){if(a.texte_suggest.value.length<4){if(langueSite=="fr"){alert("Vous devez indiquer un mot d'au moins 4 caractères")}else{alert("The keyword must be at least 4 characters long")}}else{a.submit()}}var adPositions=new Array();function writeAdDiv(b,c,a){document.write('<div class="bordure" id="'+b+'" style="text-align: center; width: '+c+"px; line-height:"+a+'px; margin-left: auto; margin-right: auto">&nbsp;</div><br />');adPositions[b]=b}function OpenX_findPosX(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b}function OpenX_findPosY(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}function OpenX_moveAbove(c,b){var a=0;if(c.offsetHeight){a=c.offsetHeight}else{if(c.clip&&c.clip.height){a=c.clip.height}else{if(c.style&&c.style.pixelHeight){a=c.style.pixelHeight}}}if(window.XMLHttpRequest){if(document.all){}else{b.style.paddingTop=0;b.style.paddingBottom=0}}else{}if(a>0){b.style.height=a}c.style.left=OpenX_findPosX(b)+"px";c.style.top=OpenX_findPosY(b)+"px"}function OpenX_positionDivs(){for(var b in adPositions){var a=b+"-cache";var d=$("#"+b).get(0);var c=$("#"+a).get(0);if((d!=null)&&(c!=null)){OpenX_moveAbove(c,d)}}}function Fenetre(){this.initialiser=function(){this.fenElement="#fenetre";this.cachee=true;$("#titre_fenetre").bind("mousedown",function(a){if(a.target.id!="img_fermer"){demarrerDeplacement("fenetre",a)}});$("#titre_fenetre").bind("mousemove",function(a){deplacement(a)});$("#titre_fenetre").bind("mouseup",function(a){if(a.target.id!="img_fermer"){arreterDeplacement()}})};this.afficherContenu=function(a,d,e){var c=new Date();var b=c.getMilliseconds();this.afficher();$("#contenu_fenetre").html("Chargement...");$.ajax({data:e+"&ms="+b,type:a,url:d,dataType:"html",success:function(f,h){var g=f;$("#contenu_fenetre").html(g)}})};this.afficher=function(){if(this.cachee){$(this.fenElement).show();this.cachee=false}};this.cacher=function(){$(this.fenElement).hide();this.cachee=true}};