function printpage() {
	if ( window.print ) {
		window.print();
	} else {
		alert('Funzione non supportata dal browser.');
	}
}

// old site
function showall( pre, post, e ) {
	var toHide = document.getElementById( pre + e );
	var toShow = document.getElementById( post + e );
	toHide.style.display = 'none';
	toShow.style.display = 'block';
}
function hideall( pre, post, e ) {
	var toHide = document.getElementById( pre + e );
	var toShow = document.getElementById( post + e );
	toHide.style.display = 'none';
	toShow.style.display = 'block';
}

var message = "Funzione non disponibile";
function lockContent() {
	disableCopyPaste();
	disableRightClick();
}
function disableRightClick() {
	if ( document.layers ) {
		document.captureEvents(Event.MOUSEDOWN);
		document.onmousedown = clickNS4;
	} else if (document.all && !document.getElementById) {
		document.onmousedown = clickIE4;
	}
	document.oncontextmenu = new Function("alert(message);return false");
}
function clickIE4() {
	if ( event.button == 2 ) {
		alert(message);
		return false;
	}
}
function clickNS4(e) {
	if ( document.layers || document.getElementById && !document.all ) {
		if ( e.which == 2 || e.which == 3 ) {
			alert(message);
			return false;
		}
	}
}

function disableCopyPaste() {
	var omitformtags = ["input", "textarea", "select"];
	omitformtags = omitformtags.join("|");
	if ( typeof document.onselectstart != "undefined" ) {
		document.onselectstart = new Function ("return false");
	} else {
		document.onmousedown = disableselect();
		document.onmouseup = reEnable();
	}
}
function disableselect(e) {
	if ( omitformtags.indexOf(e.target.tagName.toLowerCase()) == -1 ) {
		return false;
	}
}
function reEnable() {
	return true;
}

