﻿var ppl = new Array();
ppl[0] = new tag("0001","Pixelian Prototype-M<br>ピクセリアン試作型M");
ppl[1] = new tag("0002","Pixelian Prototype-W<br>ピクセリアン試作型W");
ppl[2] = new tag("0003","Phoenix Wright<br>成歩堂龍一");
ppl[3] = new tag("0004","Maya Fey<br>綾里真宵");
ppl[4] = new tag("0005","Mia Fey<br>綾里千尋");
ppl[5] = new tag("0006","Miles Edgeworth<br>御剣怜侍");
ppl[6] = new tag("0007","Dick Gumshoe<br>糸鋸圭介");
ppl[7] = new tag("0008","The Judge<br>裁判長");
ppl[8] = new tag("0009","Purlin Beam");
ppl[9] = new tag("0010","Fatmo<br>肥毛");
ppl[10] = new tag("0011","Kam Wang<br>錦宏");
ppl[11] = new tag("0012","Rance");
ppl[12] = new tag("0013","Boot Boot Che<br>砵砵車");
ppl[13] = new tag("0014","Ki Yue Kwan<br>紀元君");
ppl[14] = new tag("0015","Sei Ye<br>死野");
ppl[15] = new tag("0016","Sui Gwai<br>衰鬼");
ppl[16] = new tag("0017","Snowmask");
ppl[17] = new tag("0018","Xiao Yufeng<br>蕭雨風");
ppl[18] = new tag("0019","Smile Sandy");
ppl[19] = new tag("0020","Agent I");
ppl[20] = new tag("0021","IQ");
ppl[21] = new tag("0022","Dr. Superficial");
ppl[22] = new tag("0023","Evil Henchman 0719A");
ppl[23] = new tag("0024","Evil Henchman 0386B");
ppl[24] = new tag("0025","T-800 Model 101");
ppl[25] = new tag("0026","T-800");
ppl[26] = new tag("0027","T-1000");
ppl[27] = new tag("0028","T-X");
ppl[28] = new tag("0029","T-X");
ppl[29] = new tag("0030","T-1");
ppl[30] = new tag("0031","V");
ppl[31] = new tag("0032","Evey Hammond");
ppl[32] = new tag("0033","Mr. Monopoly");
ppl[33] = new tag("0034","Godzilla<br>ゴジラ");
ppl[34] = new tag("0035","Lee Kei<br>李奇");
ppl[35] = new tag("0036","Tze Yuen<br>謝源");
ppl[36] = new tag("0037","Ching Po Chu<br>程寶珠");
ppl[37] = new tag("0038","Shiu Fong Fong<br>邵芳芳");
ppl[38] = new tag("0039","Luke Skywalker");
ppl[39] = new tag("0040","Obi-Wan Kenobi");
ppl[40] = new tag("0041","Leia Organa");
ppl[41] = new tag("0042","Han Solo");
ppl[42] = new tag("0043","Chewbacca");
ppl[43] = new tag("0044","R2-D2");
ppl[44] = new tag("0045","C-3PO");
ppl[45] = new tag("0046","Batman");
ppl[46] = new tag("0047","Robin");
ppl[47] = new tag("0048","Cloud Strife<br>クラウド・ストライフ");
ppl[48] = new tag("0049","Aeris Gainsborough<br>エアリス・ゲインズブール");
ppl[49] = new tag("0050","Tifa Lockhart<br>ティファ・ロックハート");
ppl[50] = new tag("0051","Waldo<br>Wally");
ppl[51] = new tag("0052","Rayman");
ppl[52] = new tag("0053","Rabbid");
ppl[53] = new tag("0054","Mario<br>マリオ");
ppl[54] = new tag("0055","Luigi<br>ルイージ");
ppl[55] = new tag("0056","WALL·E");
ppl[56] = new tag("0057","EVE");
ppl[57] = new tag("0058","Hal");
ppl[58] = new tag("0059","M-O");
ppl[59] = new tag("0060","Captain B. McCrea");
ppl[60] = new tag("0061","Auto");
ppl[61] = new tag("0062","The Joker");
ppl[62] = new tag("0063","Two-Face");
ppl[63] = new tag("0064","The Scarecrow");
ppl[64] = new tag("0065","Ra's Al Gul");
ppl[65] = new tag("0066","Beibei<br>福娃贝贝");
ppl[66] = new tag("0067","Jingjing<br>福娃晶晶");
ppl[67] = new tag("0068","Huanhuan<br>福娃欢欢");
ppl[68] = new tag("0069","Yingying<br>福娃迎迎");
ppl[69] = new tag("0070","Nini<br>福娃妮妮");
ppl[70] = new tag("0071","Darth Vader");
ppl[71] = new tag("0072","Grand Moff Tarkin");
ppl[72] = new tag("0073","Stormtrooper");
ppl[73] = new tag("0074","Boo");
ppl[74] = new tag("0075","James P. Sullivan");
ppl[75] = new tag("0076","Mike Wazowski");
ppl[76] = new tag("0077","Mother<br>母");
ppl[77] = new tag("0078","Mikan Tachibana<br>立花みかん");
ppl[78] = new tag("0079","Yuzuhiko Tachibana<br>立花ユズヒコ");
ppl[79] = new tag("0080","Father<br>父");
ppl[80] = new tag("0081","Colonel Harland Sanders");
ppl[81] = new tag("0082","Bo Ging Wan<br>步驚雲");
ppl[82] = new tag("0083","Nip Fung<br>聶風");
ppl[83] = new tag("0084","Mo Ming<br>無名");
ppl[84] = new tag("0085","Nathan Hale");
ppl[85] = new tag("0086","Chimeran Hybrid");
ppl[86] = new tag("0087","Wario<br>ワリオ");
ppl[87] = new tag("0088","Princess Peach<br>ピーチ姫");
ppl[88] = new tag("0089","Yoshi<br>ヨッシー");
ppl[89] = new tag("0090","Toad<br>キノピオ");
ppl[90] = new tag("0091","Bowser<br>クッパ");
ppl[91] = new tag("0092","BURN-E");
ppl[92] = new tag("0093","Sheeta<br>シータ");
ppl[93] = new tag("0094","Pazu<br>パズー");
ppl[94] = new tag("0095","Dola<br>ドーラ");
ppl[95] = new tag("0096","Muska<br>ムスカ");
ppl[96] = new tag("0097","General Mouro<br>モウロ将軍");
ppl[97] = new tag("0098","Laputa Robot Soldier<br>ラピュタロボット兵");
ppl[98] = new tag("0099","Goddess of Democracy<br>民主女神");
ppl[99] = new tag("0100","Wang Weilin<br>王维林");
ppl[100] = new tag("0101","Shinnosuke Nohara<br>野原しんのすけ");
ppl[101] = new tag("0102","Himawari Nohara<br>野原ひまわり");
ppl[102] = new tag("0103","Shiro<br>シロ");
ppl[103] = new tag("0104","Misae Nohara<br>野原みさえ");
ppl[104] = new tag("0105","Hiroshi Nohara<br>野原ひろし");
ppl[105] = new tag("0106","Twitter Bird");
ppl[106] = new tag("0107","Cecil Harvey<br>セシル・ハーヴィ");
ppl[107] = new tag("0108","Cecil Harvey<br>セシル・ハーヴィ");
ppl[108] = new tag("0109","Android");
ppl[109] = new tag("0110","Santa Claus");
ppl[110] = new tag("0111","Starkiller");
ppl[111] = new tag("0112","Juno Eclipse");
ppl[112] = new tag("0113","Rahm Kota");
ppl[113] = new tag("0114","PROXY");
ppl[114] = new tag("0115","PromaxBDA Award");
ppl[115] = new tag("0116","Lightning<br>ライトニング");
ppl[116] = new tag("0117","Snow Villiers<br>スノウ・ヴィリアース");
ppl[117] = new tag("0118","Oerba Dia Vanille<br>ヲルバ=ダイア・ヴァニラ");
ppl[118] = new tag("0119","Oerba Yun Fang<br>ヲルバ=ユン・ファング");
ppl[119] = new tag("0120","Sazh Katzroy<br>サッズ・カッツロイ");
ppl[120] = new tag("0121","Hope Estheim<br>ホープ・エストハイム");
ppl[121] = new tag("0122","Barthandelus<br>バルトアンデルス");
ppl[122] = new tag("0123","Haibo<br>海宝");


