

function checkAdditionalMethod(transportPartyId, keepBox, keepBoxField, getItemLocation, getItemLocationField, deliveryName, deliveryNameField, newDeliveryName, newDeliveryNameField, deliveryAddress, deliveryAddressField, newDeliveryAddress, newDeliveryAddressField, deliveryPhone, deliveryPhoneField, newDeliveryPhone, newDeliveryPhoneField, transportLocation, transportLocationField, combineTogether, combineTogetherField, postCode, postCodeField, errorTipsField)
{
	switch (transportPartyId)
	{
		case "1": //Default (Normal Express)
			if (keepBox ==  '' || keepBox ==  null || keepBox ==  'undefined')
			{
				updateTips(keepBoxField, errorTipsField, txt_auction[509], true);
				return false;
			}
			else if (getItemLocation == '' || getItemLocation ==  null || getItemLocation ==  'undefined')
			{
				updateTips(getItemLocationField, errorTipsField, txt_auction[510], true);
				return false;
			}
			else
				return true;
		break;
		case "4": //Urgent Express
			 if (getItemLocation == '' || getItemLocation ==  null || getItemLocation ==  'undefined')
			{
				updateTips(getItemLocationField, errorTipsField, txt_auction[510], true);
				return false;
			}
			else if (deliveryName == 'add' && (newDeliveryName == '' || newDeliveryName == null) && getItemLocation == 'send to customer address')
			{
				updateTips(newDeliveryNameField, errorTipsField, txt_auction[511], true);
				return false;
			}
			else if (deliveryAddress == 'add' && (newDeliveryAddress == '' || newDeliveryAddress == null) && getItemLocation == 'send to customer address')
			{
				updateTips(newDeliveryAddressField, errorTipsField, txt_auction[512], true);
				return false;
			}
			else if (deliveryPhone == 'add' && (newDeliveryPhone == '' || newDeliveryPhone == null) && getItemLocation == 'send to customer address')
			{
				updateTips(newDeliveryPhoneField, errorTipsField, txt_auction[513], true);
				return false;
			}
			else
				return true;
		break;
		case "2": //Sea
			return true;
		break;
		case "5": //EMS To Customer
			if (combineTogether ==  '' || combineTogether ==  null || combineTogether == 'undefined')
			{
				updateTips(combineTogetherField, errorTipsField, txt_auction[514], true);
				return false;
			}
			else if (combineTogether == 'send immediately')
			{
				if (deliveryName == 'add' && (newDeliveryName == '' || newDeliveryName == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryNameField, errorTipsField, txt_auction[511], true);
					return false;
				}
				else if (deliveryAddress == 'add' && (newDeliveryAddress == '' || newDeliveryAddress == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryAddressField, errorTipsField, txt_auction[512], true);
					return false;
				}
				else if (deliveryPhone == 'add' && (newDeliveryPhone == '' || newDeliveryPhone == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryPhoneField, errorTipsField, txt_auction[513], true);
					return false;
				}
				else if (transportLocation == "-1")
				{
					updateTips(transportLocationField, errorTipsField, txt_auction[132], true);
					return false;
				}
				else if (postCode == '' || postCode == null)
				{
					updateTips(postCodeField, errorTipsField, txt_auction[529], true);
					return false;
				}
				else
					return true;
			}
			else
				return true;
		break;
		case "6": //SEA To Customer
			if (combineTogether ==  '' || combineTogether ==  null || combineTogether == 'undefined')
			{
				updateTips(combineTogetherField, errorTipsField, txt_auction[514], true);
				return false;
			}
			else if (combineTogether == 'send immediately')
			{
				if (deliveryName == 'add' && (newDeliveryName == '' || newDeliveryName == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryNameField, errorTipsField, txt_auction[511], true);
					return false;
				}
				else if (deliveryAddress == 'add' && (newDeliveryAddress == '' || newDeliveryAddress == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryAddressField, errorTipsField, txt_auction[512], true);
					return false;
				}
				else if (deliveryPhone == 'add' && (newDeliveryPhone == '' || newDeliveryPhone == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryPhoneField, errorTipsField, txt_auction[513], true);
					return false;
				}
				else if (transportLocation == "-1")
				{
					updateTips(transportLocationField, errorTipsField, txt_auction[132], true);
					return false;
				}
				else if (postCode == '' || postCode == null)
				{
					updateTips(postCodeField, errorTipsField, txt_auction[529], true);
					return false;
				}
				else
					return true;
			}
			else
				return true;
		break;
		case "24": //Send To Japan
			if (combineTogether ==  '' || combineTogether ==  null || combineTogether == 'undefined')
			{
				updateTips(combineTogetherField, errorTipsField, txt_auction[514], true);
				return false;
			}
			else if (combineTogether == 'send immediately')
			{
				if (deliveryName == 'add' && (newDeliveryName == '' || newDeliveryName == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryNameField, errorTipsField, txt_auction[511], true);
					return false;
				}
				else if (deliveryAddress == 'add' && (newDeliveryAddress == '' || newDeliveryAddress == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryAddressField, errorTipsField, txt_auction[512], true);
					return false;
				}
				else if (deliveryPhone == 'add' && (newDeliveryPhone == '' || newDeliveryPhone == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryPhoneField, errorTipsField, txt_auction[513], true);
					return false;
				}
				else if (transportLocation == "-1")
				{
					updateTips(transportLocationField, errorTipsField, txt_auction[132], true);
					return false;
				}
				else if (postCode == '' || postCode == null)
				{
					updateTips(postCodeField, errorTipsField, txt_auction[529], true);
					return false;
				}
				else
					return true;
			}
			else
				return true;
		break;
		case "25": //SAL To Customer
			if (combineTogether ==  '' || combineTogether ==  null || combineTogether == 'undefined')
			{
				updateTips(combineTogetherField, errorTipsField, txt_auction[514], true);
				return false;
			}
			else if (combineTogether == 'send immediately')
			{
				if (deliveryName == 'add' && (newDeliveryName == '' || newDeliveryName == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryNameField, errorTipsField, txt_auction[511], true);
					return false;
				}
				else if (deliveryAddress == 'add' && (newDeliveryAddress == '' || newDeliveryAddress == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryAddressField, errorTipsField, txt_auction[512], true);
					return false;
				}
				else if (deliveryPhone == 'add' && (newDeliveryPhone == '' || newDeliveryPhone == null) && getItemLocation == 'send to customer address')
				{
					updateTips(newDeliveryPhoneField, errorTipsField, txt_auction[513], true);
					return false;
				}
				else if (transportLocation == "-1")
				{
					updateTips(transportLocationField, errorTipsField, txt_auction[132], true);
					return false;
				}
				else if (postCode == '' || postCode == null)
				{
					updateTips(postCodeField, errorTipsField, txt_auction[529], true);
					return false;
				}
				else
					return true;
			}
			else
				return true;
		break;
	}
}

