function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function Gera_Alerta_JS(texto){
	alert(texto);
}

function janelaImpressao(urlLink)
{
	var largura = screen.width;
	var altura = screen.height;
	var pos_largura = (largura/2) - 360;
	var pos_altura = (altura/2) - 260;
	open(urlLink,'Impressao','resizable=yes,scrollbars=1,menubar=0,location=0,left=' + pos_largura + ',top=' + pos_altura + ',resizable=0,toolbar=0,status=1,width=640,height=480') ;
}

function roll(img_name, img_src){
   document[img_name].src = img_src;
}

/************** CHECA SE CAMPO JÁ FOI PREENCHIDO, SE NÃO, RETORNA AO ESTADO INICIAL */
function ChecaCampo(idField,strMsg){
	if(idField.value == strMsg){
		idField.value = "";
	}else
		if(idField.value == ""){
			idField.value = strMsg;
	}
}

/*********************************************************/
/* VALIDA E-MAIL */

function checa_mail(mail){
	var str, arroba, ponto
	str=mail
	for (i=0; i < (mail.length-1); i++){
		if ((i > 0) && (str.charAt(i)=="@")) {
			arroba=true
		} else
			if ((str.charAt(i)==".") && (arroba)) {
				ponto=true
			}
	}
	if ((! arroba) || (! ponto))
		return false
	else
		return true
}

/* FLASH */

function EscreveFlash(archivo,ancho,alto,version,name) // tutorial by IVI CONCEPT - www.ivi-concept.com
  {
  var quality="high"; // calidad de visualización de la peli
  var bgcolor="#fb6d00"; // color de fondo de la peli
  var wmode="transparent"; // color de fondo de la peli
  // --fin parametros--------------------------------------------------
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+version+'" name='+name+' width='+ancho+' height='+alto+'>\n');
document.write('<param name="movie" value='+archivo+' />\n');
document.write('<param name="quality" value='+quality+'>\n');
document.write('<param name="bgcolor" value='+bgcolor+'>\n');
document.write('<param name="wmode" value='+wmode+'>\n');
document.write('<embed src='+archivo+' wmode='+wmode+' bgcolor='+bgcolor+' quality='+quality+' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" id='+name+' width='+ancho+' height='+alto+'></embed>');
document.write('</object>\n');
}

/* Pop-Up  */
function popEsqueci(mypage, myname, w, h, chscroll) {
	var winLargura = (screen.width - w) / 2;
	var winAltura = (screen.height - h) / 2;
	winprops = 'height='+h+',width='+w+',top='+winAltura+',left='+winLargura+',scrollbars='+chscroll+',resizable'
	win = window.open(mypage, myname, winprops)
	
	if (parseInt(navigator.appVersion) >= 4){
	win.window.focus();
	}
}