//FLASH CONTROL FUNCTION
/*
function FlashControl(objStrNS,objStrIE,cmdName,frameNum) { //v2.0

  var objStr = (navigator.appName=='Netscape')?objStrNS:objStrIE;
  if ((objStr.indexOf('document.layers[')==0 && document.layers==null) ||
      (objStr.indexOf('document.all[')   ==0 && document.all   ==null))
    objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
  if (eval(objStr) != null)
    eval(objStr+'.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}
*/
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function FlashControl(objStr,x,cmdName,frameNum) { //v3.0
  var obj=MM_findObj(objStr);
  if (obj) eval('obj.'+cmdName+'('+((cmdName=='GotoFrame')?frameNum:'')+')');
}

//FlashControl('sdfsd','','Play');
//FlashControl('sdfsd','','GotoFrame','17');
//FlashControl('sdfsd','','StopPlay');
//FlashControl('sdfsd','','Rewind')">

function Goto(frm) { //goes to frame
FlashControl('menu','','GotoFrame',frm);
//FlashControl('document.embeds[0]','document.flashsuperior','GotoFrame',frm);
}

function Play() { //plays the movie
FlashControl('produtos','','Play');
//FlashControl('document.embeds[0]','document.flashsuperior','Play');
}

function FlashCombo(frm) { //combo that commands the goto and play
Goto(frm);
//Play();
}

function FlashCommand(frm) {// triggers the combo function and the NN6 workaround
top.topo.FlashCombo(frm);
}
