regIdOffice = 0; oblIdOffice = 0; oblTypeOffice = 0; function whatMakeOffice(obl, reg, type) { obj = document.getElementById("sv-what-house"); if(obj && obl==2 && 0) { obj.style.display = "block"; } oblIdOffice = obl; regIdOffice = reg; oblTypeOffice = type; if(obl!=2 || 1) { goDinamicOffice(); } } function goDinamicOffice() { setElementOffice(); url = "http://www.svdevelopment.com/ru/web/office/"; document.whatDoFormOffice.action = url; document.whatDoFormOffice.submit(); closeWhatOffice(); } function goPriceOffice() { setElementOffice(); url = "http://www.svdevelopment.com/ru/web/office/"; document.whatDoFormOffice.action = url; document.whatDoFormOffice.submit(); closeWhatOffice(); } function setElementOffice() { document.getElementById("oblCalcOffice").value = oblIdOffice; document.getElementById("oblDinOffice").value = oblIdOffice; document.getElementById("regOblOffice").value = regIdOffice; document.getElementById("oblDId").value = regIdOffice; document.getElementById("regDinOffice").value = regIdOffice; document.getElementById("oblTypeOffice").value = oblTypeOffice; } function closeWhatOffice() { obj = document.getElementById("sv-what-house"); if(obj) { obj.style.display="none"; } } function openOblastOffice(id) { // alert(id+' '+lastShowedRegionOffice); obj = document.getElementById("omgOblOffice"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { obj.src="http://www.svdevelopment.com/img/minus.gif"; showHideRegionsOffice(id, ""); if(lastShowedRegionOffice>0 && lastShowedRegionOffice!=id) hideOblastOffice(lastShowedRegionOffice); obj = document.getElementById("ttlOblOffice_"+id); if(obj) { obj.className = "sv-reg-op"; } } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegionsOffice(id, "none"); } } lastShowedRegionOffice = id; } function hideOblastOffice(id) { obj = document.getElementById("omgOblOffice"+id); if(obj) { if(obj.src.indexOf("minus.gif")==-1) { } else { obj.src="http://www.svdevelopment.com/img/plus.gif"; showHideRegionsOffice(id, "none"); } } obj = document.getElementById("ttlOblOffice_"+id); if(obj) { obj.className = "sv-reg-cl"; } } function showHideRegionsOffice(id, action) { objs = document.getElementsByTagName("tr"); id = "trOblOffice_"+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+"| id: "+id+" objs[i].id: "+objs[i].id+"\n"; objs[i].style.display = action; } } // alert(s); }