noweOkienko = null;
function galeria(src, w, h, name){
if(window.screen){
 aw=screen.availWidth;
 ah=screen.availHeight;
}else{
 aw=640;
 ah=450;
}
if(noweOkienko==null || noweOkienko.closed){
 ustawienia=
 "left=" + (aw-w)/2 + ","
 +"top=" + (ah-h)/2 + ","
 +"screenX=" + (aw-w)/2 + ","
 +"screenY=" + (ah-h)/2 + ","
 +"width=" + w + ","
 +"height=" + h + ","
 +"innerWidth=" + w + ","
 +"innerHeight=" + h + ","
 +"toolbar=no,"
 +"location=no,"
 +"directories=no,"
 +"status=no,"
 +"menubar=no,"
 +"scrollbars=no,"
 +"resizable=no"
 noweOkienko = window.open("",'obrazek',ustawienia);
}
noweOkienko.document.open();
noweOkienko.document.clear();
noweOkienko.document.write('<html><head><title>'+ name +'</title>\n'+'<style><!--\n'+'body{background-repeat:no-repeat}\n'+'--></style>\n'+'</head>\n'+'<body background="' + src + '"></body>\n'+'</html>');
noweOkienko.document.close();
noweOkienko.focus();
}

function popup(adres,w,h)
{
 window.open(adres, '', 'toolbar=no,menubar=no,resizable=no,status=no,margines=no,location=no,directories=no,copyhistory=no,scrollbars=yes,height='+h+',width='+w+',left=0,top=0');
 // definicja otwieranego okienka przy wejściu
}

startList = function() {
// Required update: if the page has no primary nav, don't do anything, don't give an error.
  if (document.all&&document.getElementById) {
    navRoot = document.getElementById("submenu");
    if (navRoot) {
      for (i=0; i<navRoot.childNodes.length; i++) {
        node = navRoot.childNodes[i];
        if (node.nodeName=="LI") {
          node.onmouseover=function() {
            this.className+=" over";
          }
          node.onmouseout=function() {
            this.className=this.className.replace(" over", "");
          }
} } } } }

// Set up onclick events for popup windows
/*initPopups = function() {
  var x = document.getElementById('channels');
  var y = document.getElementById('footer');
 
  if (x) { x = x.getElementsByTagName('a'); } // Collect all <a/> tags within the channels area
  if (y) { y = y.getElementsByTagName('a'); }

  var list = new Array();
  if (x) { for(var i=0; i<x.length; i++) { list[list.length] = x[i]; } }
  if (y) { for(var i=0; i<y.length; i++) { list[list.length] = y[i]; } }
  // Set default values
  var width = 800; var height = 600; var scroll = 1; var resize = 1; var status = 1;
  if (list.length > 0) {
    for (var i=0; i < list.length; i++) {
		  if (list[i].className == "popupLink") {
				if (!list[i].onclick) { // Make sure not to overwrite an existing onclick event
					  list[i].onclick = function() {
						var wHref = this.href;
						var wName = this.target;
						if (wName=="_blank" || wName=="") { wName = "default"; }
						if (wName=="wDownloadHelp") { width = 640; height = 480; status = 0; }
						if (wName=="wForm") { wHref += "?referer=" + window.location; width = 640; height = 480; scroll = 0; status = 0; }
						if (wName=="wSiteFeedback") { wHref += "?referer=" + window.location; }
						if (wName=="wDownload") { status = 0; }
						if (wName=="wWebcast") { width=950; height=700; status=0; }
						popup(wHref, wName, width, height, scroll, resize, status);
						return false;
					  } 
				} 
		  } 
    } 
  } 

} */

execOnLoad = function() {
 startList();
// initPopups();
}

window.onload=execOnLoad;
