﻿//Color Palette
if (!window.Spark.Web.UI) Spark.Web.UI=new Object();
if (!window.Spark.Web.UI.WebControls) Spark.Web.UI.WebControls=new Object();
if (!window.Spark.Web.UI.WebControls.HTMLText) Spark.Web.UI.WebControls.HTMLText=new Object();
if (!window.Spark.Web.UI.WebControls.HTMLText.GlobalResources) Spark.Web.UI.WebControls.HTMLText.GlobalResources=new Object();
Spark.Web.UI.WebControls.HTMLText.GlobalResources.colorPalette=[
		"#3d3e39","#ffffff","#000000","#ff0000","#00ff00","#0000ff","#c8bdb7"];
//Color Palette END


if (!window.Spark) Spark=new Object();
if (!window.Spark.Web) Spark.Web=new Object();
if (!window.Spark.Web.Portal) Spark.Web.Portal=new Object();

function addPageToFavorite() {

    var tytul = "Swiatlo.pl - Home";
    
    var host = document.location.host;
    
    
    var adres = "http://" + host;
 
    //FireFox
    if (window.sidebar) { 

        window.sidebar.addPanel(tytul, adres, ""); 

    //IE
    } else if (window.external) {
      //  alert(adres);
        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();
    }
}