function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


<!--產品左邊的選項-->
function showproduct(lan){
 var xmlHttp;
 var url='../ajax/product_left.php?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('product_left').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--產品左邊的選項結束-->
<!--熱門商品-->
function producthot(lan){
 var xmlHttp;
 var url='../ajax/product_hot.php?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('product_hot').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--熱門商品-->
<!--展品次頁列表-->
function product_list(lan,id){
 var xmlHttp;
 var url='../ajax/product_list.php?lan='+lan+'&id='+id;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--展品次頁列表結束-->
<!--展品次頁列表-->
function product(lan,id){
 var xmlHttp;
 var url='../ajax/product1.php?lan='+lan+'&id='+id;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--展品次頁列表結束-->
<!--展品次頁列表-->
function main_product1(lan,id){
 var xmlHttp;
 var url='../ajax/main_product1.php?lan='+lan+'&id='+id;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--展品次頁列表結束-->
<!--展品第三頁列表-->
function product_detail(lan,id,sid,specialoffer){
 var xmlHttp;
 var url='../ajax/product_detail.php?lan='+lan+'&id='+id+"&sid="+sid+'&specialoffer='+specialoffer;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('product').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--展品第三頁列表結束-->
<!--展品第三頁列表-->
function main_product(lan,id,sid,specialoffer){
 var xmlHttp;
 var url='../ajax/main_product.php?lan='+lan+'&id='+id+"&sid="+sid+'&specialoffer='+specialoffer;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--展品第三頁列表結束-->
<!--最新消息列表結束-->
function news(lan,id){
 var xmlHttp;
 var url='../ajax/news.php?lan='+lan+'&id='+id;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--最新消息列表結束-->
<!--首頁最新消息列表結束-->
function main_news(lan){
 var xmlHttp;
 var url='../ajax/main.php?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('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--首頁最新消息列表結束-->
<!--特價商品列表結束-->
function specialoffer(lan){
 var xmlHttp;
 var url='../ajax/specialoffer.php?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('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--特價商品列表結束-->
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}


<!--POST INQUERY-->
function getFormValue(form){
	var str='',ft,fv;
	
	for (var i=0;i<form.elements.length;i++){
		fv=form.elements[i];
		ft=fv.type.toLowerCase();

		switch(ft){
			case 'select-one':
				str+=fv.name+'='+escape(fv.value)+'&';
				break;
			case 'radio':
				if (fv.checked){
					str+=fv.name+'='+escape(fv.value)+'&';
				}
				break;
			case 'checkbox':
				if (fv.checked){
					str+=fv.name+'='+escape(fv.value)+'&';
				}
				break;
			case 'text':
				str+=fv.name+'='+fv.value+'&';
				break;
			case 'password':
				str+=fv.name+'='+escape(fv.value)+'&';
				break;
			case 'hidden':
				str+=fv.name+'='+escape(fv.value)+'&';
				break;
			case 'textarea':
				str+=fv.name+'='+escape(fv.value)+'&';
				break;
			default:
				break;
		}
	}

	
	return str.split(/\s/).join('')
}

function postinquery(){
 var form=document.inquery;
 var xmlHttp;
 var url='../ajax/inquery.php';
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 

 xmlHttp.open('POST',url,true);
 xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
 xmlHttp.send(getFormValue(form));
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   var s=xmlHttp.responseText;  
   if(s=='no'){
   alert('Fields marked with an asterisk * are required');
   }else{
   document.getElementById('show_inquery').innerHTML = xmlHttp.responseText;
   }
  }
 }

}

<!--POST INQUERY END-->

function postinquery2(){
 var form=document.inquery2;
 var xmlHttp;
 var url='../ajax/inquery2.php';
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 

 xmlHttp.open('POST',url,true);
 xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
 xmlHttp.send(getFormValue(form));
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   var s=xmlHttp.responseText;  
   if(s=='no'){
   alert('Please choose');
   }else{
   document.getElementById('news').innerHTML = xmlHttp.responseText;
   }
  }
 }

}
function postinquery3(){
 var form=document.inquery3;
 var xmlHttp;
 var url='../ajax/inquery3.php';
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 

 xmlHttp.open('POST',url,true);
 xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
 xmlHttp.send(getFormValue(form));
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   var s=xmlHttp.responseText;  
   if(s=='no'){
   alert('Fields marked with an asterisk * are required');
   }else{
   document.getElementById('news').innerHTML = xmlHttp.responseText;
   }
  }
 }

}
function news2(lan,id){
 var xmlHttp;
 var url='../ajax/news2.php?lan='+lan+'&id='+id;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--展品第三頁列表-->
function main_product2(lan,id,sid,specialoffer){
 var xmlHttp;
 var url='../ajax/main_product2.php?lan='+lan+'&id='+id+"&sid="+sid+'&specialoffer='+specialoffer;
 if (window.ActiveXObject) { 
  xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
 } 
 else if (window.XMLHttpRequest) { 
  xmlHttp = new XMLHttpRequest();
 } 
 
 xmlHttp.onreadystatechange = function(){
  if(xmlHttp.readyState == 4){
   document.getElementById('news').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--展品第三頁列表結束-->
<!--公司-->
function pcompany(lan){
 var xmlHttp;
 var url='../ajax/company.php?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('pcompany').innerHTML = xmlHttp.responseText;
  }
 }

 xmlHttp.open("GET",url,true);
 xmlHttp.send(null);
}
<!--公司結束-->
