var BGColorDefault = '#153B63';
var BGColorHighlight = '#1B528C';
var BGColorActive = '#2269B5'; //2269B5

var BGColorDefaulthell = '#84BE7B';
var BGColorHighlighthell = '#33CC66';

var CurMenuItemID = '';

var AlphabetImages = new Array ();

function MenuHighlight (MenuItemID, Highlight) {

	if (document.all) {
		var DocMenuItemTD = eval ('document.all.menutd' + MenuItemID);
		var DocMenuItemTDb = eval ('document.all.menutd' + MenuItemID + 'b' );
		var DocMenuItemTDc = eval ('document.all.menutd' + MenuItemID + 'c' );
		var Color = Highlight ? BGColorHighlight : BGColorDefault;
		if (MenuItemID != CurMenuItemID) DocMenuItemTD.style.backgroundColor = Color;
		if (MenuItemID != CurMenuItemID) DocMenuItemTDb.style.backgroundColor = Color;
		//if (MenuItemID != CurMenuItemID) DocMenuItemTDc.style.backgroundColor = Color;
	}

} // function MenuHighlight


function findTag(eItemMenu) {
	var objATagMenu = new Object();
	objATagMenu = eItemMenu.all.tags("TD").item(0)
	return objATagMenu;
}
function MenuOver(eItemMenu){
	eItemMenu.DefaultClass = eItemMenu.className;
	eItemMenu.className = "bgAzulMenu2";
	eItemMenu.style.cursor = "pointer";
}
function MenuOut(eItemMenu){
	eItemMenu.className = eItemMenu.DefaultClass;
}









function MenuHighlighthell (MenuItemID, Highlight) {

	if (document.all) {
		var DocMenuItemTD = eval ('document.all.menutd' + MenuItemID);
		var Color = Highlight ? BGColorHighlighthell : BGColorDefaulthell;
		if (MenuItemID != CurMenuItemID) DocMenuItemTD.style.backgroundColor = Color;
	}

} // function MenuHighlight


function PageStartup (MenuID) {

	var a = '';
	
	for (var i=65; i< 65+26; i++) {
		a = String.fromCharCode (i);
		AlphabetImages [a] = new Image;
		AlphabetImages [a].src = 'art/letras/' + String.fromCharCode (i + 32) + '1.gif';
	}
	
	for (var i=0; i <= 9; i++) {
		AlphabetImages [String(i)] = new Image;
		AlphabetImages [String(i)].src = 'art/letras/' + String(i) + '1.gif';
	}

	CurMenuItemID = MenuID;
  if (document.all && (navigator.userAgent.indexOf ('Opera') < 0) ) {
    var DocMenuItemTD = document.all['menutd' + MenuID];
    var DocMenuItemTDb = document.all['menutd' + MenuID + 'b'];
    var DocMenuItemTDc = document.all['menutd' + MenuID + 'c'];
    if (DocMenuItemTD != null) {
      DocMenuItemTD.style.backgroundColor = BGColorActive;
      DocMenuItemTDb.style.backgroundColor = BGColorActive;
      DocMenuItemTDc.style.backgroundColor = BGColorActive;
    }
	}

} // function PageStartup


function LetterHigh (LetterID) {

	document.images['alphabet' + LetterID].src = AlphabetImages [LetterID].src;
	
} // function LetterHigh 


function LetterLow (LetterID) {

	document.images['alphabet' + LetterID].src= 'art/letras/' + LetterID + '0.gif';
	
} // function LetterHigh 



var wScrollBars = 1;
var wResizable = 2;
var wLocationBar = 4;
var wMenuBar = 8;
var wStatusBar = 16;
var wDependent = 32;
var wReturnWinHandle = 64;


function popup (winUrl, winWidth, winHeight, winX, winY, winName, winPropsEnable, winPropsDisable) {

  winScrollBars = (winPropsEnable & wScrollBars) ? 'scrollbars=yes,' : ( (winPropsDisable & wScrollBars ) ? 'scrollbars=no,' : '' );
  winResizable = (winPropsEnable & wResizable) ? 'resizable=yes,' : ( (winPropsDisable & wResizable ) ? 'resizable=no,' : '' );
  winLocationBar = (winPropsEnable & wLocationBar) ? 'location=yes,' : ( (winPropsDisable & wLocationBar ) ? 'location=no,' : '' );
  winMenuBar = (winPropsEnable & wMenuBar) ? 'menubar=yes,' : ( (winPropsDisable & wMenuBar ) ? 'menubar=no,' : '' );
  winStatusBar = (winPropsEnable & wStatusBar) ? 'status=yes,' : ( (winPropsDisable & wStatusBar ) ? 'status=no,' : '' );
  winDependent = (winPropsEnable & wDependent) ? 'dependent=yes,' : ( (winPropsDisable & wDependent ) ? 'dependent=no,' : '' );

  newWin = window.open (winUrl, winName, 'left=' + winX + ',top=' + winY + ',innerWidth=' + winWidth + ',width=' + winWidth + ',innerHeight=' + winHeight + ',height=' + winHeight + ',' + winScrollBars + winResizable + winLocationBar + winMenuBar + winStatusBar + winDependent);

  return (winPropsEnable & wReturnWinHandle) ? newWin : false;

} // function openWindow - old name
