var cities = new Array();
cities[0] = new Array("KB01:遺伝子", "KB02:タンパク質", "KB03:酵素", "KB04:微生物", "KB05:細胞", "KB06:動物実験", "KB07:免疫", "KB08:薬理", "KB09:病理", "KB10:バイオインフォマティクス", "KB99:その他"); 
cities[1] = new Array("KC01:有機合成", "KC02:高分子", "KC03:触媒", "KC04:材料・素材", "KC05:電気化学", "KC06:食品分析", "KC07:医薬品分析", "KC08:化成品分析", "KC09:環境分析", "KC99:その他"); 
cities[2] = new Array("KE01:電気・電子", "KE02:機械", "KE03:ハードウェア", "KE04:金属", "KE05:土木・建築", "KE06:半導体", "KE07:航空宇宙", "KE08:物理", "KE09:気象・防災", "KE99:その他"); 
cities[3] = new Array("KS01:プログラミング", "KS02:システムエンジニアリング", "KS03:ネットワーク", "KS04:情報通信", "KS05:シミュレーション・統計", "KS99:その他");
cities[4] = new Array("KK01:技術営業", "KK02:アプリケーション", "KK03:フィールドサービス", "KK99:その他");
cities[5] = new Array("KM01:臨床開発モニター", "KM02:治験コーディネーター", "KM03:治験事務", "KM04:データマネジメント", "KM05:薬事申請", "KM06:メディカルライティング", "KM07:市販後調査", "KM08:ドラッグインフォメーション", "KM09:品質管理事務", "KM99:その他");
cities[6] = new Array("KX01:特許", "KX02:環境アセスメント", "KX04:文献調査", "KX05:統計・解析", "KX06:マーケティングリサーチ", "KX07:学術", "KX08:知的財産", "KX09:技術翻訳", "KX10:アナリスト", "KX11:研究事務", "KX99:その他");

function cate(b) {
	if ( document.forms[0].pref.selectedIndex == 0 ) {
		document.forms[0].city.length = 1;
		document.forms[0].city.selectedIndex = 0;
	} else {
		if (b) {
			document.forms[0].city.length = 1;
			document.forms[0].city.selectedIndex = 0;
		}
		var city = cities[ document.forms[0].pref.selectedIndex - 1 ];
		document.forms[0].city.length = city.length + 1;
		for ( var i = 0; i < city.length; i++ ) {
			var arr = city[ i ].split( ':' );
			document.forms[0].city.options[ i + 1 ].value = arr[0];
			document.forms[0].city.options[ i + 1 ].text = arr[1];
		}
	}
}

function sch_freeword() {
	var fwd = document.getElementById('freeword').value;
	location.href = "/Jobinfo.nsf/doSearch?OpenForm&fwd=" + encodeURI(fwd);
}

function categoryOpen() {
	if ( document.forms[0].pref.selectedIndex == 0 && document.forms[0].city.selectedIndex == 0 ) {
		window.alert( "大分類と小分類を選択してください" );
		return false;
	} else if ( document.forms[0].pref.selectedIndex == 0 ) {
		window.alert( "大分類を選択してください" );
		return false;
	} else if ( document.forms[0].city.selectedIndex == 0 ) {
		window.alert( "小分類を選択してください" );
		return false;
	}
	v = document.forms[0].elements['city'].value;
	if ( v.substring( 0, 1 ) == 'K' ) {
		key = v.substring( 1 );
	} else {
		key = v.substring( 1 );
	};
	url = '/jobinfo.nsf/doSearch?OpenForm&kwd='+key;
	location.href = url;
};
