// JavaScript Document
<!-- Begin
function CreateBookmarkLink(url,title) {
	if(!url) url = location.href;
	if(!title) title = document.title || url.replace(/^(.+):\/\//,"").replace(/\/$/,"").replace(/\//g,"_");
	if(typeof(window.external)!="undefined" && typeof(window.external.addFavorite)!="undefined") {
		window.external.addFavorite(url,title);
		return true;
	}
	else try {
		netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect")
		var b = Components.classes["@mozilla.org/browser/bookmarks-service;1"].getService();
		b = b.QueryInterface(Components.interfaces.nsIBookmarksService);
		b.addBookmarkImmediately(url,title,0,null);
		return true;
	} catch(e) {
		if(typeof(window.sidebar)!="undefined" && typeof(window.sidebar.addPanel)!="undefined") {
			window.sidebar.addPanel(title,url,"");
			return true;
		}
		else
			return false;
	}
}
// Imposta come home page
function setHomepage()
{
 if (document.all)
    {
        document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage('http://calcestruzzi.capuano.net/');
 
    }
    else if (window.sidebar)
    {
    if(window.netscape)
    {
         try
   {  
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
         catch(e)  
         {  
    alert("Questa azione non è consentita dal browser in uso, se vuoi abilitarla, inserisci 'about:config' nella barra degli indirizzi, e cambia il valore di 'signed.applets.codebase_principal_support' a true");  
         }
    } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage','http://calcestruzzi.capuano.net/');
 }
}
var popUpWin=0;
function NewWin(mypage, myname, w, h, scroll)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=yes,status=yes, menubar=yes, toolbar=yes, address=yes, location=1'

  popUpWin = open(mypage, myname, winprops);}
//  End -->

