/* 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 Vycisti(ctrl,valu) { if (ctrl.value == valu) ctrl.value="" } function zmenselectkraj() { if (document.forms[3].zeme.value=="30") { document.forms[3].KRAJ.disabled=false;} else { document.forms[3].KRAJ.disabled=true; } } function zmenselectkraj2() { if (document.forms[1].STAT.value=="30") { document.forms[1].KRAJ.disabled=false;} else { document.forms[1].KRAJ.disabled=true; } } function launch(url) { window.open(url, 'list', 'height=600, width=700, toolbar=no, location=no, resizable=no, status=yes, menubar=no, scrollbars=yes') } function launchukazka(url) { window.open(url, 'show', 'height=500, width=650, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function launcher2(url) { window.open(url, 'info', 'height=300, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=no') } function launcher3b(url) { window.open(url+'&znacky='+document.forms[0].zeme.options[document.forms[0].zeme.selectedIndex].value, 'autors', 'height=400, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function launcher3c(url) { window.open(url+'&znacky='+document.forms[2].zeme.options[document.forms[2].zeme.selectedIndex].value, 'autors2', 'height=400, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function launcher4(url) { window.open(url+'&znacky='+formular2.zeme.options[formular2.zeme.selectedIndex].value, 'autors', 'height=400, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } function launcher4b(url) { window.open(url, 'czechreal2', 'height=50, 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 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') } function launch2(url) { window.open(url, 'list2', 'height=575, width=830, toolbar=no, location=no, resizable=no, status=yes, menubar=no, scrollbars=yes') } function Testhledej() { err=''; if (document.forms[2].elements[15].value.length!=0 && !isFinite(document.forms[2].elements[15].value)) {err+='Cena od není zadána ve správném formátu\n';}; if (document.forms[2].elements[16].value.length!=0 && !isFinite(document.forms[2].elements[16].value)) {err+='Cena do není zadána ve správném formátu\n';}; if (err.length>0) { alert('Doplňte prosím následující údaje:\n'+err); return false;} else return true; } function Test() { err=''; var re1=/^[a-zA-Z0-9\.-]+$/; if (document.forms[0].souhlas.checked==false) {err+='Nezadán souhlas s obchodními podmínkami\n';}; if (document.forms[0].heslo.value.length==0) {err+='Nezadáno heslo\n';}; if (document.forms[0].DIC.value.length==0 && !document.forms[0].DIC1.checked) {err+='Nezadáno DIČ\n';}; if (document.forms[0].ICO.value.length==0 && !document.forms[0].ICO1.checked) {err+='Nezadáno IČ\n';}; if (document.forms[0].sidlo.value.length==0) {err+='Nezadáno sídlo\n';}; if (document.forms[0].zastupce.value.length==0) {err+='Nezadán odpovědný zástupce\n';}; if (document.forms[0].heslo.value!=document.forms[0].heslo2.value) {err+='Zadaná hesla nejsou stejná\n';}; if (document.forms[0].nazev_firmy.value.length==0) {err+='Nezadán název firmy\n';}; if (document.forms[0].tel.value.length==0) {err+='Nezadán telefon\n';}; if (document.forms[0].mesto.value.length==0) {err+='Nezadáno město\n';}; if (document.forms[0].zip.value.length==0) {err+='Nezadáno PSČ\n';}; if (document.forms[0].mail.value.length==0) {err+='Nezadán e-mail\n';}; if (!re1.test(document.forms[0].heslo.value)) {err+='Heslo obsahuje nepovolené znaky. Povolená jsou písmena bez diakritiky, čísla, - a .\n';}; if (err.length>0) { alert(err); return false;} else return true; } function Testck() { err=''; if (document.forms[0].souhlas.checked==false) {err+='Nezadán souhlas s obchodními podmínkami\n';}; if (document.forms[0].heslo.value.length==0) {err+='Nezadáno heslo\n';}; if (document.forms[0].DIC.value.length==0 && !document.forms[0].DIC1.checked) {err+='Nezadáno DIČ\n';}; if (document.forms[0].ICO.value.length==0 && !document.forms[0].ICO1.checked) {err+='Nezadáno IČ\n';}; if (document.forms[0].sidlo.value.length==0) {err+='Nezadáno sídlo\n';}; if (document.forms[0].zastupce.value.length==0) {err+='Nezadán odpovědný zástupce\n';}; if (document.forms[0].heslo.value!=document.forms[0].heslo2.value) {err+='Zadaná hesla nejsou stejná\n';}; if (document.forms[0].nazev_firmy.value.length==0) {err+='Nezadán název firmy\n';}; if (document.forms[0].tel.value.length==0) {err+='Nezadán telefon\n';}; if (document.forms[0].mesto.value.length==0) {err+='Nezadáno město\n';}; if (document.forms[0].zip.value.length==0) {err+='Nezadáno PSČ\n';}; if (document.forms[0].POJISTENI[0].checked==false && document.forms[0].POJISTENI[1].checked==false) {err+='Nevybráno pojištění\n';}; if (err.length>0) { alert(err); 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('Doplňte prosím následující údaje:\n'+err); return false;} else return true; } function launcher3(url) { window.open(url+'&znacky='+document.forms[2].znacka.options[document.forms[2].znacka.selectedIndex].value, 'autors', 'height=400, width=400, toolbar=no, location=no, resizable=no, status=no, menubar=no, scrollbars=yes') } 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 }