var g_reset_load = -1;

function ReadResetInfo()
{
	slot = OpenFile("config.sav");
	var auto_load = slot.read("auto_load", -2);
	if (auto_load > -2 || auto_load == -5)
	{
		//load this slot
		g_reset_load = auto_load;
		// clear the info.
		slot.write("auto_load", -2);
	}
	else
	{
		g_reset_load	=-2
	}
	slot.flush();
	slot.close();
	return auto_load;
}

function WriteResetInfo(num)
{
	slot = OpenFile("config.sav");
	slot.write("auto_load", num);
	slot.flush();
	slot.close();
}