var vSpaceCanBeConverted = "";
var vDaysCanBeConverted = "";
var vGoldBeansCanGet = "";
var vConvertRuleSpace = "";
var vConvertRuleGoldBean = "";
var vGoldBeanNeeded = "";
var vSpaceNeeded = "";
var vSpaceCanGet = "";
var vGoldBeansConverted = "";

function Jindou_2_OnLoad()
{
	vSpaceCanBeConverted = external.SpaceCanBeConverted();
	vDaysCanBeConverted = external.DaysCanBeConverted();
	vGoldBeansCanGet = external.GoldBeansCanGet();
	vConvertRuleSpace = external.ConvertRuleSpace();
	vConvertRuleGoldBean = external.ConvertRuleGoldBean();
	vGoldBeanNeeded = external.GoldBeanNeeded();
	vSpaceCanGet = external.SpaceCanGet();
	vSpaceNeeded = external.GoldBeanNeeded();

	$("SpaceCanBeConverted").innerHTML = vSpaceCanBeConverted;
	$("DaysCanBeConverted").innerHTML = vDaysCanBeConverted;
	$("GoldBeansCanGet").innerHTML = vGoldBeansCanGet;
	$("ConvertRuleSpace").innerHTML = vConvertRuleSpace;
	$("ConvertRuleGoldBean").innerHTML = vConvertRuleGoldBean;
	$("GoldBeanNeeded").innerHTML = vGoldBeanNeeded;
	$("SpaceCanGet").innerHTML = vSpaceCanGet;
}

function Jindou_3_OnLoad()
{
	vGoldBeansConverted = external.GoldBeansConverted();
	vGoldBeanNeeded = external.GoldBeanNeeded();
	vSpaceCanGet = external.SpaceCanGet();

	$("GoldBeansConverted").innerHTML = vGoldBeansConverted;
	$("GoldBeanNeeded").innerHTML = vGoldBeanNeeded;
	$("SpaceCanGet").innerHTML = vSpaceCanGet;
	
	external.OnCheckChange(1);
}

function Jindou_4_OnLoad()
{
	vGoldBeanCount = external.GoldBeanCount();
	vGoldBeanNeeded = external.GoldBeanNeeded();
	vSpaceCanGet = external.SpaceCanGet();

	$("GoldBeanCount").innerHTML = vGoldBeanCount;
	$("GoldBeanNeeded").innerHTML = vGoldBeanNeeded;
	$("SpaceCanGet").innerHTML = vSpaceCanGet;

	external.OnCheckChange(1);
}

function Jindou_5_OnLoad()
{
	vGoldBeanCount = external.GoldBeanCount();

	$("GoldBeanCount").innerHTML = vGoldBeanCount;
}

function OnShowConvertInfo()
{
	external.OnShowConvertInfo();
	$("btnShowConvertInfo").disabled = true;
}

function OnStartConvert()
{
	external.OnStartConvert();
	$("btnStartConvert").disabled = true;
}

function OnCheckClick()
{
	external.OnCheckChange($("chkUseGB").checked);
}