/*
	TabMenu v.1
	Copyright (c) Rafael Kukawski
	www.rafael.webhelp.pl
*/
function xyz(x){document.getElementById('log').innerHTML+=x+'<br>'}
function TabMenu(tabLinks,active,fns){
	var r=this, tabs={};
	function $(id){return document.getElementById(id)}
	r.click=function(x,l,t){
		try {
			if(active){
				r.onDeactivate(l=tabs[active].l,t=tabs[active].t)
				t.style.display='none'
				l.className=''
			}
			x=/#.+$/.exec(x)+''
			r.onActivate(l=tabs[active=x].l,t=tabs[x].t)
			t.style.display=''
			l.className='active'
			x=false
		}catch(x){x=true}
		return x
	}
	r.onActivate=function(){}
	r.onDeactivate=function(){}
	var t,i,l,h;
		for(i=0,t=$(tabLinks).getElementsByTagName('a');l=t[i++];){
			if(/#.+$/.test(h=l.getAttribute('href'))){
			h=''+/#.+$/.exec(h)
				tabs[h]={'l':l,'t':$(h.substr(1))}
				tabs[h].t.style.display='none'
				l.onclick=function(){
					return r.click(this.getAttribute('href'))
				}
			}
		}
		for(i in fns)if(i!='click')r[i]=fns[i]
		if((h=location.hash)&&tabs[h])active=h.substr(1)
		if(active)tabs[active='#'+active].l.onclick()
}

/* TabMenu end */
function show_div(div_id) {
    // ukryj
    document.getElementById('advImage').style.display = 'none';
    document.getElementById('advFlash').style.display = 'none';
	
    // pokaz
    document.getElementById(div_id).style.display = 'block';
}

function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}
function ReverseDisplay(d) {
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}

function windowOpen(name,width,height) {
config = 'left=100,top=100,width='+width+',height='+height+',innerheight='+height+',innerwidth='+width+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';

faf = window.open('','',config)

var wOpen = '';
wOpen += '<html><head>';
wOpen += '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
wOpen += '<title></title>';
wOpen += '</head>';
wOpen += '<body bgcolor="white" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">';
wOpen += '<div align="center"><a href="#" onclick="javascript:self.close();"><img src='+name+' border="0" alt="" /></a></div>';
wOpen += '</body></html>';

faf.document.write(wOpen);
faf.document.close(); 
}
