var adresurl = ''+location.href;
if (adresurl.indexOf('http://www.30dni.kociarze.pl/')==0) {
	uri = adresurl.substring(29);
	location.href='http://30dni.kociarze.pl/'+uri;
}


function wysekranu() {
	if (self.innerHeight) {
		return self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		return document.documentElement.clientHeight;
	} else if (document.body) {
		return document.body.clientHeight;
	}
}

function skalujduzegoflesza() {
	if (document.getElementById('duzyflesz') && document.getElementById('duzyflesz').skalujsie) {
		document.getElementById('duzyflesz').skalujsie(wysekranu());
	}
	setTimeout(skalujduzegoflesza,2000);
	if ('_'+window.onresize=='_undefined') window.onresize = skalujduzegoflesza;
}

if (window.parent!=window) window.parent.location.href=location.href;

var obrazekpodtrzymujsesje = new Image();
function podtrzymujsesje() {
	obrazekpodtrzymujsesje.src='podtrzymujsesje.php?los='+Math.round(100000*Math.random());
	setTimeout(podtrzymujsesje,30000);
}
setTimeout(podtrzymujsesje,10000);

function przywrocpolatekstowe() {
	polatekstowe = document.getElementsByTagName('TEXTAREA');
	for (i=0; i<polatekstowe.length; i++) polatekstowe[i].value=polatekstowe[i].defaultValue;
	setTimeout(przywrocpolatekstowe,500);
}

function pochwalsieklik(num) {
	n = 0;
	while (o=document.getElementById('pochwalsiekod'+n)) {
		o.style.display = (n==num)?'block':'none';
		n++;
	}
	return false;
}
function pokazukryj(identyfikator) {
	zw = document.getElementById(identyfikator+'zw');
	rozw = document.getElementById(identyfikator+'rozw');
	if (rozw.style.display=='none') {
		zw.style.display='none';
		rozw.style.display='block';
	} else {
		zw.style.display='block';
		rozw.style.display='none';
	}
}

function otworzpopup(co,w,h) {
	OKIENKO = window.open(co,"mimpopup","scrollbars=yes,resizable=yes,alwaysRaised=yes,menubar=no,width="+w+",height="+h);	
	OKIENKO.location.href=co;
	OKIENKO.moveTo(10,10);
	OKIENKO.resizeTo(w,h);
	OKIENKO.focus();
	return false;
}
function otworzwparencie(co) {
	window.opener.location.href = co;
	//window.close();
	return false;
}