function preload(imgObj,imgSrc) {
	if (document.images) {
		eval(imgObj+' = new Image()')
		eval(imgObj+'.src = "'+imgSrc+'"')
	}
}


function changeImage(imgName,imgObj) {
	if (document.images) {
		document.images[imgName].src = eval(imgObj+".src")
	}
}

//===============================================================================================	
/**
 *hiding/showing text block
 *
 * @var int		text block number
 */
function expandLine(nr) {
		line_=document.getElementById('line_'+ nr);
		pic=document.getElementById('pic_'+ nr);
		if (line_.style.display == "none") {
			line_.style.display = "";
			pic.src="pic/ico_minus.gif";
		} else {
			line_.style.display = "none";
			pic.src="pic/ico_plus.gif";
		}
	} 

//===============================================================================================


function popup(picURL) 
{ 
		
	okno2=window.open("","galeria","left=300,top=200,resizable=1,WIDTH=10,HEIGHT=10,scrollbars=no,menubar=no");
	okno2.document.write("<HTML><HEAD><TITLE>Galeria</TITLE><script language=javascript> window.moveTo(300,200); window.resizeTo(10,10); var NS = (navigator.appName=='Netscape')?true:false; function fitPic() { iWidth = (NS)?window.innerWidth:document.body.clientWidth;iHeight = (NS)?window.innerHeight:document.body.clientHeight;iWidth = document.images[0].width - iWidth;iHeight = document.images[0].height - iHeight;window.resizeBy(iWidth+20,iHeight+19);window.moveTo((screen.width-document.images[0].width)/2,(screen.height-document.images[0].height)/2);self.focus();};</scr");
	okno2.document.write("ipt></HEAD><BO");
	okno2.document.write("DY bgcolor='#EEEEEE' topmargin='9' leftmargin='9' onload='fitPic();'>\n<table border=0 bgcolor=#000000 cellpadding=1 cellspacing=0>\n<tr><td align=center valign=center><a href=javascript:close();><img src='" +picURL+ "' border=0 alt='zamknij'></a></td></tr></table></body>\n</html>");
	okno2.document.close();

}


browser_version= parseInt(navigator.appVersion);
browser_type = navigator.appName;

if (browser_type == "Netscape" && (browser_version <= 4)) {
document.write("<link rel=stylesheet href=style_ns.css type=text/css>");
} else {
document.write("<link rel=stylesheet href=style_ie.css type=text/css>");
}


/**
 * resize.js 0.3 970811
 * by gary smith
 * js component for "reloading page onResize"
 */

if(!window.saveInnerWidth) {
  window.onresize = resizeIt;
  window.saveInnerWidth = window.innerWidth;
  window.saveInnerHeight = window.innerHeight;
}

function resizeIt() {
    if (saveInnerWidth < window.innerWidth || 
        saveInnerWidth > window.innerWidth || 
        saveInnerHeight > window.innerHeight || 
        saveInnerHeight < window.innerHeight ) 
    {
        window.history.go(0);
    }
}