//********************
//*****NOWE OKNO******
//********************
function nowe_okno(patch, name, pwidth, pheight){
	okno=window.open('','ksnr','width='+pwidth+',height='+pheight+',top=0,left=0');
	okno.document.write ("<HTML><HEAD><TITLE>"+name+"</TITLE></HEAD> <BODY topmargin=0 leftmargin=0 style='cursor:hand'onclick=parent.close()><IMG SRC="+patch+" width="+pwidth+" height="+pheight+" border=\"0\" alt='Kliknij aby zamknąć'></BODY</HTML>");
	okno.document.close();
	okno.focus();
}

function nowe_okno_help(lang){
   okno=window.open("","DisplayWindow","toolbar=no,directories=no,menubar=no");
   if (lang == "en"){
     okno.document.write("<HEAD><TITLE>Guest Book - Help</TITLE></HEAD>"); 
     okno.document.write("<BODY topmargin=0 leftmargin=0 style='cursor:hand'onclick=parent.close()>");
     okno.document.write("<HR><H3>Under translate...</H3><HR>");
   } else {
     okno.document.write("<HEAD><TITLE>Księga Gości - pomoc</TITLE></HEAD>");
     okno.document.write("<BODY topmargin=0 leftmargin=0 style='cursor:hand'onclick=parent.close()>");

   }
   okno.document.close();
   okno.focus();
}

//********************
//********MENU********
//********************
offMessage = "Wybierz interesujący Cię temat..."

function boxOn(which, message, id) {
	if (document.all||document.getElementById) {
		which.className = 'BorderOn';
		if (document.getElementById) {
			document.getElementById("Message").innerHTML = message
		}else {
			Message.innerHTML = message;      
		}   
	}
if (id == "0") bMenu.showByCursor('m_zp',50,0);
if (id == "1") bMenu.showByCursor('m_pr',50,0);
if (id == "2") bMenu.showByCursor('m_se',50,0);
if (id == "3") bMenu.showByCursor('m_pd',50,0);
}

function boxOff(which) {
if (document.all||document.getElementById) {
	which.className = 'BorderOff';
	if (document.getElementById) {
		document.getElementById("Message").innerHTML = offMessage
		}else {
		Message.innerHTML = offMessage;
		}
	}
}

function box(which) {
	which.className = 'menu(active)';
}

//********************
//*****NOTOWANIE******
//********************
function CreerCurseur(nom,min,max,star_w,star_h,emot_w,emot_h,gifon,gifoff,delai) {
	this.nom=nom;
	this.valeur=Math.round((max-min)/2+2); 
	this.action=0; 
	this.delai=delai;
	this.min=min; this.max=max; 
	//this.pas=0;
	this.star_w=star_w; this.star_h=star_h;
	this.emot_w=emot_w; this.emot_h=emot_h;
	this.gifon=gifon; this.gifoff=gifoff;
	this.Affecte=AffecteCurseurbis;
	this.Affiche=AffCurseurbis;
	this.Update=UpdateCurseurbis;
}

function NoteScriptbis() {
	document.kg.rating.value=note.valeur;
}

function AffCurseurbis() {
	var Z=""; 
	for (var i=this.min;i<this.max;i++) {
		if (i<this.valeur) {gif=this.gifon;} else {gif=this.gifoff;}
		Z+="<A onmouseover='javascript:eval(\""+this.nom+".Affecte("+(i+1)+");\");'>";
		Z+="<IMG CLASS=\"srodek\" name="+this.nom+i+" src='"+gif+"' width="+this.star_w+" height="+this.star_h+" border=0 alt='"+this.nom+" : "+(i+1)+"'>";
		Z+="</A>";
	}
	
	document.write(Z);
}

function AffecteCurseurbis(val) {
	this.valeur=val;
	this.Update();
}

function UpdateCurseurbis() {
	for (var i=this.min;i<this.max;i++) {
		if (i<this.valeur) {gif=this.gifon;} else {gif=this.gifoff;}
		document.images[this.nom+i+""].src=gif;
	}
	Updatebis("imgnote",this.valeur,this.max);
}

function Updatebis(img,val,max) {
	if (val<=max) {src='data/kg/v_1.gif'}
	if (val<Math.floor(max*0.8)) {src='data/kg/v_2.gif'}
	if (val<Math.floor(max*0.6)) {src='data/kg/v_3.gif'}
	if (val<Math.floor(max*0.3)) {src='data/kg/v_4.gif'}
	document.images[img].src=src;
}

