/**
 * @author Mirosław Bogacz
 * @version 1.0
 * @data 03-09-2008r.
 */
/**
 * @version 1.0 beta 1
 * @see
 */
var Ulubione = {
    Ustawienia: {
        Tytul: '',
        Adres: '',
        Id: ''
    },
    Dodaj: function(){
		if (document.getElementById(Ulubione.Ustawienia.Id)) {
			if (window.sidebar) {
				document.getElementById(Ulubione.Ustawienia.IdLink).onclick = function(){
					window.sidebar.addPanel(Ulubione.Ustawienia.Tytul, Ulubione.Ustawienia.Adres, "");
				};
			}
			else 
				if (window.external) {
					document.getElementById(Ulubione.Ustawienia.Id).onclick = function(){
						window.external.AddFavorite(Ulubione.Ustawienia.Adres, Ulubione.Ustawienia.Tytul);
					};
				}
				else 
					if (window.opera && window.print) {
						var e = document.getElementById(Ulubione.Ustawienia.Id);
						e.setAttribute('href', Ulubione.Ustawienia.Adres);
						e.setAttribute('title', Ulubione.Ustawienia.Tytul);
						e.setAttribute('rel', 'sidebar');
					}
		}
	}
};

/**
 * @namespace InfoBrowser
 * @version 0.4 beta
 * @see
 */
var InfoBrowser = new function InfoBrowser(){
    if (window.navigator.userAgent.indexOf('Firefox') != -1) {
        this.Name = 'Firefox';
        this.Version = window.navigator.userAgent.substring(window.navigator.userAgent.indexOf('Firefox') + 8, window.navigator.userAgent.indexOf('.', window.navigator.userAgent.indexOf('Firefox') + 8))
        this.FullVersion = window.navigator.userAgent.substring(window.navigator.userAgent.indexOf('Firefox') + 8, window.navigator.userAgent.length)
    }
    else 
        if (window.navigator.userAgent.indexOf('Opera') != -1) {
            this.Name = 'Opera';
            this.Version = window.navigator.appVersion.substring(0, window.navigator.appVersion.indexOf('('), 0);
            this.FullVersion = window.navigator.appVersion.substring(0, window.navigator.appVersion.indexOf('.'));
        }
        else 
            if (window.navigator.userAgent.indexOf('MSIE') != -1) {
                this.Name = 'Microsoft Internet Explorer';
                this.Version = window.navigator.appVersion.substring(window.navigator.appVersion.indexOf('MSIE') + 4, window.navigator.appVersion.indexOf(';', window.navigator.appVersion.indexOf('MSIE') - 1))
                this.FullVersion = window.navigator.appVersion.substring(window.navigator.appVersion.indexOf('MSIE') + 4, window.navigator.appVersion.indexOf('.', window.navigator.appVersion.indexOf('MSIE') - 1))
            }
            else 
                if (window.navigator.userAgent.indexOf('Safari') != -1) {
                    this.Name = 'Safari';
                    this.Version = window.navigator.userAgent.substring(window.navigator.userAgent.indexOf('Version/') + 8, window.navigator.userAgent.indexOf('S') - 1, window.navigator.userAgent.indexOf('Version/' + 9))
                    this.FullVersion = window.navigator.userAgent.substring(window.navigator.userAgent.indexOf('Version/') + 8, window.navigator.userAgent.indexOf('.', window.navigator.userAgent.indexOf('Version/')))
                }
};

/**
 * @author Mirosław Bogacz
 * @namespace RovelImg
 * @version 1.0 22-05-2009
 */
var RovelImg = {
    start: function(){
        var e = document.getElementsByTagName('img');
        for (var i = 0; i < e.length; i++) {
            if (e[i].src.match(/(_off.)/gi)) {
				RovelImg.active(e[i])
                RovelImg.over(e[i]);
                RovelImg.out(e[i]);
            }
        }
    },
    over: function(e){
        e.onmouseover = function(){
            this.src = this.src.replace('_off.', '_on.');
        }
    },
    out: function(e){
        e.onmouseout = function(){
			if (e.active == false) {
				this.src = this.src.replace('_on.', '_off.');
			}
        }
    },
	active: function (e) {
		this.href = e.parentNode.href;
		this.location = document.location.href;
		
		if (this.location.match(this.href)) {
			e.active = true;
			e.src = e.src.replace('_off.', '_on.');
		} else {
			e.active = false;
		}
	}
};

var webDesktop = function () 
{
	
}


