// wpCore JS v0.01
<!--
var divIds = new Array();



function goTop(){if (self != top){top.location.href=self.location.href;}} setTimeout("goTop()",1000);
function d(id) {return document.getElementById(id);}
function flash(){

}


var picNr = 1;
function pictureRotate() {
	document.getElementById('PK_IMG').src = document.getElementById('PK_HID_'+picNr).value;
	document.getElementById('IMG_SUB').innerHTML = document.getElementById('PK_HID_'+picNr).name;
		
	picNr++;
	if (picNr > 3) picNr = 1;
	setTimeout('pictureRotate()', 3000);
}




var willar = 1;
var ile = 3;
var willaTimer;

function changeC(id, newClass) {
	identity=document.getElementById(id);
	identity.className=newClass; 
}

function willaOver(k) { clearTimeout(willaTimer); willan(k); }
function willaOut() { willaTimer=setTimeout('willaRotate()', 3000); }
function willan(k) {
	if (document.getElementById('willa0') != null) {
		document.getElementById('willa0').innerHTML=document.getElementById('willa'+k).innerHTML; 
		changeC('l'+k, 'act');
		for (var i=1; i<=ile; i++) {
			if (i != k) {
			changeC('l'+i, 'act_off');
			}
		}
	}
}
function willaRotate() {
	willan(willar);
	if (willar<ile) willar++; else willar=1;
	willaTimer=setTimeout('willaRotate()', 5000);
}

function changeMonth(nr) {
	document.getElementById('cal0').innerHTML=document.getElementById('cal'+nr).innerHTML; 
}

function countHeight(divNr, heightArray) {
	if (divNr < 0) divNr = 0;	

	retVal = 0;
	for (c=divNr; c >= 0; c--) {
		retVal += heightArray[c];
	}

	return retVal;
}

function changeDivClass() {
	skyOn = (document.getElementById('adv07') != null) ? true : false;
	
	if (skyOn) {
		skyHeight = document.getElementById('adv07').offsetHeight;
	} else {
		skyHeight = 0;
	}
	
	additionalHeight1 = (document.getElementById('addH_01') != null) ? document.getElementById('addH_01').offsetHeight : 0;
	additionalHeight2 = (document.getElementById('addH_02') != null) ? document.getElementById('addH_02').offsetHeight : 0;
	skySurHeight = skyHeight + additionalHeight1 + additionalHeight2;
	divHeight = Array();

	temp = Array(); x = 0;
	for (i=0; i<divIds.length; i++) {
		if (document.getElementById(divIds[i]) != null) {
			temp[x] = divIds[i];
			x++;
		}
	}
	divIds = temp;

	for (i=0; i<divIds.length; i++) {
		divHeight[i] = document.getElementById(divIds[i]).offsetHeight;
		if (skySurHeight > 0) {
			if (skySurHeight < countHeight(0, divHeight)) changeC(divIds[0],'leftIntColDyn w360');
			if (skySurHeight >= countHeight(i, divHeight)) {
				if (divIds.length > i+1) {
					changeC(divIds[i],'leftIntColDyn w360');
					changeC(divIds[i+1],'leftIntColDyn w360');
				} else changeC(divIds[i],'leftIntColDyn w360');
			} else 	if (skySurHeight >= countHeight(i-1, divHeight)) {
					changeC(divIds[i],'leftIntColDyn w360');
				}
		}
	}
}

function onLoadFunctions() {
	if (document.getElementById('PK_IMG') != null) {
		pictureRotate();
	}
	willaRotate();
	changeDivClass();
}

if (null == window.onload) {
	window.onload = onLoadFunctions;
} else {
	var oldOnLoad = window.onload;
	window.onload = function() {
		oldOnLoad();
		onLoadFunctions();
	};
};

licz=0;
function otworz(nazwa,szer,wys) {
config='left=100,top=100,width='+szer+',height='+wys+',innerheight='+wys+',innerwidth='+szer+',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no';
kitekSC='okno' + licz;
stadion=window.open('',kitekSC,config)
stadion.document.write('<HTML><HEAD>');
stadion.document.write('<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">');
stadion.document.write('<TITLE>Wirtualna Polska - Foto-Galeria</title>');
stadion.document.write('<script language="javascript">');
stadion.document.write('setTimeout(');
stadion.document.write('"self.close()');
stadion.document.write(';",70000)');stadion.document.write('</');
stadion.document.write('script>');
stadion.document.write('</HEAD>');
stadion.document.write('<body bgcolor=white leftmargin=0 topmargin=0 marginheight=0 marginwidth=0>');
stadion.document.write('<DIV align=center><a href=# onclick="javascript:self.close();"><img src='+nazwa+' border=0></A></DIV>');
stadion.document.write('</body></html>');
stadion.focus();
licz+=1;
}

function changeCountryList(letter_nr) {
	for (i = 1; i<=23; i++) {
		document.getElementById('cs_'+i).style.display = 'none';
		document.getElementById('csa_'+i).className = 'country';
	}
	document.getElementById('cs_'+letter_nr).style.display = '';
	document.getElementById('csa_'+letter_nr).className = 'countrySel';
}

//-->
