﻿function openwin(args) {
    openwidth = 400;
    openheight = 500;
    width=(screen.width/2)- (openwidth/2)
    height=(screen.height/2)- (openheight/2)
    window.open(args,'','toolbar=0,scrollbars=1,location=0,status=0,menubars=0,resizable=1,width='+openwidth+',height='+openheight+',left=width,top=height')
}



var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

// Handle all the the FSCommand messages in a Flash movie
function Viewer_DoFSCommand(command, args) {
    var ViewerObj = InternetExplorer ? Viewer : document.Viewer;

    alert(command);
    if (command == "test") {
        alert(args);
    }
    if (command == "filename") {
        filename(args);
    }
    if (command == "openwin") {
        openwin(args);
    }
    if (command == "openpage") {
    }
}

// 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 Viewer_FSCommand(ByVal command, ByVal args)\n');
	document.write('  call Viewer_DoFSCommand(command, args)\n');
	document.write('end sub\n');
	document.write('</SCRIPT\> \n');
}

function quickflashlink(url) {
    //alert(url);
	window.open(url);
}

function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  } else {
    return document[movieName]
  }
}

// Utility function
function isUndefined(value)
{
    var undef;
    return value == undef;
}