// Questo file è stato creato il 14/09/2005 da Lorenzo Breme e contiene funzioni javascript di utilità generale

	// Questa funzione imposta l'home page sul browser
	function fnSet() {

		var s_url = "http://www.visitatorino.com";
		var s_nn = "Your browser does not support the automatic setting of \nthe HomePage. Manually setting up is necessary";
		var s_op = "Your browser does not support the automatic setting of \nthe HomePage. Manually setting up is necessary";
		var s_other = "Your browser does not support the automatic setting of \nthe HomePage. Manually setting up is necessary";

		if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

			oHomePage.style.behavior = "url('#default#homePage')"
			oHomePage.setHomePage(s_url);
			return true;

		} else if (navigator.appName == "Netscape") {

			alert(s_nn);

		}	else if (navigator.appName == "Opera") {

			alert(s_op);
		}
		else {
		  document.write("" + s_other + "");
		}

	}


	//Questa funzione aggiunge la pagina web nei preferiti
	function fvSet() {

		var b_url = "http://www.visitatorino.com";
		var b_title = "VisitaTorino";
		var b_nn = "Your browser does not support the automatic addition of the \npage in the Favourites. Manually setting up is necessary";
		var b_nn6 = "Your browser does not support the automatic addition of the \npage in the Favourites. Manually setting up is necessary";
		var b_op = "Your browser does not support the automatic addition of the \npage in the Favourites. Manually setting up is necessary";
		var b_other = "Your browser does not support the automatic addition of the \npage in the Favourites. Manually setting up is necessary";

		if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4)) {

			window.external.addfavorite(b_url,b_title);
			return true;
		}
		else if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) <= 4)) {

	  	alert(b_nn);
		}
		else if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 5)) {

			alert(b_nn6);
		}
		else if (navigator.appName == "Opera") {

	  	alert(b_op);
		}
		else {

	  	alert(b_other);
		}
	}
