var pnn=(document.layers)?true:false;
var pn6=(navigator.vendor == ("Netscape6") || navigator.product == ("Gecko"));
var pie=false;
var pop=false;

if (document.all){ if (navigator.userAgent.search('Opera')>=0){ pie=false; pop=true;} else {pie=true; pop=false;}}

document.write('');
document.write('<div id="loginform" style="visibility:hidden;"></div>');



function setlocation() {
pokaz('zerooplat');
sn_toplayer_centerLayer(document.getElementById('zerooplat'),87,100, -60, 31);
}

window.onload = setlocation;

function getElement(id){if (document.all)	return document.all[id];else if (document.getElementById)return document.getElementById(id);else return false;}


function pokaz(warstwa)
{
if(pnn) { document.layers[warstwa].visibility="show"; } else
if(pie || pop) { document.all[warstwa].style.visibility="visible"; } else
if(pn6) { document.getElementById(warstwa).style.visibility="visible"; }
}

function ukryj(warstwa)
{
if(pnn) { document.layers[warstwa].visibility="hide"; } else
if(pie || pop) { document.all[warstwa].style.visibility="hidden"; } else
if(pn6) { document.getElementById(warstwa).style.visibility="hidden"; }
}

function hideLoginForm()
{


	ukryj('loginform');
	var tmp; 
	tmp = getElement('loginform');
	tmp.innerHTML= "";
}


function showLoginForm()
{

	pokaz('loginform');

	var tmp; 
	tmp = getElement('loginform');
	

	sn_toplayer_centerLayer(document.getElementById('loginform'),400,200,0,100);
	html = "";
	html = html + '<form action="logowanie.php" method="post" name="formlogon">';
	html = html + '<input type="hidden" name="language" value="polish" />';
	html = html + '<table style="margin: 0 auto;text-align: center;width:400px;" border="0">';
	html = html + '<tr>';


	html = html + '<td colspan=3>';

	html = html + '<table style="margin: 0 auto;text-align: center;width:400px;" border="0">';
	html = html + '<tr>';
	html = html + '<td width="380"></td>';
	html = html + '<td width="20"><a href="#" onclick="hideLoginForm()" class="txt2">X</a></td>';
	html = html + '</tr>';
	html = html + '</table>';

	html = html + '<table style="margin: 0 auto;text-align: center;width:400px;" border="0">';
	html = html + '<tr>';
	html = html + '<td class="txt2">Serdecznie witamy na portalu interaktywnym i interpersonalnym<br><b>"Centrum informacji o Parkinsonie, pisanych przez internaut&#55958;&#56380;/b><br>Jeste¶my przekonani, &#191;e b&#39162;ie on s3u&#191;y3 wszystkim, kt&#55943;&#56953; interesuj± si&#34800;roblemami &#191;ycia z chorob± Parkinsona. Jest to doskona3a okazja wzajemnego poznania, dziel±c si&#34810;ar&#55962;&#57199; rado¶ciami jak i k3opotami, <br>przy mo&#191;liwo¶ci zachowania anonimowo¶&#19260;br><br>—yczymy tw&#55942;&#56506;ej wymiany my¶li, pogl±d&#55957;&#57321; opinii.<br>Rada Fundacji "—y&#18426; chorob± Parkinsona"<br><br>Na rok 2008 r. zaplanowali¶my publikacj&#34800;t.: <br>"Choroba Parkinsona w relacjach chorych i ich opiekun&#55958;&#56366;<br><br>Obja¶nienia u&#191;ytkowania portalu znajduj± si&#34807; zak3adce "Pomoc".<br></td>';
	html = html + '</tr>';
	html = html + '</table>';
	html = html + '</form>';
	tmp.innerHTML= html;
}


var sn_toplayer_left = 0; 
var sn_toplayer_top = 0; 

function sn_toplayer_centerLayer(obj, iw, ih, x, y) 
{ 
 sn_toplayer_left = (sn_toplayer_insideWindowWidth() / 2) - (iw/2) + x;
 sn_toplayer_top = (sn_toplayer_insideWindowHeight() / 2) - (ih/2);  

 if (document.layers) { // NN4 
  obj.left = sn_toplayer_left; 
  obj.top = y; 
 } 
 else if (document.all) { // IE4 
  obj.style.pixelLeft = sn_toplayer_left; 
  obj.style.pixelTop = y; 
 } 
 else if (document.getElementById) { // NN6 
  obj.style.left = sn_toplayer_left + 'px'; 
  obj.style.top = y+'px'; 
 } 
} 

function sn_toplayer_insideWindowHeight() 
{ 
 return (document.all) ? document.documentElement.clientHeight : window.innerHeight//document.body.clientHeight : window.innerHeight 
} 

function sn_toplayer_insideWindowWidth() 
{ 
 return (document.all) ? document.body.clientWidth : window.innerWidth 
} 

function sn_toplayer_hideLayer(obj)
{
  obj.style.visibility = 'hidden'; 
}

function sn_toplayer_showLayer(obj, iw, ih)
{
 obj.style.visibility = 'visible';

 sn_toplayer_centerLayer(obj, iw, ih);
}
	function autoSubmit(){
     document.form.submit();
	}

