// Forma de Contacto esegete.com
<!--
function foco( obj_id ){
	document.getElementById( obj_id ).style.backgroundColor='#F3F3F3';
}
function no_foco( obj_id ){
	document.getElementById( obj_id ).style.backgroundColor='#DDDDDD';
}

var var_nombre;
var var_mensaje;
var var_email;
error_email = 0;

function first_check(){
	document.getElementById( 'cnt_nombre' ).value = '';
	document.getElementById( 'cnt_asunto' ).value = '';
	document.getElementById( 'cnt_email' ).value = '';
	document.getElementById( 'cnt_mensaje' ).value = '';
	revisar_email( '' );
}

function revisar_email( valor ){
	error_email = 0;
	// eliminamos los espacios
	valor = valor.replace( /[\s<>"'$&(){}\[\]#%,;:\/\\?]/g, '' );
	document.getElementById( 'cnt_email' ).value = valor;
	// Evaluamos que tenga arroba y sólo una y que no esté al final y que además exista un punto (al menos)
	if( valor.indexOf( '@' ) < 1 || 
		valor.indexOf( '@' ) != valor.lastIndexOf( '@' ) || 
		valor.lastIndexOf( '@' ) + 4 > valor.length ||
		valor.indexOf( '.' ) < 1 ){
		error_email = 1;
	} else {
		// Si parece ser correcto, partimos el string...
		piezas_mail = valor.split( '@' );
		// revisamos el usuario
		piezas_usuario = piezas_mail[ 0 ].split( '.' );
		for( i = 0; i < piezas_usuario.length; i++ ){
			if( piezas_usuario[ i ].length < 1 ){
				error_email = 1;
			}
		}
		// revisamos el servidor
		piezas_servidor = piezas_mail[ 1 ].split( '.' );
		for( i = 0; i < piezas_servidor.length; i++ ){
			if( piezas_servidor[ i ].length < 2 ){
				error_email = 1;
			}
		}
	}
	
	if( !error_email ){
		document.getElementById( 'cnt_email' ).style.color = '#505050';
	}
	
	var_email = valor;
	
	revisar_datos();
	
}

function revisar_error( err_id ){
	revisar_email( document.getElementById( err_id ).value );
	if( error_email && document.getElementById( err_id ).value.length ){
		document.getElementById( err_id ).style.color='#FF0000';
	} else {
		document.getElementById( err_id ).style.color='#505050';
	}
}

function revisar_datos(){
	// Eliminamos los espacios para evaluar el contenido de la variable ( \s = espacio, g = todos )
	var_nombre=document.getElementById( 'cnt_nombre' ).value.replace( /\s/g, '' );
	var_mensaje=document.getElementById( 'cnt_mensaje' ).value.replace( /\s/g, '' );
	if( !var_nombre || !var_email || error_email || !var_mensaje ){
		document.getElementById( 'b_enviar' ).style.visibility='hidden';
	} else {
		document.getElementById( 'b_enviar' ).style.visibility='visible';
	}
}
-->