var fontFace = 'Verdana, Arial, Helvetica, sans-serif';
var fontSize = "1";
var fontColor = "FFFFFF";
var boxColor = "000000";
var borderColor = "000000";
var borderSize = "1";
var Xoff=12;
var Yoff=20;

//********** NO NEED TO EDIT BELOW HERE **********\\

var text='<font color="#'+fontColor+'" id="myText"></font>';


ns4 = (navigator.appName.indexOf("Netscape")>=0 && document.layers)? true : false;
ie4 = (document.all && !document.getElementById)? true : false;
ie5 = (document.all && document.getElementById)? true : false;
ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;
var x1=0;
var y1=-1000;
var t='';
t+=(ns4)? '<layer name="txt" top="-1000" left="0" width="1" height="1">' : '<div id="txt" style="position:absolute; border: '+ borderSize +'px solid #'+borderColor+'; top:-1000px; left:0px; visibility:visible;">';
t+='<table cellspacing="0" cellpadding="3" border="0" bgcolor="#'+ boxColor +'"><tr><td nowrap>'+text+'</td></tr></table>';
t+=(ns4)? '</layer>' : '</div>';

document.write(t);

function moveid(id,x,y){
if(ns4)id.moveTo(x,y);
else{
  if (window.opera) {
	id.style.left=x;
	id.style.top=y;
  } else {
	id.style.left=x+'px';
	id.style.top=y+'px';
  }
}}

