function globalnav($arquivo,$altura,$largura,$id){
    document.writeln('    <object id="globalnav-object" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + $largura + '" height="' + $altura + '" id="' + $id + '" name="' + $id + '">');
    document.writeln('        <param name="movie" value="' + $arquivo + '" />');
    document.writeln('        <param name="FlashVars" value="loc=en_US&htmlApp=false&gatewayURL=gwurl" />');
    document.writeln('        <param name="bgcolor" value="#ffffff" />');
    document.writeln('        <param name="menu" value="false" />');
    document.writeln('        <param name="quality" value="high" />');
    document.writeln('        <param name="salign" value="tl" />');
    document.writeln('        <param name="scale" value="noscale" />');
    document.writeln('        <param name="wmode" value="transparent" />');
    document.writeln('        <embed id="globalnav-embed" src="' + $arquivo + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" flashvars="loc=en_US&htmlApp=false&gatewayURL=gwurl" bgcolor="#ffffff" menu="false" quality="high" salign="tl" scale="noscale" id="' + $id + '" width="' + $largura + '" height="' + $altura + '"></embed>');
    document.writeln('    </object>');
}

function pop_open(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function vF(theURL) { //v2.0
  window.open(theURL,'Foto','scrollbars=yes,statusbar=no,width=650,height=600');
}

function Numero(e)
{
navegador = /msie/i.test(navigator.userAgent);
if (navegador)
var tecla = event.keyCode;
else
var tecla = e.which;

if(tecla > 47 && tecla < 58) // numeros de 0 a 9
return true;
else
{
if (tecla != 8) // backspace
return false;
else
return true;
}
}
/**  
* Função para aplicar máscara em campos de texto
* Copyright (c) 2008, Dirceu Bimonti Ivo - http://www.bimonti.net 
* All rights reserved. 
* @constructor  
*/ 

/* Version 0.27 */

/**  
  * Função Principal 
  * @param w - O elemento que será aplicado (normalmente this).
  * @param e - O evento para capturar a tecla e cancelar o backspace.
  * @param m - A máscara a ser aplicada.
  * @param r - Se a máscara deve ser aplicada da direita para a esquerda. Veja Exemplos.
  * @param a - 
  * @returns null  
  */
function maskIt(w,e,m,r,a){
    
    // Cancela se o evento for Backspace
    if (!e) var e = window.event
    if (e.keyCode) code = e.keyCode;
    else if (e.which) code = e.which;
    
    // Variáveis da função
    var txt  = (!r) ? w.value.replace(/[^\d]+/gi,'') : w.value.replace(/[^\d]+/gi,'').reverse();
    var mask = (!r) ? m : m.reverse();
    var pre  = (a ) ? a.pre : "";
    var pos  = (a ) ? a.pos : "";
    var ret  = "";

    if(code == 9 || code == 8 || txt.length == mask.replace(/[^#]+/g,'').length) return false;

    // Loop na máscara para aplicar os caracteres
    for(var x=0,y=0, z=mask.length;x<z && y<txt.length;){
        if(mask.charAt(x)!='#'){
            ret += mask.charAt(x); x++;
        } else{
            ret += txt.charAt(y); y++; x++;
        }
    }
    
    // Retorno da função
    ret = (!r) ? ret : ret.reverse()    
    w.value = pre+ret+pos;
}

// Novo método para o objeto 'String'
String.prototype.reverse = function(){
    return this.split('').reverse().join('');
};
/**  
* Função Só Númeross
*/
function soNumeros(e){
 //Caso Internet Explorer(IE) outros (Other)
 if (navigator.appName.indexOf('Microsoft') != -1){
 	clientNavigator = "IE";
 }else{
 	clientNavigator = "Other";
 }
 //Função permite digitação de números
 	if (clientNavigator == "IE"){
 		if (e.keyCode < 48 || e.keyCode > 57){
 			return false
 		}
 	}else{
 		if ((e.charCode < 48 || e.charCode > 57) && e.keyCode == 0){
 			return false
 		}
  }
}
// JavaScript Document
function dataen(id) {
  document.getElementById(id).maxlength=10;
  obj = document.getElementById(id).value;
  if (obj.length == 2) {
    document.getElementById(id).value = (obj+"/");
  }
  if (obj.length == 5) {
    document.getElementById(id).value = (obj+"/");
  }
  if (obj.length == 10) {
    document.getElementById(id).value = (obj.substring(6,10)+"-"+obj.substring(3,5)+"-"+obj.substring(0,2));
	document.getElementById(id).blur();
  }
  if (obj.length < 10) {
	document.getElementById(id).focus();  
  }
  dia = (obj.substring(0,2));
  if (dia > 31 || dia == 00) {
	document.getElementById(id).value = "";
  }
  mes = (obj.substr(3,5));
  if (mes > 12 || dia == 00) {
	document.getElementById(id).value = (obj.substring(0,3));
  }
}
