function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}


    // convert all characters to lowercase to simplify testing
    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    // Note: On IE5, these return 4, so use is_ie5up to detect IE5.
    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie3    = (is_ie && (is_major < 4));
    var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
    var is_ie4up  = (is_ie && (is_major >= 4));
    var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
    var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
    var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
    var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
    var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
    var is_opera = (window.opera)?true:false;
    var is_opera7 = (window.opera)?true:false;
    var is_gecko = (agt.indexOf('gecko') != -1);

if(document.all && !document.getElementById)
    document.getElementById = function(id) { return document.all[id]; }

if(document.all && !document.getElementsByTagName)
    document.getElementsByTagName = function(tag) { return document.all.tags(tag); }
	

function sClear(obj,itxt) {
	if (obj.value == itxt) obj.value = '';
}
function sReturn(obj,itxt) {
	if (obj.value == '') obj.value = itxt;
}

var activeSubMenu = false;
var timeOut = 1000;

function subMenu(obj,show) {
	if (obj.nextSibling.tagName == 'UL') {
	activeSubMenu = t = obj.nextSibling;	

	if (show) {
		allul = document.getElementsByTagName('ul');
		for (a = 0; a < allul.length; ++a) if (allul[a].className == 'submenu') allul[a].style.display = 'none';
		t.style.display = 'block';
		//alert (obj.parentNode.parentNode.scrollLeft);
		t.style.left = (obj.scrollLeft<230)?obj.scrollLeft+ 'px':'190px';
	}
	else {
		activeSubMenu = false;
	 	setTimeout ("hideSubmenu(document.getElementById('"+t.id+"'))",timeOut);
	}
	}
}
function hideSubmenu(t) {
	if (!activeSubMenu || activeSubMenu != t) t.style.display = 'none';
}

function overMenu(t) {
	activeSubMenu = t;
}

function outMenu(t) {
	activeSubMenu = false;
 	setTimeout ("hideSubmenu(document.getElementById('"+t.id+"'))",timeOut);
}

function flash(name,src,x,y,ver,opcja,opcja2,bg) {
	

	if (is_ie) { b = 'ie' }
	
	else if (is_gecko) { b = 'gecko' }
	else if (is_opera) { b = 'opera' }

	if (opcja == 'w3c' || (opcja == 'jsOpti' && b != 'ie')) {
		document.write ('<object id="'+name+'" type="application/x-shockwave-flash" data="'+src+'" width="'+x+'" height="'+y+'" >');
		document.write ('<param name="movie" value="'+src+'" >');
		document.write ('<param name="swliveconnect" value="true">');
		if (bg) document.write ('<param name="bgcolor" value="'+bg+'">');
		document.write ('</object>');
	}
	else if (opcja == 'fsc' || (opcja == 'jsOpti' && b == 'ie') || (opcja == 'transparent' && b == 'ie')) {

		document.write ('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write ('codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version='+ver+',0,0,0"');
		document.write ('width='+x+' height='+y+' id="'+name+'">');
		document.write ('<param name=movie value="'+src+'">');
		document.write ('<param name=quality value=high>');

		if (opcja == 'transparent') document.write ('<param name="wmode" value="transparent">');

		document.write ('<param name="swliveconnect" value="true">');
		document.write ('<embed src="'+src+'" quality="high" width="'+x+'" height="'+y+'"');
		document.write (' type="application/x-shockwave-flash"');
		document.write (' pluginspage="http://www.macromedia.com/downloads/"');
		document.write (' name="'+name+'" swliveconnect="true">');
		document.write ('</embed>');
		document.write ('</object>');
	}
}
var cg = 0;

function rotateGal() {
	
	++cg;
	if( !lastGal[cg] ) cg = 1;
	document.getElementById('galprv').src = lastGal[cg];
	setTimeout("rotateGal()",3000);
}

function oW (path,Xsiz,Ysiz) {
	var przed = '';
	if (!(Xsiz > 0)) { Xsiz = 450; }
	if (!(Ysiz > 0)) { Ysiz = 300; }
	w = window.open(przed+path, 'fotozoom', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,fullscreen=no,channelmode=no,width='+Xsiz+',height='+Ysiz+',top=30,left=30');
	w.focus();
	void(0);
}
function openWindow(path,name,scrollbars,x,y) {
	w = window.open(path, name, 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars='+scrollbars+',resizable=yes,fullscreen=no,channelmode=no,width='+x+',height='+y+',top=30,left=30');
	w.focus();
	void(0);

}

function getValue(varname)
{

  var url = window.location.href;
  var qparts = url.split("?");
  if (qparts.length == 0)
  {
    return "";
  }
  var query = qparts[1];
  var vars = query.split("&");
  var value = "";

  for (i=0;i<vars.length;i++)
  {
    var parts = vars[i].split("=");
    if (parts[0] == varname)
    {
      value = parts[1];
      break;
    }
  }
  
  value = unescape(value);
  value.replace(/\+/g," ");

  return value;
}

window.onload = rotateGal;