var MenuTimer = new Array();

function ExibeMenu (menu, posLeft) {
	var windowWidth = getInnerWidth(window);
	var pos = ((windowWidth-780)/2) + posLeft;
	for (x in MenuTimer) {
		MM_changeProp(x,'','style.visibility','hidden','DIV');
		clearTimeout(MenuTimer[menu]);
	}
	MM_changeProp(menu,'','style.left',pos+'px','DIV');
	MM_changeProp(menu,'','style.visibility','visible','DIV');
}
function OcultaMenu (menu) {
	MenuTimer[menu] = setTimeout("MM_changeProp('"+menu+"','','style.visibility','hidden','DIV')", 950);
}

function getInnerWidth(win) {
	var winWidth;
	if (document.compatMode == "CSS2Compat" || navigator.userAgent.indexOf('Gecko') != -1) {
		winWidth = parseInt(win.document.defaultView.getComputedStyle(document.documentElement, null).getPropertyValue("width"));
	} else if (document.compatMode == "CSS1Compat") {
		winWidth = win.document.documentElement.clientWidth;
	} else if (navigator.appName == 'Netscape') {
		winWidth = win.innerWidth;
	} else {
		winWidth = win.document.body.clientWidth;
	}
	return winWidth;
}

function MM_findObj(n, d) { //v3.0
  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); return x;
}

function MM_changeProp(objName,x,theProp,theValue) { //v6.0
  var obj = MM_findObj(objName);
  if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
    if (theValue == true || theValue == false) {
      eval("obj."+theProp+"="+theValue);
    } else {
      eval("obj."+theProp+"='"+theValue+"'");
    }
  }
}

function MM_pulaMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function ajuda(ajuda) 
{ jan = window.open(ajuda,"jan", "toolbar=no,scrollbars=yes,menu=no,width=420,height=520");}

function fotos(fotos) 
{ jan = window.open(fotos,"jan", "toolbar=no,scrollbars=no,menu=no,width=320,height=300");}