function loadbis() {
	if (document.images) {
		this.length=load.arguments.length;
		for (var i=0;i<this.length;i++) {
			this[i+1]=new Image();
			this[i+1].src=load.arguments[i];
		}
	}
}

function preloadbis() {
	var temp=new loadbis("data/kg/v_4.gif","data/kg/v_3.gif","data/kg/v_2.gif","data/kg/v_1.gif");
}




//********************
//***MENU ROZWIJANE***
//********************
function NowewMenuPL(menu){
 with(menu){
	zIndex=1
	APC=1
	waitDelay=1000
	hideDelay=400

	globalPanel={bgColor:'#003399', bgImage:0, width:0, borderClass:'b2pxwhite', marginH:3, marginV:1, opacity:60, filterIE:0}
	globalItem={fontClass:'alFont', fontClassOver:'alFontOv', bgColor:0, bgColorOver:'#000000', bgImage:0, bgImageOver:0, height:0, align:'left', alignOver:'left', valign:'middle', valignOver:'middle', borderClass:0, borderClassOver:0, cursor:'pointer', filterIE:0}

	var kursor={cursor:'pointer'}
	var separator={bgColorOver:0}
//Menu projekty
 with(Panel('m_zp')){
  Item('zp.php?lang=pl#poczatek',		'Wstęp')
  Item(0,'<hr>',separator)
  Item('zp.php?lang=pl#zasilacz_12V_50A',	'Zasilacz 12V, 50A')
  Item('zp.php?lang=pl#termometr_800_1600',	'Termometr 800C - 1600C ')
  Item('zp.php?lang=pl#generator_DDA',		'Generator DDA')
  Item('zp.php?lang=pl#miliwatomierz',		'Miliwatomierz')
  Item('zp.php?lang=pl#stezenie_co2',		'Miernik stężenia CO2')
  Item('zp.php?lang=pl#wilgotnosciomierz',	'Miernik wilgotności')
  Item('zp.php?lang=pl#cisnieniomierz',		'Miernik ciśnienia')
  Item('zp.php?lang=pl#generator_funkcyjny',	'Generator funkcyjny')
  Item('zp.php?lang=pl#instalacja_warsztat',	'Instalacja elektryczna')
 }
//Menu programy
 with(Panel('m_pr')){
  Item('pr.php?lang=pl#poczatek',		'Wstęp')
  Item(0,'<hr>',separator)
  Item('pr.php?lang=pl#analiza_harmonicznych',	'Numeryczna analiza harmonicznych')
  Item('pr.php?lang=pl#rownania_stanu_v1',	'Równania stanu (v.1)')
  Item('pr.php?lang=pl#rownania_stanu_v2',	'Równania stanu (v.2)')
  Item('pr.php?lang=pl#szereg_fouriera',	'Szereg Fouriera')
  Item('pr.php?lang=pl#wsp_uwarunkowania',	'Uwarunkowanie macierzy')
  Item('pr.php?lang=pl#pomiar_kata_fazowego',	'Estymacja kąta fazowego')
  Item('pr.php?lang=pl#wypieranie_pradu',	'Zjawisko naskórkowości')
  Item('pr.php?lang=pl#natezenie_linia',	'Rozkład natężenia (linia)')
  Item('pr.php?lang=pl#natezenie_przewod',	'Rozkład natężenia (przewód)')
  Item('pr.php?lang=pl#potencjaly',		'Analiza obwodu')
  Item('pr.php?lang=pl#numeryczne',		'Programy numeryczne')
  Item('pr.php?lang=pl#graficzne',		'Programy graficzne')
 }
//Menu seminarki
 with(Panel('m_se')){
  Item('se.php?lang=pl#poczatek',		'Wstęp')
  Item(0,'<hr>',separator)
  Item('se.php?lang=pl#mikrokontrolery',	'Mikrokontrolery')
  Item('se.php?lang=pl#uklady_cyfrowe',		'Układy cyfrowe')
  Item('se.php?lang=pl#systemy_pomiarowe',	'Systemy pomiarowe')
  Item('se.php?lang=pl#modele',			'Modele obiektów dynamicznych')
  Item('se.php?lang=pl#mostek',			'Mostki dwuprądowe')
  Item('se.php?lang=pl#funkcje_nieortogonalne',	'Funkcje nieortogonalne') 
 }
//Menu praca dyplomowa
 with(Panel('m_pd')){
  Item('pd.php?lang=pl#poczatek',		'Wstęp')
  Item(0,'<hr>',separator)
  Item('pd.php?lang=pl#przesuwniki',		'Badane przesuwniki')
  Item('pd.php?lang=pl#aplikacja',		'Aplikacja &raquo').expand('m_pd_a')
  Item('pd.php?lang=pl#stanowisko',		'Stanowisko laboratoryjne') 
 }
////PodMenu praca dyplomowa
 with(Panel('m_pd_a')){
  Item('pd.php?lang=pl#charakterograf',		'Cyfrowy charakterograf')
  Item('pd.php?lang=pl#przesuwnik',		'Cyfrowy przesuwnik fazowy')
 }
 }
}

