function catchResult(form,to_url){
  //alert(document.cookie);
  var cookiename="href_tmp=";
  var chk_href=document.cookie.indexOf("href_tmp");
  if(chk_href!=-1){
	var chk_position=document.cookie.indexOf(";",chk_href);
	if(chk_position==-1){
	  var href_position=document.cookie.length;
	}
  }
  var href_tmp=document.cookie.substr(chk_href+cookiename.length,href_position);
  //act-
  if(to_url=='xl'){
	var form=document.orderitem;
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
				 
		     }else if(s == 2){
			  alert('您沒選擇！');	 
			 }
			  else{
			  alert('沒那麼多貨喔！');
			  form.num1.value=0;
		 }
	   }
	 }
  }
  //-
  if(to_url=='l'){
	  var form=document.orderitem;
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
				 
		     }else if(s == 2){
			  alert('您沒選擇！');	 
			 }
			  else{
			  alert('沒那麼多貨喔！');
			  form.num2.value=0;
		 }
	   }
	 }
  }
  //-
  if(to_url=='m'){
	  var form=document.orderitem;
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
				 
		     }else if(s == 2){
			  alert('您沒選擇！');	 
			 }
			  else{
			  alert('沒那麼多貨喔！');
			  form.num3.value=0;
		 }
	   }
	 }
  }
  //-
  if(to_url=='s'){
	  var form=document.orderitem;
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
				 
		     }else if(s == 2){
			  alert('您沒選擇！');	 
			 }
			  else{
			  alert('沒那麼多貨喔！');
			  form.num4.value=0;
		 }
	   }
	 }
  }
  //-
  if(to_url=='step1'){
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
            location.href='order1.php';
		     }else{
			  alert('沒那麼多貨喔！');
			  form.num4.value=0;
		 }
	   }
	 }
  }
  //-
  if(to_url=='md_order'){
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
			   location.href=location.href;
		     }else{
			  alert('系統異常！');
			  location.href='http://www.i-memine.com/?page_id=12';
		 }
	   }
	 }
  }
  //-
  if(to_url=='shop_end'){
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
			   alert('時間已到，此次交易將被取消！');
			   location.href='/?id=12';
		     }else{
			  alert('抱歉系統異常，此次交易將被取消！');
			   location.href='/?id=12';
		 }
	   }
	 }
  }
  //-
  if(to_url=='close_win'){
	if (xmlHttp.readyState==4){		
		var s=xmlHttp.responseText;
		 if (xmlHttp.status == 200) {
			 if(s == 1){
			   alert('視窗即將關閉！');
			   window.close();
		     }else{
			  alert('抱歉系統異常，此次交易將被取消！');
			  window.close();
		 }
	   }
	 }
  }
  //-
}