
function make_focus() {
var f_list=document.find.func;
document.find.str.focus();
f_list.length=2;
f_list.options[0].value=""; f_list.options[0].text="Раздел:";
f_list.options[1].value=""; f_list.options[1].text="-------------------------------";
f_list.options.selectedIndex=0;
document.find.target.options.selectedIndex=0;
document.find.str.value="";
}

function select_func() {
var f_list=document.find.func;
var f_target=document.find.target.options[document.find.target.options.selectedIndex].value;
if (f_target=="alltop") {
 f_list.length=2;
 f_list.options[0].value="yandex0"; f_list.options[0].text="В рейтинге";
 f_list.options[1].value=""; f_list.options[1].text="-------------------------------";
}
if (f_target=="yandex") {
 f_list.length=7;
 f_list.options[0].value="yandex0"; f_list.options[0].text="На сайтах";
 f_list.options[1].value="yandex1"; f_list.options[1].text="В каталоге";
 f_list.options[2].value="yandex2"; f_list.options[2].text="В новостях";
 f_list.options[3].value="yandex3"; f_list.options[3].text="В магазине";
 f_list.options[4].value="yandex4"; f_list.options[4].text="В энциклопедии";
 f_list.options[5].value="yandex5"; f_list.options[5].text="В картинках";
 f_list.options[6].value=""; f_list.options[6].text="-------------------------------";
}
if (f_target=="aport") {
 f_list.length=9;
 f_list.options[0].value="aport0"; f_list.options[0].text="На сайтах";
 f_list.options[1].value="aport1"; f_list.options[1].text="В рефератах";
 f_list.options[2].value="aport2"; f_list.options[2].text="В знакомствах";
 f_list.options[3].value="aport3"; f_list.options[3].text="В mp3";
 f_list.options[4].value="aport4"; f_list.options[4].text="В новостях";
 f_list.options[5].value="aport5"; f_list.options[5].text="В энциклопедии";
 f_list.options[6].value="aport6"; f_list.options[6].text="В работе";
 f_list.options[7].value="aport7"; f_list.options[7].text="В товарах";
 f_list.options[8].value=""; f_list.options[8].text="-------------------------------";
} 
if (f_target=="google") {
 f_list.length=5;
 f_list.options[0].value="google0"; f_list.options[0].text="На сайтах";
 f_list.options[1].value="google1"; f_list.options[1].text="В картинках";
 f_list.options[2].value="google2"; f_list.options[2].text="В группах Usenet";
 f_list.options[3].value="google3"; f_list.options[3].text="В каталоге";
 f_list.options[4].value=""; f_list.options[4].text="-------------------------------";
} 
if (f_target=="rambler") {
 f_list.length=7;
 f_list.options[0].value="rambler0"; f_list.options[0].text="На сайтах";
 f_list.options[1].value="rambler1"; f_list.options[1].text="В новостях";
 f_list.options[2].value="rambler2"; f_list.options[2].text="В товарах";
 f_list.options[3].value="rambler3"; f_list.options[3].text="В рейтинге";
 f_list.options[4].value="rambler4"; f_list.options[4].text="В файлах";
 f_list.options[5].value="rambler5"; f_list.options[5].text="В словарях";
 f_list.options[6].value=""; f_list.options[6].text="-------------------------------";
} 
if (f_target=="mail") {
 f_list.length=7;
 f_list.options[0].value="mail0"; f_list.options[0].text="На сайтах";
 f_list.options[1].value="mail1"; f_list.options[1].text="В картинках";
 f_list.options[2].value="mail2"; f_list.options[2].text="В каталоге";
 f_list.options[3].value="mail3"; f_list.options[3].text="В товарах и лотах";
 f_list.options[4].value="mail4"; f_list.options[4].text="В софте";
 f_list.options[5].value="mail5"; f_list.options[5].text="В словарях";
 f_list.options[6].value=""; f_list.options[6].text="-------------------------------";
} 
}

function verify_form() {
var f_target=document.find.target.options[document.find.target.options.selectedIndex].value;
var f_func=document.find.func.options[document.find.func.options.selectedIndex].value;
var f_str=document.find.str.value;
if (f_target=="yandex") { eval('document.'+f_func+'.text.value=f_str;'); eval('document.'+f_func+'.submit();'); }
if (f_target=="aport") { eval('document.'+f_func+'.r.value=f_str;'); eval('document.'+f_func+'.submit();'); }
if (f_target=="google") { eval('document.'+f_func+'.q.value=f_str;'); eval('document.'+f_func+'.submit();'); }
if (f_target=="rambler") { eval('document.'+f_func+'.words.value=f_str;'); eval('document.'+f_func+'.submit();'); }
if (f_target=="mail") {
 if (f_func=="mail0") { eval('document.'+f_func+'.q.value=f_str;'); eval('document.'+f_func+'.submit();'); }
 if (f_func=="mail1") { eval('document.'+f_func+'.q.value=f_str;'); eval('document.'+f_func+'.submit();'); }
 if (f_func=="mail2") { eval('document.'+f_func+'.q.value=f_str;'); eval('document.'+f_func+'.submit();'); }
 if (f_func=="mail3") { eval('document.'+f_func+'.text.value=f_str;'); eval('document.'+f_func+'.submit();'); }
 if (f_func=="mail4") { eval('document.'+f_func+'.searchstring.value=f_str;'); eval('document.'+f_func+'.submit();'); }
 if (f_func=="mail5") { eval('document.'+f_func+'.winword.value=f_str;'); eval('document.'+f_func+'.submit();'); }
}
return false;
}