function NowewMenuEN(menu){
  with(menu){
    zIndex=1
    APC=1
    waitDelay=1000
    hideDelay=400
    globalPanel={bgColor:'#003399', bgImage:0, width:0, borderClass:'b2pxwhite', marginH:3, marginV:1, opacity:60, filterIE:0}
    globalItem={fontClass:'alFont', fontClassOver:'alFontOv', bgColor:0, bgColorOver:'#000000', bgImage:0, bgImageOver:0, height:0, align:'left', alignOver:'left', valign:'middle', valignOver:'middle', borderClass:0, borderClassOver:0, cursor:'pointer', filterIE:0}
    var kursor={cursor:'pointer'}
    var separator={bgColorOver:0}

	//Menu projekty
    with(Panel('m_zp')){
      Item('zp.php?lang=en#poczatek',			'Introduction')
      Item(0,'<hr>',separator)
      Item('zp.php?lang=en#zasilacz_12V_50A',		'Power supply 12V, 50A')
      Item('zp.php?lang=en#termometr_800_1600',		'Thermometer 800C - 1600C ')
      Item('zp.php?lang=en#generator_DDA',		'DDA generator')
      Item('zp.php?lang=en#miliwatomierz',		'Miliwattmeter')
      Item('zp.php?lang=en#stezenie_co2',		'CO2 concentration meter')
      Item('zp.php?lang=en#wilgotnosciomierz',		'Humidity meter')
      Item('zp.php?lang=en#cisnieniomierz',		'Pressure meter')
      Item('zp.php?lang=en#generator_funkcyjny',	'Function generator')
      Item('zp.php?lang=en#instalacja_warsztat',	'Electric installation')
    }
	//Menu programy
    with(Panel('m_pr')){
      Item('pr.php?lang=en#poczatek',			'Introduction')
      Item(0,'<hr>',separator)
      Item('pr.php?lang=en#analiza_harmonicznych',	'Numerical harmonical analysis')
      Item('pr.php?lang=en#rownania_stanu_v1',		'Equations of state (v.1)')
      Item('pr.php?lang=en#rownania_stanu_v2',		'Equations of state (v.2)')
      Item('pr.php?lang=en#szereg_fouriera',		'Fourier range')
      Item('pr.php?lang=en#wsp_uwarunkowania',		'Matrix conditionality')
      Item('pr.php?lang=en#pomiar_kata_fazowego',	'Estimation of phase')
      Item('pr.php?lang=en#wypieranie_pradu',		'Skin effect')
      Item('pr.php?lang=en#natezenie_linia',		'Schedule of EM intensifying (line) ')
      Item('pr.php?lang=en#natezenie_przewod',		'Schedule of EM intensifying (wire)')
      Item('pr.php?lang=en#potencjaly',			'Circuit analysis')
      Item('pr.php?lang=en#numeryczne',			'Numeric programs')
      Item('pr.php?lang=en#graficzne',			'Graphic programs')
    }
//Menu seminarki
    with(Panel('m_se')){
      Item('se.php?lang=en#poczatek',			'Introduction')
      Item(0,'<hr>',separator)
      Item('se.php?lang=en#mikrokontrolery',		'Microcontrollers')
      Item('se.php?lang=en#uklady_cyfrowe',		'Digital circuits')
      Item('se.php?lang=en#systemy_pomiarowe',		'Measuring systems')
      Item('se.php?lang=en#modele',			'Models of dynamic objects')
      Item('se.php?lang=en#mostek',			'Two-current bridges')
      Item('se.php?lang=en#funkcje_nieortogonalne',	'Nonorthogonal functions') 
    }
	//Menu praca dyplomowa
    with(Panel('m_pd')){
      Item('pd.php?lang=en#poczatek',			'Introduction')
      Item(0,'<hr>',separator)
      Item('pd.php?lang=en#przesuwniki',		'Phase shifter')
      Item('pd.php?lang=en#aplikacja',			'Aplication &raquo').expand('m_pd_a')
      Item('pd.php?lang=en#stanowisko',			'Laboratory position') 
    }
	//PodMenu praca dyplomowa
    with(Panel('m_pd_a')){
      Item('pd.php?lang=en#charakterograf',		'Digital curve tracer')
      Item('pd.php?lang=en#przesuwnik',			'Digital phase shifter')
    }
  }
}

