<?xml version="1.0" encoding="UTF-8" ?>
<Module>
<ModulePrefs
 title="検索"
 directory_title="いろいろ検索できます２"
 height="50"
 description="ひとつのガジェットで場所を取らずに様々な検索エンジンを呼び出せます。検索エンジンを選択してキーワードを記入し検索ボタンを押すか、またはEnterキーを叩くと別窓で検索結果を開きます。最後に使用した検索エンジンを記憶するようになっています。詳しくはガジェットのタイトルをクリックして説明ページをご覧下さい。"
 author="yosi6sun"
 author_email="yoshirou3+gadget@gmail.com"
 author_location="JAPAN"
 title_url="http://toys.tank.jp/gg/multi/"
 category="tools"
 category2="lifestyle"
 screenshot="http://toys.tank.jp/gg/multi/ssss.png"
 thumbnail="http://toys.tank.jp/gg/multi/sstn.png">
<Locale lang="ja" country="jp" />
<Require feature="dynamic-height"/>
<Require feature="analytics"/>
<Require feature="setprefs"/>
</ModulePrefs>

<UserPref name="rosenstart" display_name="路線検索出発駅" default_value=""/>

<UserPref display_name="Yahoo!ウェブ" name="s5" datatype="bool" default_value="true"/>
<UserPref display_name="Yahoo!オークション" name="s13" datatype="bool" default_value="true"/>
<UserPref display_name="Yahoo!路線" name="s19" datatype="bool" default_value="true"/>
<UserPref display_name="msnウェブ" name="s10" datatype="bool" default_value="true"/>
<UserPref display_name="Googleウェブ" name="s2" datatype="bool" default_value="true"/>
<UserPref display_name="Google画像" name="s1" datatype="bool" default_value="true"/>
<UserPref display_name="Google顔" name="s0" datatype="bool" default_value="true"/>
<UserPref display_name="Googleブログ" name="s4" datatype="bool" default_value="true"/>
<UserPref display_name="Googleニュース" name="s6" datatype="bool" default_value="true"/>
<UserPref display_name="Google News" name="s7" datatype="bool" default_value="true"/>
<UserPref display_name="Google地図" name="s8" datatype="bool" default_value="true"/>
<UserPref display_name="goo地図" name="s17" datatype="bool" default_value="true"/>
<UserPref display_name="goo国語辞書" name="s14" datatype="bool" default_value="true"/>
<UserPref display_name="ALC英和・和英" name="s3" datatype="bool" default_value="true"/>
<UserPref display_name="Answers.com英英" name="s18" datatype="bool" default_value="true"/>
<UserPref display_name="excite翻訳" name="s27" datatype="bool" default_value="true"/>
<UserPref display_name="Wikipedia" name="s11" datatype="bool" default_value="true"/>
<UserPref display_name="2ch" name="s12" datatype="bool" default_value="true"/>
<UserPref display_name="Twitter" name="s28" datatype="bool" default_value="true"/>
<UserPref display_name="価格.com" name="s20" datatype="bool" default_value="true"/>
<UserPref display_name="YouTube" name="s21" datatype="bool" default_value="true"/>
<UserPref display_name="ニコニコ動画" name="s26" datatype="bool" default_value="true"/>
<UserPref display_name="GyaO" name="s25" datatype="bool" default_value="true"/>
<UserPref display_name="Uta-Net" name="s22" datatype="bool" default_value="true"/>
<UserPref display_name="教えて!goo" name="s23" datatype="bool" default_value="true"/>
<UserPref display_name="電話番号⇒地域" name="s15" datatype="bool" default_value="true"/>
<UserPref display_name="町名⇔〒" name="s16" datatype="bool" default_value="true"/>

<UserPref name="LastSel" default_value="2" datatype="hidden"/>

