<!-- 
	// Crear Numeros aleatorios
	numeros=new Array() 
	
	for(var i = 1; i <= 14; i++){ 
		var inferior = 2; 
		var superior = 14; 
		var numPosibilidades = (superior + 1) - inferior; 
		var aleat = Math.random() * numPosibilidades; 
		aleat = Math.floor(aleat); 
		aleat = (inferior + aleat); 
		numeros[i]=aleat;
		
		if((aleat < inferior) || (aleat > superior)) System.out.println("Rango erroneo"); 
	} 


	
	// Validar text para ingresar solo numeros		
	var nav4 = window.Event ? true : false;
	function acceptNum(evt){ 
		// NOTE: Backspace = 8, Enter = 13, '0' = 48, '9' = 57 
		var key = nav4 ? evt.which : evt.keyCode; 
		return (key <= 13 || (key >= 48 && key <= 57));
	}
	
	/*------------------------------------------------------------------------------------------*/
	
	// Menu principal de la Pagina Web
	function MM_swapImgRestore() { //v3.0
		var i,x,a=document.MM_sr;
		for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
		x.src=x.oSrc;
	}
	
	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];
				}
		}
	}
	
	function MM_findObj(n, d) { //v4.01
		var p,i,x;
		if(!d)
			d=document;
		if((p=n.indexOf("?"))>0&&parent.frames.length) {
			d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);
		}
		if(!(x=d[n])&&d.all)
			x=d.all[n];
		for (i=0;!x&&i<d.forms.length;i++)
			x=d.forms[i][n];
		for(i=0;!x&&d.layers&&i<d.layers.length;i++)
			x=MM_findObj(n,d.layers[i].document);
		if(!x && d.getElementById)
			x=d.getElementById(n);
		return x;
	}
	
	function MM_swapImage() { //v3.0
		var i,j=0,x,a=MM_swapImage.arguments;
		document.MM_sr=new Array;
		for(i=0;i<(a.length-2);i+=3)
			if ((x=MM_findObj(a[i]))!=null){
				document.MM_sr[j++]=x;
				if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];
			}
	}

	/*------------------------------------------------------------------------------------------*/
	// Browser Slide-Show script.
	// With image cross fade effect for those browsers that support it.
	var slideCache = new Array();
	function RunSlideShow(pictureName,imageFiles,displaySecs){
		var imageSeparator = imageFiles.indexOf(";");
		var nextImage = imageFiles.substring(0,imageSeparator);
		if (document.all){
			document.getElementById(pictureName).style.filter="blendTrans(duration=3)";
			document.getElementById(pictureName).filters.blendTrans.Apply();
		}
		document.getElementById(pictureName).src = nextImage;
		if (document.all){
			document.getElementById(pictureName).filters.blendTrans.Play();
		}
		var futureImages = imageFiles.substring(imageSeparator+1,imageFiles.length) + ';' + nextImage;
		setTimeout("RunSlideShow('"+pictureName+"','"+futureImages+"',"+displaySecs+")",
		displaySecs*1000);
		// Cache the next image to improve performance.
		imageSeparator = futureImages.indexOf(";");
		nextImage = futureImages.substring(0,imageSeparator);
		if (slideCache[nextImage] == null) {
			slideCache[nextImage] = new Image;
			slideCache[nextImage].src = nextImage;
		}
	}	

	/*-----------------------------------------------------------------------------------------------------------*/
	// Verificar mail y datos Necesarios
	function f_datos() {
		if (document.FrmContactar.mailde.value == ''){
			alert ('"Please, enter your email address"');
			document.FrmContactar.mailde.focus();
			return false;
		}
		if (document.FrmContactar.nombrede.value == ''){
			alert ('"Please, enter your name"');
			document.FrmContactar.nombrede.focus();
			return false;
		}


		if (document.FrmContactar.mensaje.value == ''){
			alert ('"Please enter the Message"');
			document.FrmContactar.mensaje.focus();			
			return false;
		}
		a = f_verifica_mail(document.FrmContactar.mailde);
		if (a == true){
			document.FrmContactar.submit();
		}
	}
	function f_verifica_mail(field) {
		var goodEmail = field.value.match(/\b(^(\S+@).+((\.com)|(\.net)|(\.edu)|(\.mil)|(\.gov)|(\.org)|(\..{2,2}))$)\b/gi);
		if (goodEmail){
			good = true
		}else{
			alert('Please enter a correct e-mail')
			field.focus()
			field.select()
			good = false
		}
		return good;
	}
					
		/*------------------------------------------------------------------------------------------------------------*/
	//VENTANAS DE IMAGENES
	function f_ventanita(nombre,img,tipo){
		if (tipo=='Galeria'){
			carpeta = nombre.toLowerCase();
			ruta = "../gallery.php?rut="+"images/gallery/"+carpeta+"/long/"+img+"&idioma=en&nomb="+nombre;
			ventana_imagen = window.open(ruta,"GALLERY","toolbar=no, location=no, directories=no, status=no, scrollbars=0, resizable=0, top=0, left=0, width=550, height=443");
			ventana_imagen.focus();
		}else{
				if (tipo='Mapas'){
					ruta = "../gallery.php?rut="+"images/maps/long/"+img+"&idioma=en&nomb="+nombre;
					ventana_imagen = window.open(ruta,"MAPS","toolbar=no, location=no, directories=no, status=no, scrollbars=1, resizable=1, top=0, left=0, width=700, height=500");
					ventana_imagen.focus();
					}
			}
		//window.open(ruta);
	}
	
//-->
