/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
»»»  PSP Methodology
»»»  Copyright 2003 Pedro Pereira
»»»  http://www.pspinteractive.com.br/
»»»  Version 2.0 - 02/11/2003
___________________________________________
---- Specific Front-end for customer: -----
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ */

function bg(isso, estado) {
	if(estado == "luminosos_off") isso.style.backgroundColor = '#F6D346'; 
	if(estado == "luminosos_on") isso.style.backgroundColor = '#F9E078'; 
	if(estado == "publinstal_off") isso.style.backgroundColor = '#7FAE37'; 
	if(estado == "publinstal_on") isso.style.backgroundColor = '#98C74F'; 
	if(estado == "visual_off") isso.style.backgroundColor = '#7F88D7'; 
	if(estado == "visual_on") isso.style.backgroundColor = '#A6ACE3'; 
}

// MENU
function mostraItem(layerAtual,proxima) {
	if (proxima) {
		if (document.all[layerAtual].style.visibility == 'hidden') {
			document.all[layerAtual].style.visibility = 'visible';
			document.all[proxima].style.visibility = 'visible';
		} else {
			document.all[layerAtual].style.visibility = 'hidden';
			document.all[proxima].style.visibility = 'hidden';
		}
	} else {
		if (document.all[layerAtual].style.visibility == 'hidden') {
			document.all[layerAtual].style.visibility = 'visible';
		} else {
			document.all[layerAtual].style.visibility = 'hidden';
		}
	}
}

// APENAS INTEIROS DENTRO DO INPUT
function onlyInt(e) {
	if (document.all) { // Internet Explorer
		var tecla = event.keyCode;
	} else if(document.layers) { // Nestcape
		var tecla = e.which;
	}

	if (tecla >= 47 && tecla < 58) { // numeros de 0 a 9
		return true;
	} else {
		if (tecla != 8) { // backspace
			event.keyCode = 0;
			//return false;
		} else {
			return true;
		}
	}
}

