function check_form()
{
	if($.trim($('#ServerList').val()) == '')
	{
		alert('please choose your server');
		return false;
	}
	if($.trim($('#ProductList').val()) == '')
	{
		alert('please choose the the product');
		return false;
	}
	if ($("#CustomerEmail").val().search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) == -1)
	{
		alert('Email Address Wrong!');
		$("#CustomerEmail").focus();
		return false;
	}
	if ($("#CustomerPhone").val() == '')
	{
		alert('Input Phone Number');
		$("#CustomerPhone").focus();
		return false;
	}
	if($("#FirstName").val() == '')
	{
		alert('Please fill in your FirstName!');
		$("#FirstName").focus();
		return false;
	}
	if($("#LastName").val() == '')
	{
		alert('Please fill in your LastName!');
		$("#LastName").focus();
		return false;
	}
	if($("#CharactorName").val() == '')
	{
		alert('Please fill in your Character!');
		$("#CharactorName").focus();
		return false;
	}
	if ($("#GameName").val() == 'RS2' && $("#LoginGameName").val() == '')
	{
		alert('Input account name');
		$("#LoginGameName").focus();
		return false;
	}
	if ($("#GameName").val() == 'RS2' && $("#LoginGamePassword").val() == '')
	{
		alert('Input password');
		$("#LoginGamePassword").focus();
		return false;
	}
	var currency = document.getElementsByName('Currency');
	for(var i=0;i<currency.length;i++){
		if(currency[i].checked){
			currency=currency[i].value;
			break;
		}
	}
	if(typeof(currency)=="object")
	{currency="USD";}
	$("#c_currency").val(currency);
	numberPrice = $.trim($('#ProductList').val())+'|'+ $('#ProductList').find('option:selected').text()
	$("#ServerName").val($('#ServerList').find('option:selected').text());
	$("#NumberPrice").val(numberPrice);
	$("#payment_form").submit();
}
function checkout_confirm()
{
	item_number = $("#CharactorName").val()+"|"+$("#LoginGameName").val()+"|"+$("#LoginGamePassword").val();
	os1 = $("#FirstName").val()+' '+$("#LastName").val()+'|'+$("#CustomerEmail").val()+'|'+$("#CustomerPhone").val();
	os2 = $("#Notice").val();
	os5 = $("#CustomerMsn").val()+'|'+$("#CustomerLandlinPhone").val()+'|'+$("#CustomerOnlieTime").val()+'|'+$("#OtherCharactor").val();
	var method = document.getElementsByName("PayType");
	for(var i=0;i<method.length;i++)
	{
		if(method[i].checked)
		{
			method=method[i].value;
			break;
		}
	}

	switch(method)
	{
		case "1":
			$("#item_number").val(item_number);
			$("#os1").val(os1);
			$("#os2").val(os2);
			$("#os5").val(os5);
			$("#theform").submit();
			return false;
			break;
		case "2":
		case "3":
			if(method == 2)
			{$("#paymentbank").val('eu');}
			else if(method == 3)
			{$("#paymentbank").val('wu');}
			$("#char").val($("#CharactorName").val());
			$("#fname").val($("#FirstName").val());
			$("#lname").val($("#LastName").val());
			$("#mail").val($("#CustomerEmail").val());
			$("#phone").val($("#CustomerPhone").val());
			$("#payment_other").submit();
			return false;
			break;
	}
}