function help(path){window.open(path,'Pomoc','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,top=50,left=50,height=300,width=450');} function RegistryForm(id,category){if(category=='public'){if(id.meno.value==""){alert("Wpisz swoje imię i nazwisko!");id.meno.focus();return false;} if($("tel").val==""&&id.email.value==""){alert(" Sprecyzuj swój kontakt telefoniczny lub e-mailowy!");id.tel.focus();return false;} if(id.nickname.value==""){alert(" Wpisz login!");id.nickname.focus();return false;} if(id.password.value==""){alert(" Wpisz hasło!");id.password.focus();return false;} if(id.password2.value==""){alert(" Wpisz hasło potwierdzające!");id.password2.focus();return false;} if(id.password.value!=id.password2.value){alert(" Hasło potwierdzające różni się od hasła do logowania!");id.password.focus();return false;}} if(category=='agency'){if(id.nazov.value==""){alert(" Wpisz nazwę firmy!");id.nazov.focus();return false;} if((id.adresa.value=="")||(id.mesto.value=="")){alert(" Wpisz adres siedziby firmy !");if(id.adresa.value=="")id.adresa.focus();else id.mesto.focus();return false;} if(id.ico.value==""){alert("Wpisz numer REGON!");id.ico.focus();return false;} if(id.meno.value==""){alert(" Wpisz imię osoby do kontaktu!");id.meno.focus();return false;} if(id.tel.value==""&&id.tel2.value==""&&id.email.value==""){alert("Sprecyzuj swój kontakt telefoniczny lub e-mailowy!");if(id.tel.value=="")id.tel.focus();else id.email.focus();return false;} if(id.nick.value==""){alert(" Wpisz login!");id.nick.focus();return false;} if(id.password.value==""){alert(" Wpisz hasło!");id.password.focus();return false;} if(id.password2.value==""){alert(" Wpisz hasło potwierdzające!");id.password2.focus();return false;} if(id.password.value!=id.password2.value){alert(" Hasło potwierdzające różni się od hasła do logowania!");id.password.focus();return false;}}} function LoginForm(id){if($("#login #login_meno").val()==""){alert(" Wpisz login!");$("#login #login_meno").focus();return false;} if($("#login #login_pass").val()==""){alert("Wpisz hasło!");$("#login #login_pass").focus();return false;} $("#login").hide(100,function(){$("#loginload").show(100,function(){$.post("/login.php",{nick:$("#login #login_meno").val(),password:$("#login #login_pass").val(),save:function(){return $("#login_save").is(":checked")?1:0;}},function(data){$("#loginresponse").html(data);if(data=="OK"){window.location="/?page=my_home";} else if(data=="OKcert"){window.location="https://certifikaty.topreality.sk";} else if(data=="OKkupon"){window.location="/kupon";} else{$("#loginload").hide(100,function(){$("#loginresponse").show(100);});}})});});return false;} function sendTwoFactor(){if($("input[name=tw_key]").val()!=""){$("#loginresponse").hide(100,function(){$("#loginload").show(100,function(){$.post("/login.php",{tw_key:$("input[name=tw_key]").val()},function(data){if(data=="OK"){window.location="/?page=my_home";} else if(data=="OKcert"){window.location="https://certifikaty.topreality.sk";} else if(data=="OKkupon"){window.location="/kupon";}else{$("#loginresponse").html(data);$("#loginload").hide(100,function(){$("#loginresponse").show(100);});}})});});} return false;} function multiNum(id){if($("input[name=new_number]").val()!=""){$("#loginresponse").hide(100,function(){$("#loginload").show(100,function(){$.post("/login.php",{tw_multinum:id},function(data){$("#loginresponse").html(data);$("#loginload").hide(100,function(){$("#loginresponse").show(100);});})});});} return false;} function newTelnum(){if($("input[name=new_number]").val()!=""){$("#loginresponse").hide(100,function(){$("#loginload").show(100,function(){$.post("/login.php",{tw_newnum:$("input[name=new_number]").val()},function(data){$("#loginresponse").html(data);$("#loginload").hide(100,function(){$("#loginresponse").show(100);});})});});} return false;} function loginBoxReset(){$("#loginresponse").hide(100,function(){$("#login").show(100);$("#login")[0].reset();});} function rowOver(id){$("#"+id).css("backgroundColor","#F5F5F5");} function rowOut(id){$("#"+id).css("backgroundColor","#FFFFFF")} function PreviewEstate(id,photo,kind){window.open('./other/preview_estate.php?ID='+id+'&IDphoto='+photo+'&kind='+kind,'FotoGalery','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,top=0,left=0,width=1110,height=820');} function windowPrint(href){window.open(href,'Print','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,copyhistory=0,top=50,left=50,width=640,height=480');} function windowSave(href){window.open(href,'Save','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,copyhistory=0,top=50,left=50,width=640,height=480');} function isNumberKey(evt) {var charCode=(evt.which)?evt.which:event.keyCode if(charCode>31&&(charCode<48||charCode>57)) return false;return true;} function isNumber(obj) {out="";for(i=0;i<=(obj.value.length)-1;i++){char=obj.value.substr(i,1);charCode=char.charCodeAt(0);if(!(charCode>31&&(charCode<48||charCode>57))){out=out+char;}} obj.value=out;return true;} function ajaxCounter(){var params={};$(".searchform").find("input, select").each(function(){var value=null;if($(this).attr("type")=="checkbox"){value=$(this).is(":checked");} else if($(this).attr("type")=="radio"){if($(this).is(":checked")){value=$(this).val();}} else{value=$(this).val();} if(value){value=value===true?1:value;params[$(this).attr("name")]=value;}});$.get("/ajax.php",params,function(data){$(".foundresults").html(data);});} function ajaxWindow(url,title,width,height,cssClass) {if(width===undefined) width=380;if(height===undefined) height="auto";if(cssClass===undefined) cssClass="dialog";if($(window).width()&&width>$(window).width()) width=$(window).width();$('
').dialog({modal:true,resizable:false,draggable:false,width:width,height:height,title:title,open:function(){$(this).append('
Nahrávam ...
');$(this).load(url,function(){placeholdersFromLabels();});},close:function(){$(this).remove();}});} function ajaxForm(where,responseTo){$.ajax({type:"POST",url:$(where).attr("action"),data:$(where).serialize(),success:function(response){responseTo.html(response);placeholdersFromLabels();}});} function openSaveSearchDialog(){$("#searchSaveDialog").dialog({title:"Zasielať ponuky e-mailom",width:340,modal:true,position:["center",400]});} $(function(){$(".favouriteButton").click(function(){var $this=$(this);$.get($(this).attr("href"),function(data){if(data=="added"){$this.addClass("favouriteActive");$this.removeClass("favourite");alert("Inzerát bol pridaný do obľúbených");} else if(data=="removed"){$this.addClass("favourite");$this.removeClass("favouriteActive");alert("Inzerát bol odstránený z obľúbených");}});return false;});$(".n_srch_typ").change(function(){if($(this).val()==3) $(".n_srch_stud_prenajom").show();else $(".n_srch_stud_prenajom").hide();});$(".n_srch_druh").change(function(){var values=$(this).val();if(values.length==0) return;var onlyLand=true;for(key in values){if(!(values[key]>=800&&values[key]<900)) onlyLand=false;} if(onlyLand) $(".n_srch_novostavby_block").hide();else $(".n_srch_novostavby_block").show();});$(".n_srch_cod, .n_srch_cdo").keyup(function(){var $parent=$(this).parent().parent();var from=$parent.find(".n_srch_cod").val();var to=$parent.find(".n_srch_cdo").val();if(from||to) $(".n_srch_cena_m2_block").show();else $(".n_srch_cena_m2_block").hide();});$(".searchform input, .searchform select").change(ajaxCounter);ajaxCounter();$("#topSearch").tokenInput(function(){return"/ajaxTokenSearch.php";},{queryParam:"queryString",theme:"topreality",preventDuplicates:true,hintText:"Zacznij wpisywać nazwę miejscowości, kategoria, typ, cena, powierzchnia
Przykład:
Warszawa[ENTER]
1 sypialnia [ENTER]
sprzedaż [ENTER]
50000 (wybrać cenę) [ENTER]
kategorię, gminy, rodzaje mogą być bardziej",searchingText:"Vyhľadávam ...",noResultsText:"Obec neexistuje",resultsFormatter:function(item){var out="";else out+=">";out+=item.displayText;out+="";return out;}});$(".price .propose, .price2 .propose, .buttons .mail, .buttons .report, .forgottenPassword, .askPhoto").click(function(){var url=$(this).attr("href");var title=$(this).attr("title");ajaxWindow(url,title);return false;});$("body").delegate(".form_mail","submit",function(){ajaxForm($(this),$(".dialog"));return false;});$("#n_srch_druh, .preferencesForms #type, .typeSelect").multiselect({minWidth:160,menuWidth:215,height:215,checkAllText:"Wszystko",uncheckAllText:"Nic",noneSelectedText:"Wszystkie",selectedText:"Wybrany #",selectedList:15});$(".ui-multiselect-menu").mouseleave(function(){$("#n_srch_druh").multiselect("close");});$(".showContact").click(function(){var $this=$(this);var id=$(this).data("idestate");$.get("/block/kontakt.php",{id:id},function(data){$this.replaceWith(data);});SociomanticShowSale();return false;});$("#searchSaveDialogButton").click(openSaveSearchDialog);$("#searchSaveDialog form").submit(function(){var textElement=$(this).parent().find("p");$.ajax({type:"POST",url:"/searchSave.php",data:$(this).serialize(),success:function(data){textElement.html(data);}});return false;});$(".listing .estate a.slsp").click(function(){ga("click","reality","predaj","klik");});});