// @(#) $Id: main.js,v 1.1.1.1 2004/05/07 09:14:29 tom Exp $
/*
startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		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", "");
				}
			}
		}
	}
}
*/
startList = function() {
	if (document.all && document.getElementById) {
		//var navRoot = document.getElementById("nav");
		
		var navRoot = document.getElementsByName("nav");
		for (j = 0; j < navRoot.length; j++) {
				
				var elem = navRoot[j];
				
			for (i = 0; i < elem.childNodes.length; i++) {
				node = elem.childNodes[i];
				/*alert( node.innerHTML + " " + node.nodeName);*/
				if (node.nodeName == "LI") {
					node.onmouseover = function(){
						this.className += " over";
					}
					node.onmouseout = function(){
						this.className = this.className.replace(" over", "");
					}
				}
			}
		}
	}
}
window.onload=startList;

function WOpen(name,url,w,h,s,r)
{
	return(window.open(url,name,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars="+s+",resizable="+r+",fullscreen=no,channelmode=no,width="+w+",height="+h));
}

// -------------------------------------------------------------------------------
// Title
// wstawia tytul flashowy na strone
// -------------------------------------------------------------------------------
function title( title01_str, title02_str, width, height )
{
	if( title01_str == undefined ) title01_str = "";
	if( title02_str == undefined ) title02_str = "";
	if( width == undefined ) width = 500;
	if( height == undefined ) height = 60;
	var swf_object = "";
	swf_object += "<object width='"+width+"' height='"+height+"' id='title01' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0'>";
	swf_object += "<param name='movie' value='lib.flash/title01.swf'>";
	swf_object += "<param name='flashvars' value='text01="+title01_str+"&text02="+title02_str+"'>";
	swf_object += "<param name='scale' value='NoScale'>";
	swf_object += "<param name='salign' value='tl'>";
	swf_object += "<param name='quality' value='high'>";
	swf_object += "<param name='bgcolor' value='#ffffff'>";
	swf_object += "<param name='wmode' value='transparent'>";
	swf_object += "<param name='menu' value='false'>";
	swf_object += "<embed src='lib.flash/title01.swf' flashvars='text01="+title01_str+"&text02="+title02_str+"' swliveconnect='true' width='"+width+"' height='"+height+"' bgcolor='#ffffff' name='title01' wmode='transparent' menu='false' quality='high' scale='NoScale' salign='tl' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'></embed>";
	swf_object += "</object>";
	document.write( swf_object );
}


var ScrollX;
var ScrollY;
function ScrollPos()
{
	ScrollX = (document.all)?document.body.scrollLeft:window.pageXOffset;
	ScrollY = (document.all)?document.body.scrollTop:window.pageYOffset;
}


document.write( "<div id=\"zoomObj\" style=\"position: absolute; width: 100%; height: 100%; border: solid 0px red; display: none; \" align=\"center\"><table style=\"background-color: white; border: solid 1px #a0a0a0; \"><tr><td id=\"zoomObjInner\" align=\"center\" style=\"padding: 10px;\">");
document.write( "<table border='0' cellspacing='0' cellpadding='0' style='margin-bottom: 10px; border-bottom: solid 1px #a0a0a0;'>" );
document.write( "<tr valign='top'>" );
document.write( "<td width='100%' style='padding-right: 10px;'>" );
document.write( "<p style='font-size: 18px;'><b>%title%</b></p>" );
document.write( "<p style='margin-bottom: 10px;'>%desc%</p>" );
document.write( "</td>" );
document.write( "<td>" );
document.write( "<a href='javascript:Zoom();'><img src='i/l/zoomClose.gif' style='border: 0px;'></a>" );
document.write( "</td>" );
document.write( "</tr>" );
document.write( "</table>" );
document.write( "<div id='ZoomImageContainer' style='position: relative;'>" );
document.write( "<img src='%img%'>" );
document.write( "</div>" );
document.write( "</td></tr></table></div>" );
var ZoomObjInnerSource = document.getElementById( "zoomObjInner" ).innerHTML;
function Zoom( img, title, desc ){
	//var lc_elem = document.getElementById( "lc" );

    //alert(lc_elem.innerHTML );
	var lc = document.getElementById( "lc" ).innerHTML;
	
	//var lc = lc_elem.innerHTML ;
	//if ((lc != "en_00") && (lc != "en_01") && (lc != "cs_CZ")  )  { 
		//return; 
	//}
	
	var o = document.getElementById( "zoomObj" );
	var i = document.getElementById( "zoomObjInner" );
	if( !img ){ o.style.display = "none"; return; }
	//if( !ZoomObjInnerSource ){ ZoomObjInnerSource = document.getElementById( "zoomObjInner" ).innerHTML; }

	if( !title ){ title = ""; }
	if( !desc ){ desc = ""; }

	var html = ZoomObjInnerSource;
	html = html.replace( "%title%", title );
	html = html.replace( "%desc%", desc );
	html = html.replace( "%img%", img );
	i.innerHTML = html;
	o.style.display = "block";
	ScrollPos();
	o.style.top = ( ScrollY + 25 )+"px";
	return;
}
