startList = function() {
if (document.all && document.getElementById) {
    navRoot = document.getElementById("menu").getElementsByTagName("ul")[0];
    for (i=0; i<navRoot.childNodes.length; i++) {
        node = navRoot.childNodes[i];
    if (node.nodeName=="LI") {
       node.onmouseover=function() {
       this.className="root ieover";
    }
    node.onmouseout=function() {
       this.className=this.className.replace("root ieover", "root");
    }
   }
  }
 }
 flashLink = function() {
    if (document.all&&document.getElementById||!!window.opera&&!(navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1)) {
        navLink = document.getElementById("link");
        if(navLink) {
            navLink.onclick = navToPage;
            function navToPage() {
            }
        }
    }
}
flashLink();
}
window.onload=startList;

window.addEvent('domready',function(){
    if($('pw')) {
        $$('table.dane').setStyle('display','none');
        $('pw').addEvent('submit',function(e){
            var e = new Event(e);
            e.preventDefault();
        });
        $($('year').get('value')).setStyle('display','');
        $('year').addEvent('change',function(){
            $$('table.dane').setStyle('display','none');
            $($('year').get('value')).setStyle('display','');
        });
        $('pw').getElement('label').addEvent('click',function(e){
            var e = new Event(e);
            e.preventDefault();
            $('year').focus();
        });
    }
	if ($('akcjonariat')) {
		//new Asset.css(basedir + '/static/css/datepicker.css');
		new Asset.javascript('/js/raphael.js', {
			onload: function(){
				new Asset.javascript('/js/piechart.js');
			}
		});
	}
	if ($('videoplayer')) {
		var loaded = false;
		new Asset.javascript('/js/video.js', {
			onload: function(){
				if (!loaded) {
					new VideoPlayer({
						autoplay: true
					});
					loaded = true;
				}
			}
		});
	}
	$$('#sidebar h2').each(function(header) {
		header.set('html', header.get('html').replace(' ', ' <span>') + '</span>');
	});
});

