
browserName = navigator.appName;
browserVer = parseInt(navigator.appVersion);
var ver = false
if (browserName == "Microsoft Internet Explorer" && browserVer >= 4) ver = true;
if (browserName == "Netscape" && browserVer >= 3) ver = true;
var livello = 1;


if (ver){
	for (var i = 1; i < 11; i++) {
		eval ("img_" + i + " = new Image()");
		eval ("img_" + i + ".src = '../images/img" + i + "b_appart.jpg'");
	}
	for (i = 5; i < 11; i++) {
		eval ("img2liv_" + i + " = new Image()");
		eval ("img2liv_" + i + ".src = '../images/img" + i + "a_appart.jpg'");
	}
	frecciadxaccesa = new Image();
	frecciadxaccesa.src = "../images/frecciadxaccesa.jpg";
	frecciadxvuoto = new Image();
	frecciadxvuoto.src = "../images/vuoto.gif";
	frecciasxspenta = new Image();
	frecciasxspenta.src = "../images/frecciasxspenta.gif";
	frecciasxaccesa = new Image();
	frecciasxaccesa.src = "../images/frecciasxaccesa.jpg";
	load = true;
}


function ON_img(N_img) {
	if (ver && load) {
		eval ("document.img" + N_img + ".src = img_" + (N_img + (livello - 1) * 5)+ ".src");		
	}
}


function OFF_img(N_img) {
	if (ver && load) {
		if (livello == 1) {
			eval ("document.img" + N_img + ".src = '../images/img" + N_img + "a_appart.jpg'");
		} 
		else {
			eval ("document.img" + N_img + ".src = img2liv_" + (N_img + 5) + ".src")	
		}	 
	}
}

function frecciadxon() {
	if ((livello == 1) && ver && load) document.frecciadx.src = frecciadxaccesa.src;
}

function frecciadxoff() {
	if ((livello == 1) && ver && load) document.frecciadx.src = "../images/frecciadxspenta.gif";
}

function accendifrecciasx() {
	if (ver && load) {
		document.frecciadx.src = frecciadxvuoto.src;
		document.frecciasx.src = frecciasxspenta.src;
		for (var x = 1; x < 6; x++) {
			eval ("document.img" + x + ".src = img2liv_" + (x + 5) + ".src");
		}
		livello = 2;
	}
}

function frecciasxon() {
	if ((livello == 2) && ver && load) document.frecciasx.src = frecciasxaccesa.src;
}

function frecciasxoff() {
	if ((livello == 2) && ver && load) document.frecciasx.src = frecciasxspenta.src;
}

function accendifrecciadx() {
	if (ver && load) {
		document.frecciadx.src = "../images/frecciadxspenta.gif";
		document.frecciasx.src = "../images/box1e_appart.jpg";
		for (var x = 1; x < 6; x++) {
			eval ("document.img" + x + ".src = '../images/img" + x + "a_appart.jpg'"); 
		} 
		livello = 1;
	}
}

function mostrafoto(N_foto) {
	if (livello ==1) {
		if (N_foto == 1) openPictureWindow_Fever('../images/foto1_appart.jpg','262','233','Residence-Prapoz','30','30')
		if (N_foto == 2) openPictureWindow_Fever('../images/foto2_appart.jpg','287','233','Residence-Prapoz','30','30')
		if (N_foto == 3) openPictureWindow_Fever('../images/foto3_appart.jpg','288','233','Residence-Prapoz','30','30')
		if (N_foto == 4) openPictureWindow_Fever('../images/foto4_appart.jpg','301','233','Residence-Prapoz','30','30')
		if (N_foto == 5) openPictureWindow_Fever('../images/foto5_appart.jpg','254','233','Residence-Prapoz','30','30')
	}
	else {
		if (N_foto == 1) openPictureWindow_Fever('../images/foto6_appart.jpg','254','233','Residence-Prapoz','30','30')
		if (N_foto == 2) openPictureWindow_Fever('../images/foto7_appart.jpg','301','233','Residence-Prapoz','30','30')
		if (N_foto == 3) openPictureWindow_Fever('../images/foto8_appart.jpg','257','233','Residence-Prapoz','30','30')
		if (N_foto == 4) openPictureWindow_Fever('../images/foto9_appart.jpg','280','233','Residence-Prapoz','30','30')
		if (N_foto == 5) openPictureWindow_Fever('../images/foto10_appart.jpg','253','233','Residence-Prapoz','30','30')
	}

}
