// Giancarlo Casano Multitech Sas     

/**
 * PER ESPANSIONE DEI FONT
 *
 */

var min=12;
var max=18;
var f = 13;
var h = 24;

function increaseFontSize() {
   var textarticol = document.getElementById("news");
      if(textarticol.style.fontSize == "") {
	  	textarticol.style.fontSize = "13px";
		textarticol.style.lineHeight = "24px";
	  }
      if(f!=max) {
	     f += 1;
		 h += 1;
      }
      textarticol.style.fontSize = f+"px"
	  textarticol.style.lineHeight = h+"px"
}

function decreaseFontSize() {
   var textarticol = document.getElementById("news");
      if(textarticol.style.fontSize == "") {
	  	textarticol.style.fontSize = "13px";
		textarticol.style.lineHeight = "24px";
	  }
      if(f!=min) {
         f -= 1;
		 h -= 1;
      }
      textarticol.style.fontSize = f+"px"
	  textarticol.style.lineHeight = h+"px"
}

function nurl(){
    // nulla
    return false;
}

// Bookmark crossbrowser (c) Multitech Sas
// funzione aggiungi ai prederiti

/* Modified to support Opera */
function addBookmark(title,url){
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}

// funzione imposta homepage
function setHomePage(siteURL) {
var browser = navigator.appName;
var version = navigator.appVersion.substring(0, 1);
var ie =
  ((browser == "Microsoft Internet Explorer") &&
  (version >= 4));
var ns =
  ((browser == "Netscape") &&
  (version >= 4 && version < 5));

  if (ie) {
    document.body.style.behavior = "url(#default#homepage)";
    document.body.setHomePage(siteURL);
  } else
    alert(
      "Il browser in uso non supporta questa funzionalità.\n" +
      "Per impostare questo sito come pagina iniziale, trascinare manualmente\n" +
      "il link della barra indirizzi sull\'icona homepage del browser."
    );
}


/* This script and many more are available free online at
The JavaScript Source :: http://javascript.internet.com
Updated by: Mike Weiner :: http://www.wearebent.com
Original author: Eric King (eric_andrew_king@hotmail.com)
Last Updated: May 2006 */

/*
<a href="pop.html" onclick="newWindow(this.href, 'popup', 600, 500, 1, 1, 0, 0, 0, 1, 0); return false;" target="_blank">
1. URL del file da aprire: usando this.href, lo script andra' a usare come valore quello impostato per l'attributo href (che sempre impostato per salvguardare l'accessibilita'!);
2. nome della finestra popup: nel nostro caso il nome e' 'popup', ma qualunque nome va bene;
3. larghezza della finestra (600);
4. altezza della finestra (500);
5. presenza delle scrollbar (1 = si, 0 = no);
6. la finestra e' ridimensionabile? (1 = si, 0 = no);
7. presenza della barra dei menu (1 = si, 0 = no);
8. presenza della barra degli strumenti (1 = si, 0 = no);
9. presenza della barra dell'indirizzo (1 = si, 0 = no);
10.presenza della barra di stato (1 = si, 0 = no);
11.visualizzazione a tutto schermo (1 = si, 0 = no).
*/

function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',statusbar=' + a_bool_statusbar + ',fullscreen=' + a_bool_fullscreen + '';
  var obj_window = window.open(a_str_windowURL, a_str_windowName, str_windowProperties)
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}


//Giancarlo Casano Multitech Sas     
function highlight_row(the_element) {
    if(the_element.parentNode.parentNode.style.backgroundColor != '#64AAFF') { // Colore onclick
        the_element.parentNode.parentNode.style.backgroundColor = '#64AAFF';  // Colore onclick
    } else {
        the_element.parentNode.parentNode.style.backgroundColor = '#EDEDED';    // Colore default
    }
}

function set_hover(the_row) {
    if(the_row.style.backgroundColor != '#d2b48c') {  // Colore onclick
        the_row.style.backgroundColor = '#fff8dc';  // Colore onmouseover
    }
}

function remove_hover(the_row) {
    if(the_row.style.backgroundColor != '#d2b48c') {  // Colore onclick
        the_row.style.backgroundColor = '#EBEAD1';    // Colore default
    }
}
