function abre_cierra_menu(a , id , _height)
{
	var menus = new Array('li_institucional' , 'li_productos' , 'li_servicios' , 'li_ingenieria');
	//cierro todo
	for(var i = 0  ; i < menus.length ; i++)
	{
		var menu = $(menus[i]);
		if (menu != id && menu.getStyle('height') == _height+'px')
			new Fx.Tween(menu , {duration:300}).start('height', _height, 0);
	}
	
	var li = $(id);
	
	if (li.getStyle('height') == '0px')
	{
		new Fx.Tween(li , {duration:300}).start('height', 0, _height);
		// a.setStyle('background-image' , 'url(images/boton_izq_on.jpg)');
	}
	else if (li.getStyle('height') == _height+'px')
	{
		new Fx.Tween(li , {duration:300}).start('height', _height, 0);
		// a.setStyle('background-image' , 'url(images/boton_izq.jpg)');
	}
}

function abre_cierra_submenu(a , id , _height)
{
	var menus = new Array('li_motores_electricos' , 'li_bombas' );
	//cierro todo
	for(var i = 0  ; i < menus.length ; i++)
	{
		var menu = $(menus[i]);
		if (menu != id && menu.getStyle('height') == _height+'px')
			new Fx.Tween(menu , {duration:300}).start('height', _height, 0);
	}
	
	var li = $(id);
	
	if (li.getStyle('height') == '0px')
	{
		new Fx.Tween(li , {duration:300}).start('height', 0, _height);
		// a.setStyle('background-image' , 'url(images/boton_izq_on.jpg)');
	}
	else if (li.getStyle('height') == _height+'px')
	{
		new Fx.Tween(li , {duration:300}).start('height', _height, 0);
		// a.setStyle('background-image' , 'url(images/boton_izq.jpg)');
	}
}

function valida()
{
	if($('nombre').value == '')
	{
		$('nombre').focus();
		alert('Debe ingresar el nombre.');
		return false;
	}
	if($('nombre').value == '')
	{
		$('empresa').focus();
		alert('Debe ingresar la empresa.');
		return false;
	}
	if($('nombre').value == '')
	{
		$('email').focus();
		alert('Debe ingresar el email.');
		return false;
	}
	if($('nombre').value == '')
	{
		$('mensaje').focus();
		alert('Debe ingresar el mensaje.');
		return false;
	}
	return true;
}

