function validarContacto(){
	var nombre=document.getElementById('nombre').value.trim();
	var email=document.getElementById('mail').value.trim();
	if (nombre.length==0 || nombre=='Ingrese su nombre y apellido'){
		alert('El nombre es obligatorio');	
		return false;
	}
	if (email.length==0 || email=='Ingrese su correo electrónico'){
		alert('La direccion de e-mail es obligatoria');
		return false;
	}
	if (!hasEmailFormat(email)){
		alert('La direccion de e-mail no tiene un formato válido');
		return false;
	}
	if (document.getElementById('consulta')){
		var cuerpo=document.getElementById('consulta').value.replace("\n",'<br />').replace("\r",'').trim();
		if (cuerpo.length==0 || cuerpo=='Ingrese el asunto'){
			alert('El asunto es obligatoria');
			return false;
		}
	}
	return true;
}
function setInputProperties(input,value){
    input.value = value;
    input.originalText = value;
    input.onfocus = function(){
        if(this.value == this.originalText){
            this.value.length = 0;
        }
    }
    input.onclick = function(){
        if(this.value == this.originalText){
            this.value = '';
        }
    }
    input.onblur = function(){
        if(this.value.length == 0 || this.value == this.originalText){
            this.value = this.originalText;
        }
    }
}
