	var myWindow;

	function abrirJanelaCentralizada(url, largura, altura) {
		//var width = 500;
		//var height = 150;
		var width = largura;
		var height = altura;
		var left = parseInt((screen.availWidth/2) - (width/2));
		var top = parseInt((screen.availHeight/2) - (height/2));
		var windowFeatures = "width=" + width + ",height=" + height + ",status,resizable,left=" + left + ",top=" + top + "screenX=" + left + ",screenY=" + top;
		myWindow = window.open(url, "subWind", windowFeatures);
	}
	

	// TOOLTIP
	var offsetfromcursorX=12 //Customize x offset of tooltip
	var offsetfromcursorY=10 //Customize y offset of tooltip
	
	var offsetdivfrompointerX=12 //Customize x offset of tooltip DIV relative to pointer image
	var offsetdivfrompointerY=14 //14 Customize y offset of tooltip DIV relative to pointer image. Tip: Set it to (height_of_pointer_image-1).
	
	document.write('<div align="center" id="dhtmltooltip"></div>') //write out tooltip DIV
	document.write('<img id="dhtmlpointer" src="/images/arrow2.gif">') //write out pointer image
	
	var ie=document.all
	var ns6=document.getElementById && !document.all
	var enabletip=false
	if (ie||ns6)
	var tipobj=document.all? document.all["dhtmltooltip"] : document.getElementById? document.getElementById("dhtmltooltip") : ""
	
	var pointerobj=document.all? document.all["dhtmlpointer"] : document.getElementById? document.getElementById("dhtmlpointer") : ""
	
	function ietruebody(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}
	
	function ddrivetip(thetext, thewidth, thecolor){
	if (ns6||ie){
	if (typeof thewidth!="undefined") tipobj.style.width=thewidth+"px"
	if (typeof thecolor!="undefined" && thecolor!="") tipobj.style.backgroundColor=thecolor
	tipobj.innerHTML=thetext
	enabletip=true
	return false
	}
	}
	
	function positiontip(e){
	if (enabletip){
	var nondefaultpos=false
	var curX=(ns6)?e.pageX : event.clientX+ietruebody().scrollLeft;
	var curY=(ns6)?e.pageY : event.clientY+ietruebody().scrollTop;
	//Find out how close the mouse is to the corner of the window
	var winwidth=ie&&!window.opera? ietruebody().clientWidth : window.innerWidth-20
	var winheight=ie&&!window.opera? ietruebody().clientHeight : window.innerHeight-20
	
	var rightedge=ie&&!window.opera? winwidth-event.clientX-offsetfromcursorX : winwidth-e.clientX-offsetfromcursorX
	var bottomedge=ie&&!window.opera? winheight-event.clientY-offsetfromcursorY : winheight-e.clientY-offsetfromcursorY
	
	var leftedge=(offsetfromcursorX<0)? offsetfromcursorX*(-1) : -1000
	
	//if the horizontal distance isn't enough to accomodate the width of the context menu
	if (rightedge<tipobj.offsetWidth){
	//move the horizontal position of the menu to the left by it's width
	tipobj.style.left=curX-tipobj.offsetWidth+"px"
	nondefaultpos=true
	}
	else if (curX<leftedge)
	tipobj.style.left="5px"
	else{
	//position the horizontal position of the menu where the mouse is positioned
	tipobj.style.left=curX+offsetfromcursorX-offsetdivfrompointerX+"px"
	pointerobj.style.left=curX+offsetfromcursorX+"px"
	}
	
	//same concept with the vertical position
	if (bottomedge<tipobj.offsetHeight){
	tipobj.style.top=curY-tipobj.offsetHeight-offsetfromcursorY+"px"
	nondefaultpos=true
	}
	else{
	tipobj.style.top=curY+offsetfromcursorY+offsetdivfrompointerY+"px"
	pointerobj.style.top=curY+offsetfromcursorY+"px"
	}
	tipobj.style.visibility="visible"
	if (!nondefaultpos)
	pointerobj.style.visibility="visible"
	else
	pointerobj.style.visibility="hidden"
	}
	}
	
	function hideddrivetip(){
	if (ns6||ie){
	enabletip=false
	tipobj.style.visibility="hidden"
	pointerobj.style.visibility="hidden"
	tipobj.style.left="-1000px"
	tipobj.style.backgroundColor=''
	tipobj.style.width=''
	}
	}
	
	document.onmousemove=positiontip
	// TOOLTIP
	
	
	
	
