// Copyright Wallace Almeida


// Basics
function DMshowSMn(id, pos){
	if(!isDef(id + 'DL')) return;
	DMhideAllSmn()
	cI('mn' + pos,'menu_' + id + '_on');
	eval(id + 'DL.clearHideTimeout()');
	eval(id + 'DL.sh()');
}

function DMhideSMn(id, pos){
	if(!isDef(id + 'DL')) return;
	cI('mn' + pos,'menu_' + id)
	if(isDef(id + 'DL')) eval(id + 'DL.setHideTimeout()');
}

/**
 * Esconde todos os submenus
 */
 
function DMhideAllSmn(){
	nucleoDL.clearShowTimeout(); nucleoDL.hd();
	principalDL.clearShowTimeout(); principalDL.hd();
	capacitacaoDL.clearShowTimeout(); capacitacaoDL.hd();
	gestaoDL.clearShowTimeout(); gestaoDL.hd();
	clippingDL.clearShowTimeout(); clippingDL.hd();
	contatoDL.clearShowTimeout(); contatoDL.hd();
	informativoDL.clearShowTimeout(); informativoDL.hd();	
	mapaDL.clearShowTimeout(); mapaDL.hd();		
}

// Timeout DHTML
var DLP=DL.prototype;

DLP.hideTimeout=null;
function DLclearHideTimeout(){clearTimeout(this.hideTimeout)};
function DLsetHideTimeout(){clearTimeout(this.hideTimeout);this.hideTimeout=setTimeout(this.obj+'.hd()',300)};
DLP.setHideTimeout=DLsetHideTimeout;
DLP.clearHideTimeout=DLclearHideTimeout;

DLP.showTimeout=null;
function DLclearShowTimeout(){clearTimeout(this.showTimeout)};
function DLsetShowTimeout(){clearTimeout(this.showTimeout);this.showTimeout=setTimeout(this.obj+'.sh()',300)};
DLP.setShowTimeout=DLsetShowTimeout;
DLP.clearShowTimeout=DLclearShowTimeout;



function alertConfirmation(msg){
	if(confirm(msg)){
		return true;
	}
	return false;
}