function enableActiveX (containerID)
// Use it, improve it
// by Dirk Alban Adler // KLITSCHE.DE
{
	// No IE = no need to enable
    if (getInternetExplorerVersion () != -1 || navigator.appName == 'Opera')
    {
        // Get container
        var container = document.getElementById (containerID);
        // Get html in noscript 
        var html = container.innerHTML; 
        // Write html back to container
        container.innerHTML = html;
    }
}
function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// Found at: 
// http://msdn.microsoft.com/workshop/author/dhtml/overview/browserdetection.asp
{
	var rv = -1; // Return value assumes failure
    if (navigator.appName == 'Microsoft Internet Explorer')
    {
        var ua = navigator.userAgent;
        var re  = new RegExp ("MSIE ([0-9]{1,}[\.0-9]{0,})");
        if (re.exec (ua) != null)
        {
        	rv = parseFloat (RegExp.$1);
        }
    }
	
    return rv;
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}




var movieName = "testcommand";

function waitForLoading(theFrame){
	var dummy = 0;
	do {
	  if (movieIsLoaded(thisMovie(movieName))){
		  go(theFrame);
		  break;
		  }
	 dummy++;
	  	
	} while (movieIsLoaded(thisMovie(movieName))== false && dummy < 10);
}

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;
  }
}


function go(theFrame) {
    thisMovie(movieName).GotoFrame(theFrame);
}

