﻿onload = init;
var state;
var result;

function init() {
  $('fm').onsubmit = function (){return ( itemDisp() );}
  $('fm').onreset = function (){clearDisp();}
  state = $('state');
  result = $('result');
}


function getValue(xmlData, tagName) {
  var tmp = xmlData.getElementsByTagName(tagName);
  var tmpValue;

  //子要素を取得
  var cn = tmp[0].childNodes;

  //値がある場合は取得
  if(cn.length >= 1) {
    tmpValue = tmp[0].firstChild.nodeValue;
  }else{
    tmpValue = "";
  }

  return tmpValue;
}


function clearDisp() {
  state.innerHTML = "";
  result.innerHTML = "";
}

