function sixtySecondTour()
{
	/*
		The only reason that demoMovie would not be equal to 60secondtour.swf 
		would be if a different intro movie was played initially as in the www.time4learning.com/demos.shtm page
		
		Also
	*/
	$("#demos_div").html('');				
	$("#demos_div").hide();	
	$("#airhockey_div").hide();		
	$("#oneminutetour_div").show();
	$("#playground_div").hide();
	$("#lessons_div").hide();


	movieObject = getFlashMovieObject('oneminutetour');
	if (movieObject)
	{
		if (navigator.appName.indexOf("Microsoft Internet")!==-1)
			movieObject.Play();
		else
		{
		}
		
	}

}

function tryThePlayground()
{
	stopAndRewind();
	$("#demos_div").html('');		
	$("#demos_div").hide();	
	$("#airhockey_div").hide();		
	$("#oneminutetour_div").hide();
	$("#playground_div").show();
	$("#lessons_div").hide();
}

function stopAndRewind()
{
	movieObject = getFlashMovieObject('oneminutetour');
	if (movieObject)
	{
		if (navigator.appName.indexOf("Microsoft Internet")!==-1)
		{
			movieObject.Rewind();
			movieObject.StopPlay();
		} 
		else
		{
		}
	}
}

function tryTheLessons()
{ 
	stopAndRewind();
	$("#demos_div").html('');		
	$("#demos_div").hide();	
	$("#airhockey_div").hide();		
	$("#oneminutetour_div").hide();
	$("#playground_div").hide();
	$("#lessons_div").show();
}

function loadDemo(flashDemo)
{
	$("#demos_div").show();
	var so = new SWFObject(flashDemo, "flashDemo", "570", "382", "6", "#BDBEDB");
	so.addParam("quality","high");
	so.addParam("play","true");
	so.write("demos_div");
	$("#oneminutetour_div").hide();
	$("#playground_div").hide();
	$("#lessons_div").hide();	
	$("#airhockey_div").hide();			
	return false;
}

function loadAirHockey()
{
	$("#airhockey_div").show();
	$("#oneminutetour_div").hide();
	$("#playground_div").hide();
	$("#lessons_div").hide();	
	return false;
}

function getFlashMovieObject(movieName)
{
  if (window.document[movieName]) 
  {
      return window.document[movieName];
  }
  if (navigator.appName.indexOf("Microsoft Internet")==-1)
  {
    if (document.embeds && document.embeds[movieName])
      return document.embeds[movieName]; 
  }
  else // if (navigator.appName.indexOf("Microsoft Internet")!=-1)
  {
    return document.getElementById(movieName);
  }
}