﻿  function vertical() { 

   var navItems = document.getElementById("nav").getElementsByTagName("li"); 
    
   for (var i=0; i< navItems.length; i++) { 
      if(navItems[i].className == "submenu") { 
         navItems[i].onmouseover=function() {this.getElementsByTagName('ul')[0].style.display="block";this.style.backgroundColor = 
"#eaeaea";} 
         navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";this.style.backgroundColor = 
"#FFFFFF";} 
      } 
   } 

} 

function horizontal() { 

   var navItems = document.getElementById("barra").getElementsByTagName("li"); 
    
   for (var i=0; i< navItems.length; i++) { 
      if((navItems[i].className == "menuvertical") || (navItems[i].className == "submenu")) 
      { 
         if(navItems[i].getElementsByTagName('ul')[0] != null) 
         { 
            navItems[i].onmouseover=function() {this.getElementsByTagName('ul')[0].style.display="block";this.style.backgroundColor="#f9f9f9";} 
            navItems[i].onmouseout=function() {this.getElementsByTagName('ul')[0].style.display="none";this.style.backgroundColor = 
"#FFFFFF";} 
         } 
      } 
   } 

} 


function abre (link, tipo) {
	
	// concatena pagina atual no link
	if (tipo == 1)
		window.open(link + document.location.href, 'links');
	else
		window.open(link, 'links');
}

function isShow(object) {
		//var img_id = "img_" + object.id.substr(8, 8);
	
		if(object.style.display=="none") {
		   object.style.display = "inline";
		   
	
		   //document.getElementById(img_id).src = "del.gif";
		}
		else {
		   object.style.display = "none";
		   //document.getElementById(img_id).src = "../../imgs/ico_lupa.jpg";
		}
	  }

 function verificaKeyPress(obj, max)

{

 if (obj.value.length == max)

     {

        event.returnValue = false;

     }

}

 

function verificaKeyUp(obj, max)

{

    if (obj.value.length > max)

  {

      obj.value = obj.value.substr(0,max);

   }

}



function NovaJanela(pagina,nome,w,h,scroll){
    var win = null;
	LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
	TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
	settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable'
	win = window.open(pagina,nome,settings);
}
 
   

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>');

}