// Funcoes
// Funcoes
function login(){

var usuario = document.getElementById('usuario');

var senha = document.getElementById('senha');
if(usuario.value!=''){
	if(senha.value!=''){
		document.login.submit();
		document.login.reset();
	}else{
		alert('Por favor, entre com uma senha         \n\n\n');
		senha.focus();
	}	
}else{
	alert('Por favor, entre com usuário         \n\n\n');
	usuario.focus();
}



}

function hidetrail(){ 
document.getElementById('banners').style.display= "none";
}

function swf($arquivo,$largura,$altura,$title)
{
	document.writeln('<object type="application/x-shockwave-flash" data="' + $arquivo + '" width="' + $largura + '" height="' + $altura + '" title="' + $title + '">');
	document.writeln('<param name="movie" value="flash/' + $arquivo + '">');
	document.writeln('<param name="wmode" value="transparent">');
	document.writeln('<param name="menu" value="false">');
	document.writeln('<param name="quality" value="high">');
	document.writeln('</object>');
}

function open_popup(pagina) {
 window.open(pagina, 'open_popup', 'width=600, height=500, top=100, left=100'); 
} 
function trSetColor(linha,cor)
{
	if ( cor == '' || typeof(linha.style) == 'undefined') {
        return false;
    }
    if (typeof(document.getElementsByTagName) != 'undefined') {
        var celulas = linha.getElementsByTagName('td');
    }
    else if (typeof(linha.cells) != 'undefined') {
        var celulas = linha.cells;
    }
    else {
        return false;
    }

    var celulas_count  = celulas.length;
    for (var c = 0; c < celulas_count; c++) {
        celulas[c].style.backgroundColor = cor;
    }
    return true;
}


 function indique() {
 var top_indique = "/imagens/recomende_topo.png"
 window.open('../js/indicar/indique.php?url='+document.location.href+'&topo='+top_indique+'', 'Indicar', 'width=340, height=312, top=100, left=100'); 
} 



function changeColor(objDiv){
	if(objDiv.className == 'fontMenuOver'){	
		objDiv.className='fontMenu';
	}else{
		objDiv.className='fontMenuOver';
	}
}

function changeColor2(objDiv){
	if(objDiv.className == 'fontMenuOver2'){	
		objDiv.className='fontMenu2';
	}else{
		objDiv.className='fontMenuOver2';
	}
}



function printer(div){

 conte=document.getElementById(div).innerHTML;

 

 pop=window.open("","print","width=670,height=500,scrollbars=1");
pop.document.write('<script language="javascript" src="../ajax.js"></script>');
 pop.document.write('<link href="css/css.css" rel="stylesheet"/>');


 pop.document.write('<body leftmargin=0 topmargin=0 rightmargin=0 bottommargin=0>');

 pop.document.write('<center><table bgcolor=#ffffff><tr><td><img src=imagens/print_topo.png></td></tr><tr><td>');

 pop.document.write('<div style="width:100%">');

 pop.document.write('<div>');



pop.document.write('<table style="WIDTH: 100%; HEIGHT: 40px" height="40" cellspacing="0" cellpadding="0" width="100%" border="0"><tbody><tr><td class="titulo_padrao" valign="center" align="left" background="imagens/estrutura/print_titulo.jpg" height="40" >');




 pop.document.write('</td></tr></table>');

 pop.document.write('</div>');
 pop.document.write('<div id=print>');
 pop.document.write(conte);
pop.document.write('</div>');

 pop.document.write('</div>');

 pop.document.write('</td></tr><tr><td><span style="cursor:pointer" onclick="window.print();"><font size=1 face=verdana>&nbsp;&nbsp;&nbsp;&nbsp;<br><div align="right"><img src="imagens/bt_imprimir.png"></div></font></span><br></td></tr></table></center></body>');

pop.document.close();

}



function addSWF (URL, WIDTH, HEIGHT, TRANSPARENT)
{
document.write (' <object classid="clsid:27CDB6E-AE6D-11cf-96B8-444553540000" ');
document.write (' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ');
document.write (' width="'+ WIDTH +'" height="'+ HEIGHT +'">');
document.write (' <param name="movie" value="'+ URL +'" />');
document.write (' <param name="quality" value="high" />');

if ( TRANSPARENT ) {
  document.write (' <param name="Wmode" value="Transparent" />'); 
}

document.write (' <embed src="'+ URL +'" quality="high" ');

if ( TRANSPARENT ) {
document.write (' Wmode = "transparent" ');
}

document.write (' pluginspage="http://www.macromedia.com/go/getflashplayer" ');
document.write (' type="application/x-shockwave-flash" width="'+ WIDTH +'" height="'+ HEIGHT +'"></embed> ');
document.write (' </object>');

}

