function getById( cronosElement ) {
	return document.getElementById( cronosElement );
}
function cronosElement( cronosElement ) {
	return getById( cronosElement );
}

function isVisible( cronosElement ) {
	return getById( cronosElement ).style.display == 'block';
}

function cronosShow( cronosElement ) {
	getById( cronosElement ).style.display = 'block';
}
function cronosHide( cronosElement ) {
	getById( cronosElement ).style.display = 'none';
}

function cronosShowHide( cronosElement ) {
	if ( isVisible(cronosElement) )
		cronosHide( cronosElement );
	else
		cronosShow( cronosElement );
}

function cronosHideArray( cronosElements ) {
	for ( i=0 ; i < cronosElements.length ; i++ )
		cronosHide( cronosElements[i] );
}
function cronosShowArray( cronosElements ) {
	for ( i=0 ; i < cronosElements.length ; i++ )
		cronosShow( cronosElements[i] );
}

function cronosHideObjeto( cronosElement ) {
	cronosElement.style.display = 'none';
}
function cronosShowObjeto( cronosElement ) {
	cronosElement.style.display = 'block';
}

function numeroAleatorio( limInf, limSup ) {
	return Math.floor( Math.random()*(1 + limSup - limInf) + limInf );
}

function getRequestAJAX() {
	if ( window.XMLHttpRequest )
		return new XMLHttpRequest();
	else if ( window.ActiveXObject )
		return new ActiveXObject( "Microsoft.XMLHTTP" );
	else {
		 alert( "Seu browser n\xE3o suporta AJAX!" );
		return null;
	}
}

function getObjetoFlash( objetoFlash ) {
	if ( navigator.appName == "Netscape" )
		return document.embeds[0];
	else
		return window[ objetoFlash ];
}
function abreMenu( objetoFlash, quadro ) {
	getObjetoFlash( objetoFlash ).TGotoLabel( "_root", quadro );
}

var cronosElementVisible = null;

function cronosHideVisible( cronosElement ) {
	if ( cronosElementVisible != null )
		cronosHide( cronosElementVisible );
	cronosShow( cronosElement );
	cronosElementVisible = cronosElement;
}