/*
if (typeof XMLHttpRequest == "undefined" && window.ActiveXObject) {
function XMLHttpRequest() {
   var arrSignatures = ["MSXML2.XMLHTTP.5.0", "MSXML2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
   for (var i=0; i < arrSignatures.length; i++) {
     try {
          var oRequest = new ActiveXObject(arrSignatures[i]);
          return oRequest;
          } catch (oError) {
//ignore
          }
      }
     throw new Error("MSXML is not installed on your system.");
     }
   }
  */
  
  
function sendproduct(id,lan){
 var xmlHttp;
 var url='../ajax/productimages1.php?id='+id+'&lan='+lan;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('productimages').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}

  
/*  
var xmlHttp;
function createXHR(){
	if (window.XMLHttpRequest) {
		xmlHttp = new XMLHttpRequest();
	}else if (window.ActiveXObject) {
		xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
	}

	if (!xmlHttp) {
		alert('您使用的瀏覽器不支援 XMLHTTP 物件');
		return false;
	}
}


function sendproduct(id,lan){
	createXHR();
	var url='../ajax/productimages.php?id='+id+'&lan='+lan;
	xmlHttp.onreadystatechange=catchproduct;
	xmlHttp.open('GET',url,true);
	xmlHttp.send(null);
}

function catchproduct(){
	if (xmlHttp.readyState==4 || xmlHttp.readyState=='complete'){
		var obj3=document.getElementById('productimages');
		if (xmlHttp.status == 200) {
			 obj3.innerHTML=xmlHttp.responseText;
		} else {
			alert('錯誤代碼:'+xmlHttp.status);
		}
	}
}*/