function SubMenu(lang){
	function B(o,m,b,a){for(k in m)o[k]=b?(b[k]!=a?b[k]:m[k]):m[k];return o}
	function S(n,x,y,b,c,jP){
		function M(){
			var wi=0,t,w1=up5?n.getElementsByTagName('div')[0]:n.all.tags('div')[0],w2=up5?w1.childNodes:w1.children
			for(k=0;k<w2.length;k++){
 				t=up5?w2[k].getElementsByTagName('table')[0]:w2[k].all.tags('table')[0]
 				if(t.offsetWidth>wi)wi=t.offsetWidth
			}
			for(k=0;k<w2.length;k++){w2[k].o=l.i[k];w2[k].onmouseover=w2[k].onmouseout=w2[k].onclick=Ev}
 			w1.style.width=wi+"px"
 			n.style.width=wi+2*mH+(ie?n.offsetWidth:0)+"px"
 			n.style.height=w1.offsetHeight+mV+(ie?n.offsetHeight:0)+"px"
		}
		function W(){
			with(n.layers[0]){
				var w=layers,b,bo='class='+l.borderClass
				with(w[0].document){write("<layer "+bo+"><img width=1 height=1></layer>");close()}
				b=w[0].layers[0].document.images[0];if(b)b=b.x;if(b)b-=3
				var w1=clip.width,w2=w1-(b?6:0)+mH*2
				for(k=1;k<w.length;k++){
					w[k].left=b+mH
					if(k==1)w[k].top=b+mV;else w[k].top=w[k-1].top+w[k-1].clip.height+mV
					w[k].layers[0].o=l.i[k-1]
					with(w[k].layers[0].document){write('<layer width='+w1+'>'+l.i[k-1].no+'</layer>');close()}
					var h=w[k].layers[1];
					h.clip.width=clip.width;
					h.clip.height=w[k].clip.height
					h.captureEvents(Event.CLICK);
					h.onclick=h.onmouseover=h.onmouseout=Ev
				}
			h=w[w.length-1].y+w[w.length-1].clip.height-(b?6:0)-b+mV
			with(w[0].document){write('<layer '+bo+'><table width="'+w2+'" height="'+h+'"><tr><td>&nbsp;</td></tr></table></layer>');close()}
		}
	}
	with(BlaTek){
	l=p[n];n=E(n);n.style.display='block'
	var mH=~~l.marginH,mV=~~l.marginV;if(!l.fi)ns4?W():M();l.fi=1
	if(!jP){
 		D=1;cT(O);H(1)
 		R=b?!(b%2):0;B=b>2;if(c){x=R?C.L()+C.P()-pW(n)-x:x+C.L();y=B?C.Too()+C.THiN()-pH(n)-y:y+C.Too()}
 		if(parseInt(n.style.top)==y&&parseInt(n.style.left)==x&&l.v)return
 		if(!isHidden)hide(1);else if(BlaTek.onbeforeshow)onbeforeshow()
	}
	y-=jP&&B?pH(n)-l.marginV:jP?l.marginV:0;x-=jP&&R?pW(n):0
	P[P.length]=n.ID
	if(APC){
		var x0=C.L(),y0=C.Too(),x1=x0+C.P(),y1=y0+C.THiN();x=x<x0?(R?x+pW(jP)+pW(n):x0):x;y=y<y0?y0:y
		var x2=x+pW(n),y2=y+pH(n),oX=jP?pW(jP)+pW(n):x2-x1
		x1=x1<x2?(x-oX<x0?x0:x-oX):x;y1=y1<y2?(y-(y2-y1)<y0?y0:y-(y2-y1)):y;x=x1;y=y1
	}
	n.style.left=x;
	n.style.top=y
	n.style.zIndex=++I
	k=0;var T,Er
	if(!ns4)eval(up5?'try{k=n.filters}catch(Er){}':'k=n.filters')
	if(k)for(T in k)if(~T.indexOf('Trans'))eval(up5?'try{k[T].Apply()}catch(Er){}':'k[T].Apply()')
	n.style.visibility='visible'
	if(k)for(T in k)if(~T.indexOf('Trans'))eval(up5?'try{k[T].Play()}catch(Er){}':'k[T].Play()')
	l.v=1;isHidden=0
}}

function cM(){
	if(!ie){with(cL("bltnss",ns4?1:"100%")){
		if(ns4){document.write('<table height=100%><tr><td></td></tr></table>');document.close()}
		with(style){top=left=0;height=1;visibility="hidden"}
	}
}

with(BlaTek){
	I=zIndex
	for(k in p){
		l=p[k]
		var c=l.bgColor?l.bgColor:'',w=l.width?l.width:1
		var X;with(X=cL(k,ns6?999:op7?'':0)){
			with(style){
 				left=top=op7?9999:-999;visibility="hidden";if(ie&&up5)display="none"
 				cursor="default";backgroundColor=c;backgroundImage="url("+l.bgImage+")"
 				if(!op7&&l.opacity<100){if(ns6)MozOpacity=l.opacity/100;if(ie)filter='alpha(opacity='+l.opacity+')'}
			}
			className=l.borderClass
			var s=ns4?"<layer bgcolor=\""+c+"\" background=\""+l.bgImage+"\" width="+w+"><layer></layer>":
			"<div style='position:absolute;width:"+w+"px;left:"+l.marginH+"px;top:"+l.marginV+"px'>"
			for(c in l.i)s+=kx(l.i[c]);s+=ns4?"</layer>":"</div>";innerHTML=s
			if(ns4){document.write(s);document.close()}
			if(ie&&l.filterIE)style.filter+=l.filterIE
			X.onmouseout=H;X.onmouseover=Ov
		}
	}
}}

function cT(t){clearTimeout(t)}
function sT(s,T){return setTimeout('with(bMenu)'+s+'hide()',T)}
function H(t){with(BlaTek){if(t==1)O=sT('',waitDelay);else U=sT('if(!D)',hideDelay)}}
function Ov(){with(BlaTek){cT(O);cT(U);D=0}}
function kx(p){
	var c=!p.bgColor?'':ns4?'bgColor='+p.bgColor:';background-color:'+p.bgColor,
 	g=!p.bgImage?'':ns4?'background=\"'+p.bgImage+'\"':';background-image:url('+p.bgImage+')',
 	C=p.cursor?';cursor:'+p.cursor:'',F=p.filterIE?';filter:'+p.filterIE:'',
 	h=p.height?'height:'+p.height+'px;':''
 	if(ns4)h=p.height?p.height:1
 	if(p.bgImage){p.In=new Image();p.In.src=p.bgImage}
 	if(p.bgImageOver){p.Io=new Image();p.Io.src=p.bgImageOver}
	if(!ns4)
 	return "<div style='position:relative;width:100%;"+h+"margin-bottom:"+BlaTek.p[k].marginV+"px"+c+g+C+F+"'>"+
 	"<div style='position:absolute;width:100%;height:100%'></div>"+
 	"<table class='"+p.borderClass+"' border=0 cellspacing=0 cellpadding="+(op7?0:2)+" width=100% height=100%><tr>"+
 	"<td width=100% height=100% align="+p.align+" valign="+p.valign+" class=\""+p.fontClass+"\">"+(op7?"<divop style='display:block;padding:2px'>"+p.t+"</divop>":p.t)+"</td></tr></table></div>"
	function t(p,m){
		return "<table border=0 width=100% height="+h+" cellspacing=0 cellpadding=2><tr><td align="+(m?p.alignOver:p.align)+" valign="+(m?p.valignOver:p.valign)+">"+
		"<font class=\""+(m?p.fontClassOver:p.fontClass)+"\">"+(m?p.z?p.z:p.t:p.t)+"</font></td></tr></table>"
	}
 	p.no=t(p,0)
 	p.ov=t(p,1)
 	return "<layer><layer "+c+" "+g+"><layer>"+
 	p.no+"</layer></layer><layer></layer></layer>"
}

function re(s){
	if(s.toLowerCase().indexOf('<hr')==0)return (ns4?'<img width=1 height=1>':'')+s
	k=new RegExp("<[^>]*>","gi");l=s.match(k);
	if(l){s=s.replace(k,"&mcbltt;");s=s.split("&mcbltt;")
	for(k=0;k<s.length;k++)s[k]=s[k].replace(/ /g,"&nbsp;")+(l[k]?l[k]:"")
	s=s.join("")}else s=s.replace(/ /g,"&nbsp;")
	return "&nbsp;"+s.replace(/<br>/gi,"&nbsp;<br>&nbsp;")+"&nbsp;"
}

function Ev(e){
	function M(o,u,s,e){
		var f,T,Er
		if(!ns4)eval(up5?'try{f=o.filters}catch(Er){}':'f=o.filters')
		with(o){
			if(f)for(T in f)if(~T.indexOf('Trans'))eval(up5?'try{f[T].Apply()}catch(Er){}':'f[T].Apply()')
			k=ns4?null:'transparent'
 			s=o.In?o.In.src:0;e=o.Io?o.Io.src:0;
 			if(!o.bgColor)o.bgColor=k
 			if(!o.bgColorOver)o.bgColorOver=k
 			if(ns4){
 				resizeTo(clip.width,clip.height)
 				bgColor=u?o.bgColorOver:o.bgColor
 				if((s||e)&&s!=e)background.src=u?e:s
 				layers[0].document.write(u?o.ov:o.no)
 				layers[0].document.close();return
 			}
			style.backgroundColor=u?o.bgColorOver:o.bgColor
			if((s||e)&&s!=e)style.backgroundImage='url('+(u?e:s)+')'
			k=up5?getElementsByTagName('td')[0]:all.tags('td')[0]
			k.className=u?o.fontClassOver:o.fontClass
			s=o.align;e=o.alignOver;if(s!=e)k.align=u?e:s
			s=o.valign;e=o.valignOver;if(s!=e)k.vAlign=u?e:s
			if(o.z)k.innerHTML=u?o.z:o.t
			k=up5?getElementsByTagName('table')[0]:all.tags('table')[0]
			s=o.borderClass;e=o.borderClassOver;if(s!=e)k.className=u?e:s
			if(f)for(T in f)if(~T.indexOf('Trans'))eval(up5?'try{f[T].Play()}catch(Er){}':'f[T].Play()')
	}
}

function U(o,m){
	o=ns4?o.parentLayer.parentLayer.parentLayer:up5?o.parentNode.parentNode:o.parentElement.parentElement
	with(BlaTek){for(k=P.length-1;k>=0;k--){if(P[k]==o.ID)break;if(P[k]!=m)h(P[k]);P=P.slice(0,-1)}}
}

function G(e,t){with(BlaTek){
	if(ns4){
		e=e.parentLayer;var o=e.parentLayer.parentLayer
		return t?o.left+e.left+(R?0:pW(e)):o.top+e.top+(B?pH(e):0)}
		var o=e,L=o.offsetLeft,T=o.offsetTop
		while(o.offsetParent){o=o.offsetParent;L+=o.offsetLeft;T+=o.offsetTop}
		return t?L+(R?0:pW(e)):T+(B?pH(e):0)
	}
}

e=e||event;var t=e.type!='mouseout',
l=ns4?this.parentLayer.layers[0]:this
if(e.type=='click'){if(l.o.u)glowny.location.href=l.o.u;return}
if(!ns4){
k=ns6?e.relatedTarget:t?e.fromElement:e.toElement
while(k){if(k==l)return;k=up5?k.parentNode:k.parentElement}
}

M(l,t);if(t){U(l,l.o.p);if(l.o.p)S(l.o.p,G(l,1),G(l),0,0,l)}
}
doc=document;ie=doc.all;ns4=doc.layers;up5=doc.getElementById?doc.getElementsByTagName('div'):0;ns6=up5&&!ie;op7=window.opera
function E(i,x){if(ns4)for(x=0;x<ns4.length;x++)if(ns4[x].ID==i)return ns4[x];return up5?up5[i]:ie[i]}
function cL(v,w,x){
 if(ns4){x=new Layer(w,window);x.style=x}
 else{if(up5){x=doc.createElement('div');x.id=v;x.style.position='absolute';doc.body.appendChild(x)}
  else{doc.body.insertAdjacentHTML('BeforeEnd','<div id='+v+' style="position:absolute"></div>');x=ie[v]}
 x.style.width=w}x.ID=v;return x
}

function R(f){
	if(f==1){doc.dW=innerWidth;doc.dH=innerHeight;onresize=R}
	else if(innerWidth!=doc.dW||innerHeight!=doc.dH)location.reload()}if(ns4)R(1)
	if(ns4)doc.captureEvents(Event.MOUSEMOVE)
	doc.onmousemove=function(e){BlaTek.X=ie?event.clientX:e.pageX;BlaTek.Y=ie?event.clientY:e.pageY
}

var k,l,on,BlaTek={B:0,O:0,D:0,Z:0,I:0,U:0,globalItem:{},globalPanel:{},isHidden:1,hideDelay:300,waitDelay:4000,zIndex:1,APC:1,p:{},P:[],R:0,
Panel:function(n,C){return B(this.p[n]={i:[],Item:function(U,T,C,Z){return B(this.i[this.i.length]={u:U,t:T?re(T):'',z:Z?re(Z):0,expand:function(P){this.p=P}},BlaTek.globalItem,C)}},this.globalPanel,C)},
show:function(n,x,y,b){S(n,x,y,b)},showLT:function(n,x,y,b){S(n,x,y,b?b:1,1)},showRT:function(n,x,y,b){S(n,x,y,b?b:2,1)},showLB:function(n,x,y,b){S(n,x,y,b?b:3,1)},showRB:function(n,x,y,b){S(n,x,y,b?b:4,1)},
showByElement:on=function(n,x,y,e,b){var L=ns4?e.x:e.offsetLeft,T=ns4?e.y:e.offsetTop;if(!ns4)while(e.offsetParent){e=e.offsetParent;L+=e.offsetLeft;T+=e.offsetTop};S(n,x+L,y+T,b)},
showByImg:function(n,x,y,i,b){on(n,x,y,doc.images[i],b)},pW:function(p){return ns4?p.clip.width:p.offsetWidth},pH:function(p){return ns4?p.clip.height:p.offsetHeight},
showByCursor:function(n,x,y,b){x+=this.X+(ie?this.C.L():0);y+=this.Y+(ie?this.C.Too():0);S(n,x,y,b)},
block:function(n){this.p[n].b=1},unblock:function(n){this.p[n].b=0},
h1:function(n,a){with(E(n).style){visibility='hidden';left=top=-999;if(!a&&ie&&up5)display='none'}this.p[n].v=0},
h:function(n,a){with(this)if(p[n].fi&&!p[n].b&&p[n].v){h1(n,a);E(n).style.zIndex=zIndex}},
hide:function(a){with(this){for(k in p)h(k,a);P=[];I=zIndex;isHidden=1;if(!a&&this.onafterhide)onafterhide()}},
C:new function(){
function A(){with(doc)return ns4?width:ie?body.scrollWidth:documentElement.offsetWidth}
function L(){with(doc)return ns4?height:ie?body.scrollHeight:documentElement.offsetHeight}
function l(){return ie?doc.body.scrollTop:pageYOffset}
function a(){return ie?doc.body.scrollLeft:pageXOffset}
function D(){return ns4?i()<A():ie?K()!=s():O()<A()}
function Y(){return ns4?s()<L():O()!=i()}
function N(){return E('bltnss')}
function i(){return ie?doc.body.offsetWidth-(doc.body.clientLeft*2):innerWidth}
function s(){return ie?doc.body.offsetHeight-(doc.body.clientTop*2):innerHeight}
function O(){return ie?doc.body.clientWidth:ns4?Y()?i()-(s()-N().clip.height):i():N().offsetWidth}
function K(){return ie?doc.body.clientHeight:ns4?D()?N().clip.height:s():s()-(D()?(Y()?i()-O():s()-L()):0)}

return{THiN:K, Too:l, P:O,L:a,N:D}}
};
  if (lang == "pl" || lang == "") { NowewMenuPL(BlaTek); } 
  if (lang == "en") { NowewMenuEN(BlaTek); }
  cM();
  bMenu=BlaTek
}
  function nool(){}bMenu={show:nool,showLT:nool,showRT:nool,showLB:nool,showRB:nool,showByElement:nool,showByImg:nool,showByCursor:nool,hide:nool}

