var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function main_DoFSCommand(command, args) {
  var mainObj = InternetExplorer ? main : document.main;    
  if(command == "alert")
  {
  		alert(args);
  }
  if(command == "Visited")
  {
  		BVScorm_incomplete();
  }
  
  if(command == "SetLessonLocation")
  {  
		
		BVScorm_setlocation(args);
  }
  if(command == "SetSuspendData")
  {
		
  		BVScorm_setcoredata(args);
  }
  
  if(command == "SetScore")
  {
		
  		BVScorm_score(args);
  }
  
  if(command == "Complete")
  {
  		BVScorm_complete();
  }
  if(command == "quit")
  {
  		top.close();
		window.opener.top.fClose();
  }
  if(command== "OpenResource")
  {
		window.open(args,'TheNewpop1');

  }

  //
  // Place your code here...
  //
}
// Hook for Internet Explorer
if (navigator.appName && navigator.appName.indexOf("Microsoft") != -1 &&
	  navigator.userAgent.indexOf("Windows") != -1 && navigator.userAgent.indexOf("Windows 3.1") == -1) {
	document.write('<SCRIPT LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('Sub main_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call main_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}
