﻿function carregarVisualizador(animacao, container, altura, largura, titulo)
{
	var element = document.getElementById(container);
	var htm = new String();
    htm = '';
    htm = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+largura+'" height="'+altura+'" title="'+titulo+'">';
    htm += '<param name="movie" value="'+animacao+'" />';
    htm += '<param name="quality" value="high" />';
    htm += '<param name="WMode" value="Transparent"/>';
    htm += '<embed src="'+animacao+'" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="'+largura+'" height="'+altura+'" wmode="transparent"></embed>';
    htm += '</object>';
    element.innerHTML += htm;
}

function PlayPrayerSound(value) 
{ 
if(value){ 
document.getElementById('bgsound').play(); 
} else{ document.getElementById('bgsound').stop();} 
} 

function mostraDiv(e){ 
 document.getElementById(e).style.display = ''; 
 if (e == 'ON'){ 
  document.getElementById('OFF').style.display = 'none';
 }else if(e == 'OFF'){
  document.getElementById('ON').style.display = 'none';  
 }
} 

function Mascara(objeto){ 
   if(objeto.value.length == 0)
     objeto.value = '(' + objeto.value;

   if(objeto.value.length == 3)
      objeto.value = objeto.value + ') ';

 if(objeto.value.length == 9)
     objeto.value = objeto.value + '-';
//     <asp:TextBox ID="tbTel" runat="server" onkeypress="Mascara(this);" CssClass="TextBox" Width="105px" MaxLength="8"></asp:TextBox>
}
