function T() { var first_data=Sel.ColorList.options[Sel.ColorList.selectedIndex].value; var obj2=document.getElementById(table_data[first_data]); if (Sel.ColorList.options[Sel.ColorList.selectedIndex].value == '0') {alert('Выберите тип объекта');return false;} if (obj2.options[obj2.selectedIndex].value == '0') {alert('Выберите тип операции'); return false;} sfElement = Sel.ColorList.options[Sel.ColorList.selectedIndex].value; slElement = obj2.options[obj2.selectedIndex].value; window.location.href = "/"+sfElement + slElement; return false; } function O() { if (Lse.List.options[Lse.List.selectedIndex].value == '0') {alert('Выберите тип объекта');return false;} soElement = Lse.List.options[Lse.List.selectedIndex].value + 'appreciate/'; window.location.href = soElement; return false; } table_data = { "0" :"selnorent", "flat/" :"selnorent", "house/" :"selnorent", "commercial/" :"selnorent", "rent/" :"selrent" } function checkAsk(obj) { var first_data=obj.elements.ColorList.options[obj.elements.ColorList.options.selectedIndex].value; var obj2=document.getElementById(table_data[first_data]); if (table_data[first_data]=="selnorent") { var obj3=document.getElementById("selrent"); obj3.style.display="none"; obj3.disabled=true; obj2.style.display="block"; obj2.disabled=false; } else { var obj3=document.getElementById("selnorent"); obj3.style.display="none"; obj3.disabled=true; obj2.style.display="block"; obj2.disabled=false; } var second_data=obj2.options[obj2.options.selectedIndex].value; }