function escribir(frase)  {
	document.write(frase);
}
function validaOnLine(param1) 
{	
	var re;
	if (param1.id=="nombre" || param1.id=="apellido") 
	{
		re=/[a-zA-Z ]/;
	}
	else if (param1.id=="email")
	{
		re=/[a-z0-9.@_-]/;
	}			
	p=new String(param1.value);
	valor=p.substring(p.length-1,p.length);
	if(!re.test(valor))
	{
		param1.value=p.substring(0,p.length-1);
	}
}	

function validaFinal()
{

	if (document.fmail.nombre.value.length==0)
	{
		alert("Por favor ingrese su Nombre");
		document.fmail.nombre.focus();
	}
	else if (document.fmail.apellido.value=="")
	{
		alert("Por favor ingrese su Apellido");
		document.fmail.apellido.focus();
	}
	else if (document.fmail.email.value=="")
	{
		alert("Por favor ingrese un Mail");
		document.fmail.email.focus();
	}	
	else
	{		
		re=/\w+([-+.]\w+)*@\w+([-]\w+)*\.\w+([.]\w+)*/;
		if (!re.test(document.fmail.email.value)) 
		{
			alert("El e-mail ingresado es incorrecto, inténtelo de nuevo");
			document.fmail.email.focus();	
		}
		else if (document.fmail.consulta.value=="")
		{
			alert("Por favor escriba su consulta");
			document.fmail.consulta.focus();
		}
		else
		{
			document.fmail.submit();
		}
	}
}
function validaFinal2()
{

	if (document.fmail.nombre.value.length==0)
	{
		alert("Por favor ingrese su Nombre");
		document.fmail.nombre.focus();
	}
	else if (document.fmail.email.value=="")
	{
		alert("Por favor ingrese un Mail");
		document.fmail.email.focus();
	}	
	else
	{		
		re=/\w+([-+.]\w+)*@\w+([-]\w+)*\.\w+([.]\w+)*/;
		if (!re.test(document.fmail.email.value)) 
		{
			alert("El e-mail ingresado es incorrecto, inténtelo de nuevo");
			document.fmail.email.focus();	
		}
		else if (document.fmail.consulta.value=="")
		{
			alert("Por favor escriba su consulta");
			document.fmail.consulta.focus();
		}
		else
		{
			document.fmail.submit();
		}
	}
}

function derecho(e)
{
/*
		if (navigator.appName == 'Netscape' && (e.which == 2 || e.which == 3))
				return false;
		else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 3 || event.button == 2)) 
		{
					alert("Gigapix - Copyright © 2006");
					return false;
		}
*/
		return true;
}
document.onmousedown=derecho;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=derecho;

/* Funcion de FADE para imagenes, funcion principal: initLayerFade */
function initLayerFade(imageId) {
  image = document.getElementById(imageId);
  setOpacity(image, 0);
  image.style.visibility = 'visible';
  fadeIn(imageId,0);
  window.setTimeout("ocultarLayer(image);", 7000);
}

function fadeIn(objId,opacity) {
  if (document.getElementById) {
    obj = document.getElementById(objId);
    if (opacity <= 100) {
      setOpacity(obj, opacity);
      opacity += 10;
      window.setTimeout("fadeIn('"+objId+"',"+opacity+")", 100);
    }
  }
}

function setOpacity(obj, opacity) {
  opacity = (opacity == 100)?99.999:opacity;
  
  // IE/Win
  obj.style.filter = "alpha(opacity:"+opacity+")";
  
  // Safari<1.2, Konqueror
  obj.style.KHTMLOpacity = opacity/100;
  
  // Older Mozilla and Firefox
  obj.style.MozOpacity = opacity/100;
  
  // Safari 1.2, newer Firefox and Mozilla, CSS3
  obj.style.opacity = opacity/100;
}

function ocultarLayer() {
	image.style.visibility = 'hidden';
}
/* FIN DE: Funcion de FADE para imagenes */