regId = 0; oblId = 0; function whatMake(obl, reg) { obj = document.getElementById("sv-what"); if(obj) { obj.style.display = "block"; } oblId = obl; regId = reg; } function goDinamic() { setElement(); url = "http://www.svdevelopment.com/ru/web/land/"; document.whatDoForm.action = url; document.whatDoForm.submit(); closeWhat(); } function goPrice() { setElement(); if(oblId==26) { url = "http://www.svdevelopment.com/ru/web/val_object/"; } else { url = "http://www.svdevelopment.com/ru/web/land_valuation/"; } document.whatDoForm.action = url; document.whatDoForm.submit(); closeWhat(); } function setElement() { document.getElementById("oblCalc").value = oblId; document.getElementById("oblDin").value = oblId; document.getElementById("regObl").value = regId; document.getElementById("regDin").value = regId; document.getElementById("calc_d_id").value = regId; } function closeWhat() { obj = document.getElementById("sv-what"); if(obj) { obj.style.display="none"; } } function openOblast(id) { obj = document.getElementById("omgObl"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { obj.src="http://www.svdevelopment.com/img/minus.gif"; showHideRegions(id, ""); if(lastShowedRegion>0 && lastShowedRegion!=id) hideOblast(lastShowedRegion); obj = document.getElementById("ttlObl_"+id); if(obj) { obj.className = "sv-reg-op"; } } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegions(id, "none"); } } lastShowedRegion = id; } function hideOblast(id) { obj = document.getElementById("omgObl"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegions(id, "none"); } } obj = document.getElementById("ttlObl_"+id); if(obj) { obj.className = "sv-reg-cl"; } } function showHideRegions(id, action) { objs = document.getElementsByTagName("tr"); id = "trObl_"+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); }