/*
[[ REQUIRE PROTOTYPE.JS ]]
*/

/*
指定された文字をサーチする
*/
function kw_search(srt) {
	if (srt == 0) {
		// BIG検索
		$('st_srt').value = "big";
		$('ks').action = 'http://jp-ferret.com/search.php' + "?kw=" + encodeURIComponent($('st_kw').value);
		try {
		$('st_srt2').value = "big";
		} catch (e) {
		}
		
	} else if (srt == 1) {
		// SMALL検索
		$('st_srt').value = "small";
		$('ks').action = 'http://jp-ferret.com/search.php' + "?kw=" + encodeURIComponent($('st_kw').value);
		try {
		$('st_srt2').value = "small";
		} catch (e) {
		}
	}
}

/*
指定された検索エンジンを変更する
*/
function chgengine(eng) {
	var o = $('st_eng');
	var o2;
	
	$('aw-en-fe1').style.display = 'none';
	$('aw-en-go1').style.display = 'none';
	$('aw-en-ya1').style.display = 'none';
	try {
	$('aw-en-fe2').style.display = 'none';
	$('aw-en-go2').style.display = 'none';
	$('aw-en-ya2').style.display = 'none';
	o2 = $('st_eng2');
	} catch (e) {}
	
	// COLOR
	try{
	$('en-fe1').style.color = 6710886;
	$('en-go1').style.color = 6710886;
	$('en-ya1').style.color = 6710886;
	} catch (e) {}
	

	try {
	$('en-fe2').style.color = 6710886;
	$('en-go2').style.color = 6710886;
	$('en-ya2').style.color = 6710886;
	
	} catch (e) {
	}
	
	if (eng == 0) {
		// Ferret
		o.value = "fe";
		$('aw-en-fe1').style.display = '';
		try {
		o2.value = "fe";
		$('aw-en-fe2').style.display = '';
		$('en-fe1').style.color = 3565259;
		$('en-fe2').style.color = 3565259;
		} catch (e) {
		}
		
	} else if (eng == 1) {
		// Google
		o.value = "ge";
		$('aw-en-go1').style.display = '';
		try {
		o2.value = "ge";
		$('aw-en-go2').style.display = '';
		$('en-go1').style.color = 3565259;
		$('en-go2').style.color = 3565259;
		} catch (e) {
		}
		
	} else if (eng == 2) {
		// Yahoo!
		o.value = "ya";
		$('aw-en-ya1').style.display = '';
		try {
		o2.value = "ya";
		$('aw-en-ya2').style.display = '';
		$('en-ya1').style.color = 3565259;
		$('en-ya2').style.color = 3565259;
		} catch (e) {
		}
	}
	
}

