/*Home*/
function abreplano(id){
	fechaplano();
	var plano = getById('plano'+id);
	plano.className = 'aberto';
}
function fechaplano(total){
    for(var i=1; i <= total	; i++){
		var plano = getById('plano'+i);
		plano.className = 'fechado';
	}
}

function getById($id){
	if(document.getElementById){
		return document.getElementById($id);
	}else if(document.all){
		return document.all.$id;
	}else{
		return false;
	}
}

function mudaCampo(maxTam,idAtual,proxCampo){
	if (document.getElementById(idAtual).value.length >= maxTam){
	 document.getElementById(proxCampo).focus();
	}
}

