function checkFormContact(form)
{
   if (form.name.value == "")
   {
   	  alert("Please enter your name.");
	  return false;
   }
   
	//Make sure that the email field contains a '@' and a '.'
    if (! checkEmail(form.email.value))
	{
		alert("Please enter a valid email.");
		form.email.focus();				
		return false;	
	}
}

function donate()
{
	document.donate.submit();
}

var splashIndex = 1;
function changeSplash()
{
	var intr = 5000;
	var lastImageIndex = 5;
	
	if (document.images)
	{
		document.getElementById('splash').src = eval('img_splash'+ splashIndex + '.src');
		splashIndex++;
		if ( splashIndex == lastImageIndex ) splashIndex = 1;

		setTimeout("changeSplash()", intr);			
	}
}

var rotateIndex = 1;
function changeInMemoryImages()
{
	var intr = 3000;
	var lastImageIndex = 34;
	
	if (document.images)
	{
		document.getElementById('inmemory').src = eval('img_inmemory'+ rotateIndex + '.src');
		rotateIndex++;
		if ( rotateIndex == lastImageIndex ) rotateIndex = 1;

		setTimeout("changeInMemoryImages()", intr);			
	}
}

function checkEmail(email)
{
    var regEx = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
    if ( ! regEx.test( email ) )	
		return false;
	else
		return true;
}// JavaScript Document