﻿var xmlHttp;
    var ddivid;
    
  function createXMLHttpRequest() {
     if (window.ActiveXObject) {
              xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
     } 
     else if (window.XMLHttpRequest) {
              xmlHttp = new XMLHttpRequest();
    }
  } 
		//實作AJAX
    function startRequest(GUI) {           
             var url = "check_GUI.aspx?GUI="+GUI;
             createXMLHttpRequest();
             xmlHttp.onreadystatechange = handleStateChange;
             xmlHttp.open("GET",url, true);
             xmlHttp.send(null);
   }
   function handleStateChange() {
          
             if(xmlHttp.readyState == 4) {
                  if(xmlHttp.status == 200) {
                  
                     if (xmlHttp.responseText!='True'){
                       alert('請輸入正確統一編號');
		             
                     }                                            
                  }
              }
             
   }
   
