var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
// Handle all the the FSCommand messages in a Flash movie
function flash_DoFSCommand(command, args) {
  var flashObj = InternetExplorer ? flash : document.flash;

  if (command == "status") {
    changeStatus(args);
  }

  if (command == "statusrestore") {
    changeStatusRestore();
  }

  if (command == "alert") {
    alert(args);
  }
}
// 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 flash_FSCommand(ByVal command, ByVal args)\n');
    document.write('  call flash_DoFSCommand(command, args)\n');
    document.write('end sub\n');
    document.write('</SCRIPT\> \n');
}

function changeStatus(mesg) {
  window.status = mesg;
}

function changeStatusRestore() {
  window.status = '';
}

function preloadImages() {
	if (document.images) {
		if (!document.preimglst)
			document.preimglst = new Array();
		var i, j = document.preimglst.length, a = preloadImages.arguments;
		for(i=0; i<a.length; i++) {
			if (a[i].indexOf("#") != 0) {
				document.preimglst[j]=new Image;
				document.preimglst[j++].src=a[i];
			}
		}
	}
}
