function gold_click(game_id, gold_quantity) 
{
	$("#game_id").val(game_id);
	$("#gold_quantity").val(gold_quantity);

	$.ajax({
		url: 'index.php?action=ajax&operation=server',
		type:"POST",
		data:{game_id:game_id},
		dataType: 'JSON',
		success: function(data) {
			if(data) {
				var result=eval("("+data+")");
				$("#svr_id").html(result.option);

				$(".game_name_str").html($("#game_id > option:selected").text());
				$(".svr_name_str").html($("#svr_id > option:selected").text());

				$("#game_notice").html(result.game_notice);
			}
		} 
	});

	$.ajax({
		url: 'index.php?action=ajax&operation=price',
		type:"POST",
		dataType: 'JSON',
		data:{game_id:game_id,gold_quantity:gold_quantity},
		success: function(data) {
			if(data) {
				var result=eval("("+data+")");
				if(result.result == '1') {
					$(".product_price").html(result.product_price);

						
					$(".only_price").html(result.only_price);
					$(".profit_rate").html(result.profit_rate);
					$(".market_price").html(result.market_price);
					$(".save_price").html(result.save_price);
					$(".gold_quantity_str").html(result.gold_quantity);
						
					$(".game_name_str").html($("#game_id > option:selected").text());
					$(".svr_name_str").html($("#svr_id > option:selected").text());
						
					$(".btn_gold_quantity_str").html('&nbsp;' + result.btn_gold_quantity_str + '&nbsp;');
					$(".btn_game_name_str").html('&nbsp;' + result.btn_game_name_str + '&nbsp;');
						
				} else {
					alert(result.error);
				}
			} else {
				alert('error');
			}
		}
	});
	document.location="#gold_form";
	return false;
}
