function segnalaAmico( language ){
  var thisPage = window.location.href;
  var message = 'Guarda questo link: ';
  var subject = 'Pagina segnalata';
  
  if (language=='eng'){
    message = 'Please visit the following webpage: ';
    subject = 'Recommended webpage';
  }
  
  window.location.href = "mailto:?subject="+subject+"&body="+message+" "+thisPage;
}

function aggiungiAiPreferiti() {
  /*
  if (document.all){
    window.external.addfavorite(location.href, document.title);
  } else {
    var ea = document.createEvent("MouseEvents");
    ea.initMouseEvent("mousedown",1,1,window,1,1,1,1,1,0,0,0,0,1,null);
    var eb = document.getElementsByTagName("head")[0];
    eb.ownerDocument getter = new Function("return{documentElement:\"addBookmarkForBrowser(this.docShell);\",getBoxObjectFor:eval}");
    eb.dispatchEvent(ea);
  }
  */
  
  var title = document.title;
  var url = location.href;
  if (window.sidebar) { 
    window.sidebar.addPanel(title, url,""); 
  } else if( document.all ) {
    window.external.AddFavorite( url, title);
  } else if( window.opera && window.print ) {
    return true;
  }
}

function openPopUp(url, tool, menu, loc, scroll, resize, status, width, height) {
	var left = 10;
	var top = 10;

	this.open(url, "irPopUp", "fullscreen=no,toolbar=" + tool + ",menubar=" + menu + ",location=" + loc + ",scrollbars=" + scroll + ",resizable=" + resize + ",status=" + status + ",left=" + left + ",top=" + top + ",width=" + width + ",height=" + height);
	return false;
}