function animate(evt){
 if (window.opera) {
   x1 = window.event.clientX;
   y1 = window.event.clientY;
 } else {
   x1=Xoff+((ie4||ie5)?event.clientX+document.body.scrollLeft:evt.pageX);
   y1=Yoff+((ie4||ie5)?event.clientY+document.body.scrollTop:evt.pageY);
 }
 moveid(txt,x1,y1);
}

function xanimate(evt){
moveid(txt,0,0);
}

function movetxts(){
moveid(txt,x1,y1);
}

function hint(num){
for (x=0; x<ppl.length; x++){
  if (ppl[x].code == num){
   msg = ppl[x].name; 
   break;
  }
}

if (ns4 || ns6 ) {animate; }
else{animate();}
if(ns4)document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=animate;
tid = setInterval('movetxts()',50);
document.getElementById('myText').innerHTML= msg;
document.getElementById('txt').style.visibility="visible";
}


function xhint() {
document.getElementById('txt').style.visibility="hidden";
clearInterval(tid);
document.onmousemove=xanimate;
}

function change(xyz){
if (xyz=="") {document.images['preview'].src = '../img/blank.gif';}
else {document.images['preview'].src = '../beta/'+xyz+'.gif';}}



function isFilled(blank) {
	tempBlank = blank.value.replace(/　| |\!|\[|\]|!|@|#|\$|\%|\^|\&|\*|\(|\)|\/|\-|\_|\=|\+|\{|\}|\||\\|\'|\"|\?\.|\,|\~|\`|\<|\>|\，|\。|\？|\！|\‵|\～|\”|\’|\：|\；|\〕|\〔|\｛|\｝|\｜|\＼|\＋|\－|\＊|\＆|\︿|\̂|\％|\＄|\＃|\＠|\＜|\＞/g, "");

	if (tempBlank == "" || blank.value == null) {
		return false;}
	else {return true;}}

function isEmail(elm) {
	if (elm.value == "" || elm.value == null) {return true;}
	else if (elm.value.indexOf("@") != "-1" && elm.value.indexOf(".") != "-1") {
		return true;}
	else {return false;}} 

function isReady(form) {

	var check_icon = 1;

	if (isFilled(document.form.name) == false) {
		alert("Please enter your name.");
		document.form.name.focus();
		return false;}


	if (isEmail(document.form.mail) == false) {
		alert("Your E-mail address is invalid.");
		document.form.mail.focus();
		return false;}
	
	if((document.form.icon.options[document.form.icon.selectedIndex].value == "") 
	&& (check_icon == 1))
	{alert("Please select a Pixelian.");
	document.form.icon.focus();return false;}

	if (isFilled(document.form.message) == false) {
		alert("Please enter your message.");
		document.form.message.focus();
		return false;}


	if (isFilled(document.form.passcode) == false) {
		alert("Please enter the passcode.");
		document.form.passcode.focus();
		return false;}

}

function tag(code,name){
 this.code = code;
 this.name = name;
}

function optionPrint(){
 ppl.sort(sortName);
 document.write('<option value="" selected></option>');
 for (x=0; x<ppl.length; x++) {
  document.write('<option value="' + ppl[x].code +'">'+ replaceBR(ppl[x].name) + '</option>');
 }
}

function sortName(a,b){
// ignoring leading "The"
 if (a.name.substring(0,4) == "The ") {
  aa= a.name.substring(4);
 } else {
  aa = a.name;
 }
 if (b.name.substring(0,4) == "The ") {
  bb = b.name.substring(4);
 } else {
  bb = b.name;
 }
// sort case-insensitive
 if(aa.toUpperCase() > bb.toUpperCase())
  return 1;
 if(aa.toUpperCase() < bb.toUpperCase())
  return -1;
 return 0;
}

function replaceBR(str) {
 if (str.indexOf('<br>')!=-1)
  return str.replace('<br>','&nbsp;&nbsp;\(')+')';
 else
  return str;
}
