// JavaScript Document
ok = (document.styleSheets) ? 1 : 0;

IE = ((ind1 = navigator.appVersion.indexOf("MSIE")) > -1) ? 1 : 0;
IE4 = (IE && document.all) ? 1:0;

NN = (navigator.appName.indexOf("Netscape")>-1) ? 1 : 0;
NN4 = (NN && document.layers) ? 1 : 0;
NN6 = (NN && document.getElementById) ? 1:0;

if(ok) {
  if(IE4) stile = document.styleSheets[0].rules
  if(NN6) stile = document.styleSheets[0].cssRules 
}

function aumenta() {
	if(ok) {
	var size = stile[0].style.fontSize.substring(0,2)
	var dimFont = parseInt(size,10)
	dimFont += 2;
	{
		if (dimFont > 24) dimFont = 24;
	}
  	stile[0].style.fontSize = dimFont + 'px';	
	}
	
	else
  alert("l'oggetto styleSheets\nNON\nè supportato")
}
function diminuisci() {
	if(ok) {
	var size = stile[0].style.fontSize.substring(0,2)
	var dimFont = parseInt(size,10)
	dimFont -= 2;
	{
		if (dimFont < 8) dimFont = 8;
	}
  	stile[0].style.fontSize = dimFont + 'px';	
	}
	
	else
  alert("l'oggetto styleSheets\nNON\nè supportato")
}
function cambiaFont() {
	
	if (stile[0].style.fontFamily == "Verdana, Arial, Helvetica, sans-serif")  
		stile[0].style.fontFamily = "georgia,times,times new roman,serif";
	
	else
	
	stile[0].style.fontFamily = "Verdana, Arial, Helvetica, sans-serif";
	
	}
	
function visualizza(id){
  if (document.getElementById){
    if(document.getElementById(id).style.display == 'none'){
      document.getElementById(id).style.display = 'block';
    }else{
      document.getElementById(id).style.display = 'none';
    }
  }
}



function expandingWindow(website) {
var windowprops='width=100,height=100,scrollbars=yes,status=yes,resizable=yes'
var heightspeed = 3; // vertical scrolling speed (higher = slower)
var widthspeed = 6;  // horizontal scrolling speed (higher = slower)
var leftdist = 10;    // distance to left edge of window
var topdist = 10;    // distance to top edge of window

if (window.resizeTo&&navigator.userAgent.indexOf("Opera")==-1) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist +","+ windowprops);
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed)
sizer.resizeTo("1", sizeheight);
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed)
sizer.resizeTo(sizewidth, sizeheight);
sizer.location = website;
}
else
window.open(website,'mywindow');
}

