$(document).ready(function() {
		$('#tabs').tabs();
		
		$('.titulo_pregunta').click(function() 
		{
			$(this).children('.respuesta').slideToggle('fast');
		});
});

function MM_openBrWindow(theURL,winName,features) 
{ //v2.0
	window.open(theURL,winName,features);
}

function validate_required(field,alerttxt)
{
with (field)
  {
  if (value==null||value=="")
    {
    alert(alerttxt);return false;
    }
  else
    {
    return true;
    }
  }
}

function validate_form(thisform)
{
	with (thisform)
	{
		if (validate_required(correo,"Debe introducir su nombre, email y telefono")==false)
		{
		correo.focus();
		correo.style.background = '#FF9F9F';
		if (nombre.value == "") 
		{
			nombre.style.background = '#FF9F9F';
		}else 
		{
			nombre.style.background = '#B8F5B1';
		}
		if (telefono.value == "") 
		{
			telefono.style.background = '#FF9F9F';
		}else 
		{
			telefono.style.background = '#B8F5B1';
		}
		return false;
		} 
		else 
		{
			if (validate_required(nombre,"Debe introducir su nombre, email y telefono")==false)
			{
				nombre.focus();
				nombre.style.background = '#FF9F9F';
				if (telefono.value == "") 
				{
					telefono.style.background = '#FF9F9F';
				}else 
				{
					telefono.style.background = '#B8F5B1';
				}
				return false;
			}else
			{
				if (validate_required(telefono,"Debe introducir su nombre, email y telefono")==false)
				{
					telefono.focus();
					telefono.style.background = '#FF9F9F';
					return false;
				}
			}
		}


	}
}
