/* This is our function to use xmlhttp requrests, i did not write this part w3 schools did [url=http://www.w3schools.com/ajax/ajax_browsers.asp]http://www.w3schools.com/ajax/ajax_browsers.asp[/url] This was quicker than just making my own :) */ var xmlHttp // xmlHttp variable function GetXmlHttpObject(){ // This function we will use to call our xmlhttpobject. var objXMLHttp=null // Sets objXMLHttp to null as default. if (window.XMLHttpRequest){ // If we are using Netscape or any other browser than IE lets use xmlhttp. objXMLHttp=new XMLHttpRequest() // Creates a xmlhttp request. }else if (window.ActiveXObject){ // ElseIf we are using IE lets use Active X. objXMLHttp=new ActiveXObject("Microsoft.XMLHTTP") // Creates a new Active X Object. } // End ElseIf. return objXMLHttp // Returns the xhttp object. } // Close Function function CheckUsername(username,domena,domenanazev){ // This function we will use to check to see if a username is taken or not. xmlHttp=GetXmlHttpObject() // Creates a new Xmlhttp object. if (xmlHttp==null){ // If it cannot create a new Xmlhttp object. alert ("Browser does not support HTTP Request") // Alert Them! return // Returns. } // End If. var url="check.php?username="+username+"&domena="+domena // Url that we will use to check the username. xmlHttp.open("GET",url,true) // Opens the URL using GET xmlHttp.onreadystatechange = function () { // This is the most important piece of the puzzle, if onreadystatechange is equal to 4 than that means the request is done. if (xmlHttp.readyState == 4) { // If the onreadystatechange is equal to 4 lets show the response text. document.getElementById("usernameresult").innerHTML = xmlHttp.responseText; // Updates the div with the response text from check.php } // End If. }; // Close Function xmlHttp.send(null); // Sends NULL instead of sending data. document.getElementById("vsubdomena").innerHTML=username; document.getElementById("vsubdomena2").innerHTML=username; document.getElementById("vdomena").innerHTML=domenanazev; document.getElementById("vdomena2").innerHTML=domenanazev; } // Close Function. function Placene(testurl,testlogo,testprofil,testskype) { message=''; if (document.forms[0].URL.value.length!=0 && testurl==1) { message+='Odkaz na Vaše stránky 25 Kč/měsíc\n'; }; if (document.forms[0].obrazek.value.length!=0 && testlogo==1) { message+='Logo 15 Kč/měsíc\n'; }; if ((document.forms[0].textcj.value.length>6 || document.forms[0].textnj.value.length>6 || document.forms[0].textaj.value.length>6) && testprofil==1) { message+='Profil firmy 39 Kč/měsíc\n'; }; if (document.forms[0].aktivskype.checked && testskype==1) { message+='Aktivní skypekontakt 18 Kč/měsíc'; }; if (message.length>0) { var agree=confirm('Objednali jste si následující placené služby, souhlas potvrdíte kliknutím na OK.\n'+message); if (agree) return true ; else return false ; } else return true; } function Testurl() { err=''; if (document.formodkaz.url.value.length==0) {err+='Nezadán odkaz\n';}; if (err.length>0) { alert(err); return false;} else return true; } function launchukazka(url) { window.open(url, 'show', 'height=500, width=650, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function zmenselectkraj() { if (document.formular.STAT.value=="30") { document.formular.KRAJ.disabled=false;} else { document.formular.KRAJ.disabled=true; } } function launcher2(url) { window.open(url, 'czechreal', 'height=300, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function launcher4(url) { window.open(url, 'czechreal2', 'height=50, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function launcher3(url) { window.open(url+'&znacky='+formular.STAT.options[formular.STAT.selectedIndex].value, 'autors', 'height=400, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function launcher5(url,sirka,vyska) { window.open(url, 'autors'+vyska+sirka, 'height='+vyska+', width='+sirka+', toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function Testf() { err=''; if (document.formular.souhlas.checked==false) {err+='Nezadán souhlas s obchodními podmínkami\n';}; if (document.formular.heslo.value.length==0) {err+='Nezadáno heslo\n';}; if (document.formular.DIC.value.length==0 && !document.formular.DIC1.checked) {err+='Nezadáno DIČ\n';}; if (document.formular.ICO.value.length==0 && !document.formular.ICO1.checked) {err+='Nezadáno IČ\n';}; if (document.formular.sidlo.value.length==0) {err+='Nezadáno sídlo\n';}; if (document.formular.zastupce.value.length==0) {err+='Nezadán odpovědný zástupce\n';}; if (document.formular.heslo.value!=document.formular.heslo2.value) {err+='Hesla nejsou stejná\n';}; if (document.formular.nazev_firmy.value.length==0) {err+='Nezadán název firmy\n';}; if (document.formular.tel.value.length==0) {err+='Nezadán telefon\n';}; if (document.formular.mesto.value.length==0) {err+='Nezadáno město\n';}; if (document.formular.zip.value.length==0) {err+='Nezadáno PSČ\n';}; if (document.formular.mail.value.length==0) {err+='Nezadán e-mail\n';}; if (err.length>0) { alert(err); return false;} else return true; } function Testforumtopic() { err=''; if (document.postComment.topic.value.length==0) {err+='Nevyplněn název\n';}; if (document.postComment.detail.value.length==0) {err+='Nevyplněn text\n';}; if (err.length>0) { alert(err); return false;} else return true; } function Testforumuser() { err=''; if (document.postComment.username.value.length==0) {err+='Nevyplněno uživatelské jméno\n';}; if (document.postComment.realname.value.length==0) {err+='Nevyplněno jméno\n';}; if (document.postComment.password.value.length==0) {err+='Nevyplněno heslo\n';}; if (document.postComment.email.value.length==0) {err+='Nevyplněn e-mail\n';}; if (err.length>0) { alert(err); return false;} else return true; } function Testforumuser2() { err=''; if (document.postComment.realname.value.length==0) {err+='Nevyplněno jméno\n';}; if (document.postComment.email.value.length==0) {err+='Nevyplněn e-mail\n';}; if (err.length>0) { alert(err); return false;} else return true; } function show_load(){ if (!document.getElementById) return; if (navigator.appName == "Netscape"){ document.getElementById("id_loading").style.top = "350px"; } else{ document.getElementById("id_loading").style.top = ((document.body.offsetHeight/2)-35+document.body.scrollTop)+"px"; } document.getElementById("id_loading").style.left = "310px"; document.getElementById("id_loading").style.visibility = "visible"; } function hide_load(){ // is called onload if (!document.getElementById) return; if (document.getElementById("id_loading")) { document.getElementById("id_loading").style.visibility = "hidden"; } // hides loading... layer } function launch(url) { window.open(url, 'list', 'height=600, width=700, toolbar=no, location=no, resizable=no, status=yes, menubar=no, scrollbars=yes') } function launcher3a(url,sirka,vyska) { window.open(url, 'detail'+vyska+'a'+sirka, 'height='+vyska+', width='+sirka+', toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') }