// POP UP
function popup(theURL, width, height, features) { 
	//"location=no,menubar=no,resiable=no,toolbar=no,scroollbars=yes"
	if(window.screen){
		per_ancho=(width/screen.width)*100;
		per_alto=(height/width)*100;
		win_ancho=(screen.width*per_ancho)/100;
		win_alto=(win_ancho*per_alto)/100;
		x=(screen.width-win_ancho)/2;
		y=(screen.height-win_alto)/2;
	}else{
		x=0;
		y=0;
		win_ancho=w;
		win_alto=y;
	}
	winfeatures=("top="+y+",left="+x+",width="+win_ancho+",height="+win_alto+","+features);
	window.open(theURL, 'popup', winfeatures);
}

function nada() {
   return;
}
//FLASH
function flash(versao, largura, altura, nome, modo, cor)
{
	/*
	versao = 8 .................. <- Versão do player
	largura = 200px ............. <- Largura do SWF
	altura = 200px .............. <- Altura do SWF
	id = nome ................... <- ID do arquivo
	nome = arquivo.swf .......... <- Caminho do SWF, essa opção não pode ser vazia
	modo = transparent/opaque ... <- Flash transparente ou opaco / pode ser vazia
	cor = #ffffff ............... <- Cor de fundo
	*/
	document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version="'+versao+',0,0,0" width="'+largura+'" height="'+altura+'">\n');
	document.write('<param name="allowScriptAccess" value="sameDomain">\n');
	document.write('<param name="movie" value="'+nome+'">\n');
	document.write('<param name="wmode" value="'+modo+'">\n');
	document.write('<param name="bgcolor" value="'+cor+'">\n');
	document.write('<embed src="'+nome+'" wmode="'+modo+'" bgcolor="'+cor+'" width="'+largura+'" height="'+altura+'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">\n');
	document.write('</object>\n');
}
// DATA - ÍNICIO
function data() {
	mdata = new Date();
	mhora = mdata.getHours();
	mminuto = mdata.getMinutes();
	msegundos = mdata.getSeconds();
	mdia = mdata.getDate();
	mdiasemana = mdata.getDay();
	mmes = mdata.getMonth();
	mano = mdata.getFullYear();
	if (mdiasemana == 0) {
		document.write("'Domingo, ");
	} else if (mdiasemana == 1) {
		document.write("Segunda-feira, ");
	} else if (mdiasemana == 2) {
		document.write("Ter&ccedil;a-feira, ");
	} else if (mdiasemana == 3) {
		document.write("Quarta-feira, ");
	} else if (mdiasemana == 4) {
		document.write("Quinta-feira, ");
	} else if (mdiasemana == 5) {
		document.write("Sexta-feira, ");
	} else if (mdiasemana == 6) {
		document.write("S&aacute;bado, ");
	}
	document.write(+mdia+' de ');
	if (mmes == 0) {
		document.write("janeiro de ");
	} else if (mmes == 1) {
		document.write("fevereiro de ");
	} else if (mmes == 2) {
		document.write("mar&ccedil;o de ");
	} else if (mmes == 3) {
		document.write("abril de ");
	} else if (mmes == 4) {
		document.write("maio de ");
	} else if (mmes == 5) {
		document.write("junho de ");
	} else if (mmes == 6) {
		document.write("julho de ");
	} else if (mmes == 7) {
		document.write("agosto de ");
	} else if (mmes == 8) {
		document.write("setembro de ");
	} else if (mmes == 9) {
		document.write("outubro de ");
	} else if (mmes == 10) {
		document.write("novembro de ");
	} else if (mmes == 11) {
		document.write("dezembro de ");
	}
	document.write(mano);
}
// DATA - FIM
// IS NUMERIC
//onKeyPress="return(IsNumeric(this,event))"
function IsNumeric(fld, e) 
{
	var strCheck = '0123456789';
	var whichCode = (window.Event) ? e.which : e.keyCode;
	key = String.fromCharCode(whichCode);
	if (strCheck.indexOf(key) == -1) return false;
}
//LAYER
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 MM_showHideLayers() { //v6.0
	var i,p,v,obj,args=MM_showHideLayers.arguments;
	for (i=0; i<(args.length-2); i+=3){
		if ((obj=MM_findObj(args[i]))!=null){
			v=args[i+2];
			if (obj.style){
				obj=obj.style;
				v=(v=='show')?'visible':(v=='hide')?'hidden':v;
			}
			if (obj.visibility=='hidden'){
				obj.visibility='visible';
			}
			else{
				obj.visibility='hidden';
			}
			
		}
	}
}

function mask(fld, e) 
{
	if(fld.value.length == 2){
		fld.value = fld.value + "/";
	}
	if(fld.value.length == 5 ){
		fld.value = fld.value + "/";
	}
	var strCheck = '0123456789';
	var whichCode = (window.Event) ? e.which : e.keyCode;
	key = String.fromCharCode(whichCode);
	if (strCheck.indexOf(key) == -1) return false;
}

/*POPUP DO RESULTADO DA PESQUISA NO EXTERIOR*/
function resultadoPopupShow(){
	document.getElementById("resultadoPopup").style.display = "block";
	document.getElementById("resultadoBackground").style.display = "block";
	document.getElementById("pesquisa").style.display = "none";
}
function resultadoPopupHide(){
	document.getElementById("resultadoPopup").style.display = "none";
	document.getElementById("resultadoBackground").style.display = "none";
	document.getElementById("resultadoFrame").src = "_load.php";
	document.getElementById("pesquisa").style.display = "block";
}

/*DETECTANDO A VERSÃO DO PLAYER DO FLASH*/
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Revision of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
// -----------------------------------------------------------------------------
// -->