/*VALIDA FORMULARIO DE CONTACTO*/

function WebForm_OnSubmit(form)
{
	
	/*if(!isSelected(form.ciudad)) // Valida que se seleccione una opcion del pulldown
	{
		alert('Seleccione una ciudad') // Si no es valido envia un alerta
		form.ciudad.focus(); // Pone el cursor en el campo validado
		return false;
	}*/
	
	if(Empty(form.ctl00_Estructura_Contenidos_nombre.value) || form.ctl00_Estructura_Contenidos_nombre.value=="Nombre")
	{
		alert('Insert your first name');
		form.ctl00_Estructura_Contenidos_nombre.value="";
		form.ctl00_Estructura_Contenidos_nombre.focus();
		return false;
	}
	
/*
	
	if(!isInteger(form.fono.value)) // Valida que el campo sea númerico
	{
		alert('Ingrese su teléfono') // Si viene vacio o con letras envia un alerta
		form.fono.focus(); // Pone el cursor en el campo validado
		form.fono.select(); // Selecciona el texto ingresado en el campo
		return false; // Detine el envio del formulario
	}
	
	if(!isMail(form.mail.value)) // Valida que no venga vacio y sea un e-mail válido 
	{
		alert('Ingrese su e-mail')  // Si no es valido envia un alerta
		form.mail.focus(); // Pone el cursor en el campo validado
 		form.mail.select(); // Selecciona el texto ingresado en el campo
		return false; // Detine el envio del formulario
	}
	
	*/
	return;

}

//mmosquera@temperies.com.ar
//validaciones para el contactenos
//********************************************************
function validarNombre(source, arguments)
{
    if (arguments.Value == 'Ingrese Nombre')
        arguments.IsValid = false;
    else
        arguments.IsValid = true;    
}

function validarDireccion(source, arguments)
{
    if (arguments.Value == 'Ingrese Dirección')
        arguments.IsValid = false;
    else
        arguments.IsValid = true;    
}

function validarCiudad(source, arguments)
{
    if (arguments.Value == 'Ingrese Ciudad')
        arguments.IsValid = false;
    else
        arguments.IsValid = true;    
}

function validarTelefono(source, arguments)
{
    if (arguments.Value == 'Ingrese Teléfono')
        arguments.IsValid = false;
    else
        arguments.IsValid = true;    
}

function validarEmail(source, arguments)
{
    if (arguments.Value == 'Ingrese E-mail')
        arguments.IsValid = false;
    else
        arguments.IsValid = true;    
}

function validarEmpresa(source, arguments)
{
    if (arguments.Value == 'Ingrese Empresa')
        arguments.IsValid = false;
    else
        arguments.IsValid = true;    
}

function validarAsunto(source, arguments)
{
    if (arguments.Value == 0)
        arguments.IsValid = false;
    else
        arguments.IsValid = true;    
}

function validarMensaje(source, arguments)
{
    if (arguments.Value == 'Ingrese Mensaje')
        arguments.IsValid = false;
    else        
        if (arguments.Value.length <= 1000)
            arguments.IsValid = true;    
        else
            arguments.IsValid = false;          
}
//********************************************************



