function doCloseWindow()
{
top.window.close();
}

function getLessonLocation()
{
			//get the flash object
	var flashMovie = getFlashMovieObject("fscommand");
 
	if (SCOGetValue('cmi.core.lesson_location') == "")
	{
		//flashMovie.goToFrame("1");
	}else{
		var strVal = SCOGetValue('cmi.core.lesson_location');
		
		intLocation = parseInt(strVal);
		if (isNaN(intLocation) || intLocation == "" || intLocation == undefined || intLocation == "undefined") 
		{
			intLocation = 1;
		}
		flashMovie.goToFrame( strVal - 1 );
	}
}
function setLessonLocation(val)
{
	if(val != "" || val!= null || typeof(val) != 'undefined')
	{
		SCOSetValue('cmi.core.lesson_location',val.toString());
	}
}
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);
  }
}
function setLessonStatus(val)
{
	SCOSetValue('cmi.core.lesson_status',val)
}