$(function()
{
	function checkTransportLocation (transportPartyId, transportLocation, transportLocationField, errorTipsField)
	{
		if (transportPartyId != 1 && transportPartyId != 2 && transportPartyId != 4)
		{
			if (transportLocation == '' || transportLocation == null || transportLocation < 0 || transportLocation == 'undefined')
			{
				updateTips(transportLocationField, errorTipsField, txt_auction[132], true);
				return false;
			}
			else
				return true;
		}
		else
			return true;
	}
		
	$('#auctionCalcTransportParty_' + countryId + '_1').attr("checked", ""),
	$('#auctionCalcTransportParty_' + countryId + '_4').attr("checked", ""),
	$('#auctionCalcTransportParty_' + countryId + '_2').attr("checked", ""),
	$('#auctionCalcTransportParty_' + countryId + '_5').attr("checked", ""),
	$('#auctionCalcTransportParty_' + countryId + '_6').attr("checked", ""),
	$('#auctionCalcTransportParty_' + countryId + '_24').attr("checked", ""),
		
	$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
	$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", "disabled"),
	$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
	$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", "disabled"),
	$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
	$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "disabled"),
		
	$('#biddingFrmTransportParty_' + countryId + '_1').attr("checked", ""),
	$('#biddingFrmTransportParty_' + countryId + '_4').attr("checked", ""),
	$('#biddingFrmTransportParty_' + countryId + '_2').attr("checked", ""),
	$('#biddingFrmTransportParty_' + countryId + '_5').attr("checked", ""),
	$('#biddingFrmTransportParty_' + countryId + '_6').attr("checked", ""),
	$('#biddingFrmTransportParty_' + countryId + '_24').attr("checked", ""),
		
	$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
	$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", "disabled"),
	$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
	$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", "disabled"),
	$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
	$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "disabled"),
	
	$('#auctionCalcProductType').change(function()
	{  
		var productType = $(this).val();	
			
		updateTips('', $('#auctionCalcError'), '', false),
		
		$('#auctionCalcAdditionalMethodField').hide(),
		
		$('#auctionCalcTransportParty_' + countryId + '_1').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_4').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_2').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_5').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_6').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_24').attr("checked", ""),
		
		$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
		$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", "disabled"),
		$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
		$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", "disabled"),
		$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
		$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "disabled");

		switch(productType)
		{
			case '':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "disabled");
			break;
			case '1':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '2':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '3':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '4':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '5':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '6':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '7':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '8':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '9':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '10':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '11':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '12':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '13':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '14':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '15':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '16':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '17':
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			
			default:
				$('#auctionCalcTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#auctionCalcTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
		}
	}),
	
	$('#auctionCalcFrm input[name=sendLocation]').click(function()
	{
		var sendLocation = $(this).val();	
		
		$('#auctionCalcAdditionalMethodField').hide(),
			
		updateTips('', $('#auctionCalcError'), '', false),
		
		$('tr[name=auctionCalcTransportPartyField]').hide(),
		$('tr[name=auctionCalcTransportPartyRemarkField]').hide(),
		
		$('#auctionCalcAdditionalMethodField').hide(),
		
		$('#auctionCalcTransportParty_' + countryId + '_1').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_4').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_2').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_5').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_6').attr("checked", ""),
		$('#auctionCalcTransportParty_' + countryId + '_24').attr("checked", "");

		switch(sendLocation)
		{
			case 'Local':
				$('#auctionCalcLocalTransportPartyField').show();
			break;
			case 'Other':
				$('#auctionCalcOtherTransportPartyField').show();
			break;
		}
			
		$('tr[name=auctionCalcTransportPartyRemarkField]').show();
	}),
	
	$('span[name=auctionCalcTransportParty] input[name=transportParty]').click(function()
	{
		var auctionCalcAdditionalMethod = $('#auctionCalcAdditionalMethod'),
			auctionCalcAdditionalMethodField = $('#auctionCalcAdditionalMethodField'),
			transportLocationList = '', 
			remark = '', 
			agreement = '', 
			transportPartyId = parseInt($(this).attr('transportPartyId')),
			displayHtml = '';
			
		auctionCalcAdditionalMethodField.hide();
			
		switch(transportPartyId)
		{
			case 1: //Default (Normal Express)
				remark += "&emsp;" + txt_auction[700] + txt_auction[701] + "<br />",
				remark += "&emsp;&emsp;" + txt_auction[704] + txt_auction[706] + '<br />',
				
				agreement += '<br />' + txt_auction[522],
				agreement += '<br />&nbsp;<input type="radio" name="keep_box" id="auctionCalcRemoveBox" value="N" text="' + txt_auction[517] +'"/>',
				agreement += '&nbsp;' + txt_auction[517],
				agreement += '<br />&nbsp;<input type="radio" name="keep_box" id="auctionCalcKeepBox" value="Y" text="' + txt_auction[519] +'"/>',
				agreement += '&nbsp;' + txt_auction[519];
			break;
			case 4: //Urgent Express 
				remark += "&emsp;" + txt_auction[700] + txt_auction[701] + "<br />",
				remark += "&emsp;&emsp;" + txt_auction[704] + txt_auction[707] + txt_auction[703] + txt_auction[708] + '<br />',
				 
				agreement += '<br />' + txt_auction[506],
				agreement += '<br />&nbsp;<input type="radio" name="getItemLocation" id="auctionCalcSendToOffice" value="N" text="' + txt_auction[504] +'"/>',
				agreement += '&nbsp;' + txt_auction[504],
				agreement += '<br />&nbsp;<input type="radio" name="getItemLocation" id="auctionCalcSendToAddress" value="Y" text="' + txt_auction[505] +'"/>',
				agreement += '&nbsp;' + txt_auction[505];
			break;
			case 2: //Sea
				remark += "&emsp;" + txt_auction[700] + txt_auction[702] + "<br />",
				remark += "&emsp;&emsp;" + txt_auction[705] + txt_auction[709] + '<br />';
			break;
			case 5: ////EMS To Customer
				remark += "&emsp;" + txt_auction[700] + txt_auction[701] + "<br />",
				remark += "&emsp;&emsp;" + txt_auction[704] + txt_auction[707] + '<br /><br />',
				
				transportLocationList += txt_auction[131] + '&nbsp;<select name="transportLocationList" id="auctionCalcTransportLocation"><option value="-1"></option>',
				transportLocationList += emsTransportLocationList,
				transportLocationList += '</select>';
			break;
			case 6: //SEA To Customer
				remark += "&emsp;" + txt_auction[700] + txt_auction[701] + "<br />",
				remark += "&emsp;&emsp;" + txt_auction[704] + txt_auction[707] + '<br /><br />',
				
				transportLocationList += txt_auction[131] + '&nbsp;<select name="transportLocationList" id="auctionCalcTransportLocation"><option value="-1"></option>',
				transportLocationList += seaTransportLocationList,
				transportLocationList += '</select>';
			break;
			case 24: //Send To Japan
				transportLocationList += txt_auction[131] + '&nbsp;<select name="transportLocationList" id="auctionCalcTransportLocation"><option value="-1"></option>',
				transportLocationList += japaneseLocationList,
				transportLocationList += '</select">'
			break;
			case 25: //SAL To Customer
				transportLocationList += txt_auction[131] + '&nbsp;<select name="transportLocationList" id="auctionCalcTransportLocation"><option value="-1"></option>',
				transportLocationList += salTransportLocationList,
				transportLocationList += '</select>';
			break;
		}
		
		displayHtml += remark + agreement + transportLocationList;
		
		if (displayHtml != '' && displayHtml != null)
		{
			auctionCalcAdditionalMethod.html(displayHtml),
			auctionCalcAdditionalMethodField.show();
		}
	}),
	
	$('#auctionCalcFrm').submit(function()
	{
		$('#auctionCalcResult').fadeOut(200);
		
		var auctionCalcValidData = true,
			auctionCalcMaxBidPrice = $('#auctionCalcMaxBidPrice'),
			auctionCalcQuantity = $('#auctionCalcQuantity option:selected'),
			auctionCalcLocation = $('#auctionCalcLocation option:selected'),
			auctionCalcSourceLocalPostFee = $('#auctionCalcSourceLocalPostFee'),
			auctionCalcHaveTax = $('#auctionCalcHaveTax'),
			haveTax = 'N',
			auctionCalcWeight = $('#auctionCalcWeight'),
			auctionCalcLong = $('#auctionCalcLong'),
			auctionCalcWide = $('#auctionCalcWide'),
			auctionCalcHigh = $('#auctionCalcHigh'),
			auctionCalcProductType = $('#auctionCalcProductType'),
			auctionCalcGetItemLocation = $('#auctionCalcFrm input[name=getItemLocation]'),
			auctionCalcCheckGetItemLocation = $('#auctionCalcFrm input[name=getItemLocation]:radio:checked'),
			auctionCalcSelectedProductType = $('#auctionCalcProductType option:selected'),
			auctionCalcTransport = $('#auctionCalcFrm input[name=transportParty]:radio:checked'),
			auctionCalcKeepbox = $('#auctionCalcFrm input[name=keep_box]:radio:checked'),
			auctionCalcSelectedTransportLocation = $('#auctionCalcTransportLocation option:selected'),
			auctionCalcTransportLocation = $('#auctionCalcTransportLocation'),
			auctionCalcErrorTipsField = $('#auctionCalcError'),
			auctionCalcDimensionField = $([]).add(auctionCalcLong).add(auctionCalcWide).add(auctionCalcHigh),
			auctionCalcAllTextFields = $([]).add(auctionCalcMaxBidPrice).add(auctionCalcSourceLocalPostFee).add(auctionCalcWeight).add(auctionCalcLong).add(auctionCalcWide).add(auctionCalcHigh);
			
		updateTips(auctionCalcAllTextFields, auctionCalcErrorTipsField, '', false),
		updateTips($('#auctionCalcFrm select'), auctionCalcErrorTipsField, '', false),
		
		auctionCalcValidData = auctionCalcValidData && checkBidPrice(auctionCalcMaxBidPrice.val(), auctionCalcMaxBidPrice, auctionCalcErrorTipsField),
		auctionCalcValidData = auctionCalcValidData && checkLocation(auctionCalcLocation.val(), auctionCalcLocation, auctionCalcErrorTipsField);
		
		if ($('#enableSourceLocalPostFee').attr('checked'))
			auctionCalcValidData = auctionCalcValidData && checkSourceLocalPostFee(auctionCalcSourceLocalPostFee.val(), auctionCalcSourceLocalPostFee, auctionCalcErrorTipsField);
			
		auctionCalcValidData = auctionCalcValidData && checkWeight(auctionCalcWeight.val(), auctionCalcWeight, auctionCalcTransport.attr('transportPartyId'), auctionCalcErrorTipsField),
		auctionCalcValidData = auctionCalcValidData && checkDimension(auctionCalcLong.val(), auctionCalcWide.val(), auctionCalcHigh.val(), auctionCalcDimensionField, auctionCalcTransport.attr('transportPartyId'), auctionCalcErrorTipsField),
		auctionCalcValidData = auctionCalcValidData && checkProductType(auctionCalcSelectedProductType.val(), auctionCalcProductType, auctionCalcErrorTipsField);
		
		if (auctionCalcTransport.attr('transportPartyId') == 4)
			auctionCalcValidData = auctionCalcValidData && checkGetItemLocation(auctionCalcCheckGetItemLocation.val(), auctionCalcGetItemLocation, auctionCalcErrorTipsField);
		
		auctionCalcValidData = auctionCalcValidData && checkTransportParty(auctionCalcTransport.val(), auctionCalcTransport, auctionCalcErrorTipsField);
		
		if (auctionCalcTransport.attr('transportPartyId') == 1)
			auctionCalcValidData = auctionCalcValidData && checkKeepbox(auctionCalcKeepbox.val(), auctionCalcKeepbox, auctionCalcErrorTipsField);
			
		auctionCalcValidData = auctionCalcValidData && checkTransportLocation(auctionCalcTransport.attr('transportPartyId'), auctionCalcSelectedTransportLocation.val(), auctionCalcTransportLocation, auctionCalcErrorTipsField);
		
		if (auctionCalcValidData)
		{
			if (auctionCalcHaveTax.attr('checked'))
				haveTax = 'Y';
				
			if ($('#enableSourceLocalPostFee').attr('checked'))
				enableSourceLocalPost = 'Y';
			else
				enableSourceLocalPost = 'N';
				
			$.ajax({  
					url: "./tools/ajaxTools/calculator.php",   
					type: "POST",      
					data: "auctionType="+ type +
							"&bidPrice="+auctionCalcMaxBidPrice.val() +
							"&quantity="+auctionCalcQuantity.val() +
							"&sourceLocation="+auctionCalcLocation.val() +
							"&weight="+auctionCalcWeight.val() +
							"&long="+auctionCalcLong.val() +
							"&wide="+auctionCalcWide.val() +
							"&height="+auctionCalcHigh.val() +
							"&transportParty="+auctionCalcTransport.val() +
							"&sourceLocalPostFee="+auctionCalcSourceLocalPostFee.val() +
							"&transportLocation="+auctionCalcSelectedTransportLocation.val() +
							"&keepbox="+auctionCalcKeepbox.val() +
							"&haveTax="+haveTax +
							"&enableSourceLocalPostFee="+enableSourceLocalPost +
							"&getItemLocation="+auctionCalcCheckGetItemLocation.val() +
							"&productType=" + auctionCalcProductType.val(),
					dataType: "json",
					success: function (data, txtStatus) 
					{
						if (txtStatus == 'success')
						{
							$('#auctionCalcAns').fadeOut(200, function()
							{
								if (haveTax != 'Y')
									$('#auctionCalcFinalBidPrice').text(auctionCalcMaxBidPrice.val() + " x " + auctionCalcQuantity.val() + " = " + data.bidPrice);
								else
									$('#auctionCalcFinalBidPrice').text(auctionCalcMaxBidPrice.val() + " x " + auctionCalcQuantity.val() + " x " + "(1 + 5%)" + " = " + data.bidPrice);
								
								if (auctionCalcKeepbox.val() == 'Y' && data.charge[0].keepBoxFee > 0)
								{
									$('#auctionCalcKeepBoxFee').text(data.charge[0].keepBoxFee),
									$('#auctionCalcKeepBoxFeeField').show();
								}
								else
								{
									$('#auctionCalcKeepBoxFee').text(0),
									$('#auctionCalcKeepBoxFeeField').hide();
								}
									
								$('#auctionCalcAdditionalBankCharge').text(data.charge[0].additionalBankCharge),
								$('#auctionCalcServiceCharge').text(data.charge[0].serviceCharge),
								$('#auctionCalcPercentageCharge').text(data.charge[0].percentageCharge),
								$('#auctionCalcExchangeRate').text(data.exchangeRate),
								$('#auctionCalcSubTotal').text(data.firstPay),
								$('#auctionCalcSourceLocalPostFeeAns').text(data.localPostfee),
								$('#auctionCalcInternationalPostFee').text(data.internationalPost),
								$('#auctionCalcTotal').text(data.total),
								$('#auctionCalcAns').fadeIn(200);
							});
						}         
					}       
				});
			}
			
			
		return false;
	}),
	
	<!--Bidding Order-->
	$('#biddingFrmProductType').change(function()
	{
		var productType = $(this).val();	
		
		updateTips('', $('#biddingFrmError'), '', false),
		
		$('#biddingFrmAdditionalMethodField').hide(),
		
		$('#biddingFrmTransportParty_' + countryId + '_1').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_4').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_2').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_5').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_6').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_24').attr("checked", ""),
		
		$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
		$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", "disabled"),
		$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
		$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", "disabled"),
		$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
		$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "disabled");
		
		switch(productType.toLowerCase())
		{
			case '':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "disabled");
			break;
			case '1':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '2':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '3':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '4':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '5':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '6':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '7':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '8':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '9':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '10':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '11':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '12':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '13':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '14':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '15':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '16':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			case '17':
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", "disabled"),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
			
			default:
				$('#biddingFrmTransportParty_' + countryId + '_1').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_4').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_2').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_5').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_6').attr("disabled", ""),
				$('#biddingFrmTransportParty_' + countryId + '_24').attr("disabled", "");
			break;
		}
	}),
	
	$('#biddingFrm input[name=sendLocation]').click(function()
	{
		var sendLocation = $(this).val();	
		
		updateTips('', $('#biddingFrmError'), '', false),
		
		$('tr[name=biddingFrmTransportPartyField]').hide(),
		$('tr[name=biddingFrmTransportPartyRemarkField]').hide(),
		
		$('#biddingFrmAdditionalMethodField').hide(),
		
		$('#biddingFrmTransportParty_' + countryId + '_1').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_4').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_2').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_5').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_6').attr("checked", ""),
		$('#biddingFrmTransportParty_' + countryId + '_24').attr("checked", "");
		
		switch(sendLocation)
		{
			case 'Local':
				$('#biddingFrmLocalTransportPartyField').show();
			break;
			case 'Other':
				$('#biddingFrmOtherTransportPartyField').show();
			break;
		}
			
		$('tr[name=biddingFrmTransportPartyRemarkField]').show();
			
	}),
	
	$('span[name=biddingFrmTransportParty] input[name=transportParty]').click(function()
	{
		var biddingFrmAdditionalMethod = $('#biddingFrmAdditionalMethod'), 
			remark = '',
			showExchangeRate = '',  
			charge = '',
			agreement = '',
			getItemLocation = '',
			other = '',
			transportLocationList = '', 
			displayHtml = '';
		
		showExchangeRate += txt_auction[142] + "<span style=\"color:red\" >" + exchangeRate + txt_auction[143]  + "</span><br />";
				
		if (arrCharge[$(this).attr('transportPartyId')]['additionalBankCharge'] > 0)
			charge += txt_auction[146] + "<span style=\"color:red\" >" + arrCharge[$(this).attr('transportPartyId')]['additionalBankCharge'] + "&nbsp;" + txt_currency[5] + "</span><br />";
			
		if (arrCharge[$(this).attr('transportPartyId')]['percentageCharge'] > 0)
			charge += txt_auction[147] + "<span style=\"color:red\" >" + arrCharge[$(this).attr('transportPartyId')]['percentageCharge'] + " % </span><br />";
				
		switch ($(this).attr('transportPartyId'))
		{
			case "1": //Default (Normal Express) 
				remark += "<br />" + txt_auction[500],
				remark += "<br />" + txt_auction[501],
				remark += "<br /><br />",
				
				agreement += '<br />' + txt_auction[522],
				agreement += '<br />&nbsp;<input type="radio" name="keep_box" id="biddingFrmKeepBox" value="remove_box" text="' + txt_auction[517] +'"/>',
				agreement += '&nbsp;' + txt_auction[517],
				agreement += '<br />&ensp;&ensp;&ensp;&ensp;&ensp;<strong>' + txt_auction[518] + '</strong>',
				agreement += '<br />&nbsp;<input type="radio" name="keep_box" id="biddingFrmKeepBox" value="keep_box" text="' + txt_auction[519] +'"/>',
				agreement += '&nbsp;' + txt_auction[519],
				agreement += '<br />&ensp;&ensp;&ensp;&ensp;&ensp;<strong>' + txt_auction[520] + "<span style=\"color:red\" >" + keepBoxFee + " JPY</span>" + txt_auction[521] + '</strong><br />',
				
				getItemLocation += '<br />' + txt_auction[523],
				getItemLocation += '<br />&nbsp;<input type="radio" name="getItemLocation" id="biddingFrmGetItemLocationMK" value="send to MK" text="' + txt_auction[503] + '"/>&nbsp;' + txt_auction[503] + "<br />",
				getItemLocation += '&nbsp;<input type="radio" name="getItemLocation" id="biddingFrmGetItemLocationKT" value="send to KT" text="' + txt_auction[504] + '"/>&nbsp;' + txt_auction[504] + "<br />";
				
				break;
			case "4": //Urgent
				remark += txt_auction[502],
				remark += "<br />" + txt_auction[501],
				remark += "<br />" + txt_auction[527],
				remark += "<br /><br />",
				
				getItemLocation += '<br />' + txt_auction[523],
				getItemLocation += '<br />&nbsp;<input type="radio" name="getItemLocation" id="biddingFrmGetItemLocationKT" value="send to KT" onclick="deliveryDetailsToggle(false);" text="' + txt_auction[504] +'"/>&nbsp;' + txt_auction[504] + "<br />",
				getItemLocation += '&nbsp;<input type="radio" name="getItemLocation" id="biddingFrmGetItemLocationAddress" value="send to customer address" onclick="deliveryDetailsToggle(true);" text="' + txt_auction[505] +'"/>&nbsp;' + txt_auction[505] + "<br />",
				
				getItemLocation += "&ensp;&ensp;" + txt_auction[92] + '<br />&ensp;&ensp;<select name="deliveryName" id="biddingFrmDeliveryName" disabled="disabled" onchange="enableDeliveryDetails(\'Name\');">',
				getItemLocation += deliveryNameList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryName" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryName" id="biddingFrmNewDeliveryName" /></span>',
				
				getItemLocation += "<br />&ensp;&ensp;" + txt_auction[93] + '<br />&ensp;&ensp;<select name="deliveryAddress" id="biddingFrmDeliveryAddress" disabled="disabled" onchange="enableDeliveryDetails(\'Address\');">',
				getItemLocation += deliveryAddressList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryAddress" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryAddress" id="biddingFrmNewDeliveryName" size="62"/></span>',
				
				getItemLocation += "<br />&ensp;&ensp;" + txt_auction[94] + '<br />&ensp;&ensp;<select name="deliveryPhone" id="biddingFrmDeliveryPhone" disabled="disabled" onchange="enableDeliveryDetails(\'Phone\');">';
				getItemLocation += deliveryPhoneList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryPhone" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryPhone" id="biddingFrmNewDeliveryPhone" /><br /></span>';
				
				break;
			case "2": //Sea
				remark += txt_auction[501],
				remark += "<br /><br />";
				break;
			case "5": //EMS To Customer
				remark += txt_auction[501],
				remark += "<br /><br />",
				
				other += "<br />" + txt_auction[506],
				other += '<br /><input type="radio" name="combine_together" value="request to combine together" text="' + txt_auction[507] +'" onclick="deliveryDetailsToggle(false);" />&nbsp;' + txt_auction[507] + txt_auction[524] + "<span style=\"color:red\" >" + combineFee  + "&nbsp;JPY</span>",
				other += "<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + txt_auction[530],
				other += '<br /><input type="radio" name="combine_together" value="send immediately" text="' + txt_auction[508] +'"  onclick="deliveryDetailsToggle(true);" />&nbsp;' + txt_auction[508] + "<br />",
				
				getItemLocation += '<br />' + txt_auction[158] + '<br />',
				
				getItemLocation += "&ensp;" + txt_auction[92] + '<br />&ensp;&ensp;<select name="deliveryName" id="biddingFrmDeliveryName" disabled="disabled" onchange="enableDeliveryDetails(\'Name\');">',
				getItemLocation += deliveryNameList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryName" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryName" id="biddingFrmNewDeliveryName" /></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[93] + '<br />&ensp;&ensp;<select name="deliveryAddress" id="biddingFrmDeliveryAddress" disabled="disabled" onchange="enableDeliveryDetails(\'Address\');">',
				getItemLocation += deliveryAddressList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryAddress" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryAddress" id="biddingFrmNewDeliveryName" size="62"/></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[94] + '<br />&ensp;&ensp;<select name="deliveryPhone" id="biddingFrmDeliveryPhone" disabled="disabled" onchange="enableDeliveryDetails(\'Phone\');">';
				getItemLocation += deliveryPhoneList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryPhone" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryPhone" id="biddingFrmNewDeliveryPhone" /><br /></span>';
				
				transportLocationList += "<br />&ensp;" + txt_auction[131] + '<br />&ensp;&ensp;<select name="transportLocationList" id="biddingFrmTransportLocation" disabled="disabled"><option value="-1"></option>',
				transportLocationList += emsTransportLocationList,
				transportLocationList += '</select>',
				
				transportLocationList += "<br />&ensp;" + txt_auction[173] + '<br />&ensp;&ensp;<input type="text" size="6" name="deliveryPostCode" id="biddingFrmDeliveryPostCode" disabled="disabled"/>';
				
				break;
			case "6": //SEA To Customer
				remark += txt_auction[501],
				remark += "<br />" + txt_auction[526],
				remark += "<br /><br />",
				
				other += "<br />" + txt_auction[506],
				other += '<br /><input type="radio" name="combine_together" value="request to combine together" text="' + txt_auction[507] +'" onclick="deliveryDetailsToggle(false);"/>&nbsp;' + txt_auction[507] + txt_auction[524] + "<span style=\"color:red\" >" + combineFee  + "&nbsp;JPY</span>",
				other += "<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + txt_auction[530],
				other += '<br /><input type="radio" name="combine_together" value="send immediately" text="' + txt_auction[508] +'" onclick="deliveryDetailsToggle(true);"/>&nbsp;' + txt_auction[508] + "<br />",
				
				getItemLocation += '<br />' + txt_auction[158] + '<br />',
				
				getItemLocation += "&ensp;" + txt_auction[92] + '<br />&ensp;&ensp;<select name="deliveryName" id="biddingFrmDeliveryName" disabled="disabled" onchange="enableDeliveryDetails(\'Name\');">',
				getItemLocation += deliveryNameList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryName" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryName" id="biddingFrmNewDeliveryName" /></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[93] + '<br />&ensp;&ensp;<select name="deliveryAddress" id="biddingFrmDeliveryAddress" disabled="disabled" onchange="enableDeliveryDetails(\'Address\');">',
				getItemLocation += deliveryAddressList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryAddress" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryAddress" id="biddingFrmNewDeliveryAddress" size="62"/></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[94] + '<br />&ensp;&ensp;<select name="deliveryPhone" id="biddingFrmDeliveryPhone" disabled="disabled" onchange="enableDeliveryDetails(\'Phone\');">';
				getItemLocation += deliveryPhoneList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryPhone" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryPhone" id="biddingFrmNewDeliveryPhone" /><br /></span>';
				
				transportLocationList += "<br />&ensp;" + txt_auction[131] + '<br />&ensp;&ensp;<select name="transportLocationList" id="biddingFrmTransportLocation" disabled="disabled" ><option value="-1"></option>',
				transportLocationList += seaTransportLocationList,
				transportLocationList += '</select>',
				
				transportLocationList += "<br />&ensp;" + txt_auction[173] + '<br />&ensp;&ensp;<input type="text" size="6" name="deliveryPostCode" id="biddingFrmDeliveryPostCode" disabled="disabled"/>';
				
				break;
			case "25": //SAL To Customer
				remark += txt_auction[501],
				remark += "<br /><br />",
				
				other += "<br />" + txt_auction[506],
				other += '<br /><input type="radio" name="combine_together" value="request to combine together" text="' + txt_auction[507] +'" onclick="deliveryDetailsToggle(false);"/>&nbsp;' + txt_auction[507] + txt_auction[524] + "<span style=\"color:red\" >" + combineFee  + "&nbsp;JPY</span>",
				other += "<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + txt_auction[530],
				other += '<br /><input type="radio" name="combine_together" value="send immediately" text="' + txt_auction[508] +'" onclick="deliveryDetailsToggle(true);"/>&nbsp;' + txt_auction[508] + "<br />",
				
				getItemLocation += '<br />' + txt_auction[158] + '<br />',
				
				getItemLocation += "&ensp;" + txt_auction[92] + '<br />&ensp;&ensp;<select name="deliveryName" id="biddingFrmDeliveryName" disabled="disabled"  onchange="enableDeliveryDetails(\'Name\');">',
				getItemLocation += deliveryNameList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryName" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryName" id="biddingFrmNewDeliveryName" /></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[93] + '<br />&ensp;&ensp;<select name="deliveryAddress" id="biddingFrmDeliveryAddress" disabled="disabled" onchange="enableDeliveryDetails(\'Address\');">',
				getItemLocation += deliveryAddressList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryAddress" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryAddress" id="biddingFrmNewDeliveryAddress" size="62"/></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[94] + '<br />&ensp;&ensp;<select name="deliveryPhone" id="biddingFrmDeliveryPhone" disabled="disabled" onchange="enableDeliveryDetails(\'Phone\');">';
				getItemLocation += deliveryPhoneList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryPhone" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryPhone" id="biddingFrmNewDeliveryPhone" /><br /></span>';
				
				transportLocationList += "<br />&ensp;" + txt_auction[131] + '<br />&ensp;&ensp;<select name="transportLocationList" id="biddingFrmTransportLocation"  disabled="disabled"><option value="-1"></option>',
				transportLocationList += salTransportLocationList,
				transportLocationList += '</select>',
				
				transportLocationList += "<br />&ensp;" + txt_auction[173] + '<br />&ensp;&ensp;<input type="text" size="6" name="deliveryPostCode" id="biddingFrmDeliveryPostCode" disabled="disabled"/>';
				break;
			case "24": //Send To Japan Address
				remark += txt_auction[501],
				remark += "<br />",
				
				remark += txt_auction[49] + ": 1,000" + " " + txt_auction[35],
				remark += "<br />",
				
				other += "<br />" + txt_auction[506],
				other += '<br /><input type="radio" name="combine_together" value="request to combine together" text="' + txt_auction[507] +'" onclick="deliveryDetailsToggle(false);"/>&nbsp;' + txt_auction[507] + txt_auction[524] + "<span style=\"color:red\" >" + combineFee  + "&nbsp;JPY</span>",
				other += "<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" + txt_auction[530],
				other += '<br /><input type="radio" name="combine_together" value="send immediately" text="' + txt_auction[508] +'" onclick="deliveryDetailsToggle(true);"/>&nbsp;' + txt_auction[508] + "<br />",
				
				getItemLocation += '<br />' + txt_auction[158] + '<br />',
				
				getItemLocation += "&ensp;" + txt_auction[92] + '<br />&ensp;&ensp;<select name="deliveryName" id="biddingFrmDeliveryName" disabled="disabled" onchange="enableDeliveryDetails(\'Name\');">',
				getItemLocation += deliveryNameList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryName" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryName" id="biddingFrmNewDeliveryName" /></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[93] + '<br />&ensp;&ensp;<select name="deliveryAddress" id="biddingFrmDeliveryAddress" disabled="disabled" onchange="enableDeliveryDetails(\'Address\');">',
				getItemLocation += deliveryAddressList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryAddress" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryAddress" id="biddingFrmNewDeliveryAddress" size="62"/></span>',
				
				getItemLocation += "<br />&ensp;" + txt_auction[94] + '<br />&ensp;&ensp;<select name="deliveryPhone" id="biddingFrmDeliveryPhone" disabled="disabled" onchange="enableDeliveryDetails(\'Phone\');">';
				getItemLocation += deliveryPhoneList,
				getItemLocation += '</select>',
				getItemLocation += '<span id="biddingFrmAddDeliveryPhone" style="display:none; " ><br />&ensp;&ensp;<input type="text" name="newDeliveryPhone" id="biddingFrmNewDeliveryPhone" /><br /></span>';
				
				transportLocationList += "<br />&ensp;" + txt_auction[131] + '<br />&ensp;&ensp;<select name="transportLocationList" id="biddingFrmTransportLocation"  disabled="disabled"><option value="-1"></option>',
				transportLocationList += japaneseLocationList,
				transportLocationList += '</select>',
				
				transportLocationList += "<br />&ensp;" + txt_auction[173] + '<br />&ensp;&ensp;<input type="text" size="6" name="deliveryPostCode" id="biddingFrmDeliveryPostCode" disabled="disabled"/>';
				
				break;
			default:
				break;
		}
		
		displayHtml += remark + showExchangeRate + charge + agreement + other + getItemLocation + transportLocationList;
		
		if (displayHtml != '' && displayHtml != null)
		{
			$('#biddingFrmAdditionalMethod').html(displayHtml),
			$('#biddingFrmAdditionalMethodField').show();
		}
		else
		{
			$('#biddingFrmAdditionalMethod').html(''),
			$('#biddingFrmAdditionalMethodField').hide();
		}
	}),
	
	$('#biddingFrmSubmit').click(function()
	{
		var biddingFrmValidData = true,
			biddingFrmConfirm = $('#biddingFrmConfirm'),
			biddingFrmAuctionId = $('#biddingFrmAuctionId'),
			biddingFrmAuctionUrl = $('#biddingFrmAuctionUrl'),
			biddingFrmProductName = $('#biddingFrmProductName'),
			biddingFrmProductSourceName = $('#biddingFrmProductSourceName'),
			biddingFrmSellerId = $('#biddingFrmSellerId'),
			biddingFrmMaxBidPrice = $('#biddingFrmMaxBidPrice'),
			biddingFrmQuantity = $('#biddingFrmQuantity'),
			biddingFrmSelectedQuantity = $('#biddingFrmQuantity option:selected'),
			biddingFrmHaveOtherChoice = $('input[name=biddingFrmHaveOtherChoice]:checked'),
			biddingFrmOtherChoiceName = $('input[name=biddingFrmOtherChoiceName]'),
			biddingFrmOtherChoiceValue = $('input[name=biddingFrmOtherChoiceValue]'),
			biddingFrmCustReq = $('#biddingFrmCustReq'),
			biddingFrmProductType = $('#biddingFrmProductType'),
			biddingFrmSelectedProductType = $('#biddingFrmProductType option:selected'),
			biddingFrmSendLocation = $('#biddingFrm input[name=sendLocation]'),
			biddingFrmCheckedSendLocation = $('#biddingFrm input[name=sendLocation]:checked'),
			biddingFrmTransportParty = $('#biddingFrm input[name=transportParty]'),
			biddingFrmCheckedTransportParty = $('#biddingFrm input[name=transportParty]:checked'),
			biddingFrmGetItemLocation = $('#biddingFrm input[name=getItemLocation]'),
			biddingFrmCheckedGetItemLocation = $('#biddingFrm input[name=getItemLocation]:checked'),
			biddingFrmKeepBox = $('#biddingFrm input[name=keep_box]'),
			biddingFrmCheckedKeepBox = $('#biddingFrm input[name=keep_box]:checked'),
			biddingFrmCombine = $('#biddingFrm input[name=combine_together]'),
			biddingFrmCheckedCombine = $('#biddingFrm input[name=combine_together]:checked'),
			biddingFrmDeliveryName = $('#biddingFrmDeliveryName option:selected'),
			biddingFrmDeliveryAddress = $('#biddingFrmDeliveryAddress option:selected'),
			biddingFrmDeliveryPhone = $('#biddingFrmDeliveryPhone option:selected'),
			biddingFrmDeliveryLocation = $('#biddingFrmTransportLocation'),
			biddingFrmDeliveryPostCode = $('#biddingFrmDeliveryPostCode'),
			biddingFrmSelectedDeliveryLocation = $('#biddingFrm #biddingFrmTransportLocation option:selected'),
			biddingFrmNewDeliveryName = $('#biddingFrmNewDeliveryName'),
			biddingFrmNewDeliveryAddress = $('#biddingFrmNewDeliveryAddress'),
			biddingFrmNewDeliveryPhone = $('#biddingFrmNewDeliveryPhone'),
			biddingFrmSelectedTransportLocation = $('#biddingFrmTransportLocation option:selected'),
			biddingFrmTransportLocation = $('#biddingFrmTransportLocation'),
			deliveryName = '',
			deliveryAddress = '',
			deliveryPhone = '',
			biddingFrmErrorTipsField = $('#biddingFrmError'),
			biddingFrmPriceError = $('#biddingFrmPriceError'),
			biddingFrmPriceErrorText = $('#biddingFrmPriceErrorText'),
			biddingFrmPriceErrorValue = $('#biddingFrmPriceErrorValue'),
			biddingFrmSubmitBtn = $('#biddingFrmSubmit'),
			biddingFrmAllTextFields = $([]).add(biddingFrmProductName).add(biddingFrmMaxBidPrice).add(biddingFrmCustReq),
			tempHtml = '';
						
		updateTips($('#biddingFrm select'), biddingFrmErrorTipsField, '', false),
		updateTips(biddingFrmAllTextFields, biddingFrmErrorTipsField, '', false),
		
		biddingFrmValidData = biddingFrmValidData && checkBidPrice(biddingFrmMaxBidPrice.val(), biddingFrmMaxBidPrice, biddingFrmErrorTipsField),
		biddingFrmValidData = biddingFrmValidData && checkQuantity(biddingFrmSelectedQuantity.val(), biddingFrmQuantity, biddingFrmErrorTipsField),
		biddingFrmValidData = biddingFrmValidData && checkProductName(biddingFrmProductName.val(), biddingFrmProductName, biddingFrmErrorTipsField),
		biddingFrmValidData = biddingFrmValidData && checkProductType(biddingFrmSelectedProductType.val(), biddingFrmProductType, biddingFrmErrorTipsField),
		biddingFrmValidData = biddingFrmValidData && checkTransportParty(biddingFrmCheckedTransportParty.val(), biddingFrmTransportParty, biddingFrmErrorTipsField),
		
		biddingFrmValidData = biddingFrmValidData && checkAdditionalMethod(biddingFrmCheckedTransportParty.attr('transportpartyid'), biddingFrmCheckedKeepBox.val(), biddingFrmKeepBox, biddingFrmCheckedGetItemLocation.val(), biddingFrmGetItemLocation, biddingFrmDeliveryName.val(), biddingFrmDeliveryName, biddingFrmNewDeliveryName.val(),  biddingFrmNewDeliveryName, biddingFrmDeliveryAddress.val(), biddingFrmDeliveryAddress, biddingFrmNewDeliveryAddress.val(),  biddingFrmNewDeliveryAddress, biddingFrmDeliveryPhone.val(), biddingFrmDeliveryPhone, biddingFrmNewDeliveryPhone.val(),  biddingFrmNewDeliveryPhone, biddingFrmSelectedTransportLocation.val(), biddingFrmTransportLocation, biddingFrmCheckedCombine.val(), biddingFrmCombine, biddingFrmDeliveryPostCode.val(), biddingFrmDeliveryPostCode, biddingFrmErrorTipsField);
		
		if (biddingFrmHaveOtherChoice.val() == 'N')
			biddingFrmCustReq.val('');
		else
		{
			otherChoiceName = biddingFrmOtherChoiceName.toArray(),
			otherChoiceValue = biddingFrmOtherChoiceValue.toArray();
			
			var otherChoiceNameLength = otherChoiceName.length,
				custReq = '';
			
			for(var a=0; a<otherChoiceNameLength; a++)
			{
				if (otherChoiceValue[a].value != '' && otherChoiceValue[a].value != null)
				{
					custReq += otherChoiceName[a].value + ": " + otherChoiceValue[a].value + ", ";
				}
			}
			
			if (custReq != '')
				biddingFrmCustReq.val(custReq);
			else
				biddingFrmCustReq.val('');
		}
			
		if (biddingFrmMaxBidPrice.val() >= buyPrice && biddingFrmValidData && biddingFrmPriceErrorValue.val() == '')
		{
			biddingFrmValidData = false,
			biddingFrmPriceError.show(),
			biddingFrmSubmitBtn.hide(),
			updateTips('', biddingFrmPriceErrorText, txt_auction[154], true);
			
			return false;
		}
		
		if (biddingFrmValidData)
		{
			biddingFrmSubmitBtn.hide(),
			$('#biddingFrmLoader').show(),
			$('tr[name="biddingSummaryKeepBoxField"]').hide(),
			$('tr[name="biddingSummaryGetItemLocationField"]').hide(),
			$('tr[name="biddingSummaryReceiverField"]').hide();
			biddingFrmPriceErrorValue.val(''),
			$.ajax(
			{  
				url: "./tools/ajaxTools/checkBalance.php",   
				type: "POST",
				dataType: "json",
				success: function (data, txtStatus)
				{
					if (parseFloat(data.balance.balance) < (parseFloat(biddingFrmMaxBidPrice.val() * biddingFrmSelectedQuantity.val() * exchangeRate)))
					{
						updateTips(biddingFrmMaxBidPrice, biddingFrmErrorTipsField, txt_auction[88], true),
						$('#biddingFrmLoader').hide();
						
						return false;
					}
					else
					{
						biddingFrmConfirm.val('Y'),
						$('#biddingDialog').dialog('close'),
						$('#biddingSummaryMaxBidPrice').text(biddingFrmMaxBidPrice.val()),
						$('#biddingSummaryQuantity').text(biddingFrmSelectedQuantity.val()),
						$('#biddingSummaryEstimatePrice').text(number_format(biddingFrmMaxBidPrice.val() * exchangeRate * biddingFrmSelectedQuantity.val(), decimal, '.', ',')),
						$('#biddingSummaryProductName').text(biddingFrmProductName.val()),
						$('#biddingSummaryProductType').text(biddingFrmSelectedProductType.attr('text')),
						$('#biddingSummarySendLocation').text(biddingFrmCheckedSendLocation.attr('text')),
						$('#biddingSummaryTransportParty').text(biddingFrmCheckedTransportParty.attr('text'));
						
						if (biddingFrmCustReq.val() != '' && biddingFrmCustReq.val() != null && biddingFrmHaveOtherChoice == 'Y')
						{
							$('#biddingSummaryCustomerRequestField').show();
							$('#biddingSummaryCustomerRequest').text(biddingFrmCustReq.val());
						}
						else
							$('#biddingSummaryCustomerRequestField').hide();
						
						switch (biddingFrmCheckedTransportParty.attr('transportPartyId'))
						{
							case "1": //Default (Normal Express) 
								$('#biddingSummaryKeepBox').text(biddingFrmCheckedKeepBox.attr('text')),
								$('tr[name="biddingSummaryKeepBoxField"]').show(),
								$('#biddingSummaryGetItemLocation').text(biddingFrmCheckedGetItemLocation.attr('text')),
								$('tr[name="biddingSummaryGetItemLocationField"]').show();
								break;
							case "4": //Urgent
								$('#biddingSummaryGetItemLocation').text(biddingFrmCheckedGetItemLocation.attr('text')),
								$('tr[name="biddingSummaryGetItemLocationField"]').show();
								
								if (biddingFrmCheckedGetItemLocation.val() == 'send to customer address')
								{
									if (biddingFrmDeliveryName.val() != 'add')
										$('#biddingSummaryReceiverName').text(biddingFrmDeliveryName.val());
									else
										$('#biddingSummaryReceiverName').text(biddingFrmNewDeliveryName.val());
									
									if (biddingFrmDeliveryAddress.val() != 'add')
										$('#biddingSummaryReceiverAddress').text(biddingFrmDeliveryAddress.val());
									else
										$('#biddingSummaryReceiverAddress').text(biddingFrmNewDeliveryAddress.val());
										
									if (biddingFrmDeliveryPhone.val() != 'add')
										$('#biddingSummaryReceiverPhone').text(biddingFrmDeliveryPhone.val());
									else
										$('#biddingSummaryReceiverPhone').text(biddingFrmNewDeliveryPhone.val());
										
									$('tr[name="biddingSummaryReceiverField"]').show();
								}
								
								break;
							case "2": //Sea
								break;
							case "5": //EMS To Customer
								$('#biddingSummaryCombineTogether').text(biddingFrmCheckedCombine.attr('text'));
								
								if (biddingFrmCheckedCombine.val() == 'send immediately')
								{
									$('tr[name=biddingSummaryCombineTogetherField]').show();
										
									if (biddingFrmDeliveryName.val() != 'add')
										$('#biddingSummaryReceiverName').text(biddingFrmDeliveryName.val());
									else
										$('#biddingSummaryReceiverName').text(biddingFrmNewDeliveryName.val());
									
									if (biddingFrmDeliveryAddress.val() != 'add')
										$('#biddingSummaryReceiverAddress').text(biddingFrmDeliveryAddress.val());
									else
										$('#biddingSummaryReceiverAddress').text(biddingFrmNewDeliveryAddress.val());
										
									if (biddingFrmDeliveryPhone.val() != 'add')
										$('#biddingSummaryReceiverPhone').text(biddingFrmDeliveryPhone.val());
									else
										$('#biddingSummaryReceiverPhone').text(biddingFrmNewDeliveryPhone.val());
										
									$('tr[name="biddingSummaryReceiverField"]').show(),
									$('#biddingSummaryTransportLocation').text(biddingFrmSelectedTransportLocation.val()),
									$('tr[name="biddingSummaryTransportLocationField"]').show();
								}
								
							break;
							case "6": //SEA To Customer
								$('#biddingSummaryCombineTogether').text(biddingFrmCheckedCombine.attr('text'));
								
								if (biddingFrmCheckedCombine.val() == 'send immediately')
								{
									$('tr[name=biddingSummaryCombineTogetherField]').show();
										
									if (biddingFrmDeliveryName.val() != 'add')
										$('#biddingSummaryReceiverName').text(biddingFrmDeliveryName.val());
									else
										$('#biddingSummaryReceiverName').text(biddingFrmNewDeliveryName.val());
									
									if (biddingFrmDeliveryAddress.val() != 'add')
										$('#biddingSummaryReceiverAddress').text(biddingFrmDeliveryAddress.val());
									else
										$('#biddingSummaryReceiverAddress').text(biddingFrmNewDeliveryAddress.val());
										
									if (biddingFrmDeliveryPhone.val() != 'add')
										$('#biddingSummaryReceiverPhone').text(biddingFrmDeliveryPhone.val());
									else
										$('#biddingSummaryReceiverPhone').text(biddingFrmNewDeliveryPhone.val());
										
									$('tr[name="biddingSummaryReceiverField"]').show(),
									$('#biddingSummaryTransportLocation').text(biddingFrmSelectedTransportLocation.val()),
									$('tr[name="biddingSummaryTransportLocationField"]').show();
								}
							break;
							case "25": //SAL To Customer
								$('#biddingSummaryCombineTogether').text(biddingFrmCheckedCombine.attr('text'));
								
								if (biddingFrmCheckedCombine.val() == 'send immediately')
								{
									$('tr[name=biddingSummaryCombineTogetherField]').show();
										
									if (biddingFrmDeliveryName.val() != 'add')
										$('#biddingSummaryReceiverName').text(biddingFrmDeliveryName.val());
									else
										$('#biddingSummaryReceiverName').text(biddingFrmNewDeliveryName.val());
									
									if (biddingFrmDeliveryAddress.val() != 'add')
										$('#biddingSummaryReceiverAddress').text(biddingFrmDeliveryAddress.val());
									else
										$('#biddingSummaryReceiverAddress').text(biddingFrmNewDeliveryAddress.val());
										
									if (biddingFrmDeliveryPhone.val() != 'add')
										$('#biddingSummaryReceiverPhone').text(biddingFrmDeliveryPhone.val());
									else
										$('#biddingSummaryReceiverPhone').text(biddingFrmNewDeliveryPhone.val());
										
									$('tr[name="biddingSummaryReceiverField"]').show(),
									$('#biddingSummaryTransportLocation').text(biddingFrmSelectedTransportLocation.val()),
									$('tr[name="biddingSummaryTransportLocationField"]').show();
								}
							break;
							case "24": //Send To Japan Address
								$('#biddingSummaryCombineTogether').text(biddingFrmCheckedCombine.attr('text'));
								
								if (biddingFrmCheckedCombine.val() == 'send immediately')
								{
									$('tr[name=biddingSummaryCombineTogetherField]').show();
										
									if (biddingFrmDeliveryName.val() != 'add')
										$('#biddingSummaryReceiverName').text(biddingFrmDeliveryName.val());
									else
										$('#biddingSummaryReceiverName').text(biddingFrmNewDeliveryName.val());
									
									if (biddingFrmDeliveryAddress.val() != 'add')
										$('#biddingSummaryReceiverAddress').text(biddingFrmDeliveryAddress.val());
									else
										$('#biddingSummaryReceiverAddress').text(biddingFrmNewDeliveryAddress.val());
										
									if (biddingFrmDeliveryPhone.val() != 'add')
										$('#biddingSummaryReceiverPhone').text(biddingFrmDeliveryPhone.val());
									else
										$('#biddingSummaryReceiverPhone').text(biddingFrmNewDeliveryPhone.val());
										
									$('tr[name="biddingSummaryReceiverField"]').show(),
									$('#biddingSummaryTransportLocation').text(biddingFrmSelectedTransportLocation.val()),
									$('tr[name="biddingSummaryTransportLocationField"]').show();
								}
							break;
							default:
							break;
						}
						
						$('#biddingSummaryDialog').dialog('open');
					}
				}
			});
			
		}
		
		return false;
	}),
	
	$('#biddingSummarySubmit').click(function()
	{
		$('#biddingFrm').submit();
	}),
	
	$('#biddingFrm').submit(function()
	{
		var biddingFrmValidData = true,
			biddingFrmConfirm = $('#biddingFrmConfirm'),
			biddingFrmAuctionId = $('#biddingFrmAuctionId'),
			biddingFrmAuctionUrl = $('#biddingFrmAuctionUrl'),
			biddingFrmProductName = $('#biddingFrmProductName'),
			biddingFrmProductSourceName = $('#biddingFrmProductSourceName'),
			biddingFrmSellerId = $('#biddingFrmSellerId'),
			biddingFrmMaxBidPrice = $('#biddingFrmMaxBidPrice'),
			biddingFrmQuantity = $('#biddingFrmQuantity'),
			biddingFrmSelectedQuantity = $('#biddingFrmQuantity option:selected'),
			biddingFrmCustReq = $('#biddingFrmCustReq'),
			biddingFrmProductType = $('#biddingFrmProductType'),
			biddingFrmSelectedProductType = $('#biddingFrmProductType option:selected'),
			biddingFrmSendLocation = $('#biddingFrm input[name=sendLocation]'),
			biddingFrmCheckedSendLocation = $('#biddingFrm input[name=sendLocation]:checked'),
			biddingFrmTransportParty = $('#biddingFrm input[name=transportParty]'),
			biddingFrmCheckedTransportParty = $('#biddingFrm input[name=transportParty]:checked'),
			biddingFrmGetItemLocation = $('#biddingFrm input[name=getItemLocation]'),
			biddingFrmCheckedGetItemLocation = $('#biddingFrm input[name=getItemLocation]:checked'),
			biddingFrmKeepBox = $('#biddingFrm input[name=keep_box]'),
			biddingFrmCheckedKeepBox = $('#biddingFrm input[name=keep_box]:checked'),
			biddingFrmCombine = $('#biddingFrm input[name=combine_together]'),
			biddingFrmCheckedCombine = $('#biddingFrm input[name=combine_together]:checked'),
			biddingFrmDeliveryName = $('#biddingFrmDeliveryName option:selected'),
			biddingFrmDeliveryAddress = $('#biddingFrmDeliveryAddress option:selected'),
			biddingFrmDeliveryPhone = $('#biddingFrmDeliveryPhone option:selected'),
			biddingFrmDeliveryLocation = $('#biddingFrmTransportLocation'),
			biddingFrmDeliveryPostCode = $('#biddingFrmDeliveryPostCode'),
			biddingFrmSelectedDeliveryLocation = $('#biddingFrm #biddingFrmTransportLocation option:selected'),
			biddingFrmNewDeliveryName = $('#biddingFrmNewDeliveryName'),
			biddingFrmNewDeliveryAddress = $('#biddingFrmNewDeliveryAddress'),
			biddingFrmNewDeliveryPhone = $('#biddingFrmNewDeliveryPhone'),
			biddingFrmSelectedTransportLocation = $('#biddingFrmTransportLocation option:selected'),
			biddingFrmTransportLocation = $('#biddingFrmTransportLocation'),
			deliveryName = '',
			
			deliveryAddress = '',
			deliveryPhone = '',
			biddingFrmErrorTipsField = $('#biddingFrmError'),
			biddingFrmPriceError = $('#biddingFrmPriceError'),
			biddingFrmPriceErrorText = $('#biddingFrmPriceErrorText'),
			biddingFrmPriceErrorValue = $('#biddingFrmPriceErrorValue'),
			biddingFrmSubmitBtn = $('#biddingFrmSubmit'),
			biddingFrmAllTextFields = $([]).add(biddingFrmProductName).add(biddingFrmMaxBidPrice).add(biddingFrmCustReq);

		if (biddingFrmConfirm.val() == 'Y')
		{
			if (biddingFrmCheckedTransportParty.attr('transportPartyId') == 5 || biddingFrmCheckedTransportParty.attr('transportPartyId') == 6 || biddingFrmCheckedTransportParty.attr('transportPartyId') == 24 || biddingFrmCheckedTransportParty.attr('transportPartyId') == 25 || (biddingFrmCheckedTransportParty.attr('transportPartyId') == 4 && biddingFrmCheckedGetItemLocation.val() == 'send to customer address'))
			{
				if (biddingFrmDeliveryName.val() != 'add')
					deliveryName = biddingFrmDeliveryName.val();
				else
					deliveryName = biddingFrmNewDeliveryName.val();
									
				if (biddingFrmDeliveryAddress.val() != 'add')
					deliveryAddress = biddingFrmDeliveryAddress.val();
				else
					deliveryAddress = biddingFrmNewDeliveryAddress.val();
									
				if (biddingFrmDeliveryPhone.val() != 'add')
					deliveryPhone = biddingFrmDeliveryPhone.val();
				else
					deliveryPhone = biddingFrmNewDeliveryPhone.val();
			}				
			$.ajax({  
				url: "./tools/ajaxTools/bidding.php",   
				type: "POST",      
				data: "type=" + type + 
					  "&clientId=" + clientId + 
					  "&auctionId=" + biddingFrmAuctionId.val() + 
					  "&auctionUrl=" + biddingFrmAuctionUrl.val() + 
					  "&productName=" + biddingFrmProductName.val() + 
					  "&productSourceName=" + biddingFrmProductSourceName.val() + 
					  "&sellerInternetId=" + biddingFrmSellerId.val() + 
					  "&maxBidPrice=" + biddingFrmMaxBidPrice.val() + 
					  "&quantity=" + biddingFrmSelectedQuantity.val() + 
					  "&customerReq=" + biddingFrmCustReq.val() + 
					  "&itemTypeId=" + biddingFrmCheckedTransportParty.val() + 
					  "&transportPartyId=" + biddingFrmCheckedTransportParty.attr('transportPartyId') + 
					  "&keepBox=" + biddingFrmCheckedKeepBox.val() + 
					  "&getItemLocation=" + biddingFrmCheckedGetItemLocation.val() + 
					  "&combineTogether=" + biddingFrmCheckedCombine.val() + 
					  "&deliveryName=" + deliveryName + 
					  "&deliveryAddress=" + deliveryAddress + 
					  "&deliveryPhone=" + deliveryPhone + 
					  "&deliveryLocation=" + biddingFrmSelectedTransportLocation.val() + 
					  "&productType=" + biddingFrmSelectedProductType.val() + 
					  "&categoryIdPath=" + categoryIdPath + 
					  "&categoryId=" + categoryId + 
					  "&store=" + store + 
					  "&postCode=" + biddingFrmDeliveryPostCode.val() + 
					  "&enddingDate=" + auctionEndingDate,
				dataType: "json",
				success: function (data, txtStatus) 
				{
					if (data.isInsert)
					{
						if (type == 'yahoo')
						{
							var biddingKey = data.bkey;
						
							$('#biddingSummaryDialog').dialog('close'),
							$('#resultText').html(txt_auction[151]),
							$('#resultLoadingBar').show(),
									
							$('#resultDialog').show().dialog('open'),
								
							$.ajax({  
									url: "./tools/ajaxTools/ordering.php",   
									type: "GET",
									data: "bkey=" + encodeURIComponent(biddingKey),
									dataType: "json",
									success: function (data2, txtStatus) 
									{
										if(data2.resultCode == 1)
										{
											$('#resultText').text(txt_auction[611] + data2.bidAccount),
											$('#resultLoadingBar').hide(),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();
											},2500);
										}
										else if (data2.resultCode == 2)
										{
											$('#resultText').text(txt_auction[612] + data2.bidAccount),
											$('#resultLoadingBar').hide(),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();
											},2500);
										}
										else if (data2.resultCode == 11)
										{
											$('#resultDialog').dialog('close'),
											$('#resultLoadingBar').hide(),
											$('#rebidFrmBkey').val(biddingKey),
											$('#rebidFrmMaxBidPrice').val(biddingFrmMaxBidPrice.val()),
											updateTips('', $('#rebidFrmText'), txt_auction[6111], true),
											$('#rebidFrmVoid').show(),
											$('#rebidDialog').show().dialog('open');
										}
										else if (data2.resultCode == 12)
										{
											$('#resultDialog').dialog('close'),
											$('#resultLoadingBar').hide(),
											$('#rebidFrmBkey').val(biddingKey),
											$('#rebidFrmMaxBidPrice').val(biddingFrmMaxBidPrice.val()),
											updateTips('', $('#rebidFrmText'), txt_auction[6112], true),
											$('#rebidFrmVoid').show(),
											$('#rebidDialog').show().dialog('open');
										}
										else if (data2.resultCode == 35)
										{
											$('#resultText').text(txt_auction[6135]),
											$('#resultLoadingBar').hide(),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();
											},2500);
										}
										else if (data2.resultCode == 52)
										{
											$('#resultText').text(txt_auction[6152]),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();
											},2500);
										}
										else if (data2.resultCode == 53)
										{
											$('#resultDialog').dialog('close'),
											$('#resultLoadingBar').hide(),
											$('#rebidFrmBkey').val(biddingKey),
											$('#rebidFrmMaxBidPrice').val(biddingFrmMaxBidPrice.val()),
											updateTips('', $('#rebidFrmText'), txt_auction[6153], true),
											$('#rebidFrmVoid').show(),
											$('#rebidDialog').show().dialog('open');
										}
										else if (data2.resultCode == 54)
										{
											$('#resultDialog').dialog('close'),
											$('#resultLoadingBar').hide(),
											$('#rebidFrmBkey').val(biddingKey),
											$('#rebidFrmMaxBidPrice').val(biddingFrmMaxBidPrice.val()),
											updateTips('', $('#rebidFrmText'), txt_auction[6154], true),
											$('#rebidFrmVoid').show(),
											$('#rebidDialog').show().dialog('open');
										}
										else if (data2.resultCode == 55)
										{
											$('#resultText').text(txt_auction[61101]),
											$('#resultLoadingBar').hide(),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();	
											},2500);
										}
										else if (data2.resultCode == 98)
										{
											$('#resultText').text(txt_auction[6198]),
											$('#resultLoadingBar').hide(),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();	
											},2500);
										}
										else if (data2.resultCode == 99)
										{
											$('#resultDialog').parent().children().children('.ui-dialog-titlebar-close').show(),
											$('#resultText').text(txt_auction[6199]),
											$('#resultLoadingBar').hide();
										}
										else if (data2.resultCode == 101)
										{
											$('#resultText').text(txt_auction[61101]),
											$('#resultLoadingBar').hide(),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();		
											},2500);
										}
										else
										{
											$('#resultText').text(txt_auction[6199]),
											$('#resultLoadingBar').hide(),
											setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();		
											},2500);
										}
									}
								});
						}
						else
						{
							$('#biddingSummaryDialog').dialog('close'),
							$('#resultText').text(txt_auction[613]),
							$('#resultLoadingBar').show(),
									
							$('#resultDialog').show().dialog('open'),
							
							setTimeout(function()
											{
												$('#resultDialog').dialog('close'),
												window.location.reload();		
											},2500);
											
						}
					}
							else
							{
								$('#biddingSummaryDialog').dialog('close'),
								$('#resultText').text(txt_auction[155]),
								$('#resultDialog').show().dialog('open'),
									
								setTimeout(function()
								{
									$('#resultDialog').dialog('close'),
									window.location.reload();		
								}, 2500);
							}
						
					}
				});
		}
		
		return false; 
		
	});
	<!--End Of Bidding Order-->
});