// Menu Javascript
	
	var GlobalMenuItem = "";
	function MenuRollOver(MenuItem, Over) {
		if (GlobalMenuItem) {
			eval ("document.images." + GlobalMenuItem + ".src = '/images/mnu_" + GlobalMenuItem + ".jpg'");
		}
		//if (Over == true) {
		//	eval ("document.images." + MenuItem + ".src = '/images/mn_" + MenuItem + ".gif'");
		//}
		GlobalMenuItem = MenuItem;
	}
	
	// Conteudo para Sistemas
	var Sistemas = new Array();
	Sistemas[0] = "<a href='http://intranet.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Intranet</a>";
	Sistemas[1] = "<a href='http://mail.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_owa.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Outlook Web Access</a>";
	Sistemas[2] = "<a href='http://isosystem.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_iso.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;ISOSYSTEM</a>";
	Sistemas[3] = "<a href='http://sogi6.sogi.com.br' target='_blank'><img src='/images/ico_menu_sogi.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;SOGI</a>";
	Sistemas[4] = "<a href='http://treinamento.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_treinamento.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Treinamento Online</a>";
	
	// Conteudo para Sistemas
	var Systems = new Array();
	Systems[0] = "<a href='http://intranet.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Intranet</a>";
	Systems[1] = "<a href='http://mail.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_owa.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Outlook Web Access</a>";
	Systems[2] = "<a href='http://isosystem.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_iso.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;ISOSYSTEM</a>";
	Systems[3] = "<a href='http://sogi6.sogi.com.br' target='_blank'><img src='/images/ico_menu_sogi.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;SOGI</a>";
	Systems[4] = "<a href='http://treinamento.oceanicasub.com.br' target='_blank'><img src='/images/ico_menu_treinamento.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Online Training</a>";
	
	var Oceanica = new Array();
	Oceanica[0] = "<a href='/portugues/oceanica-engenharia-submarina/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Sobre n&oacute;s</a>";
	Oceanica[1] = "<a href='/portugues/certificados-qualidade-iso-9001-14001-18001/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Nossos certificados</a>";
	Oceanica[2] = "<a href='/portugues/missao-visao-valores/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Miss&atilde;o, vis&atilde;o e valores</a>";
	Oceanica[3] = "<a href='/portugues/politica-sistema-gestao-integrado-qualidade/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Pol&iacute;tica do sistema de gest&atilde;o integrado</a>";
	Oceanica[4] = "<a href='/portugues/download-informativos/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Informativos</a>";

	var AboutOceanica = new Array();
	AboutOceanica[0] = "<a href='/english/about-us-oceanica-enginneer/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;About us</a>";
	AboutOceanica[1] = "<a href='/english/certificates-quality-iso-90001-14001-18001/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Our certificates</a>";
	AboutOceanica[2] = "<a href='/english/mission-vision-values/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Mission, vision and values</a>";
	AboutOceanica[3] = "<a href='/english/quality-politics'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Oceānica Politics</a>";
	AboutOceanica[4] = "<a href='/english/download-journal/'><img src='/images/ico_menu_intranet.gif' width='16' height='16' align='absmiddle' border='0' />&nbsp;&nbsp;Journal</a>";

	
		
	var menuwidth = "202px" //Tamanho do menu
	var menubgcolor = "#ffffff"; //Cor do background
	var disappeardelay = 250; //o menu vai desaparecer em quantos MS
	var hidemenu_onclick = "no" //hide menu when user clicks within menu?
	
	var ie4=document.all
	var ns6=document.getElementById&&!document.all
	
	if (ie4||ns6)
	document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
	
	function getposOffset(what, offsettype){
		var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
		var parentEl=what.offsetParent;
		while (parentEl!=null){
		totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
		}
		return totaloffset;
	}
	
	
	function showhide(obj, e, visible, hidden, menuwidth){
		if (ie4||ns6)
		dropmenuobj.style.left=dropmenuobj.style.top=-500
		if (menuwidth!=""){
		dropmenuobj.widthobj=dropmenuobj.style
		dropmenuobj.widthobj.width=menuwidth
		}
		if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
			obj.visibility=visible
			else if (e.type=="click")
			obj.visibility=hidden
	}
	
	function iecompattest(){
		return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
		}
		
		function clearbrowseredge(obj, whichedge){
		var edgeoffset=0
		if (whichedge=="rightedge"){
		var windowedge='800';
		//ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
		if (windowedge-dropmenuobj.x < dropmenuobj.contentmeasure)
		edgeoffset=dropmenuobj.contentmeasure-obj.offsetWidth
		}
		else{
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
		if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure)
		edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
		}
		return edgeoffset
	}
	
	function populatemenu(what){
		if (ie4||ns6)
		dropmenuobj.innerHTML=what.join("")
	}
	
	
	function dropdownmenu(obj, e, menucontents, menuwidth){
		if (window.event) event.cancelBubble=true
		else if (e.stopPropagation) e.stopPropagation()
		clearhidemenu()
		dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
		populatemenu(menucontents)
		
		if (ie4||ns6){
		showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
		dropmenuobj.x=getposOffset(obj, "left")
		dropmenuobj.y=getposOffset(obj, "top")
		//dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+"px" - Menu Automatico para direita ou esquerda
		//dropmenuobj.style.left=dropmenuobj.x+"px"
		dropmenuobj.style.left= dropmenuobj.x+ 1 + "px" // TAMANHO DA JANELA ESQUERDA
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+obj.offsetHeight + 5 + "px"
		//dropmenuobj.style.filter = "alpha(opacity=" + 93 + ")";
		//dropmenuobj.style.opacity = "0.53";
	
	}
	
	return clickreturnvalue()
	}
	
	function clickreturnvalue(){
		if (ie4||ns6) return false
		else return true
	}
	
	function contains_ns6(a, b) {
		while (b.parentNode)
		if ((b = b.parentNode) == a)
		return true;
		return false;
	}
	
	function dynamichide(e){
		if (ie4&&!dropmenuobj.contains(e.toElement))
		delayhidemenu()
		else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
		delayhidemenu()
	}
	
	function hidemenu(e){
	
		if(GlobalMenuItem == '')
		return
	
		eval ("document.images." + GlobalMenuItem + ".src = '/images/mnu_" + GlobalMenuItem + ".jpg'");
		if (typeof dropmenuobj!="undefined"){
		if (ie4||ns6)
		dropmenuobj.style.visibility="hidden"
		}
	}
	
	function delayhidemenu(){
		if (ie4||ns6)
		delayhide=setTimeout("hidemenu()",disappeardelay)
	}
	
	function clearhidemenu(){
		if (typeof delayhide!="undefined")
		clearTimeout(delayhide)
	}
	
	if (hidemenu_onclick=="yes")
		document.onclick=hidemenu
		
		
	
	
	//window.onload=_body_onload();
	//window.onload = function()
	//{
	      
		//javascript:startList;
		//javascript:_body_onload();
		//javascript:iBox.showURL('chamada_feira_brasil_offshore_2011.html');
		
		 
	
	  //logs.Usuario.focus();
	//}
	
		
	

