function escribir(frase)  {
	document.write(frase);
}


function validaOnLine(param1) 
{	
	var re;
	if ((param1.id=="txtnombre") || (param1.id=="txtcargo") || (param1.id=="txtempresa") || (param1.id=="txtpais") || (param1.id=="txtciudad"))
	{
		re=/[a-zA-Z ]/;
	}
	else if ((param1.id=="txttelefono") || (param1.id=="txtfax"))
	{
		re=/[0-9-()]/;
	}
	else if (param1.id=="txtemail")
	{
		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.sNombre.value.length==0) 
	{
		alert("Debe completar el campo Nombre");
		document.fmail.sNombre.focus();
	}
	else if (document.fmail.sApellido.value.length==0)
	{
		alert("Debe completar el campo Apellido");
		document.fmail.sApellido.focus();
	}
	else if (document.fmail.sCompania.value.length==0)
	{
		alert("Debe completar el campo Compa&ntilde;&iacute;a");
		document.fmail.sCompania.focus();
	}
	else if (document.fmail.sCiudadPais.value.length==0)
	{
		alert("Debe completar el campo Ciudad/Pais");
		document.fmail.sCiudadPais.focus();
	}
	else if (document.fmail.sTelefono.value.length==0)
	{
		alert("Debe completar el campo Telefono");
		document.fmail.sTelefono.focus();
	}
	else if (document.fmail.sAsunto.value.length==0)
	{
		alert("Debe completar el campo Asunto");
		document.fmail.sAsunto.focus();
	}
	else if (document.fmail.sEmail.value=="")
	{
		alert("Por favor ingrese se E-mail");
		document.fmail.sEmail.focus();
	}	
	else
	{		
		re=/\w+([-+.]\w+)*@\w+([-]\w+)*\.\w+([.]\w+)*/;
		if (!re.test(document.fmail.sEmail.value)) 
		{
			alert("El e-mail ingresado es incorrecto, inténtelo de nuevo");
			document.fmail.sEmail.focus();
		}
		else
		{
			document.fmail.submit();
		}
	}
}

function validaFinalRegistro()
{

	if (document.fmail.txtnombre.value.length==0) 
	{
		alert("Debe completar el campo Nombre");
		document.fmail.txtnombre.focus();
	}
	else if (document.fmail.txtcargo.value.length==0)
	{
		alert("Debe completar el campo Cargo");
		document.fmail.txtcargo.focus();
	}
	else if (document.fmail.txtempresa.value.length==0)
	{
		alert("Debe completar el campo Empresa");
		document.fmail.txtempresa.focus();
	}
	else if (document.fmail.txtdireccion.value.length==0)
	{
		alert("Debe completar el campo Direccion");
		document.fmail.txtdireccion.focus();
	}
	else if (document.fmail.txtpais.value.length==0)
	{
		alert("Debe completar el campo Pais");
		document.fmail.txtpais.focus();
	}
	else if (document.fmail.txtciudad.value.length==0)
	{
		alert("Debe completar el campo Ciudad");
		document.fmail.txtciudad.focus();
	}
	else if (document.fmail.txttelefono.value.length==0)
	{
		alert("Debe completar el campo Telefono");
		document.fmail.txttelefono.focus();
	}
	else if (document.fmail.txtemail.value=="")
	{
		alert("Debe completar el campo E-mail");
		document.fmail.txtemail.focus();
	}	
	else
	{		
		re=/\w+([-+.]\w+)*@\w+([-]\w+)*\.\w+([.]\w+)*/;
		if (!re.test(document.fmail.txtemail.value)) 
		{
			alert("El e-mail ingresado es incorrecto, inténtelo de nuevo");
			document.fmail.txtemail.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("Copyright © 2008");
					return false;
		}
		return true;
}
document.onmousedown=derecho;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
window.onmousedown=derecho;