<SCRIPT LANGUAGE=JavaScript>

<!--

var movieName = "master_pl";



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]

  }

}



// Checks if movie is completely loaded.

// Returns true if yes, false if no.

function movieIsLoaded (theMovie) {

  if (typeof(theMovie) != "undefined") {

    return theMovie.PercentLoaded() == 100;

  } else {

    return false;

  }

}



//ta funkcja jest wywolywana ze strony w ramce glowna

function updateMenu(targetLabel) {

  if (movieIsLoaded(thisMovie(movieName))) {

    thisMovie(movieName).SetVariable("/:menu2set","" + targetLabel);

    thisMovie(movieName).SetVariable("/:changemenu","tak");

    //thisMovie(movieName).TGotoLabel("Scene 2", "" + targetLabel);

  }

  else {

  alert("nie zaladowany");

  }

}





var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;

// Handle all the the FSCommand messages in a Flash movie

function menu_DoFSCommand(command, args) {

  var menuObj = InternetExplorer ? menu : document.menu;

  //

  // 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 menu_FSCommand(ByVal command, ByVal args)\n');

	document.write('  call menu_DoFSCommand(command, args)\n');

	document.write('end sub\n');

	document.write('</SCRIPT\> \n');

}



function updateMenuNow() {

var pageNumber = document.location.href;

var hrefarray = pageNumber.split("=");

var position = hrefarray.length;

targetLabel = hrefarray[position-1];

if (targetLabel != "") {

updateMenu(targetLabel);

}

//document.write(targetLabel + '<br>');

}



//-->

</SCRIPT>


