function findNameandPass()
{
	document.GSRELeagueForm.name.value = document.getElementsByName("gsrelname")[0].value;
	document.GSRELeagueForm.password.value = document.getElementsByName("gsrelpass")[0].value;
	document.GSRELeagueForm.leader.value = document.getElementsByName("gsrellead")[0].value;
}
function doGym()
{
	findNameandPass();
	document.GSRELeagueForm.battletype.value = "gym";
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.submit();
}
function doTrainer(index)
{
	findNameandPass();
	document.GSRELeagueForm.battletype.value = "trainer";
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.index.value = index;
	document.GSRELeagueForm.submit();
}
function doWild(index)
{
	findNameandPass();
	document.GSRELeagueForm.battletype.value = "wild";
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.index.value = index;
	document.GSRELeagueForm.submit();
}
function doRare(index)
{
	findNameandPass();
	document.GSRELeagueForm.battletype.value = "rare";
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.index.value = index;
	document.GSRELeagueForm.submit();
}
function doEvent(index)
{
	findNameandPass();
	document.GSRELeagueForm.battletype.value = "event";
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.action = "http://www.realitysend.com/cgi-bin/relevent.pl";
	document.GSRELeagueForm.index.value = index;
	document.GSRELeagueForm.submit();
}
function doSpecial(index)
{
	findNameandPass();
	document.GSRELeagueForm.battletype.value = "special";
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.action = "http://www.realitysend.com/cgi-bin/relspecial.pl";
	document.GSRELeagueForm.index.value = index;
	document.GSRELeagueForm.submit();
}
function doPokeBox()
{
	findNameandPass();
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.action = "http://www.realitysend.com/cgi-bin/relpokebox.pl";
	document.GSRELeagueForm.submit();
}
function doShop()
{
	findNameandPass();
	document.GSRELeagueForm.action = "http://www.realitysend.com/cgi-bin/relshop.pl";
	document.GSRELeagueForm.origin.value = document.URL;
	document.GSRELeagueForm.submit();
}
document.write('<form action="http://www.realitysend.com/cgi-bin/relbattle.pl" method=post name="GSRELeagueForm"><input type=hidden name=battletype><input type=hidden name=index><input type=hidden name=origin><input type=hidden name=name><input type=hidden name=password><input type=hidden name=leader><input type=hidden name=ver value="gs"></form>');
