function equalContainer(idList)
{//SET container height over the highest height of anyother innerContainer causeof the footer has to go to the container's bottom
	var array = idList.split("||");
	
	var container = document.getElementById('container');
	var a = document.getElementById('lateral');
	var b = document.getElementById('central');
	
	if(a != null && b != null){
		if(a.offsetHeight > b.offsetHeight){
			container.style.height = (a.offsetHeight+180)+"px";
		}else{
			container.style.height = (b.offsetHeight+180)+"px";
		}
	}
	setTimeout("equalContainer('lateral||central')", 500);
}

function changeView(id){
	
	var element = document.getElementById(id);
	
	if(element.style.visibility == "hidden"){
		element.style.visibility = "visible";
		element.style.position = "";
	}else{
		element.style.visibility = "hidden";
		element.style.position = "absolute";
	}
}


function changeTitle(title){
	
	document.title = document.title+" - "+title;
	
	//var e = document.getElementsByName('title');
	//e[0].innerHTML = title;
	
	//el elemento 0 porque solo hay un unico title tag
}


function validForm(sItems){
	
	var aItems = sItems.split(",");
	var error = "";
	for(var i=0; aItems[i] != null; i++){
		var e = document.getElementById(aItems[i]);
		if(e.value == ""){
			error += "El campo "+aItems[i]+" es obligatorio \n";
		}
	}
	
	if(error != ""){ alert(error); }
	
	return (error == "")
}

//setTimeout("equalContainer('lateral||central')", 0);
