//---------------------------------------------------------------------------------
//
// FLASH & JS - Interacção entre flash e Javascript
// 
// Copyright: Sistemas Futuro
// Autor: Adao Santos <adao@sistemasfuturo.pt>
//---------------------------------------------------------------------------------

var SWFSource;
var SWFLoaded;
var SWFError;

function SWFInit(source) {
	
	SWFSource = eval("document."+source);
	if (typeof(SWFSource) == "undefined") {
		SWFLoaded = false;
		SWFError = "Flash ID não encontrado!";
		return;
	} else {
		SWFLoaded = true;
	}
}

// GotoAndPlay 
function SWFgtp(movie) {
	if (SWFLoaded == false) {
		window.status = "ERRO : " + SWFError;
		return false;
	} else {
		SWFSource.TGotoLabel('/', movie); 
		SWFSource.Play();
	}
 }

function SWFgtf(frame) {
		SWFSource.GotoFrame(frame);
		SWFSource.Play();
}