regIdFlatn = 0; oblIdFlatn = 0; function whatMakeFlatn(obl, reg) { oblIdFlatn = obl; regIdFlatn = reg; goDinamicFlatn(); } function goDinamicFlatn() { setElementFlatn(); url = "http://www.svdevelopment.com/ru/web/flat_costs/"; document.getElementById("whatDoFormFlatn").action = url; document.whatDoFormFlatn.submit(); // closeWhatFlatn(); } function setElementFlatn() { document.getElementById("oblCalcFlatn").value = oblIdFlatn; document.getElementById("oblDinFlatn").value = oblIdFlatn; document.getElementById("regOblFlatn").value = regIdFlatn; document.getElementById("regDinFlatn").value = regIdFlatn; } function closeWhatFlatn() { obj = document.getElementById("sv-what-house"); if(obj) { obj.style.display="none"; } } function openOblastFlatn(id) { obj = document.getElementById("omgOblFlatn"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { obj.src="http://www.svdevelopment.com/img/minus.gif"; showHideRegionsFlatn(id, ""); if(lastShowedRegionFlatn>0 && lastShowedRegionFlatn!=id) hideOblastFlatn(lastShowedRegionFlatn); obj = document.getElementById("ttlOblFlatn_"+id); if(obj) { obj.className = "sv-reg-op"; } } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegionsFlatn(id, "none"); } } lastShowedRegionFlatn = id; } function hideOblastFlatn(id) { obj = document.getElementById("omgOblFlatn"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegionsFlatn(id, "none"); } } obj = document.getElementById("ttlOblFlatn_"+id); if(obj) { obj.className = "sv-reg-cl"; } } function showHideRegionsFlatn(id, action) { objs = document.getElementsByTagName("tr"); id = "trOblFlatn_"+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); }