/*
	www.sportago.com/scripts/index.js
	Chad Krsek for Sportago
	ckrsek@yahoo.com
	Modified 12/17/02
*/

function show(vis)
{
	document.getElementById(vis).style.visibility="visible";
}

function hide(vis)
{
	document.getElementById(vis).style.visibility="hidden";
}

function validateContact()
{
	if(formIsGood())
	{
		document.Contact.submit();
	}
}

function formIsGood()
{
	if((document.Contact.realname.value == null) || (document.Contact.realname.value == ""))
	{
		alert("Please enter your name");
		document.Contact.realname.focus();
		return false;
	}
	if((document.Contact.email.value == null) || (document.Contact.email.value == ""))
	{
		alert("Please enter your email address");
		document.Contact.email.focus();
		return false;
	}
	return true;
}

function newWindow(location, name, attributes) 
{
	opened = window.open(location, name, attributes);
}

function change(off, on)
{
	document.getElementById(off).style.visibility = "hidden";
	document.getElementById(on).style.visibility = "visible";
	document.getElementById(on).style.left = 268;
}

function preloadImages()
{
	var d=document; 
	if(d.images)
	{ 
		if(!d.imgArray) 
		{
			d.imgArray=new Array();
		}
		var i, j=d.imgArray.length, args=preloadImages.arguments; 
		for(i=0; i < args.length; i++)
		{
			if(args[i].indexOf("#") != 0)
			{ 
				d.imgArray[j] = new Image; 
				d.imgArray[j++].src = args[i];
			}
		}
	}
}

function slide(pos, on)
{
	i = parseInt(pos);
	pass = on;

	if(i >= 268)
	{
		i-=10;
		document.getElementById(pass).style.left = pos;
		setTimeout("slide(i, pass)", 3);
	}
}


