// JavaScript Document
//



//  begin script per nasconder/visualizzare div

var getById = (typeof document.getElementById != "undefined");		

function toggleDisplay(obj,display1,display2){
	if(!getById) return;	
	obj = getRef(obj);	
	if(obj.style.display == display1)
		obj.style.display = display2;
	else
		obj.style.display = display1;	
	repaintFix();
}

function getRef(obj){
	if(getById)
		return(typeof obj == "string") ? document.getElementById(obj) : obj;
}

function repaintFix(obj){ 	
	if("undefined" == typeof document.body
	  || "undefined" == typeof document.body.style) return;	
	if(obj == null)
		obj == document.body;
	else obj = getRef(obj);	
	document.body.style.visibility = "hidden";
	document.body.style.visibility = "visible";
}
//  end script per nasconder/visualizzare div


// setta la grandezza dei caratteri

function createCookie(name,value,days) {
  if (days) {
    var date = new Date();
    date.setTime(date.getTime()+(days*24*60*60*1000));
    var expires = '; expires='+date.toGMTString();
  }
  else expires = '';
  document.cookie = name+'='+value+expires+'; path=/';
}

function readCookie(name) {
  var nameEQ = name + '=';
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}

function setFontSize(size) {
	var body = document.getElementsByTagName('body')[0];
	var percentuale = "90%"; // default
	if (size == 1) percentuale = "70%";
	if (size == 2) percentuale = "80%";
	if (size == 3) percentuale = "90%";
	if (size == 4) percentuale = "100%";
	if (size == 5) percentuale = "110%";
	body.style.fontSize = percentuale;
	createCookie('TuoSitoFontSize',size,365);
}

<!-- Begin
// quick browser tests
var ns4 = (document.layers) ? true : false;
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (!document.all && document.getElementById) ? true : false;

function show(sw,obj) {
	// show/hide the divisions
	if (sw && (ie4 || ie5) ) document.all[obj].style.display = 'block';
	if (!sw && (ie4 || ie5) ) document.all[obj].style.display = 'none';
	if (sw && ns4) document.layers[obj].visibility = "visible";
	if (!sw && ns4) document.layers[obj].visibility = "hidden";
}
// End -->

	object_ID=null;
	action=0;
    function blink_action(link_ID,param) {
		action=param;
		object_ID=link_ID;
		if (action) {
			blink_on();
		} else {
			action=0;
			object_ID.style.color="c0c0c0";
		}
	}
	
	function blink_on() {
       object_ID.style.color="333333";
       if (action) { 
	   		timerOne=setTimeout("blink_off()", 10);
		} else {
			object_ID.style.color="c0c0c0";
		}
	}

	function blink_off() {
       object_ID.style.color="c0c0c0";
       if (action) {
	   		timerTwo=setTimeout("blink_on()", 10);
		} else {
			object_ID.style.color="c0c0c0";
		}
	}
//
<!--- disable right click --->
/*
function clickIE() {
if (document.all) {
return false;}}
function clickNS(e) {
if (document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {
return false;
}}}
if (document.layers) 
{
document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;
}else{
document.onmouseup=clickNS;
document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
*/
<!-- rollover e rollout per icone immagine e link-->
function opacityOn(elem){
if(document.all){
elem.filters.alpha.opacity = '100';
}}

function opacityOff(elem){
if(document.all){
elem.filters.alpha.opacity = '70';
}}

function MM_displayStatusMsg(msgStr) { //v1.0
  status=msgStr;
  document.MM_returnValue = true;
}

<!-- finestra popup generica con variabili-->
function popup_generica (url,wname,w,h,scroll,browserloc,menubar,resizable,status,directories,toolbar) {
	var winl = (screen.width - w) / 2 - 5;
	var wint = (screen.height - h) / 2 -80;
	finestra = window.open(url,wname,'top='+wint+',left='+winl+',width='+w+',height='+h+',buttons=1,scrollbars='+scroll+',location='+browserloc+',menubar='+menubar+',resizable='+resizable+',status='+status+',directories='+directories+',toolbar='+toolbar+',copyhistory=Yes');
}

<!--- finestra popup immagini ingrandite centrata --->

function popupimage(theURL,winName,features) {
    finestra=window.open(theURL,winName,features);  
}


<!--- violazione download --->

/*function click(){
	if (event.button==2)
		{ alert('Copyright Mutech')}
	}
	document.onmousedown=click*/

function nominatarget() {
	self.name = "template";
}

defaultStatus = "Mutech"

