var oferte_host=''; function add_cos(id){ var linkCart="/oferte/cart.php?oferta_id_run="+id; new Ajax.Request(linkCart,{onSuccess: added}); } function sterge_cos(id){ var linkCart="/oferte/cart.php?oferta_id_run="+id+"&delete=1"; var req = new Ajax.Request(linkCart,{onSuccess: function(resp){ alert("Oferta a fost stearsa din cos."); $('oferte').removeChild($('oferta_'+id)); $$('.count_oferte').each(function(el){ el.innerHTML = resp.responseText; if(resp.responseText==0) { document.location = "/oferte/cos-de-oferte.html"; } }); }}); } function added(resp) { if(resp.responseText!="COD INVALID") alert("Oferta a fost adaugata in cos.") //alert(resp.responseText); } function open_link(link, width, height, params) { var left = screen.width; var top = screen.height; left = (left - width) / 2; top = (top - height) / 2; if (params > "") params = "," + params; var params = "width=" + width + ",height=" + height + ",left=" + left + ",top=" + top + params; var v = window.open(link, "winame", params); v.focus(); } function basic_link(screen) { var link = "http://www.rhrservices.ro/oferte/index.php?screen=" + screen; link += "&s_filter="; link += "&s_static=N%3B"; link += "&client=rhr2"; link += "&oras=Bucuresti"; link += "&lang=rom"; link += "&orderby=+POZE_INFO+DESC%2C%09PUNCTAJ+DESC"; return link; } function sel_page(page) { var link = ""; link = basic_link('list'); link = link + "&page=" + page; link = link + "&pageSize=" + 10; location.href = link; } function resort(targ,selObj,restore) { var link = ""; link = basic_link('list'); link = link + "&orderby=" + selObj.options[selObj.selectedIndex].value; location.href = link; } function details(id){ var link=""; link += basic_link('details'); link += "&id=" + id; location.href = link; } function s_rez(k){ var s = document.cookie; //alert(s); var deja_ex = 0; if (s.indexOf("OFERTE_424|") != 0) s = "OFERTE_424|"; if (s.indexOf("|" + k + "|") == -1){ document.cookie = s + k + "|"; } else{ deja_ex = 1; } s = document.cookie; var k = -1; var ex = s.indexOf('|'); while (ex > 0){ k ++; ex = s.indexOf('|',ex + 1); } if (k > 0){ if (deja_ex){ alert("Inregistrarea a fost introdusa aterior in cosul de oferte.Pentru a trimite cererea Dvs. agentiilor imobiliare accesati optiunea \"cos de oferte\" din partea superioara a paginii!\n\nIn prezent aveti in cos "+k+" oferte!"); } else{ alert("Inregistrarea a fost introdusa in cosul de oferte.Pentru a trimite cererea Dvs. agentiilor imobiliare accesati optiunea \"cos de oferte\" din partea superioara a paginii!\n\nIn prezent aveti in cos "+k+" oferte!"); } } else{ alert("Eroare\nInregistrarea nu a putut fi introdusa in cosul de oferte.\n\nVerificati daca optiunea 'accept cookies' este activata."); } } var wind=0; function choose_multiple_zone(){ if( getOrasForm && getTranzForm && getImobilForm ){ }else{ return; } oras=getOrasForm(); tip_tranz=getTranzForm(); tip_imobil=getImobilForm(); if(oras>' ' && tip_tranz>' ' && tip_imobil>' '); else return; link="/oferte/index.php?client=rhr2&screen=chzone2&real=1&oras="+oras+"&sel1[tip_tranz]="+tip_tranz+"&sel1[tip_imobil]="+tip_imobil; if(!wind.closed && wind.location){ wind.location.href=link; } else{ wind=window.open(link,"choose","width=650,height=600,status=1,scrollbars=1,resizable=1"); } if(window.focus) wind.focus(); }