
function AvisoLegal ()
{
	var Ventana = new TVentana ();
	
	Ventana.Ancho       = 575;
	Ventana.Alto        = 400;
	Ventana.Nombre      = 'AvisoLegal';
	Ventana.URL         = '/plantillas/avisolegal.html';
	Ventana.Open (true);
}

function DescargaTarifas (Idioma)
{
	var Ventana = new TVentana ();
	
	Ventana.Ancho       = 620;
	Ventana.Alto        = 550;
	Ventana.Nombre      = 'Formulario';
	Ventana.ScrollBars  = true;
	
	if (!Idioma) {Ventana.URL         = '/plantillas/acceso.html';}
	else {Ventana.URL         = '/plantillas/acceso_ing.html';}
	
	Ventana.Open (true);
}

function FormularioAlta (Idioma)
{
	var Ventana = new TVentana ();
	
	Ventana.Ancho       = 620;
	Ventana.Alto        = 550;
	Ventana.Nombre      = 'Formulario';
	Ventana.ScrollBars  = true;
	
	if (!Idioma) {Ventana.URL         = '/plantillas/alta.html';}
	else {Ventana.URL         = '/plantillas/alta_ing.html';}
	
	Ventana.Open (true);
}

function FormularioContacto (Idioma)
{
	var Ventana = new TVentana ();
	
	Ventana.Ancho       = 620;
	Ventana.Alto        = 550;
	Ventana.Nombre      = 'Formulario';
	Ventana.ScrollBars  = true;
	
	if (!Idioma) {Ventana.URL         = '/plantillas/contacto.html';}
	else {Ventana.URL         = '/plantillas/contacto_ing.html';}
	
	Ventana.Open (true);
}

function NuevaVentana (Ancho, Alto, URL, NombreVentana, Scroll)
{
	var Ventana = new TVentana ();
	
	Ventana.Ancho      = Ancho;
	Ventana.Alto       = Alto;
	Ventana.ScrollBars = Scroll;
	Ventana.Nombre     = NombreVentana;
	Ventana.URL        = URL;
	Ventana.Open (true);
}

function ValidarContacto ()
{
	if (Trim (document.Contacto.Nombre.value) == '')
	{ alert ('Tiene que indicar un NOMBRE.'); }
	
	else if (! EmailCorrecto (document.Contacto.Email.value))
	{   if (Trim (document.Contacto.Email.value) == '') { alert ('Tiene que indicar un EMAIL.'); }
        else { alert ('El EMAIL no es correcto.'); }
    }
    
    else if (Trim (document.Contacto.Telefono.value) == '')
	   { alert ('Tiene que indicar un TELEFONO.'); }
	   
    else if (Trim (document.Contacto.Mensaje.value) == '')
	   { alert ('Tiene que indicar un MENSAJE.'); }
	
    else return (true);
	
	return (false);
}

function ValidarAlta ()
{
	if (Trim (document.Alta.Nombre.value) == '')
	{ alert ('Tiene que indicar un NOMBRE.'); }
	
	else if (Trim (document.Alta.Apellidos.value) == '')
	{ alert ('Tiene que indicar los APELLIDOS.'); }
	
	else if (! EmailCorrecto (document.Alta.Email.value))
	{   if (Trim (document.Alta.Email.value) == '') { alert ('Tiene que indicar un EMAIL.'); }
        else { alert ('El EMAIL no es correcto.'); }
    }
    
	else if (Trim (document.Alta.Empresa.value) == '')
	{ alert ('Tiene que indicar un EMPRESA.'); }

	else if (Trim (document.Alta.Localidad.value) == '')
	{ alert ('Tiene que indicar un LOCALIDAD.'); }

	else if (Trim (document.Alta.Provincia.value) == '')
	{ alert ('Tiene que indicar un PROVINCIA.'); }

    else if (Trim (document.Alta.Telefono.value) == '')
	   { alert ('Tiene que indicar un TELEFONO.'); }
	
    else return (true);
	
	return (false);
}

