function addToFavorite() {

    var tytul = 'NZOZ Centrum Medyczne Połaniec Sp. z o.o.';
    var adres = 'http://nzozpolaniec.pl/';

    //FireFox
    if (window.sidebar) { 

        window.sidebar.addPanel(tytul, adres, ""); 

    //IE
    } else if (window.external) {

        window.external.AddFavorite(adres, tytul); 

    //Opera
    } else if (window.opera && window.print) {

        var a = document.createElement('a');
        a.setAttribute('href', adres);
        a.setAttribute('title', tytul);
        a.setAttribute('rel','sidebar');
        a.click();
    }
}

function setAsHomepage()
{
 var adres = 'http://nzozpolaniec.pl/';
 if (document.all)
    {
        document.body.style.behavior='url(#default#homepage)';
		document.body.setHomePage(adres);
 
    }
    else if (window.sidebar)
    {
    if(window.netscape)
    {
         try
		 {  
            netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");  
         }  
         catch(e)  
         {  
		 alert("Twoja przeglądarka zablokowała dodanie strony jako strony startowej. Musisz dodać stronę ręcznie.");  
         }
    } 
    var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components. interfaces.nsIPrefBranch);
    prefs.setCharPref('browser.startup.homepage',adres);
 }
}





