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);
  }
}

// Depreciated.
function ReceiveDataFromFlashMovie()
{
	var flashMovie=getFlashMovieObject("imageSlider");
	var sbid_val=flashMovie.GetVariable("/:sbid");
	document.controller.sbid.value=sbid_val;
	
	var parent_val=flashMovie.GetVariable("/:parentId");
	document.controller.parent.value=parent_val;
	
	if (sbid_val == ""){
		document.controller.add.style.visibility='hidden';	
		document.controller.skip.style.visibility='hidden';	
		document.controller.comment.style.visibility='hidden';	
		document.getElementById('commentWould').innerHTML='You have not selected an item to add to your scrapbook.  Please select an item first.';
		document.getElementById('commentLike').innerHTML='';
	} else {
		document.controller.add.style.visibility='visible';	
		document.controller.skip.style.visibility='visible';
		document.controller.comment.style.visibility='visible';	
		document.getElementById('commentWould').innerHTML='Would you like to add a comment to this image:';
		document.getElementById('commentLike').innerHTML='Comment<br />(Eg, i like the taps in this image.)';
	}
}

function ReceiveDataFromFlashMovieScrapbookjQuery()
{
	var flashMovie=getFlashMovieObject("imageSlider");
	var sbid_val=flashMovie.GetVariable("/:sbid");
	
	return(sbid_val);
}

function ReceiveDataFromFlashMovieHintsjQuery()
{
	var flashMovie=getFlashMovieObject("imageSlider");
	var hint_val=flashMovie.GetVariable("/:hint");
	
	return(hint_val);
}
