﻿function seteuc(fx){
	bkup=document.charset;
	document.charset="euc-jp";
	display(fx);
	document.charset=bkup;
}

function setsjis(fx){
	bkup=document.charset;
	document.charset="shift_jis";
	display(fx);
	document.charset=bkup;
}

function setutf(fx){
	bkup=document.charset;
	document.charset="utf-8";
	display(fx);
	document.charset=bkup;
}

function display(formx) {
	swin=window.open("","category_root","");

	formx.target="category_root";
	formx.submit(); swin.focus();
}

function search(eng) {
	q=document.fm.k.value;
	if(q=="") return;
	if(eng=="yahoo") { fw=document.f_yahoo; fw.q.value=q; setutf(fw); }
	if(eng=="google") { fw=document.f_google; fw.q.value=q; setutf(fw); }
	if(eng=="msn") { fw=document.f_msn; fw.q.value=q; setutf(fw); }
	if(eng=="sbif") { fw=document.f_sbif; fw.q.value=q; setutf(fw); }
	if(eng=="infoseek") { fw=document.f_infoseek; fw.q.value=q; setutf(fw); }
	if(eng=="nifty") { fw=document.f_nifty; fw.q.value=q; setutf(fw); }
	if(eng=="ocn") { fw=document.f_ocn; fw.q.value=q; setutf(fw); }
	if(eng=="biglobe") { fw=document.f_biglobe; fw.q.value=q; setutf(fw); }
	if(eng=="nikkei") { fw=document.f_nikkei; fw.q.value=q; setutf(fw); }
	if(eng=="reuters") { fw=document.f_reuters; fw.q.value=q; setutf(fw); }
	if(eng=="bloomb") { fw=document.f_bloomb; fw.q.value=q; setutf(fw); }
	if(eng=="morning") { fw=document.f_morning; fw.keyword.value=q; setsjis(fw); }
	if(eng=="quick") { fw=document.f_quick; fw.q.value=q; setutf(fw); }
	if(eng=="kabumap") { fw=document.f_kabumap; fw.codetext.value=q; setsjis(fw); }
	if(eng=="tradersweb") { fw=document.f_tradersweb; fw.S_SC.value=q; setsjis(fw); }
	if(eng=="ifis") { fw=document.f_ifis; fw.q.value=q; setutf(fw); }
	if(eng=="stockw") { fw=document.f_stockw; fw.q.value=q; setutf(fw); }
	if(eng=="ullet") { fw=document.f_ullet; fw.q.value=q; setutf(fw); }
	if(eng=="kabutan") { fw=document.f_kabutan; fw.input_string.value=q; setutf(fw); }
	if(eng=="nsj") { fw=document.f_nsj; fw.name.value=q; seteuc(fw); }
	if(eng=="blogos") { fw=document.f_blogos; fw.q.value=q; setutf(fw); }
	if(eng=="miller") { fw=document.f_miller; fw.q.value=q; setutf(fw); }
	if(eng=="opticast") { fw=document.f_opticast; fw.src.value=q; seteuc(fw); }
	if(eng=="tokyoipo") { fw=document.f_tokyoipo; fw.brand.value=q; seteuc(fw); }
	if(eng=="minkabu") { fw=document.f_minkabu; fw.q.value=q; setutf(fw); }
	if(eng=="ynews") { fw=document.f_ynews; fw.q.value=q; setutf(fw); }
	if(eng=="gnews") { fw=document.f_gnews; fw.q.value=q; setutf(fw); }
	if(eng=="fresheye") { fw=document.f_fresheye; fw.q.value=q; setutf(fw); }
	if(eng=="asahi") { fw=document.f_asahi; fw.q.value=q; setutf(fw); }
	if(eng=="yomiuri") { fw=document.f_yomiuri; fw.q.value=q; setutf(fw); }
	if(eng=="sankei") { fw=document.f_sankei; fw.q.value=q; setutf(fw); }
	if(eng=="mainichi") { fw=document.f_mainichi; fw.q.value=q; setutf(fw); }
	if(eng=="nnews") { fw=document.f_nnews; fw.q.value=q; setutf(fw); }
	if(eng=="jiji") { fw=document.f_jiji; fw.q.value=q; setutf(fw); }
	if(eng=="47news") { fw=document.f_47news; fw.q.value=q; setutf(fw); }
	if(eng=="gpdf") { fw=document.f_gpdf; fw.q.value=q; setutf(fw); }
	if(eng=="asset") { fw=document.f_asset; fw.code_name.value=q; seteuc(fw); }
	if(eng=="kreport") { fw=document.f_kreport; fw.q.value=q; setutf(fw); }
	if(eng=="honkawa") { fw=document.f_honkawa; fw.q.value=q; setutf(fw); }
	if(eng=="estat") { fw=document.f_estat; fw.q.value=q; setutf(fw); }
	if(eng=="twitter") { fw=document.f_twitter; fw.q.value=q; setutf(fw); }
	if(eng=="find2ch") { fw=document.f_find2ch; fw.q.value=q; setutf(fw); }
	if(eng=="makimo") { fw=document.f_makimo; fw.q.value=q; setutf(fw); }
	if(eng=="ybbs") { fw=document.f_ybbs; fw.q.value=q; setutf(fw); }
	if(eng=="kizashi") { fw=document.f_kizashi; fw.q.value=q; setutf(fw); }
	if(eng=="gblog") { fw=document.f_gblog; fw.q.value=q; setutf(fw); }
	if(eng=="goo") { fw=document.f_goo; fw.q.value=q; setutf(fw); }
	if(eng=="hatena") { fw=document.f_hatena; fw.q.value=q; setutf(fw); }
	if(eng=="oshiete") { fw=document.f_oshiete; fw.q.value=q; setutf(fw); }
	if(eng=="wiki") { fw=document.f_wiki; fw.q.value=q; setutf(fw); }

}

