function MOverOut(src) 
{ 
	if (!src.contains(event.toElement)) 
	{ 
		src.style.cursor = 'default';src.bgColor = '';
	}
	else
	{
		if (!src.contains(event.fromElement)) 
		{ 
			src.style.cursor = 'hand'; src.bgColor = '#e4ecf2'; 
		}
	}
}

function mClk(src) { 
	if(event.srcElement.tagName=='TD') 
	{
		src.children.tags('a')[0].click();
	}
}

function SubMOverOut(src) 
{ 
	if (!src.contains(event.toElement)) 
	{ 
		src.style.cursor = 'default';src.bgColor = '';
	}
	else
	{
		if (!src.contains(event.fromElement)) 
		{ 
			src.style.cursor = 'hand'; src.bgColor = 'WhiteSmoke'; 
		}
	}
}

function OpMenu(opcao)
{
	if (!opcao.contains(event.toElement)) 
	{ 
		var optdisplay = ( (opcao.style.display == '') ? 'none' : '' )
		opcao.style.display = optdisplay;
	}
}

function OpSubMenu(opcao)
{
		if (!opcao.contains(event.toElement)) 
	{ 
		var optdisplay = ( (opcao.style.display == '') ? 'none' : '' )
		opcao.style.display = optdisplay;
	}
}

function CalendCurso(opcao)
{
	trJan16.style.display = 'none';
	trJan30.style.display = 'none';
	trFev13.style.display = 'none';
	trFev17.style.display = 'none';
	trVazio.style.display = 'none';			
	opcao.style.display = '';
}

function MM_openBrWindow(theURL,winName,features) 
{
	window.open(theURL,winName,features);
}

// Abre Janela Centralizada
function OpenWindowCenter(URL,winName,features) {
	openWindowCenter(URL,winName,features);
	}
function openWindowCenter(URL,winName,features) {
	var autoCloseTimeoutHandle, ontopIntervalHandle, w = 480, h = 340;  
	if(document.all || document.layers || document.getElementById) {
		w = screen.availWidth; h = screen.availHeight;
		//alert('w='+w + ' h='+h);
		}
	var param = features.split(',');
	var subpar;
	var popWidth='800'; popHeight='600';
	for(var i=0;i<param.length;i++) {
		subpar=param[i].split('=');
		if(subpar[0] == 'width') {
			popWidth=subpar[1];
			}
		if(subpar[0] == 'height') {
			popHeight=subpar[1];
			}
		}
	var leftPos = (w-popWidth)/2, topPos = (h-popHeight)/2;
	features += (features.length > 0 ? ',' : '') + 'top=' + topPos+',left='+leftPos;
	//alert('features='+features+' w='+w+' h='+h+' popWidth='+popWidth+' popHeight='+popHeight);
	popupWindow = window.open(URL,winName,features);
	if (popupWindow.opener == null) popupWindow.opener = self;    
	if (document.all || document.layers || document.getElementById) {
  		window.onbeforeunload = function() {popupWindow.close();}; 
  		}   
	}



// Inserido em: 26/12/2005 - 16:50
// Esta funcção server para carregar multiplas funções para o window.onload
// Use: 
//		addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
//		addLoadEvent(function() {
		  	/* more code to run on page load */ 
//			});

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	}
	else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

