window.onload=function(){var t=document.getElementsByTagName("input");for(var i=0;i<t.length;i++){var p=t[i];if(p.type=="text")p.onkeydown=cntKey;}}
function cntKey(e){if(!e)e=window.event;var k=e&&e.keyCode;if(k==38)cntUp(this);else if(k==40)cntDown(this);else return;}function cntUp(e,n,a){if(typeof e=="string")e=document.getElementsByID(e);if(!e||(!e.tagName&&e.nodeType!=1))return false;var is_float=(e.value||'').match(/\./);if(!n)n=1;if(is_float)n*=0.1;var value=(parseFloat(e.value)||0)+n;if(value>=0)e.value=(!is_float)?value:(Math.round(10*value)/10+'').replace(/^(\d+)$/,'$1.0');if(!a&&e.blur&&e.focus){e.blur();e.focus();}return false;}function cntDown(e,n,a){return cntUp(e,(n||1)*-1,a)}
function bPush(i,d){i=parseInt(i);document.getElementById(d).setAttribute("value",i);}
function getSelect(u){
	o=RecHttp();
	o.onreadystatechange = convXml;
	o.open("get",u,true);
	o.send(null);
}
function RecHttp(){try{return new XMLHttpRequest();}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(e){return null;}}return null;}
function convXml(){
	var text = "";
	var nObj = o.responseXML.getElementsByTagName('pokemon');
	for(var i=0;i<nObj.length;i++){
		var eObj = nObj.item(i);
		if(eObj.getAttribute('checked').toString()==1) bbb = " selected=\"selected\"";
		else bbb="";
		text=text + "<option value=\""+eObj.getAttribute('no').toString()+"\""+bbb+">"+eObj.getAttribute('name').toString()+"</option>";
	}
		document.getElementById("pokemon").innerHTML=text;
}