//PRINCIPIO desactivar seleccion de texto --------------------------------------



function disableselect(e)

{

   return false

}

function reEnable()

{

   return true

}

//if IE4+

document.onselectstart=new Function ("return false")

//if NS6

if (window.sidebar)

{

   document.onmousedown=disableselect

   document.onclick=reEnable

}



function MM_preloadImages() { //v3.0

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}

// desactivar seleccion de texto -------------------------------------------------





// desactivar boton derecho ------------------------------------------------------



var mensaje = "[Copyright © 2010 ORBIS TERRARUM]";

function derecho(e)

{

if (navigator.appName == 'Netscape' && e.which == 3)

alert(mensaje);

else if (navigator.appName == 'Microsoft Internet Explorer' && event.button==2)

alert(mensaje);

}

document.onmousedown = derecho;

//fin desactivar boton derecho.



// NO BARRA EN POPUP ----------------------------------------------------------



function Abrir_ventana (pagina) {

var opciones="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=486,height=430,top=85,left=140";

window.open(pagina,"pop",opciones);

}



// ENVIAR FORMULARIO ----------------------------------------------------------



// valida formulario



function valida_envia(){

	//valido el nombre

	if (document.getElementById("fvalida").nombre.value.length==0){

		alert("Por favor, escriba su nombre.")

		document.getElementById("fvalida").nombre.focus()

		return 0;

	}



	if (document.getElementById("fvalida").telefono.value.length==0){

		alert("Por favor, escriba su teléfono.")

		document.getElementById("fvalida").telefono.focus()

		return 0;

	}

	

		if (document.getElementById("fvalida").motivo.value.length==0){

		alert("Por favor, escriba su motivo de contacto.")

		document.getElementById("fvalida").motivo.focus()

		return 0;

	}

	

//el formulario se envia

//formulario-bolsa ----------------------------------------------------------



	document.getElementById("fvalida").submit();

}



function valida_envia2(){



	

	if (document.fvalida2.nombre.value.length==0){

		alert("Por favor, escriba su nombre.")

		document.fvalida2.nombre.focus()

		return 0;

	}

	

	if (document.fvalida2.apellidos.value.length==0){

		alert("Por favor, escriba su apellido.")

		document.fvalida2.apellidos.focus()

		return 0;

	}

	



	if (document.fvalida2.direccion.value.length==0){

		alert("Por favor, escriba su direccion.")

		document.fvalida2.direccion.focus()

		return 0;

	}

			if (document.getElementById("fvalida2").telefono.value.length==0){

		alert("Por favor, escriba su teléfono.")

		document.getElementById("fvalida2").telefono.focus()

		return 0;

	}



	

	//el formulario se envia



	document.fvalida2.submit();

}










