regIdHouse = 0; oblIdHouse = 0; function whatMakeHouse(obl, reg) { obj = document.getElementById("sv-what-house"); if(obj) { obj.style.display = "block"; } oblIdHouse = obl; regIdHouse = reg; // goDinamicHouse(); } function goDinamicHouse() { setElementHouse(); url = "http://www.svdevelopment.com/ru/web/house_costs/"; document.whatDoFormHouse.action = url; document.whatDoFormHouse.submit(); closeWhatHouse(); } function goPriceHouse() { setElementHouse(); if(oblIdHouse==26) { url = "http://www.svdevelopment.com/ru/web/val_object/"; } else { url = "http://www.svdevelopment.com/ru/web/on-line/"; } document.whatDoFormHouse.action = url; document.whatDoFormHouse.submit(); closeWhatHouse(); } function setElementHouse() { document.getElementById("oblCalcHouse").value = oblIdHouse; document.getElementById("oblDinHouse").value = oblIdHouse; document.getElementById("regOblHouse").value = regIdHouse; document.getElementById("regDinHouse").value = regIdHouse; document.getElementById("calc_d_id").value = regIdHouse; } function closeWhatHouse() { obj = document.getElementById("sv-what-house"); if(obj) { obj.style.display="none"; } } function openOblastHouse(id) { obj = document.getElementById("omgOblHouse"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { obj.src="http://www.svdevelopment.com/img/minus.gif"; showHideRegionsHouse(id, ""); if(lastShowedRegionHouse>0 && lastShowedRegionHouse!=id) hideOblastHouse(lastShowedRegionHouse); obj = document.getElementById("ttlOblHouse_"+id); if(obj) { obj.className = "sv-reg-op"; } } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegionsHouse(id, "none"); } } lastShowedRegionHouse = id; } function hideOblastHouse(id) { obj = document.getElementById("omgOblHouse"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegionsHouse(id, "none"); } } obj = document.getElementById("ttlOblHouse_"+id); if(obj) { obj.className = "sv-reg-cl"; } } function showHideRegionsHouse(id, action) { objs = document.getElementsByTagName("tr"); id = "trOblHouse_"+id; // s = ''; for(i in objs) { if((objs[i].className == "sv-dev-cellS0" || objs[i].className == "sv-dev-cellS1") && objs[i].id.indexOf(id)==0) { // s+= i+"="+objs[i].className+":"+objs[i].title+"|\t"; objs[i].style.display = action; } } // alert(s); }