//********************
//***EFEKT AKWARIUM***
//********************
 var no = 10; // image number or falling rate 
 var speed = 80; // the lower the number the faster the image moves
 var snow = new Array();
 snow[0] = "bubble.gif"
 snow[1] = "bubble1.gif"
 snow[2] = "bubble.gif"

 var ns4up = (document.layers) ? 1 : 0;  // browser sniffer
 var ie4up = (document.all) ? 1 : 0;
 var ns6up = (document.getElementById&&!document.all) ? 1 : 0;
 var dx, xp, yp;    // coordinate and position variables
 var am, stx, sty;  // amplitude and step variables
 var i, doc_width = 150, doc_height = 1800; OffsetY = 35; snow_width = 1;

 dx = new Array();
 xp = new Array();
 yp = new Array();
 am = new Array();
 stx = new Array();
 sty = new Array();
 SnowWidth= new Array();
 j = 0;

function akwarium()
{
 if (ns4up||ns6up)
 {
	doc_height = 0.9*self.innerHeight;
 	} else if (ie4up){
        doc_height = 0.9*document.body.clientHeight;
 }

 for (i = 0; i < no; ++ i) 
 {
 	dx[i] = 0;                        // set coordinate variables
        xp[i] = Math.random()*(doc_width-5);  // set position variables
        yp[i] = Math.random()*doc_height;
        am[i] = Math.random()*5;         // set amplitude variables
        stx[i] = 0.02 + Math.random()/10; // set step variables
        sty[i] = 0.7 + Math.random();     // set step variables
        SnowWidth[i] = 5*+Math.random();
	if (ns4up) 
 	{                      // set layers
                if (i == 0) 
		{
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" 			visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
                } else 
		{
                        document.write("<layer name=\"dot"+ i +"\" left=\"15\" top=\"15\" 			visibility=\"show\"><img src=\""+ snow[j] + "\" border=\"0\"></layer>");
                }        
	} else if (ie4up||ns6up) 
	{                
		if (i == 0) 
		{
                        document.write("<div><img id=\"dot"+ i +"\" style=\"POSITION: absolute; VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:10px; height:10px;\" src=\"" + snow[j] + "\" border=\"0\"></div>");
                } else 
		{
                        document.write("<div><img id=\"dot"+ i +"\" style=\"POSITION: absolute; VISIBILITY: visible; TOP: 15px; LEFT: 15px; width:10px; height:10px;\" src=\"" + snow[j] + "\" border=\"0\"></div>");
                }
        }
        if (j == (snow.length-1)) { j = 0; } else { j += 1; }
 }
}

