function changeMoney(a){document.forms.form_commande.method="POST";document.forms.form_commande.action="/order/ts"+a+"_server";document.forms.form_commande.submit()}function sliderTS3(){window.addEvent("domready",function(){var b=$("transfert");var a=$("result_transfert");new Slider(b,b.getElement(".knob_transfert"),{steps:5001,range:[300],wheel:true,onChange:function(e){a.innerHTML=e+" Kb/s"}}).set(10);var c=$("space");var d=$("result_space");new Slider(c,c.getElement(".knob_space"),{steps:10000,range:[100],wheel:true,onChange:function(e){d.innerHTML=e+" Mo"}}).set(10)})}function delUserSec(a){if(confirm("Do you really want to delete this user ?")){window.location.replace("/customer_area/my_users?action=delete&user="+a)}}function showWoman(){if(document.getElementById("woman").style.display=="none"){document.getElementById("woman").style.display="block"}else{document.getElementById("woman").style.display="none"}}function effectuerVirement(a){var l=document.getElementById("loginDestinataire").value;var j=document.getElementById("montant_gbp").value;var c=document.getElementById("montant_usd").value;var f=document.getElementById("montant_eur").value;var k=document.getElementById("montant_cad").value;var b=document.getElementById("montant_chf").value;if(l==""){alert("Please inform the recipient.")}else{if(confirm(("Are you sure to do a tokens transfert to "+l+" ?"))){var m;try{m=new ActiveXObject("Msxml2.XMLHTTP")}catch(g){try{m=new ActiveXObject("Microsoft.XMLHTTP")}catch(i){try{m=new XMLHttpRequest()}catch(h){m=false}}}m.onreadystatechange=function(){if(m.readyState==4&&m.status==200){alert(m.responseText);window.location.replace("/customer_area/my_tokens")}};var d="id="+a+"&pseudo="+encodeURIComponent(l)+"&montant_gbp="+j+"&montant_usd="+c+"&montant_eur="+f+"&montant_cad="+k+"&montant_chf="+b;m.open("POST","/ajax/virement.php",true);m.setRequestHeader("Content-Type","application/x-www-form-urlencoded");m.send(d)}}}function womanInfo(a){if(a=="bic"){document.getElementById("informations").innerHTML='<p>All the transferts from your account are immediately transferred to the recipient account</p><p>Form more informations about the transfert, <a href="/page/faq_teamspeak">consult our Frequently Asked Questions here</a></p>'}else{if(a=="histo"){document.getElementById("informations").innerHTML='<p>All your orders are listing here.</p><p>You can cancel or change the mean of payment while the server is not delivered in the tab <a href="/customer_area/my_orders">"my orders"</a>.</p>'}}}function moreDetails(a){if(a=="standby"){document.getElementById("bulle").style.display="block";document.getElementById("woman").innerHTML="<p>Your order is validated.</p><p>We await reception of your payment.</p>";window.scroll(0,0)}else{if(a=="finish"){document.getElementById("bulle").style.display="block";document.getElementById("woman").innerHTML="<p>Your order is delivered.</p><p>You can manage your server.</p>";window.scroll(0,0)}}}function cancelOrder(b,a){if(confirm("Are you sure you want to cancel your order ?")){var h;try{h=new ActiveXObject("Msxml2.XMLHTTP")}catch(g){try{h=new ActiveXObject("Microsoft.XMLHTTP")}catch(f){try{h=new XMLHttpRequest()}catch(d){h=false}}}h.onreadystatechange=function(){if(h.readyState==4&&h.status==200){alert(h.responseText);window.location.replace("/customer_area/my_orders")}};var c="id_commande="+b+"&id_client="+a;h.open("POST","/ajax/annuler_commande.php",true);h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");h.send(c)}}function addEmailToNewsletter(){var f;try{f=new ActiveXObject("Msxml2.XMLHTTP")}catch(d){try{f=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){try{f=new XMLHttpRequest()}catch(b){f=false}}}f.onreadystatechange=function(){if(f.readyState==4&&f.status==200){document.getElementById("newsletter_msg").innerHTML=f.responseText}};var a="email="+document.getElementById("emailNewsletter").value;f.open("POST","/ajax/ajouter_email_newsletter.php",true);f.setRequestHeader("Content-Type","application/x-www-form-urlencoded");f.send(a)}function changePasswordOfServer(i,a){var h;try{h=new ActiveXObject("Msxml2.XMLHTTP")}catch(g){try{h=new ActiveXObject("Microsoft.XMLHTTP")}catch(f){try{h=new XMLHttpRequest()}catch(d){h=false}}}h.onreadystatechange=function(){if(h.readyState==4&&h.status==200){alert(h.responseText)}};var b=document.getElementById("ts_password").value;var c="id="+i+"&pass="+encodeURIComponent(b)+"&id2="+a;h.open("POST","/ajax/changer_pass_serveur_ts.php",true);h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");h.send(c)}function changeSuperUserPasswordOfServer(i,a){var h;try{h=new ActiveXObject("Msxml2.XMLHTTP")}catch(g){try{h=new ActiveXObject("Microsoft.XMLHTTP")}catch(f){try{h=new XMLHttpRequest()}catch(d){h=false}}}h.onreadystatechange=function(){if(h.readyState==4&&h.status==200){alert(h.responseText)}};var b=document.getElementById("superuser").value;var c="id="+i+"&superuser="+encodeURIComponent(b)+"&id2="+a;h.open("POST","/ajax/changer_pass_serveur_mumble.php",true);h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");h.send(c)}function sendCommand(i,a){var h;try{h=new ActiveXObject("Msxml2.XMLHTTP")}catch(f){try{h=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){try{h=new XMLHttpRequest()}catch(c){h=false}}}h.onreadystatechange=function(){if(h.readyState==4&&h.status==200){document.getElementById("buttonsendcommand").value="Execute (OK)";document.getElementById("buttonsendcommand").disabled=false;if(g=="newtoken"){document.getElementById("tokens").value=h.responseText}}};var g=document.getElementById("command").value;var b="id="+i+"&command="+encodeURIComponent(g)+"&id2="+a;h.open("POST","/ajax/sendCommand.php",true);h.setRequestHeader("Content-Type","application/x-www-form-urlencoded");h.send(b)}function server(h,a,i){var g;try{g=new ActiveXObject("Msxml2.XMLHTTP")}catch(f){try{g=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){try{g=new XMLHttpRequest()}catch(c){g=false}}}document.getElementById("serverStatus").src="/img/espace_client/serveurs/btn_restart.gif";g.onreadystatechange=function(){if(g.readyState==4&&g.status==200){if(g.responseText==1){window.location.replace("/customer_area/my_servers?id="+a)}else{alert(g.responseText)}}};var b="p="+h+"&ts="+a+"&id="+i;g.open("POST","/ajax/server.php",true);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send(b)}function verifAjouterHerbergement(){var a=document.getElementById("ssDomaine").value;var b=/\W|_/gi;a=a.replace(b,"");if(a!=""){if(confirm("Do you really want the subdomain : http://"+a+".teamspeak.net")){document.forms.form.submit()}}else{alert("Fill the field.")}}function tokensCodeSecret(a){if(document.getElementById("codeSecret").value==""){alert("Indicate your secret code.")}else{var i=document.getElementById("codeSecret").value;var h=/\W|_/gi;i=i.replace(h,"");var g;try{g=new ActiveXObject("Msxml2.XMLHTTP")}catch(f){try{g=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){try{g=new XMLHttpRequest()}catch(c){g=false}}}g.onreadystatechange=function(){if(g.readyState==4&&g.status==200){alert(g.responseText);window.location.replace("/customer_area/my_tokens")}};var b="code="+i+"&id="+a;g.open("POST","/ajax/tokenCodeSecrets.php",true);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send(b)}}function effectuerReglement(h,a){var g;try{g=new ActiveXObject("Msxml2.XMLHTTP")}catch(f){try{g=new ActiveXObject("Microsoft.XMLHTTP")}catch(d){try{g=new XMLHttpRequest()}catch(c){g=false}}}g.onreadystatechange=function(){if(g.readyState==4&&g.status==200){alert(g.responseText);window.location.replace("/customer_area/my_clan_contribution")}};var b="r="+h+"&u="+a;g.open("POST","/ajax/reglerCotisation.php",true);g.setRequestHeader("Content-Type","application/x-www-form-urlencoded");g.send(b)};
