/*
---------------------------------------------------------------------
【ソフト名称】ＰＳＯセクションＩＤサーチプログラム
【バージョン】1.1425.3201
【 著作権者 】TRY Soft / 叶あかね
【 対応機種 】JavaScript対応ブラウザ
【 動作確認 】Microsoft InternetExplorer 4.0 / 5.0 / 5.5
【 開発言語 】JavaScript Ver.unknown:)
【ソフト種別】直人専用
【　転　載　】不可
【 アクセス 】URL:http://www.cno.ne.jp/r22/niku-q/
              MAIL:niku-q@r22.cno.ne.jp
---------------------------------------------------------------------

【設置方法】

ＨＴＭＬファイルに以下の一行を記入するだけ♪
<SCRIPT LANGUAGE="JAVASCRIPT" SRC="psoid.js"></SCRIPT>
*/

/*---------------------------------------------*/
/*     プログラム開始                          */
/*---------------------------------------------*/
document.write("<form name='idstr'>");
document.write("PSO Section-ID Search<BR>");
document.write("<INPUT TYPE='TEXT' NAME='name' Onchange='Search()' Onkeyup='Search()'><BR>");
document.write("<INPUT TYPE='TEXT' VALUE='■VIRIDIA' NAME='id' ID='id' style='color:green; background-color:black; border-style:none'>");
document.write("</form>");

idstr.name.onchange;
function Search()
{
	var total = 0;
	for( var i = 0 ; i < idstr.name.value.length ; i++ ){
		total = total + idstr.name.value.charCodeAt( i );
		total = ( total ) % ( 10 );
	}

	switch( total ){
		case 0:
			idstr.id.style.color = "GREEN";
			idstr.id.value = "■VIRIDIA";
			break;
		case 1:
			idstr.id.style.color = "LIME";
			idstr.id.value = "■GREENILL";
			break;
		case 2:
			idstr.id.style.color = "CYAN";
			idstr.id.value = "■SKYLY";
			break;
		case 3:
			idstr.id.style.color = "BLUE";
			idstr.id.value = "■BLUEFULL";
			break;
		case 4:
			idstr.id.style.color = "PURPLE";
			idstr.id.value = "■PURPLENUM";
			break;
		case 5:
			idstr.id.style.color = "PINK";
			idstr.id.value = "■PINKAL";
			break;
		case 6:
			idstr.id.style.color = "RED";
			idstr.id.value = "■REDRIA";
			break;
		case 7:
			idstr.id.style.color = "ORANGE";
			idstr.id.value = "■ORAN";
			break;
		case 8:
			idstr.id.style.color = "YELLOW";
			idstr.id.value = "■YELLOWBOZE";
			break;
		case 9:
			idstr.id.style.color = "WHITE";
			idstr.id.value = "■WHITILL";
			break;
	}
}

/* End Of PosId.js */
