// ［送信］ボタンをクリック時の処理を定義
function send(str, fvcode) {

	// 非同期通信を行うためのXMLHttpRequestオブジェクトを生成
	if(window.XMLHttpRequest){
		 xmlReq = new XMLHttpRequest();
	 }
	 if(window.ActiveXObject){
	 try {
		 xmlReq = new ActiveXObject("MSXML2.XMLHTTP");
	 } catch(e){
 		xmlReq = new ActiveXObject("Microsoft.XMLHTTP");
 	}
 }

   // サーバーからの応答時の処理を定義（結果のページへの反映）
	  xmlReq.onreadystatechange = function() {
	    var msg = document.getElementById( str );
	    if (xmlReq.readyState == 4) {
	      if (xmlReq.status == 200) {
	        msg.innerHTML = xmlReq.responseText;
	      } else {
	        msg.innerHTML = "It failed in the communication. ";
	      }
	    } else {
	      msg.innerHTML = "Under registration";
	    }
	  }
  
   // サーバーとの通信を開始
  xmlReq.open("GET","favctrl.php?fvcode="
                    + encodeURI(fvcode),true);
  xmlReq.send(null);
}


// ［送信］ボタンをクリック時の処理を定義
function send(str, fvcode) {

	// 非同期通信を行うためのXMLHttpRequestオブジェクトを生成
	if(window.XMLHttpRequest){
		 xmlReq = new XMLHttpRequest();
	 }
	 if(window.ActiveXObject){
	 try {
		 xmlReq = new ActiveXObject("MSXML2.XMLHTTP");
	 } catch(e){
 		xmlReq = new ActiveXObject("Microsoft.XMLHTTP");
 	}
 }

   // サーバーからの応答時の処理を定義（結果のページへの反映）
	  xmlReq.onreadystatechange = function() {
	    var msg = document.getElementById( str );
	    if (xmlReq.readyState == 4) {
	      if (xmlReq.status == 200) {
	        msg.innerHTML = xmlReq.responseText;
	      } else {
	        msg.innerHTML = "It failed in the communication. ";
	      }
	    } else {
	      msg.innerHTML = "Under registration";
	    }
	  }
  
   // サーバーとの通信を開始
  xmlReq.open("GET","favctrl.php?fvcode="
                    + encodeURI(fvcode),true);
  xmlReq.send(null);
}



