/* 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[2].zeme.value=="30") { document.forms[2].KRAJ.disabled=false;} else { document.forms[2].KRAJ.disabled=true; } } function zmenselectkraj2() { if (document.forms[2].STAT.value=="30") { document.forms[2].KRAJ.disabled=false;} else { document.forms[2].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 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 Test3b() { err=''; if (document.formular.mail.value.length==0) {err+='Nezadán e-mail\n';}; if (document.formular.nazev_firmy.value.length==0) {err+='Nezadáno jméno\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.NAZEVcj.value.length==0 && document.formular.NAZEVnj.value.length==0 && document.formular.NAZEVaj.value.length==0) {err+='Nezadán název nabídky\n';}; if (document.formular.MESTO.value.length==0) {err+='Nezadáno místo u nabídky\n';}; if (document.formular.region.value.length==0) {err+='Nezadáno kraj u nabídky\n';}; if (document.formular.region2.value.length==0) {err+='Nezadáno region u nabídky\n';}; if (err.length>0) { alert('Prosím doplňte formulář:\n'+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 Testhledej() { err=''; if ((document.forms[2].DV0.value!='n') && (document.forms[2].DV1.value!='n') && (eval(document.forms[2].DV0.value)>eval(document.forms[2].DV1.value))) {err+='Rok výroby od je vyšší než do\n';}; if ((document.forms[2].KM1.value!=-2) && (eval(document.forms[2].KM0.value)>eval(document.forms[2].KM1.value))) {err+='Najeté kilometry od jsou vyšší než do\n';}; if (err.length>0) { alert(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 } if (document.images) { reality1 = new Image(); reality1.src = "/images/domy1cj.gif" ; reality2 = new Image(); reality2.src = "/images/domy2cj.gif" ; reality3 = new Image(); reality3.src = "/images/byty1cj.gif" ; reality4 = new Image(); reality4.src = "/images/byty2cj.gif" ; reality5 = new Image(); reality5.src = "/images/komercni1cj.gif" ; reality6 = new Image(); reality6.src = "/images/komercni2cj.gif" ; reality7 = new Image(); reality7.src = "/images/pozemky1cj.gif" ; reality8 = new Image(); reality8.src = "/images/pozemky2cj.gif" ; reality9 = new Image(); reality9.src = "/images/ostatni1cj.gif" ; reality10 = new Image(); reality10.src = "/images/ostatni2cj.gif" ; reality11 = new Image(); reality11.src = "/images/chaty1cj.gif" ; reality12 = new Image(); reality12.src = "/images/chaty2cj.gif" ; } function roll_over( buttonname, co ) { if (document.images) { document[ buttonname ].src = eval( co + ".src" ); } }