function snowIE_NS6() 
{  // IE main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
          	sty[i] = 1.01*sty[i];
		yp[i] -= sty[i];
                SnowWidth[i]= SnowWidth[i]+0.01*SnowWidth[i];
		if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]);
                        yp[i] = doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        SnowWidth[i] = 5*+Math.random();
			// doc_width = ns6up?window.innerWidth-5:document.body.clientWidth;
                        //doc_width = 140; // 0.2*doc_width;
			doc_height = ns6up?window.innerHeight-5:document.body.clientHeight;
			doc_height = 0.9*doc_height;                
		}
                dx[i] += stx[i];
                if (ie4up){
                document.all["dot"+i].style.pixelTop = yp[i]+document.body.scrollTop;
                document.all["dot"+i].style.pixelLeft = xp[i] + am[i]*Math.sin(dx[i]) + OffsetY;
		document.all["dot"+i].style.height = SnowWidth[i];                
		document.all["dot"+i].style.width = SnowWidth[i];
		}
                else if (ns6up){
                document.getElementById("dot"+i).style.top=yp[i]+pageYOffset;
                document.getElementById("dot"+i).style.left=xp[i] + am[i]*Math.sin(dx[i])+OffsetY;
                document.getElementById("dot"+i).style.width= SnowWidth[i]; 
		document.getElementById("dot"+i).style.height= SnowWidth[i]; 
		}
        }
       	setTimeout("snowIE_NS6()", speed);
}

function snowNS()
{  // Netscape main animation function
        for (i = 0; i < no; ++ i) {  // iterate for every dot
                yp[i] -= 0.9*sty[i];                
		if (yp[i] < -50) {
                        xp[i] = Math.random()*(doc_width-am[i]-30);
                        yp[i] = 0.9*doc_height;
                        stx[i] = 0.02 + Math.random()/10;
                        sty[i] = 0.7 + Math.random();
                        //doc_width = 0.2*self.innerWidth;
                        doc_height = 0.9*self.innerHeight;                }
                dx[i] += stx[i];
                document.layers["dot"+i].top = yp[i]+pageYOffset;
                document.layers["dot"+i].left = xp[i] + am[i]*Math.sin(dx[i]);
        }
        setTimeout("snowNS()", speed);
}