<Content type="html"><![CDATA[
<table align="center" border="0">
	<form name="form1" id="form1" method="GET" target="_blank" onSubmit="return sch();">
	<tr>
		<td height="3"></td>
	</tr>
	<tr>
		<td align="center" valign="middle" height="50">
			<div id="ssel"></div>
			<input type="text" id="qtxt" size="19" style="font-size:16px;" value="">
			<input type="button" value="検索" style="font-size:16px;" onClick="return sch();">
		</td>
	</tr>
	</form>
</table>
<script type="text/javascript">
document.open();
document.write(
'<scr' + 'ipt type="text/javascript" src="' +
_IG_GetCachedUrl('http://toys.tank.jp/gg/ecl.js') +
'"></scr' + 'ipt>');
document.close();
</script>

<script type="text/javascript">

var prefs = new _IG_Prefs(__MODULE_ID__);
var LastSel = prefs.getString("LastSel") -0;

var BtnList = "";
if (prefs.getBool("s5")==true){
	if (LastSel == 5){sel='selected';} else {sel='';}
	BtnList += '<option value="5" ' + sel + '>Yahoo!ウェブ</option>';
}

if (prefs.getBool("s13")==true){
	if (LastSel == 13){sel='selected';} else {sel='';}
	BtnList += '<option value="13" ' + sel + '>Yahoo!オークション</option>';
}

if (prefs.getBool("s19")==true){
	if (LastSel == 19){sel='selected';} else {sel='';}
	BtnList += '<option value="19" ' + sel + '>Yahoo!路線</option>';
}

if (prefs.getBool("s10")==true){
	if (LastSel == 10){sel='selected';} else {sel='';}
	BtnList += '<option value="10" ' + sel + '>msnウェブ</option>';
}

if (prefs.getBool("s2")==true){
	if (LastSel == 2){sel='selected';} else {sel='';}
	BtnList += '<option value="2" ' + sel + '>Googleウェブ</option>';
}

if (prefs.getBool("s1")==true){
	if (LastSel == 1){sel='selected';} else {sel='';}
	BtnList += '<option value="1" ' + sel + '>Google画像</option>';
}

if (prefs.getBool("s0")==true){
	if (LastSel == 0){sel='selected';} else {sel='';}
	BtnList += '<option value="0" ' + sel + '>Google顔</option>';
}

if (prefs.getBool("s4")==true){
	if (LastSel == 4){sel='selected';} else {sel='';}
	BtnList += '<option value="4" ' + sel + '>Googleブログ</option>';
}

if (prefs.getBool("s6")==true){
	if (LastSel == 6){sel='selected';} else {sel='';}
	BtnList += '<option value="6" ' + sel + '>Googleニュース</option>';
}

if (prefs.getBool("s7")==true){
	if (LastSel == 7){sel='selected';} else {sel='';}
	BtnList += '<option value="7" ' + sel + '>Google News</option>';
}

if (prefs.getBool("s8")==true){
	if (LastSel == 8){sel='selected';} else {sel='';}
	BtnList += '<option value="8" ' + sel + '>Google地図</option>';
}

if (prefs.getBool("s17")==true){
	if (LastSel == 17){sel='selected';} else {sel='';}
	BtnList += '<option value="17" ' + sel + '>goo地図</option>';
}

if (prefs.getBool("s23")==true){
	if (LastSel == 23){sel='selected';} else {sel='';}
	BtnList += '<option value="23" ' + sel + '>教えて!goo</option>';
}

if (prefs.getBool("s14")==true){
	if (LastSel == 14){sel='selected';} else {sel='';}
	BtnList += '<option value="14" ' + sel + '>goo国語辞書</option>';
}

if (prefs.getBool("s3")==true){
	if (LastSel == 3){sel='selected';} else {sel='';}
	BtnList += '<option value="3" ' + sel + '>ALC英和・和英</option>';
}

if (prefs.getBool("s18")==true){
	if (LastSel == 18){sel='selected';} else {sel='';}
	BtnList += '<option value="18" ' + sel + '>Answers.com英英</option>';
}

if (prefs.getBool("s27")==true){
	if (LastSel == 27){sel='selected';} else {sel='';}
	BtnList += '<option value="27" ' + sel + '>excite翻訳</option>';
}

if (prefs.getBool("s11")==true){
	if (LastSel == 11){sel='selected';} else {sel='';}
	BtnList += '<option value="11" ' + sel + '>Wikipedia</option>';
}

if (prefs.getBool("s12")==true){
	if (LastSel == 12){sel='selected';} else {sel='';}
	BtnList += '<option value="12" ' + sel + '>2ch</option>';
}

if (prefs.getBool("s28")==true){
	if (LastSel == 28){sel='selected';} else {sel='';}
	BtnList += '<option value="28" ' + sel + '>Twitter</option>';
}

if (prefs.getBool("s20")==true){
	if (LastSel == 20){sel='selected';} else {sel='';}
	BtnList += '<option value="20" ' + sel + '>価格.com</option>';
}

if (prefs.getBool("s21")==true){
	if (LastSel == 21){sel='selected';} else {sel='';}
	BtnList += '<option value="21" ' + sel + '>YouTube</option>';
}

if (prefs.getBool("s26")==true){
	if (LastSel == 26){sel='selected';} else {sel='';}
	BtnList += '<option value="26" ' + sel + '>ニコニコ動画</option>';
}

if (prefs.getBool("s25")==true){
	if (LastSel == 25){sel='selected';} else {sel='';}
	BtnList += '<option value="25" ' + sel + '>GyaO</option>';
}

if (prefs.getBool("s22")==true){
	if (LastSel == 22){sel='selected';} else {sel='';}
	BtnList += '<option value="22" ' + sel + '>Uta-Net</option>';
}

if (prefs.getBool("s15")==true){
	if (LastSel == 15){sel='selected';} else {sel='';}
	BtnList += '<option value="15" ' + sel + '>電話番号⇒地域</option>';
}

if (prefs.getBool("s16")==true){
	if (LastSel == 16){sel='selected';} else {sel='';}
	BtnList += '<option value="16" ' + sel + '>町名⇔〒</option>';
}

if (LastSel == 24){sel='selected';} else {sel='';}
BtnList += '<option value="24" ' + sel + '>楽天</option>';

if (LastSel == 9){sel='selected';} else {sel='';}
BtnList += '<option value="9" ' + sel + '>Amazon.co.jp</option>';

_gel("ssel").innerHTML = '<select id="qsel" style="font-size:16px;">' + BtnList +"</select>";

function sch(){
	segn=_gel("qsel").value - 0;
	
	if (LastSel != segn){
		LastSel = segn;
		prefs.set("LastSel",LastSel);
	}
	
	switch(segn) {
		case 0:
			kw=_gel("qtxt").value;
			window.open('http://images.google.co.jp/images?hl=ja&gbv=2&imgtype=face&q=' + kw, "");
			return false;
			break;

		case 1:
			kw=_gel("qtxt").value;
			window.open('http://images.google.co.jp/images?hl=ja&gbv=2&q=' + kw, "");
			return false;
			break;

		case 2:
			kw=_gel("qtxt").value;
			window.open('http://www.google.co.jp/search?hl=ja&q=' + kw, "");
			return false;
			break;

		case 3:
			kw=_gel("qtxt").value;
			window.open('http://eow.alc.co.jp/' + kw + '/', "");
			return false;
			break;

		case 4:
			kw=_gel("qtxt").value;
			window.open('http://blogsearch.google.co.jp/blogsearch?hl=ja&lr=lang_ja&q=' + kw, "");
			return false;
			break;

		case 5:
			kw=_gel("qtxt").value;
			window.open('http://search.yahoo.co.jp/search?p=' + kw, "");
			return false;
			break;

		case 6:
			kw=_gel("qtxt").value;
			window.open('http://news.google.co.jp/news?hl=ja&ned=jp&q=' + kw, "");
			return false;
			break;

		case 7:
			kw=_gel("qtxt").value;
			window.open('http://news.google.co.jp/news?hl=ned&q=' + kw, "");
			return false;
			break;

		case 8:
			kw=_gel("qtxt").value;
			window.open('http://maps.google.co.jp/maps?q=' + kw, "");
			return false;
			break;

		case 9:
			kw=_gel("qtxt").value;
			window.open('http://www.amazon.co.jp/gp/associates/link-types/searchbox.html?tag=msearch-22&__mk_ja_JP=カタカナ&mode=blended&keyword=' + kw, "");
			return false;
			break;

		case 10:
			kw=_gel("qtxt").value;
			window.open('http://search.msn.co.jp/results.aspx?q=' + kw, "");
			return false;
			break;

		case 11:
			kw=_gel("qtxt").value;
			window.open('http://ja.wikipedia.org/w/index.php?search=' + kw, "");
			return false;
			break;

		case 12:
			kw=EscapeEUCJP(_gel("qtxt").value);
			window.open('http://find.2ch.net/?BBS=ALL&TYPE=TITLE&COUNT=10&STR=' + kw, "");
			return false;
			break;

		case 13:
			kw=EscapeEUCJP(_gel("qtxt").value);
			window.open('http://search.auctions.yahoo.co.jp/jp/search/auc?auccat=0&alocale=0jp&acc=jp&p=' + kw, "");
			return false;
			break;

		case 14:
			kw=EscapeEUCJP(_gel("qtxt").value);
			window.open('http://dictionary.goo.ne.jp/search.php?kind=&mode=0&jn.x=36&jn.y=10&MT=' + kw, "");
			return false;
			break;

		case 15:
			kw=EscapeSJIS(_gel("qtxt").value);
			window.open('http://joko.jp/qjk/sigai/?numb=' + kw, "");
			return false;
			break;

		case 16:
			kw=EscapeSJIS(_gel("qtxt").value);
			window.open('http://joko.jp/zip/?k=' + kw, "");
			return false;
			break;

		case 17:
			kw=_gel("qtxt").value;
			window.open('http://map.goo.ne.jp/search.php?selop=&src=1&map_search=%C3%CF%BF%DE%B8%A1%BA%F7&sw=0&MT=' + kw, "");
			return false;
			break;

		case 18:
			kw=_gel("qtxt").value;
			window.open('http://www.answers.com/' + kw, "");
			return false;
			break;

		case 19:
			kw=EscapeEUCJP(_gel("qtxt").value);
			var rosenstart = prefs.getString("rosenstart");
			if (rosenstart == ''){
				window.open('http://transit.yahoo.co.jp/search?val_htmb=select&from=' + kw, "");
			}else{
//			rosenstart=EscapeEUCJP(rosenstart);
				rosenstart=rosenstart;
				window.open('http://transit.yahoo.co.jp/search?val_htmb=select&val_to=' + kw + '&from=' + rosenstart, "");
			}
			return false;
			break;

		case 20:
			kw=EscapeSJIS(_gel("qtxt").value);
			window.open('http://search.kakaku.com/ksearch/search.aspx?query=' + kw, "");
			return false;
			break;

		case 21:
			kw=encodeURI(_gel("qtxt").value);
			window.open('http://jp.youtube.com/results?search_query=' + kw, "");
			return false;
			break;

		case 22:
			kw=EscapeSJIS(_gel("qtxt").value);
			window.open('http://www.uta-net.com/user/ichiran.html?cursession=&curuserid=&Aselect=2&Bselect=3&Cselect=1&Keyword=' + kw, "");
			return false;
			break;

		case 23:
			kw=EscapeEUCJP(_gel("qtxt").value);
			window.open('http://oshiete.goo.ne.jp/search/search.php?status=select&from=&PT=&nsMT=&MT=' + kw, "");
			return false;
			break;

		case 24:
			kw=EscapeEUCJP(_gel("qtxt").value);
			window.open('http://px.a8.net/svt/ejp?a8mat=1BTGUC%208MSC3M%205WS%20C164Y&sv=2&p=0&sitem=' + kw, "");
			return false;
			break;

		case 25:
			kw=EscapeSJIS(_gel("qtxt").value);
			window.open('http://gyaostream.search.livedoor.com/search/?svc=all&q=' + kw, "");
			return false;
			break;

		case 26:
			kw=_gel("qtxt").value;
			window.open('http://www.nicovideo.jp/search/' + kw, "");
			return false;
			break;

		case 27:
			kw=_gel("qtxt").value;
			kw=kw.replace(/^[ 　\t]*/,"");
			
			if (kw.match(/^[a-z0-9']{1}/i)){
				wb='ENJA';
			} else {
				wb='JAEN';
			}
			
			kw=EscapeSJIS(kw);
			window.open('http://www.excite.co.jp/world/english/?wb_lp=' + wb + '&before=' + kw, "");
			return false;
			break;

		case 28:
			kw=_gel("qtxt").value;
			window.open('http://search.twitter.com/search?q=' + kw, "");
			return false;
			break;



		case 29:
			_gel("form1").action = "http://search.twitter.com/search";
			_gel("qtxt").name = "q";
			break;




		default:
			break;
	}
}

_IG_AdjustIFrameHeight();
_IG_Analytics("UA-2078390-3", "/SSearch/");
</script>
]]></Content>
</Module>

