// JavaScript Document


	function fRedimensionar(){

		if (window.screen.width==1024){
			
			document.getElementById('ZonaFotos').style.width="24%";
			document.getElementById('ContenCuaternario').style.width="75%";
			document.getElementById('ContenedorZonaNoticias').style.width="74%"
			document.getElementById('ZonaDerecha').style.width="25%"
			document.getElementById('ContenSecundario').style.width="83%"
			document.getElementById('ContenMenuIzquierda').style.width="17%"

		}
		
		/*else if (window.screen.width==800){
			
			document.getElementById('ZonaFotos').style.width="32%";
			document.getElementById('ContenCuaternario').style.width="68%";
			document.getElementById('ContenedorZonaNoticias').style.width="56%"
			document.getElementById('ZonaDerecha').style.width="20%"
			document.getElementById('ContenSecundario').style.width="78%"
			document.getElementById('ContenMenuIzquierda').style.width="22%"

		}*/
	}

//------------------------------------------------------------------------------


function Is ()
{   // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase()

    // --- BROWSER VERSION ---
    this.major = stringToNumber(navigator.appVersion)
    this.minor = parseFloat(navigator.appVersion)

    this.nav  = ((agt.indexOf('mozilla')!=-1) && ((agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1)))
    this.nav2 = (this.nav && (this.major == 2))
    this.nav3 = (this.nav && (this.major == 3))
    this.nav4 = (this.nav && (this.major == 4))
	
	//Netscape 6
	this.nav5 =	(this.nav && (this.major == 5))
	this.nav6 = (this.nav && (this.major == 5))
	this.gecko = (this.nav && (this.major >= 5))

    this.ie   = (agt.indexOf("msie") != -1)
    this.ie3  = (this.ie && (this.major == 2))
    this.ie4  = (this.ie && (this.major == 3))
    this.ie5  = (this.ie && (this.major == 4))


    this.opera = (agt.indexOf("opera") != -1)
     
    this.nav4up = this.nav && (this.major >= 4)
    this.ie4up  = this.ie  && (this.major >= 4)
}

function stringToNumber(s) {
        return parseInt(('0' + s), 10)
}


var is = new Is();

function saveImageAs (numero) { 
imgOrURL = "irudiak/MahaiHondoak/MahaiHondoa_"+numero+".jpg"; 

	if (is.ie4up) {
		document.location.href (imgOrURL); setTimeout('document.execCommand("SaveAs")', 500); 
	}
	else {
		location.href = "irudiak/MahaiHondoak/MahaiHondoa_"+numero+".zip";
	}

}