var flashvars = {}; var params = { wmode: "opaque" }; var attributes = {}; var timerChat; var delaychat=2000; swfobject.embedSWF("swf/head.swf", "head", "898", "385", "10.0.0", "expressInstall.swf", flashvars, params, attributes); function mouse_event(obj, newClass) { obj.className = newClass; } function special_caract(evt) { var keyCode = evt.which ? evt.which : evt.keyCode; if (keyCode==9) return true; var interdit = 'ààâäãçéèêëìîïòôöõµùûüñ &\?!:\.;,\t#~"^¨@%\$£?²¤§%\*()[]{}-_=+<>|\\/`\''; if (interdit.indexOf(String.fromCharCode(keyCode)) >= 0) { alert('Les caractères spéciaux ou accentués sont interdits !'); return false; } } function setFocusOnFlash() { var fl = document.getElementById("boxswf"); if (fl) { fl.focus(); } } function dieTchat() { if(document.getElementById('boxchat').style.display=='none'){ document.getElementById('boxchat').style.display='block'; document.getElementById('boxclient').style.width='960px'; document.getElementById('boxclient').style.marginLeft='-490px'; }else{ document.getElementById('boxchat').style.display='none'; document.getElementById('boxclient').style.width='760px'; document.getElementById('boxclient').style.marginLeft='-380px'; } } function dieSwf(){ clearTimeout(timerChat); document.getElementById("chatwindow").innerHTML = ""; document.getElementById("fondnoir").style.display = "none"; document.getElementById("boxclient").style.display = "none"; document.body.style.overflowY = "auto"; } var tabEvent = new Array("-","-","-"); var overDiv = false; function razTabEvent() { var i; for (i=0; i=1){ document.getElementById("m1").style.display = "none"; document.getElementById("m2").style.display = "none"; document.getElementById("m3").style.display = "none"; document.getElementById("m4").style.display = "none"; document.getElementById("m5").style.display = "none"; document.getElementById("a1").style.color = "#fff"; document.getElementById("a2").style.color = "#fff"; document.getElementById("a3").style.color = "#fff"; document.getElementById("a4").style.color = "#fff"; document.getElementById("a5").style.color = "#fff"; document.getElementById(menu).style.color = "#333"; document.getElementById(sousmenu).style.display = "block"; overDiv = true; } if (!overDiv){ hideAll() ; document.getElementById("a1").style.color = "#fff"; document.getElementById("a2").style.color = "#fff"; document.getElementById("a3").style.color = "#fff"; document.getElementById("a4").style.color = "#fff"; document.getElementById("a5").style.color = "#fff"; if(sousmenu != 0) document.getElementById(sousmenu).style.display = "none"; return true; } tabEvent[index] = "("+objet.tagName+")"; if (tabEvent[0]!="-") { n = 0; while (tabEvent[n]!="-" && n < tabEvent.length) n++; n--; if(!n) overDiv = false; razTabEvent(); } } function random_img() { var nbr; nbr = tab_vig.length; document.getElementById("vignette_src").src = "img/capture-ecran/"+tab_vig[Math.floor((nbr-1)*Math.random())]; } var xhr = null; function getXhr(){ if(window.XMLHttpRequest)xhr = new XMLHttpRequest(); else if(window.ActiveXObject){ try{ xhr = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e){ xhr = new ActiveXObject("Microsoft.XMLHTTP"); } } else{ alert("Votre navigateur ne peut pas effectuer cette action. Il est conseillé d'utiliser les dernières versions de Chrome, Firefox, Safari ou encore Internet explorer pour une compatibilité optimale."); xhr = false; } } function ajax_open(variable){ document.getElementById("gauche").innerHTML= "

loading ...
"; getXhr(); xhr.onreadystatechange = function(){ if(xhr.readyState == 4 && xhr.status == 200){ document.getElementById("gauche").innerHTML=xhr.responseText; random_img(); } } xhr.open("GET","contenu/ajax_main.php?view=" + variable, true); xhr.send(null); } function ajax_seek(variable){ var taille; getXhr(); taille = variable.length; xhr.onreadystatechange = function(){ if(xhr.readyState == 4 && xhr.status == 200){ document.getElementById("gauche").innerHTML=xhr.responseText; } } if(taille > 2){ document.getElementById("gauche").innerHTML= "

searching ...
"; xhr.open("GET","contenu/ajax_main.php?view=search&search=" + variable, true); } xhr.send(null); } function ajax_chat(variable){ getXhr(); xhr.onreadystatechange = function(){ if(xhr.readyState == 4 && xhr.status == 200){ if(variable == 'read'){ document.getElementById("chatwindow").innerHTML= xhr.responseText; if(xhr.responseText != '(Non connecté)' && xhr.responseText != 'Attente d\'un combat') document.getElementById("chatwrite").style.display = "block"; else document.getElementById("chatwrite").style.display = "none"; document.getElementById('chatwindow').scrollTop = document.getElementById('chatwindow').scrollHeight; } } } if(variable == 'read'){ xhr.open("GET","contenu/ajax_main.php?view=read", true); timerChat = setTimeout("ajax_chat('read')", delaychat); }else{ msg = document.getElementById("chatmsg").value; xhr.open("GET","contenu/ajax_main.php?view=write&message=" + msg, true); document.getElementById("chatmsg").value = ''; } xhr.send(null); }