firstfocus = 0;

if (document.images)
	{
	 button_home_over= new Image(52,18);
	 button_home_over.src="images/button_home_over.gif";  

	 button_members_over= new Image(78,18);
	 button_members_over.src="images/button_members_over.gif";  

	 button_wars_over= new Image(49,18);
	 button_wars_over.src="images/button_wars_over.gif";  

	 button_forum_over= new Image(54,18);
	 button_forum_over.src="images/button_forum_over.gif";  

	 button_tagwall_over= new Image(64,18);
	 button_tagwall_over.src="images/button_tagwall_over.gif";  

	 button_gallery_over= new Image(64,18);
	 button_gallery_over.src="images/button_gallery_over.gif";  

	 button_files_over= new Image(50,18);
	 button_files_over.src="images/button_files_over.gif";  

	 button_links_over= new Image(52,18);
	 button_links_over.src="images/button_links_over.gif";  

	 button_about_over= new Image(56,18);
	 button_about_over.src="images/button_about_over.gif";  

	}

function imgswap(button)
{
	if ((button.src.substr((button.src.length - 9),(button.src.length - 4)))=="_over.gif")
	{
		button.src = button.src.substr(0,(button.src.length - 9)) + ".gif";
	} else {
		button.src = button.src.substr(0,(button.src.length - 4)) + "_over.gif";
	}
}	
function jumpToLeague(lid)
{
	if (lid!=0)
	{
		location = "leagueinfo.php?leagueid=" + lid;
	}
}

function jumpToMap(mid)
{
	if (mid!=0)
	{
		location = "map.php?mapid=" + mid;
	}
}

function showScreenShot(matchmap,mapname,side,sswidth,ssheight)
{
	sshot_url = "screenshot.php?matchmap=" + matchmap + "&mapname=" + mapname + "&side=" + side;
	window_title = "dta_sshot_" + matchmap + "_" + side;
	sshot_arguments = "width=" + sswidth + ",height=" + ssheight + ",innerwidth=" + sswidth + ",innerheight=" + ssheight + ",directories=no,location=no,menubar=no,scrollbars=no,status=yes,toolbar=no,resizable=no,top=30,left=30,screenX=30,screenY=30";
	window.open(sshot_url,window_title,sshot_arguments);
}

function setAvailCell(matchid,matchav)
{
	if (matchav=='2')
	{
//		alert("you are set as AVAILABLE for this match");
//		alert('match'+matchid+'_avail');	
//		var cellclass = document.getElementById('match'+matchid+'_avail').class;
//		alert (cellclass);
	}
	if (matchav=='1')
	{
//		alert("you are set as MAYBE for this match");
	}
	if (matchav=='0')
	{
//		alert("you are set as NOT AVAILABLE for this match");
	}
}