function confirmIsUpdateTransportMethod(serial,site){
        if( window.confirm( "您確定要修改運送方式嗎？" ) ){
						var tranmethod = document.getElementById("transport_method_"+serial).value;
						
						if(site=='yahoo'){
						location.href="./member_change_auction_transport.php?info_serial="+serial+"&method="+tranmethod;
					}else{
						location.href="./member_change_shopping_transport.php?info_serial="+serial+"&method="+tranmethod;
						}
            return false;
        } else {
            return false;
        }
    }
    
	function checkValue(golink,pageIndex){
		var filter="";
	
			if(document.displayForm.view1.checked){
				filter +=","+document.displayForm.view1.value;
				}
			if(document.displayForm.view2.checked){
				filter +=","+document.displayForm.view2.value;
				}
			if(document.displayForm.view3.checked){
				filter +=","+document.displayForm.view3.value;
				}
			filter=filter.substr(1);
			desUrl=golink+"?pageIndex="+pageIndex+"&filter="+filter;
	//		alert(desUrl);
			location.href="./"+desUrl;
		return false;
	}    
    
		function contentChanger (obj, rtext){
								
			  splitArray = rtext.split( "&" );
			  left_time_string = splitArray[0].substr( splitArray[0].indexOf( "=" ) + 1 );
        now_price_string = splitArray[1].substr( splitArray[1].indexOf( "=" ) + 1 );
        auction_getter_string = splitArray[2].substr( splitArray[2].indexOf( "=" ) + 1 );
        price_unit_string = splitArray[3].substr( splitArray[3].indexOf( "=" ) + 1 );
        hk_start_date_time = splitArray[4].substr( splitArray[4].indexOf( "=" ) + 1 );
        hk_end_date_time = splitArray[5].substr( splitArray[5].indexOf( "=" ) + 1 );
			
			
			  document.getElementById("highest_price_"+obj).innerHTML = now_price_string+" 円";
        document.getElementById("start_time_"+obj).innerHTML = hk_start_date_time.substring( 5 );
        document.getElementById("price_unit_"+obj).innerHTML = price_unit_string+" 円";
        document.getElementById("highest_bidder_"+obj).innerHTML = auction_getter_string;
        document.getElementById("left_time_"+obj).innerHTML = left_time_string;
        document.getElementById("end_time_"+obj).innerHTML = hk_end_date_time.substring( 5 );
/*        
        if( document.all.auction_account_id_<? echo $auction_product_id; ?>.innerText == auction_getter_string && document.all.product_price_<? echo $auction_product_id; ?>.innerText >= now_price_string ){
                    document.all.highest_bidder_<? echo $auction_product_id; ?>.innerHTML = "<span style = 'color:#FF0000; font-weight:bold;'>" + auction_getter_string + "</span>";
                document.all.new_product_price_<? echo $auction_product_id; ?>.disabled = false;
                document.all.newPriceSubmitButton_<? echo $auction_product_id; ?>.disabled = false;
                } else {
                    document.all.highest_bidder_<? echo $auction_product_id; ?>.innerText = auction_getter_string;
//                    document.all.remove_<? echo $auction_product_id; ?>.disabled = false;

                    left_time_string = left_time_string.replace( /\s/g, "" );

                    if( left_time_string != "終了" ){
                        document.all.new_product_price_<? echo $auction_product_id; ?>.disabled = false;
                        document.all.newPriceSubmitButton_<? echo $auction_product_id; ?>.disabled = false;
                    } else {
                        document.all.new_product_price_<? echo $auction_product_id; ?>.style.visibility = "hidden";
                        document.all.newPriceSubmitButton_<? echo $auction_product_id; ?>.style.visibility = "hidden";
                    }
                }
*/
        
		}
    



    
 function loadWebPage(obj,link1){
        processajax3(obj,link1);
    }
    

    function refreshContent(page){
        document.getElementById("now_price").innerHTML = "數據讀取中";
        document.getElementById("hk_start_date_time").innerHTML = "數據讀取中";
        document.getElementById("price_unit").innerHTML = "數據讀取中";
        document.getElementById("auction_getter").innerHTML = "數據讀取中";
        document.getElementById("left_time").innerHTML = "數據讀取中";
        document.getElementById("hk_end_date_time").innerHTML = "數據讀取中";
        document.getElementById("bids").innerHTML = "數據讀取中";
        
        getAjax(placeContent,page);

    }

    function placeContent(rtext){

			  var splitArray = rtext.split( "&" );
			  var left_time_string = splitArray[0].substr( splitArray[0].indexOf( "=" ) + 1 );
        var now_price_string = splitArray[1].substr( splitArray[1].indexOf( "=" ) + 1 );
        var auction_getter_string = splitArray[2].substr( splitArray[2].indexOf( "=" ) + 1 );
        var price_unit_string = splitArray[3].substr( splitArray[3].indexOf( "=" ) + 1 );
        var hk_start_date_time = splitArray[4].substr( splitArray[4].indexOf( "=" ) + 1 );
        var hk_end_date_time = splitArray[5].substr( splitArray[5].indexOf( "=" ) + 1 );
				var bids = splitArray[6].substr( splitArray[6].indexOf( "=" ) + 1 );

			  document.getElementById("now_price").innerHTML = now_price_string;
        document.getElementById("hk_start_date_time").innerHTML = hk_start_date_time.substring( 5 );
        document.getElementById("price_unit").innerHTML = price_unit_string;
        document.getElementById("auction_getter").innerHTML = auction_getter_string;
        document.getElementById("left_time").innerHTML = left_time_string;
        document.getElementById("hk_end_date_time").innerHTML = hk_end_date_time.substring( 5 );
        document.getElementById("bids").innerHTML = bids;
      }
      
    function refreshSeller(page){
				document.getElementById("seller_good").innerHTML = "數據讀取中";
			  document.getElementById("seller_bad").innerHTML = "數據讀取中";

      	getAjax(placeSeller,page)
      	
      }
      
    function placeSeller(rtext){
				var splitArray = rtext.split( "&" );
				var good = splitArray[0].substr( splitArray[0].indexOf( "=" ) + 1 );
				var bad = splitArray[1].substr( splitArray[1].indexOf( "=" ) + 1 );
      	
      	document.getElementById("seller_good").innerHTML = good;
			  document.getElementById("seller_bad").innerHTML = bad;
			  document.allForm.seller_good.value=good;
			  document.allForm.seller_bad.value=bad;
      	
      	}
      	
    function isNumberKey(evt)
      {
         var charCode = (evt.which) ? evt.which : event.keyCode
         if (charCode > 31 && (charCode < 48 || charCode > 57))
            return false;

         return true;
      }

		function setPic(obj)
			{
			document.getElementById('pic').src=obj.src;
			}
			
		function PlaceBid(page){
			getAjax(BidResult,page);
//			alert("下標中, 請等待");
		}
		
		function BidResult(rtext){
			var reply =parseInt(rtext);
			switch (reply){
				case 0:
					window.alert("下標失敗, 請聯絡我們");
					break;
				case 1:
					window.alert("下標成功, 請到MYPAGE查看");
					break;
				case 2:
					window.alert("下標失敗");
					break;
				case 3:
					window.alert("下標成功, 但未得標, 請提高下標金額");	
					break;
				default:
					window.alert(reply);
			}
				window.history.go(0);
		}
		
	function reloadWebPage(obj){
    	
        document.getElementById("highest_price_"+obj).innerHTML = "數據讀取中";
        document.getElementById("start_time_"+obj).innerHTML = "數據讀取中";
        document.getElementById("price_unit_"+obj).innerHTML = "數據讀取中";
        document.getElementById("highest_bidder_"+obj).innerHTML = "數據讀取中";
        document.getElementById("left_time_"+obj).innerHTML = "數據讀取中";
        document.getElementById("end_time_"+obj).innerHTML = "數據讀取中";

				var page = "yahooAuctionInfoGetter_xml.php?wb_url="+obj;
//			alert(page);	
				getAjaxV2(placeContentV2,page,obj);
    }
    
    function placeContentV2(obj,rtext){

			  var splitArray = rtext.split( "&" );
			  var left_time_string = splitArray[0].substr( splitArray[0].indexOf( "=" ) + 1 );
        var now_price_string = splitArray[1].substr( splitArray[1].indexOf( "=" ) + 1 );
        var auction_getter_string = splitArray[2].substr( splitArray[2].indexOf( "=" ) + 1 );
        var price_unit_string = splitArray[3].substr( splitArray[3].indexOf( "=" ) + 1 );
        var hk_start_date_time = splitArray[4].substr( splitArray[4].indexOf( "=" ) + 1 );
        var hk_end_date_time = splitArray[5].substr( splitArray[5].indexOf( "=" ) + 1 );
				

			  document.getElementById("highest_price_"+obj).innerHTML = now_price_string;
        document.getElementById("start_time_"+obj).innerHTML = hk_start_date_time.substring( 5 );
        document.getElementById("price_unit_"+obj).innerHTML = price_unit_string;
        document.getElementById("highest_bidder_"+obj).innerHTML = auction_getter_string;
        document.getElementById("left_time_"+obj).innerHTML = left_time_string;
        document.getElementById("end_time_"+obj).innerHTML = hk_end_date_time.substring( 5 );
				
				
				if( left_time_string != "終了" ){
					document.getElementById("new_product_price_"+obj).disabled = false;
					document.getElementById("newPriceSubmitButton_"+obj).disabled = false;
				} else {
					document.getElementById("new_product_price_"+obj).style.visibility = "hidden";
					document.getElementById("newPriceSubmitButton_"+obj).style.visibility = "hidden";
				}        
      }

		function checkNewAuctionPrice2(product_id){
			var np= document.getElementById("new_product_price_"+product_id).value;
			var hp= document.getElementById("highest_price_"+product_id).innerHTML;
			var up= document.getElementById("price_unit_"+product_id).innerHTML;
			var acc = document.getElementById("product_id_"+product_id).innerHTML;
			
			hp = hp.replace("円","");
			up = up.replace("円","");
			hp = hp.replace(",","");
			up = up.replace(",","");
			
			price = parseInt(hp)+parseInt(up);
			
			
			document.getElementById("new_product_price_"+product_id).disabled = true;
			document.getElementById("newPriceSubmitButton_"+product_id).disabled = true;
			
			if(np < price){
				alert( "請輸入不小於 " + price + " 円" );
				document.getElementById("new_product_price_"+product_id).disabled = false;
				document.getElementById("newPriceSubmitButton_"+product_id).disabled = false;	
				
				return false;
			}
			
			newpage = "newAuctionPrice.php?newPrice="+np+"&auctionProduct="+acc;
			getAjax(BidResult,newpage);
			alert("下標中, 請等待");
			return false;
			//alert("np"+np+"hp"+hp+"up"+up+"最低下注"+price);
//			reloadWebPage(product_id);
		}