function testChar(){
var _testChar=""
return _testChar==testchar
}

if (document.layers) {
	widthCheck = window.innerWidth;
	heightCheck = window.innerHeight;
	window.onResize = resizeFix;
}

function resizeFix() {
	if (widthCheck != window.innerWidth || heightCheck != window.innerHeight)
		document.location.href = document.location.href;
}

function encodePL(text, encoding){

	encISO="󶼿ʣӦ";
	encCP="󜟿ʣӌ";
	encASCII="acelnoszzACELNOSZZ";

	// tryb nadrzedny
	if (encoding == "ASCII")
		for (i = 0; i<encISO.length; i++) text = text.replace(new RegExp(encISO.charAt(i), "g"), encASCII.charAt(i));
		
	else if (!testChar())
		for (i = 0; i<encISO.length; i++) text = text.replace(new RegExp(encISO.charAt(i), "g"), encCP.charAt(i));

	return text;
}

if (document.images) {

	itop1 = new Image(); 
	itop1.src = "gfx/menu-tag1.gif";
	itop1_ = new Image(); 
	itop1_.src = "gfx/menu-tag1_.gif";
	
	itop2 = new Image(); 
	itop2.src = "gfx/menu-tag2.gif";
	itop2_ = new Image(); 
	itop2_.src = "gfx/menu-tag2_.gif";

	ibtm1 = new Image(); 
	ibtm1.src = "gfx/menu-tag-3.gif";
	ibtm1_ = new Image(); 
	ibtm1_.src = "gfx/menu-tag-3_.gif";
	ibtm2 = new Image();

	ilnk1 = new Image();
	ilnk1.src = "gfx/lrogue-02-02.gif";
	ilnk1_ = new Image(); 
	ilnk1_.src = "gfx/lrogue-02-02_.gif";

}

var itops = new Array();
var iarray = null;

function rollover(area, nr, size) {
	

	if (area == 'top') iarray = itops;
	if (document.images && iarray && iarray[nr])
	iarray[nr].src = eval("i" + area + size + "_.src");
	iarray = null;
	return true;

}

function rollout(area, nr, size) {

	if (area == 'top') iarray = itops;
	if (document.images && iarray && iarray[nr])
		iarray[nr].src = eval("i" + area + size + ".src");
	iarray = null;
	return true;

}

function initMain(){
	layTag_ = new DynLayer("tag", null);
	layTag = new DynLayer("tagbody", "tag");
	layTag.show();
	findScroll();
	if (is.ie) window.onscroll = findScroll;
	else setInterval("findScroll()", 500);
}

scrollW=0; scrollH=0;
function findScroll() {
	scrollW = (is.ns)? pageXOffset : document.body.scrollLeft;
	scrollH = (is.ns)? pageYOffset : document.body.scrollTop;
	if (!onTagMove) moveTag();
}

lastH = 0; onTagMove = false;
function moveTag() {
	if(scrollH != lastH) {
		onTagMove = true;
		percent = .1 * (scrollH - lastH);
		if(percent > 0) percent = Math.ceil(percent);
		else percent = Math.floor(percent);
		lastH = lastH + percent;
		layTag_.moveBy(null, percent);
		setTimeout('moveTag()', 20);
	}
	else
		onTagMove = false;
}

function spalsh(url,width,height,src,name) {
	srct=src;
	namet=name;
	ScrWidth = 640; ScrHeight = 480;
	height+=50;
	if (window.screen) {ScrWidth = window.screen.width; ScrHeight = window.screen.height}
	PosX = Math.round((ScrWidth - width)/2);
	PosY = Math.round((ScrHeight - height)/2);
	JSFSplashWin = window.open(url, "splash", "menubar=no,toolbar=no,location=no,directories=no,status=yes,scrollbars=no,resizable=yes,copyhistory=no,width=" + width + ",height=" + height + ",left=" + PosX + ",top=" + PosY);
	JSFSplashWin.focus();
}

function displayForm(src,name){
	iscookie=readCookie('isdatabase')
	if (iscookie==null) spalsh('popup-form.html',430,450,src,name)
	else spalsh('popup-download.html',430,450,src,name);
}