function parseFMP(str){
str = str.replace(/%b4/gi,"´");
str = str.replace(/%bd/gi,"´");
str = str.replace(/%b9/gi,"ř");
str = str.replace(/%fb/gi,"ě");
str = str.replace(/%cf/gi,"ž");
str = str.replace(/%d0/gi,"ý");
str = str.replace(/%20/gi," ");
str = str.replace(/%fa/gi,"ú");
str = str.replace(/%ed/gi,"í");
str = str.replace(/%89/gi,"š");
str = str.replace(/%c8/gi,"ť");
str = str.replace(/%e3/gi,"č");
str = str.replace(/%db/gi,"ů");
str = str.replace(/%c0/gi,"ň");
str = str.replace(/%ec/gi,"ď");
str = str.replace(/%e1/gi,"á");
str = str.replace(/%e9/gi,"é");
str = str.replace(/%f3/gi,"ó");
str = str.replace(/%a4/gi,"Ř");
str = str.replace(/%80/gi,"€");
str = str.replace(/%cd/gi,"Í");
str = str.replace(/%b7/gi,"Š");
str = str.replace(/%ce/gi,"Ž");
str = str.replace(/%cb/gi,"Ť");
str = str.replace(/%e2/gi,"Č");
str = str.replace(/%af/gi,"Ý");
str = str.replace(/%d2/gi,"Ů");
str = str.replace(/%a6/gi,"Ň");
str = str.replace(/%da/gi,"Ú");
str = str.replace(/%f9/gi,"Ě");
// str = str.replace(/%eb/gi,"Ď");
str = str.replace(/%eb/gi,"ž");
str = str.replace(/%c1/gi,"Á");
str = str.replace(/%c9/gi,"É");
str = str.replace(/%d3/gi,"Ó");
str = str.replace(/%3f/gi,"?");
str = str.replace(/%22/gi,'"');
str = str.replace(/%93/gi,'"');
str = str.replace(/%94/gi,'"');
str = str.replace(/%3a/gi,":");
str = str.replace(/%3c/gi,"<");
str = str.replace(/%3e/gi,">");
str = str.replace(/%2b/gi,"+");
str = str.replace(/%2f/gi,"/");
str = str.replace(/%3d/gi,"=");
str = str.replace(/%40/gi,"@");
str = str.replace(/%23/gi,"#");
str = str.replace(/%24/gi,"$");
str = str.replace(/%7e/gi,"~");
str = str.replace(/%5e/gi,"^");
str = str.replace(/%26/gi,"&");
str = str.replace(/%7b/gi,"{");
str = str.replace(/%7d/gi,"}");
str = str.replace(/%5b/gi,"[");
str = str.replace(/%5d/gi,"]");
str = str.replace(/%25/gi,"%");
str = str.replace(/%a7/gi,"§");
str = str.replace(/%5f/gi,"_");
str = str.replace(/%0d/gi,"
");
str = str.replace(/%f6/gi,"ö");
str = str.replace(/%7c/gi,"|");
str = str.replace(/%fc/gi,"ü");
return str;
}
function TRon(obj){obj.style.backgroundColor='#eeeeff'; }
function TRoff(obj){obj.style.backgroundColor=''; }
function showListing(cnt){
var x, result, cHypoPrice, cHypoNova, cHypoType;
cHypoPrice = 10;
cHypoNova = 11;
cHypoType = 12;
cHypoActive = 13;
result = "";
x=cnt;
if (dbObj[x][9]=="" && cnt==0)
{
if (dbObj[x][5]=="4"){
result+="
Domy, vily
";
//result+="";
}
if (dbObj[x][5]=="5"){result+="Byty
";}
result+="";
}
if (last != dbObj[x][9])
{
if (cnt!=0) {result+="
"; }
if (last2 != dbObj[x][5])
{
if (dbObj[x][5]=="4"){result+="Domy, vily
";}
if (dbObj[x][5]=="5"){result+="Byty
";}
}
result+="" + dbObj[x][9] + "
";
}
url = "http://www.gavlas.cz:443/v2/cz/fmpro?-db=nemovitosti2.fp3&-format=byty.html&no=" + dbObj[x][0] + "&-find";
hypourl = "https://www.csas.cz/bydleni/application?pageid=hypocalc&cena=" + dbObj[x][cHypoPrice] + "&type=" + dbObj[x][cHypoType] + "&nova=" + dbObj[x][cHypoNova] + "&from=gavlas.cz";
result+= "";
result+="| | ";
result+= "" + dbObj[x][0] + " | ";
dbObj[x][1] = dbObj[x][1].replace(/
/gi, ", ");
result+= "" + dbObj[x][1] + " | ";
result+= "" + dbObj[x][2] + " | ";
result+= ""+ (dbObj[x][cHypoPrice]!="" && dbObj[x][cHypoActive]=="A"?" ":" ") +" | ";
result+= "" + dbObj[x][3] + " | ";
result+= "" + dbObj[x][4].replace(/ /gi," ") + " | ";
result+= "
";
last = dbObj[x][9];
last2= dbObj[x][5];
// result= "" + result.replace(/<\/td>/gi,"\n").replace(/<.*?>/gi,"") + "
";
return result;
}
function getHeader(dbObj){
return "" + dbObj[6] + "
";
}
function createTypIndex(){
var typIndex = new Array();
typIndex[0]= Array(1,"Bydlení (mimo Prahy a okolí)");
typIndex[1]= Array(2, "Obchod, služby, kanceláře, činžovní domy");
typIndex[2]= Array(3, "Rekreace, ubytování, stravování");
typIndex[3]= Array(4, "Výroba a skladování");
typIndex[4]= Array(5, "Ostatní objekty");
typIndex[5]= Array(7, "Pozemky");
return typIndex;
}
function showKN(dbObj){
typIndex = createTypIndex();
result = "";
last = "";
switch (getArg("t"))
{
case "3": mode=" k prodeji"; break;
case "4": mode=" k pronájmu"; break;
default: mode=""; break;
}
group = (getArg("class")!="office");
group = (getArg("t") != "" && getArg("gr") != "0");
group = (getArg("gr") != "0" && getArg("gr")!="");
if (group)
{
for (y=0; y" + typIndex[y][1] + mode + "
";
displayed++; last="";
}
if (dbObj[x][7] != last)
{
result+= ((last!="")?"
":"") + "" + dbObj[x][7] + "
";
}
result+= showListingKN(dbObj, x);
last = dbObj[x][7];
}
}
result+= "
";
}
}
if (!group)
{
displayed=0;
for (x=0; xKancelářské budovy k pronájmu
";}
else {result+= "
Výsledky hledání
";}
displayed++; last="";
}
if (dbObj[x][7] != last)
{
result+= ((last!="")?"":"") + "" + dbObj[x][7] + "
";
}
result+= showListingKN(dbObj, x);
last = dbObj[x][7];
}
}
result+= "
";
}
document.write(result); result="";
displayed=0;
for (x=0; x
Realizované zakázky" + mode + "
";
displayed++; last="";
}
if (dbObj[x][7] != last)
{
result+= ((last!="")?"":"") + "" + dbObj[x][7] + "
";
}
result+= showListingKN(dbObj, x);
last = dbObj[x][7];
}
}
if(result!="") {result+= "
";}
document.write(result);
}
function showListingKN(dbObj, cnt){
var x, result;
result = "";
x=cnt;
url = "http://www.gavlas.cz:443/v2/cz/fmpro?-db=nemovitosti2.fp3&-format=det.html&no=" + dbObj[x][0] + "&-find";
result+= "";
result+="| | ";
result+= "" + dbObj[x][0] + " | ";
// dbObj[x][1] = dbObj[x][1].replace(/
/gi, ", ");
result+= "" + dbObj[x][1] + " | ";
result+= "" + dbObj[x][2] + " | ";
result+= "" + dbObj[x][3] + " | ";
result+= "" + dbObj[x][4].replace(/ /gi," ") + " | ";
result+= "
";
last = dbObj[x][2];
last2= dbObj[x][6];
// result= "" + result.replace(/<\/td>/gi,"\n").replace(/<.*?>/gi,"") + "
";
return result;
}
function showDetail(dbObj){
var result;
result = "";
result+= "" + dbObj[1] + "
";
result+= "";
result+= "| Typ nabídky | " + dbObj[3] + " |
";
if (dbObj[13])
{
if (dbObj[13][5]=="A")
{
result+= "| | ";
if (dbObj[13][0]!="") result+= "| Kdy? | " + dbObj[13][0] + ""+ (dbObj[13][1]!=""? " v " + dbObj[13][1] + " hodin.":"") + " | ";
if (dbObj[13][2]!="") result+= "| Kde? | " + dbObj[13][2] + " | ";
if (dbObj[13][3]!="") result+= "| Další údaje: | Dražební vyhláška | ";
if (dbObj[13][4]!="") result+= "| | " + dbObj[13][4] + " | ";
result+= " |
";
}
}
result+= "| Stav zakázky | " + dbObj[4] + " |
";
if(dbObj[0]!=100444) result+= "| Specifikace | " + dbObj[6].replace(/ /gi, ", ") + dbObj[7].replace(/ /gi, ", ") + " |
";
result+= "| Poloha | " + dbObj[5].replace(/ /gi, ", ") + dbObj[8] + " |
";
result+= "| Číslo zakázky | " + dbObj[0] + " |
";
if (dbObj[11]!="")
{
result+= "| Cena | " + dbObj[11] + " |
";
}
result+= "
";
if (dbObj[12].length>1){
result+= "
";
result+= "";
if (dbObj[12].length>2)
{
result+= "";
for (x=0;x<(dbObj[12].length-1);x++) result+= " ";
result+= " |
";
}
result+= "";
// result+= " ";
result+= " ";
result+= " |
";
result+= "
";
}
if (dbObj[14]!="")
{
dbObj[15] = (dbObj[15]!="")?dbObj[15]:dbObj[14];
dbObj[9]+= "
Pro více informací klikněte na následující odkaz: " + dbObj[15] + ".
";
}
if (dbObj[9]!=""){
result+= "
";
result+= "
Popis
";
result+= "
" + dbObj[9];
result+= "
";
result+= "
";
}
if (dbObj[10]!=""){
result+= "
";
result+= "
Více informací
";
result+= "
" + dbObj[10] + "
";
result+= "
";
}
//result+= dbObj;
return result;
}
function showDetailByt(dbObj){
var result;
cHypoPrice = 16;
cHypoNova = 17;
cHypoType = 18;
cHypoActive = 19;
if (dbObj[cHypoPrice]!="" && dbObj[cHypoActive]=="A")
{
hypourl = "https://www.csas.cz/bydleni/application?pageid=hypocalc&cena=" + dbObj[cHypoPrice] + "&type=" + dbObj[cHypoType] + "&nova=" + dbObj[cHypoNova] + "&from=gavlas.cz";
hypocontent = "Hypoteční kalkulátor
České spořitelny
";
}
else {hypocontent = "";}
img="";
if (dbObj[12].length>1){
img+= "
";
img+= "";
if (dbObj[12].length>2)
{
img+= "";
for (x=0;x<(dbObj[12].length-1);x++) {img+= " ";}
img+= " |
";
}
img+= "";
img+= " ";
img+= " |
";
img+= "
";
}
result = "";
result+= "" + dbObj[1] + "
";
result+= "";
result+= "| Typ nabídky | " + dbObj[3] + " |
";
if (dbObj[13])
{
if (dbObj[13][5]=="A")
{
result+= "| | ";
if (dbObj[13][0]!="") result+= "| Kdy? | " + dbObj[13][0] + ""+ (dbObj[13][1]!=""? " v " + dbObj[13][1] + " hodin.":"") + " | ";
if (dbObj[13][2]!="") result+= "| Kde? | " + dbObj[13][2] + " | ";
if (dbObj[13][3]!="") result+= "| Další údaje: | Dražební vyhláška | ";
if (dbObj[13][4]!="") result+= "| | " + dbObj[13][4] + " | ";
result+= " |
";
}
}
result+= "| Stav zakázky | " + dbObj[4] + " |
";
// result+= "| Specifikace | " + dbObj[6].replace(/ /gi, ", ").replace(/, $/,"") + " |
";
result+= "| Specifikace | " + dbObj[6].replace(/ /gi, ", ") + dbObj[7].replace(/ /gi, ", ") + " |
";
// result+= "| Obec | " + dbObj[5] + " |
";
result+= "| Poloha | " + dbObj[5].replace(/ /gi, ", ") + dbObj[8] + " |
";
result+= "| Číslo zakázky | " + dbObj[0] + " |
";
if (dbObj[11]!="")
{
result+= "| Cena | " + dbObj[11] + " |
";
}
result+= "
";
result+= img;
if (dbObj[14]!="")
{
dbObj[15] = (dbObj[15]!="")?dbObj[15]:dbObj[14];
dbObj[9]+= "
Pro více informací klikněte na následující odkaz: " + dbObj[15] + ".
";
}
if (dbObj[9]!=""){
result+= "
"+ hypocontent;
result+= "
Popis
";
result+= "
" + dbObj[9];
result+= "
";
result+= "
";
}
if (dbObj[10]!=""){
result+= "
";
result+= "
Více informací
";
result+= "
" + dbObj[10] + "
";
result+= "
";
}
//result+= dbObj;
return result;
}
function changeStyle2(obj){obj.style.borderColor=(obj.style.borderColor=="black silver silver black")?"silver black black silver":"black silver silver black";}
function loadImg(thumbSrc){document.getElementById('mainImg').src = thumbSrc.replace(/thumb\./i, ".");}
function changeSize(){
var image;
image = document.getElementById('mainImg');
image.style.width = (image.style.width!='100%'?'100%':'');
}
function checkForm(id){
var el;
el=document.getElementById(id);
if ((el.utel.value==""?1:0) + (el.uemail.value==""?1:0) + (el.uname.value==""?1:0) >1)
{
alert('Vyplňte prosím Vaše jméno a alespoň telefonní číslo nebo e-mailovou adresu.');
return(false);
} else {return true;}
}
function checkForm2(id){
var el;
if(el && el.dTest){if (el.dTest.value!=""){alert("Formulář nelze odeslat.");return false;}}
el=document.getElementById(id);
if ((el.dPhone.value==""?1:0) + (el.dEmail.value==""?1:0) + (el.dJmeno.value==""?1:0) >1)
{
alert('Vyplňte prosím Vaše jméno a alespoň telefonní číslo nebo e-mailovou adresu.');
return(false);
} else {
el.dReferrer.value = location.href;
el.dItem.value = parseFMP(el.dItem.value);
return true;
}
}
function parseURL(str){
var xcode, xchar, x;
xcode = new Array("2B", "22", "F8", "ED", "9A", "9E", "9D", "E8", "FD", "F9", "F2", "FA", "EC", "EF", "E1", "E9", "F3", "D8", "CD", "8A", "8E", "8D", "C8", "DD", "D9", "D2", "DA", "CC", "CF", "C1", "C9", "D3");
xchar = new Array("+", "\"", "ř", "í", "š", "ž", "ť", "č", "ý", "ů", "ň", "ú", "ě", "ď", "á", "é", "ó", "Ř", "Í", "Š", "Ž", "Ť", "Č", "Ý", "Ů", "Ň", "Ú", "Ě", "Ď", "Á", "É", "Ó" );
for (x=0; x" + arr[x].substring(stspace) + "";
}
return result;
}
function clearOption(){
var ix, el, opt;
ix = document.getElementById("ix");
opt = new Option("", "", false, false);
el = document.forms["searchAdv"].r;
el.options[1] = opt;
ix.innerHTML = "01-: " + el.options["01-"].value + "
" + ix.innerHTML;
}
function info(str){
var ix;
ix = document.getElementById("ix");
ix.innerHTML = str + "
" + ix.innerHTML;
}
function checkR(el){
var idx;
idx = el.selectedIndex!=-1?el.selectedIndex:0;
if (el.options[idx].value=="") {el.selectedIndex=0;}
el2 = document.getElementById("typ1");
if (el.options[el.selectedIndex].value=="01-")
{
el2.options[1] = new Option("", "", false, false);
}
else
{
el2.options[1] = new Option("Bydlení", "1-", false, (el2.selectedIndex==1?true:false));
}
togglePodtyp();
}
function checkM(str){
var el2;
el2 = document.getElementById("typ1");
if (str.match(/praha/gi))
{
el2.options[1] = new Option("", "", false, false);
}
else
{
el2.options[1] = new Option("Bydlení", "1-", false, (el2.selectedIndex==1?true:false));
}
togglePodtyp();
}
function togglePodtyp(){
var el, idx, x, podtyprow, typ1select;
podtyprow = document.getElementById("podtyparea");
typ1select = document.getElementById("typ1");
if (typ1select.value=="") {typ1select.selectedIndex=0;}
idx = typ1select.selectedIndex;
if (idx==-1) {idx=0;}
for (x=1;x<=8;x++)
{
el = document.getElementById("list"+x);
el.style.display="none";
if (idx != x) {el.selectedIndex=0;}
}
if (idx!=0)
{
el = document.getElementById("list"+idx);
el.style.display="block";
podtyprow.style.display = "block";
}
else
{
podtyprow.style.display = "none";
}
el = document.forms["searchAdv"].r;
if (idx==1)
{
el.options[1] = new Option("", "", false, false);
}
else
{
el.options[1] = new Option("Praha a střední Čechy", "01-", false, (el.selectedIndex==1?true:false));
}
}
function createPodtypSelect(arr){
var temparr = new Array();
var listarr;
var cnt = 1; var x;
result = '