function edit_profil(){var A=$("#modif_profil").serialize();document.modif_profil2.tab.value=A;document.modif_profil2.submit()}function refreshLogin(){refreshAjax("refreshLogin","","login_area")}function confirm_refresh(C,A,B){if(confirm(C)){refreshAjax(A,"value="+B,"center")}}function check_dispo(B){var A=$("#add_pseudo").val();if(typeof (B)!="undefined"&&A!=B){refreshAjax("checkLogin","login="+A,"login_dispo")}else{if(typeof (B)=="undefined"){refreshAjax("checkLogin","login="+A,"login_dispo")}}}function check_exist(B){var A=$("#dest_field").val();if(typeof (B)!="undefined"&&A!=B){refreshAjax("checkLogin","login="+A,"login_dispo")}else{if(typeof (B)=="undefined"){refreshAjax("checkLogin","login="+A,"login_dispo")}}}function updateCommentaireTM(){var A=$("#comm").val();var B=$("#tm_id").val();updateAjax("modifTMcommentaire","id="+B+"&value="+A);$("#comm").effect("highlight",{color:"#00FF00"},2400)}function search_not_mbr(){var A=$("#to_search").val();refreshAjax("search_addmbr","value="+A,"center")}function search_user(){var A=$("#to_search").val();refreshAjax("searchUser","value="+A,"center")}function get_value_and_update(B,C,D){var A=$("#"+D+" option:selected").val();updateAjax(""+B+"",""+C+"&value="+A)}function send_admin_form(D,C,A){if(D=="form_empty"){refreshAjax("add_pal",$("#form_empty").serialize(),"center")}else{if(D=="form_mod"){refreshAjax("pal_to_edit",$("#form_mod").serialize(),"center")}else{if(D=="event_form"){refreshAjax("add_event",$("#event_form").serialize(),"center")}else{if(D=="event_to_mod"){refreshAjax("mod_event",$("#event_form").serialize(),"center")}else{if(D=="updateGaming"){refreshAjax("updateGaming",$("#modif_gaming").serialize(),"center")}else{if(D=="updateEsport"){refreshAjax("updateEsport",$("#modif_esport").serialize(),"center")}else{if(D=="writeMsg"){refreshAjax("writeMsg",$("#send_message").serialize(),"center")}else{if(D=="news_upload"){alert($("#answer_zone").val());refreshAjax("news_upload",$("#add_news").serialize(),"center")}else{if(D=="del_comment_news"){var B=confirm("Etes-vous sur de vouloir supprimer ce commentaire ?");if(B==true){refreshAjax("adminDeleteCommentNews","news_id="+$("#news_id").val()+"&comment_id="+C+"&is_admin="+A,"center")}}else{if(D=="edit_comment_news"){refreshAjax("adminEditCommentNews","news_id="+$("#news_id").val()+"&comment_id="+C,"center")}else{if(D=="del_comment_gallery"){var B=confirm("Etes-vous sur de vouloir supprimer ce commentaire (gallery) ?");if(B==true){refreshAjax("adminDeleteCommentGallery","gallery_id="+$("#item_id").val()+"&comment_id="+C+"&name="+$("#gallery_name").val()+"&is_admin="+A,"center")}}else{if(D=="edit_comment_gallery"){refreshAjax("adminEditCommentGallery","gallery_id="+$("#item_id").val()+"&comment_id="+C+"&name="+$("#gallery_name").val(),"center")}else{if(D=="add_match"){refreshAjax("adminAddMatch",$("#match_form").serialize(),"center")}else{if(D=="modif_match_step1"){refreshAjax("adminModifMatch","matchs_id="+C,"center")}else{if(D=="modif_match"){refreshAjax("adminModifMatch",$("#match_form").serialize(),"center")}else{if(D=="add_result_match"){refreshAjax("adminAddResultMatch",$("#match_result_form").serialize(),"center")}else{if(D=="modif_result_match_step1"){refreshAjax("adminModifResultMatch",$("#match_form").serialize()+"&result_id="+C,"center")}else{if(D=="modif_result_match"){refreshAjax("adminModifResultMatch",$("#match_result_form").serialize(),"center")}else{if(D=="delete_result_match"){var B=confirm("Etes-vous sur de vouloir supprimer ce resultat de match ?");if(B==true){refreshAjax("adminDeleteResultMatch",$("#match_form").serialize()+"&result_id="+C,"center")}}else{if(D=="del_comment_match"){var B=confirm("Etes-vous sur de vouloir supprimer ce commentaire ?");if(B==true){refreshAjax("adminDeleteCommentMatch","match_id="+$("#match_id").val()+"&comment_id="+C+"&is_admin="+A,"center")}}else{if(D=="edit_comment_match"){refreshAjax("adminEditCommentMatch","match_id="+$("#match_id").val()+"&comment_id="+C,"center")}else{if(D=="del_comment_palmares"){var B=confirm("Etes-vous sur de vouloir supprimer ce commentaire ?");if(B==true){refreshAjax("adminDeleteCommentPalmares","palmares_id="+$("#pal_id").val()+"&comment_id="+C+"&is_admin="+A,"center")}}else{if(D=="edit_comment_palmares"){refreshAjax("adminEditCommentPalmares","palmares_id="+$("#pal_id").val()+"&comment_id="+C,"center")}else{if(D=="del_comment_event"){var B=confirm("Etes-vous sur de vouloir supprimer ce commentaire ?");if(B==true){refreshAjax("adminDeleteCommentEvent","event_id="+$("#event_id").val()+"&comment_id="+C+"&is_admin="+A,"center")}}else{if(D=="edit_comment_event"){refreshAjax("adminEditCommentEvent","event_id="+$("#event_id").val()+"&comment_id="+C,"center")}else{if(D=="blog_form"){refreshAjax("addArticle",$("#blog_form").serialize(),"center")}else{if(D=="blog_to_mod"){refreshAjax("editArticle",$("#blog_form").serialize(),"center")}else{if(D=="map_form"){refreshAjax("addMap",$("#map_form").serialize(),"center")}else{if(D=="map_to_mod"){refreshAjax("editMap",$("#map_form").serialize(),"center")}else{if(D=="sendNewPass"){refreshAjax("sendNewPass",$("#forgotPass").serialize(),"center")}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}function verify_formulaire(F){var D=0;var C=/^[a-z0-9._-]+@[a-z0-9.-]{2,}[.][a-z]{2,4}$/;var E=/^[0-9]*$/;if(F=="subscription"){var B=new Array("email","confirm_email","pseudo","passwd","confirm_passwd");for(var A=0;A<B.length;A++){D+=confirm_champ(B[A])}if(D==0){refreshAjax("subscription",$("#subscribe").serialize(),"center")}}else{if(F=="modif_account"){var B=new Array("email","confirm_email","lastname","firstname","pseudo","passwd","confirm_passwd","old_passwd");for(var A=0;A<B.length;A++){D+=confirm_champ(B[A])}if(D==0){refreshAjax("modif_account",$("#modif_account").serialize(),"account_info")}}else{if(F=="modif_profil"){var B=new Array("birth","confirm_email","lastname","firstname","pseudo","passwd","confirm_passwd","old_passwd");refreshAjax("modif_profil",$("#modif_profil").serialize(),"account_info")}}}}function confirm_champ(I){var O=/^[A-Za-z0-9._-]+@[A-Za-z0-9.-]{2,}[.][a-z]{2,4}$/;var P=/^[a-z0-9._-]+@[hotmail|live|msn]+[.][a-z]{2,4}$/;var N=/^[0-9]*$/;var G=/^[A-Za-z\-]*$/;var F=/^[0-9A-Za-z\-_]*$/;var L=/^[0-9A-Za-z\-\s]*$/;var D=/^[A-Za-z0-9]{6,}$/;var K=/^(19|20)[0-9]{2}[-](0[1-9]|1[012])[-](0[1-9]|[12][0-9]|3[01])$/;var E=/^[A-Za-z\-\s!,.?;/&]*$/;var H=/^[A-Za-z\-\s!,.?#;/&]*$/;if(I=="email"){var J=$("#add_email").val();if(J==""||O.exec(J)==null){$("#add_email").css("border-color","#FF0000");$("#legende_mail").css("display","inline");return(1)}else{$("#add_email").css("border-color","#009900");$("#legende_mail").css("display","none");return(0)}}else{if(I=="confirm_email"){var A=$("#add_confirm_email").val();if(A==""||O.exec(A)==null){$("#add_confirm_email").css("border-color","#FF0000");$("#legend_confirm_mail").css("display","inline");return(1)}else{$("#legend_confirm_mail").css("display","none");if($("#add_email").val()!=$("#add_confirm_email").val()){$("#add_confirm_email").css("border-color","#FF0000");$("#error_confirm_mail").css("display","inline");return(1)}$("#add_confirm_email").css("border-color","#009900");$("#error_confirm_mail").css("display","none");return(0)}}else{if(I=="passwd"){var B=$("#add_passwd").val();if(B==""||D.exec(B)==null){$("#add_passwd").css("border-color","#FF0000");$("#legende_passwd").css("display","inline");return(1)}else{$("#add_passwd").css("border-color","#009900");$("#legende_passwd").css("display","none");return(0)}}else{if(I=="confirm_passwd"){var A=$("#add_confirm_passwd").val();if(A==""||D.exec(A)==null){$("#add_confirm_passwd").css("border-color","#FF0000");$("#legend_confirm_passwd").css("display","inline");return(1)}else{$("#legend_confirm_passwd").css("display","none");if($("#add_passwd").val()!=$("#add_confirm_passwd").val()){$("#add_confirm_passwd").css("border-color","#FF0000");$("#error_confirm_passwd").css("display","inline");return(1)}$("#add_confirm_passwd").css("border-color","#009900");$("#error_confirm_passwd").css("display","none");return(0)}}else{if(I=="old_passwd"){var B=$("#old_passwd").val();if(B==""||D.exec(B)==null){$("#old_passwd").css("border-color","#FF0000");$("#legende_old_passwd").css("display","inline");return(1)}else{$("#old_passwd").css("border-color","#009900");$("#legende_old_passwd").css("display","none");return(0)}}else{if(I=="birth"){var C=$("#add_birth").val();if(K.exec(C)==null&&C!=""){$("#add_birth").css("border-color","#FF0000");$("#legende_birth").css("display","inline");return(1)}else{$("#add_birth").css("border-color","#009900");$("#legende_birth").css("display","none");return(0)}}else{error=0;var M=$("#add_"+I).val();if(M==""&&I!="ilike"&&I!="idislike"&&I!="msn"&&I!="yahoo"&&I!="aim"&&I!="gtalk"){error=1}if((I=="lastname"||I=="firstname")&&G.exec(M)==null){error=1}if((I=="code"||I=="city"||I=="address")&&L.exec(M)==null){error=1}if(I=="pseudo"&&F.exec(M)==null){error=1}if(I=="user_irc"&&H.exec(M)==null){error=1}if(I=="user_team"&&E.exec(M)==null){error=1}if(I=="user_site"&&E.exec(M)==null){error=1}if(error==1){$("#add_"+I).css("border-color","#FF0000");$("#legende_"+I).css("display","inline")}else{$("#add_"+I).css("border-color","#009900");$("#legende_"+I).css("display","none")}return(error)}}}}}}return(1)}function actionLangage(B,C){var A=false;if(B=="addVariableForm"){if($("#name_Var").val()==undefined||$("#name_Var").val()==""||$("#name_Var").val()==null){A=true;$("#name_Var").css("border","1px solid red")}else{$("#name_Var").css("border","1px solid green")}if($("#fr").val()==undefined||$("#fr").val()==""||$("#fr").val()==null){A=true;$("#fr").css("border","1px solid red")}else{$("#fr").css("border","1px solid green")}}else{if(B=="addCategorieForm"){if($("#addCat").val()==undefined||$("#addCat").val()==""||$("#addCat").val()==null){A=true;$("#addCat").css("border","1px solid red")}else{$("#addCat").css("border","1px solid green")}}}if(C!=""&&C!=undefined&&C!=null){refreshAjax("adminLanguage","tLang="+C,"admin_lang")}else{if(A==false){refreshAjax("adminLanguage",$("#"+B).serialize(),"admin_lang")}}}function updateLanguage(A,C){var B=$("#modif_Word_"+A).val();updateAjax("editWordLanguage","word="+B+"&id="+C);$("#modif_Word_"+A).effect("highlight",{color:"#00FF00"},1400)}function genereFile(){updateAjax("genereFileLanguage");$("#genereFile").effect("highlight",{color:"#00FF00"},1400)}function show_elements(){$("#essai").fadeIn("slow")}function hide_elements(){$("#essai").fadeOut("slow")}function searchCategoryGallery(){var A=$("#keyword_gallery").val();refreshAjax("searchCategory","keyword="+A,"gallery_info")}function searchMember(){var A=$("#keyword_member").val();var B=$("#selected_page").val();refreshAjax("searchMember","keyword="+A+"&page="+B,"center_search")}function changeSkin(){}function addGuestbookComment(A){var B=$("#guestbook_comment").val();if(B!=""){refreshAjax("addGuestbookComment","users_id="+A+"&comment="+B,"center")}}function deleteGuestbookComment(B){var A=confirm("Etes-vous sur de vouloir supprimer ce commentaire de votre guestbook ?");if(A==true){refreshAjax("deleteGuestbookComment","id="+B,"center")}}function delete_match(B){var A=confirm("Etes-vous sur de vouloir supprimer ce match ?");if(A==true){refreshAjax("adminDeleteMatch","matchs_id="+B,"center")}}function deletePM(B){var A=confirm("Etes-vous sur de vouloir supprimer ce message ?");if(A==true){refreshAjax("deletePM","id="+B,"center")}}function deleteSelectedPM(){var A=confirm("Etes-vous sur de vouloir supprimer ces messages ?");if(A==true){refreshAjax("deleteSelectedPM",$("#form_inbox").serialize(),"center")}}function sendPronostic(E,A){var C=$("#tun_prono").val();var B=$("#tdeux_prono").val();var D=true;refreshAjax("describeMatch","addProno=1&id="+E+"&id_user="+A+"&Q03="+D+"&tun_score="+C+"&tdeux_score="+B,"center")}function verifyValueAndRefreshAjax(B,C){var A="center";if($("#answer_zone-word-count").text()>0){refreshAjax(B,C,A)}return true}function sendMsg(A){msg=$("#text").val();refreshAjax("sendMsg","id="+A+"&txt="+msg,"addFriend");$("#text").val("");$("#popup_msg").css("display","none")}function refreshPage(B,C){var A=document.location.toString();if(A.match("#")){if(C!=undefined&&C!=null&&C!=""){C=C}else{C=A.replace(B,"")}if(C.match("#profil_")){var D=C.replace("#profil_","");refreshAjax("load_profil_viewed","vid="+D,"center")}else{if(C.match("#event_")){D=C.replace("#event_","");refreshAjax("detailsEvent","id="+D,"center")}else{if(C.match("#gallery_")){D=C.replace("#gallery_","");refreshAjax("detail_gallery","id="+D,"center")}else{if(C.match("#blog_")){D=C.replace("#blog_","");refreshAjax("getArticles","user_id="+D,"center")}else{if(C.match("#blog_details_")){D=C.replace("#blog_details_","");refreshAjax("getArticleDetail","user_id="+D,"center")}else{if(C.match("#palmares_")){D=C.replace("#palmares_","");refreshAjax("describePalmares","id="+D,"center")}else{if(C.match("#match_")){D=C.replace("#match_","");refreshAjax("describeMatch","id="+D,"center")}else{if(C.match("#news_")){D=C.replace("#news_","");refreshAjax("load_add_comment","id="+D,"center")}else{if(C.match("#team_")){D=C.replace("#team_","");refreshAjax("load_profil_viewed","vid="+D,"center")}else{if(C.match("#pal_")){D=C.replace("#pal_","");refreshAjax("describePalmares","id="+D,"center")}else{if(C.match("#img_")){post=C.replace("#img_","");refreshAjax("galleryViewItem",post,"center")}else{if(C.match("#blog_")){D=C.replace("#blog_","");refreshAjax("getArticles","user_id="+D,"center")}else{if(C.match("#blogarticle_")){post=C.replace("#blogarticle_","");refreshAjax("getArticleDetail",post,"center")}else{if(C.match("#messagebox")){refreshAjax("refreshBox","NULL","center")}else{if(C.match("#profilguestbook")){refreshAjax("getGuestbookComment","NULL","center")}else{if(C.match("#profilfriends")){refreshAjax("refreshFriends","NULL","center")}else{if(C.match("#sendPrivate")){refreshAjax("refreshPV","NULL","center")}else{if(C.match("#page_")){D=C.replace("#page_","");refreshAjax("home","page="+D,"center")}else{if(C.match("#home")){refreshAjax("home","NULL","center")}else{if(C.match("#team")){refreshAjax("load_team_mbr","NULL","center")}else{if(C.match("#palmares")){refreshAjax("load_palmares","NULL","center")}else{if(C.match("#events")){refreshAjax("load_event","NULL","center")}else{if(C.match("#gallery")){refreshAjax("load_gallery","NULL","center")}else{if(C.match("#blogs")){refreshAjax("loadBlog","NULL","center")}else{if(C.match("#contacts")){refreshAjax("load_contact","NULL","center")}else{if(C.match("#sponsors")){refreshAjax("loadSponsors","NULL","center")}else{if(C.match("#profil")){refreshAjax("load_profil_account","NULL","center")}else{if(C.match("#modif_profil")){refreshAjax("load_modif_profil","NULL","center")}else{if(C.match("#subscription")){refreshAjax("load_formulary","NULL","center")}else{if(C.match("#admin")){refreshAjax("load_admin_panel","NULL","center")}else{if(C.match("#members")){refreshAjax("loadMembers","NULL","center")}else{if(C.match("#all_matches")){refreshAjax("load_matches","NULL","center")}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}}function changePage(B,A){var C=new Number($("#form-box2-text").val());if(C.valueOf()>0&&C.valueOf()<=A){$("#form-box2-text").css({"background-color":"#fff"});$(location).attr("href",B+"/index.vg#page_"+C.toString())}else{$("#form-box2-text").css({"background-color":"#f00"})}}function enter(){$("#form-box2-text").keypress(function(A){if(A.keyCode=="13"){$("#form-box2-button").click()}})}function showToolbox(){$("#toolbox").toggle();$("#form-box2-text").focus()};
