addEvent(window,'load',inicializarEventos,false);

function inicializarEventos()
{
  var ob1=document.getElementById('formulario');
  addEvent(ob1,'submit',enviarDatos,false);
}

function enviarDatos(e)
{
  var nom=document.getElementById('nombre');
  var ape=document.getElementById('apellidos');
  var eml=document.getElementById('correo');
  var consult=document.getElementById('comentario');

// Control del Campo Nombre
	if (nom.value=='')
	{
		alert('DEBE INGRESAR SU/S NOMBRE/S');
		if (e.preventDefault)
			e.preventDefault();
			nom.focus();
			return false;
	}// Fin Campo Nombre

// Control del Campo Apellido
	if (ape.value=='')
	{
		alert('DEBE INGRESAR SU/S APELLIDO/S');
		if (e.preventDefault)
			e.preventDefault();
			ape.focus();
			return false;
	}
// Control del Campo Correo
	if (eml.value.indexOf('@', 0) == -1 ||
		eml.value.indexOf(';', 0) != -1 ||
	  	eml.value.indexOf(' ', 0) != -1 ||
		eml.value.indexOf('/', 0) != -1 ||
	  	eml.value.indexOf(';', 0) != -1 ||
		eml.value.indexOf('<', 0) != -1 ||
	  	eml.value.indexOf('>', 0) != -1 ||
		eml.value.indexOf('*', 0) != -1 ||
	  	eml.value.indexOf('|', 0) != -1 ||
		eml.value.indexOf('`', 0) != -1 ||
	  	eml.value.indexOf('&', 0) != -1 ||
		eml.value.indexOf('$', 0) != -1 ||
	  	eml.value.indexOf('!', 0) != -1 ||
		eml.value.indexOf('"', 0) != -1 ||
	  	eml.value.indexOf(':', 0) != -1 ||
		eml.value.indexOf('.', 0) == -1)
	{
		alert('SU E-MAIL NO ES VALIDO');
		if (e.preventDefault)
			e.preventDefault();
			eml.focus();
			return false;
	}
// Control del Campo Comentario
	if (consult.value=='')
	{
		alert('DEBE INGRESAR ALGUN COMENTARIO O SUGERENCIA');
		if (e.preventDefault)
			e.preventDefault();
			consult.focus();
			return false;
	}
	return true;
}

function addEvent(elemento,nomevento,funcion,captura)
{
  if (elemento.attachEvent)
  {
    elemento.attachEvent('on'+nomevento,funcion);
    return true;
  }
  else
    if (elemento.addEventListener)
    {
      elemento.addEventListener(nomevento,funcion,captura);
      return true;
    }
    else
      return false;
}

function ShowAuthor(box)
{
	box.style.display = "block";
}

function mostrarGerencia()
{
	var box=document.getElementById('authorBio');
	var boton=document.getElementById('boton');
	box.style.display = "block";
	boton.focus();

	var textoMail=document.getElementById('formulario');
	var inputHidden = document.createElement('input');
	inputHidden.type = 'hidden';			//defino tipo de input
	inputHidden.name = 'correoSigno';		//defino id del input
	inputHidden.value= 'gerencia@marketingsigno.com';
	textoMail.appendChild(inputHidden);
}
function mostrarCreativos()
{
	var box=document.getElementById('authorBio');
	var boton=document.getElementById('boton');
	box.style.display = "block";
	boton.focus();

	var textoMail=document.getElementById('formulario');
	var inputHidden = document.createElement('input');
	inputHidden.type = 'hidden';			//defino tipo de input
	inputHidden.name = 'correoSigno';			//defino id del input
	inputHidden.value= 'creativos@marketingsigno.com';
	textoMail.appendChild(inputHidden);
}
function mostrarVentas()
{
	var box=document.getElementById('authorBio');
	var boton=document.getElementById('boton');
	box.style.display = "block";
	boton.focus();

	var textoMail=document.getElementById('formulario');
	var inputHidden = document.createElement('input');
	inputHidden.type = 'hidden';			//defino tipo de input
	inputHidden.name = 'correoSigno';			//defino id del input
	inputHidden.value= 'ventas@marketingsigno.com';
	textoMail.appendChild(inputHidden);
}
function mostrarSistema()
{
	var box=document.getElementById('authorBio');
	var boton=document.getElementById('boton');
	box.style.display = "block";
	boton.focus();

	var textoMail=document.getElementById('formulario');
	var inputHidden = document.createElement('input');
	inputHidden.type = 'hidden';			//defino tipo de input
	inputHidden.name = 'correoSigno';			//defino id del input
	inputHidden.value= 'sistemas@marketingsigno.com';
	textoMail.appendChild(inputHidden);
}
function mostrarFotografia()
{
	var box=document.getElementById('authorBio');
	var boton=document.getElementById('boton');
	box.style.display = "block";
	boton.focus();

	var textoMail=document.getElementById('formulario');
	var inputHidden = document.createElement('input');
	inputHidden.type = 'hidden';			//defino tipo de input
	inputHidden.name = 'correoSigno';			//defino id del input
	inputHidden.value= 'fotografia@marketingsigno.com';
	textoMail.appendChild(inputHidden);
}







