trescMenu = '';
iMenu = 0;
gora = 133;

if(window.location.hostname == 'localhost')
{
	host = 'http://localhost';
}
else
{
	host = 'http://www.centrumxp.pl';
}

ie = true;
if(window.navigator.appName.toLowerCase().indexOf('explorer') == -1)
{
    ie = false;
	document.all = document.getElementsByTagName('*');
}
	
otwarteMenu = -1;

function na(id)
{
	if(otwarteMenu != -1)
	{
		z(otwarteMenu);
	}
	document.all['menu'+id].style.top = gora + 'px';
	document.all['menu'+id].style.display = 'block';
	document.all['MenuReklama'].style.display = 'none';
	document.all['tm'+id].style.color = '#ffffff';	
	document.all['tm'+id].style.backgroundColor = '#669BD7';
	otwarteMenu = id;
	document.all['tm'+id].style.backgroundImage = 'url("/Img/Int/r_c.gif")';
}

function z(id)
{
	document.all['menu'+id].style.display = 'none';
	document.all['MenuReklama'].style.display = 'block';
	document.all['menu'+id].style.top = -1000 + 'px';
	document.all['tm'+id].style.backgroundColor = '';
	document.all['tm'+id].style.color = '';
	document.all['tm'+id].style.backgroundImage = 'url("/Img/Int/r_b.gif")';
}

img1 = new Image();
img1.src = '/Img/Int/l_m1.gif';
img2 = new Image();
img2.src = '/Img/Int/l_m1.gif';
img3 = new Image();
img3.src = '/Img/Int/nic.gif';
img4 = new Image();
img4.src = '/Img/Int/r_c.gif';
img5 = new Image();
img5.src = '/Img/Int/r_b.gif';

function naM(id,p)
{
	if(p == 3)
	{
		p = 2;
	}
	document.all['T'+id].style.backgroundColor = '#67ba24';
	document.all['A'+id].style.color = '#000000';
	
	window.status = document.all['A'+id].href;
}

function zM(id)
{
	document.all['T'+id].style.backgroundColor = '#4a4542';
	document.all['A'+id].style.color = '#d6d3d6';
	window.status = '';
}

czasMenu = 0;
function wylCzas()
{
	clearTimeout(czasMenu);
	czasMenu = 0;
}

function klikM(id)
{
	location.href = document.all['A'+id].href;
}

function NoweMenu()
{
	trescMenu += '<div onmouseout="wlaCzas()" onmouseover="wylCzas()">';
	trescMenu += trescM[iMenu];
    trescMenu += '</div>';
}
iK = 0;
function wylCzas()
{
	clearTimeout(czasMenu);
	czasMenu = 0;
}

function wlaCzas()
{
	czasMenu = setTimeout('wylMenu()',100);
}

function wylMenu()
{
	z(otwarteMenu,1);
}
trescM = new Array();

iMenu++;
trescM[iMenu] = '<table cellSpacing="0" cellPadding="0" class="MMenu" id="menu'+ iMenu +'">'+
'	<tr>'+
'		<td width="298">&nbsp;</td>'+
'		<td valign="top">'+
'		<table class="WMenu" cellspacing="0" cellpadding="2">'+
'			<tr>'+
'				<td width="85" height="60" align="center" valign="top"><a href="http://www.centrumxp.pl/"><img src="'+host+'/Img/Int/Menu/m,home.gif" border="0"><br>Portal CentrumXP.pl</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="http://sklep.centrumxp.pl/"><img src="'+host+'/Img/Int/Menu/m,programy.gif" border="0"><br>Sklep on-line</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="http://firma.centrumxp.pl/"><img src="'+host+'/Img/Int/Menu/m,firma.gif" border="0"><br>Komputer<br />w firmie</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="http://XboxSpot.pl/"><img src="' + host + '/Img/Int/Menu/m,xbox.gif" border="0"><br>Xbox 360</a></td>' +
'				<td width="85" height="60" align="center" valign="top"><a href="http://forum.centrumxp.pl/"><img src="'+host+'/Img/Int/Menu/m,forum.gif" border="0"><br>Forum</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="http://live.centrumxp.pl/"><img src="'+host+'/Img/Int/Menu/m,windows.gif" border="0"><br>CentrumXP.pl Live Blog</a></td>'+

'			</tr>'+
'		</table>'+
'		</td>'+
'	</tr>'+
'</table>';
NoweMenu();

iMenu++;
trescM[iMenu] = '<table cellSpacing="0" cellPadding="0" class="MMenu" id="menu'+ iMenu +'">'+
'	<tr>'+
'		<td width="298" align="right"><table class="WMenu" cellpadding="2" cellPadding="0" style="position:relative; top: -5px; text-align: right">'+
'		<tr><td align="right"><b>Starsze wersje:</b></td><td rowspan="6" width="10"></td></tr>'+
'		<tr><td align="right"><a href="'+host+'/WindowsXP">Windows XP<img hspace="5" align="absmiddle" src="'+host+'/Img/Int/Menu/n,windows.gif" width="16" height="16" border="0"></a></td></tr>'+
'		<tr><td align="right"><a href="'+host+'/Office2003">Office 2003<img hspace="5" align="absmiddle" src="'+host+'/Img/Int/Menu/n,office.gif" width="16" height="16" border="0"></a></td>'+
'		<tr><td height="1"> </td></tr>'+
'		<tr><td align="right"></td></tr>'+
'		<tr><td align="right"><a href="/Microsoft/315,1,kategoria,Aplikacje.aspx"><b>Inne aplikacje</b></a></td></tr>'+
'		</table></td>'+
'		<td valign="top">'+
'		<table class="WMenu" cellspacing="2" cellpadding="0" >'+
'			<tr>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/WindowsVista/"><img src="'+host+'/Img/Int/Menu/m,windows.gif" border="0"><br>Windows Vista</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Office2007/"><img src="'+host+'/Img/Int/Menu/m,office.gif" border="0"><br>Office 2007</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/InternetExplorer/"><img src="'+host+'/Img/Int/Menu/m,ie.gif" border="0"><br>Internet Explorer 7</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/WindowsMediaPlayer/"><img src="'+host+'/Img/Int/Menu/m,wmp.gif" border="0"><br>Windows Media Player</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/dotNET/"><img src="'+host+'/Img/Int/Menu/m,dotnet.gif" border="0"><br>Microsoft .NET</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Sprzet/"><img src="'+host+'/Img/Int/Menu/m,sprzet.gif" border="0"><br>Sprz&#281t</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Gry/"><img src="'+host+'/Img/Int/Menu/m,gry.gif" border="0"><br>Gry</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Expert/"><img src="'+host+'/Img/Int/Menu/m,expert.gif" border="0"><br>Expert</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/WindowsMobile/"><img src="'+host+'/Img/Int/Menu/m,windowsmobile.gif" border="0"><br>Windows Mobile</a></td>'+
'			</tr>'+
'		</table>'+
'		</td>'+
'	</tr>'+
'</table>';
NoweMenu();

iMenu++;
trescM[iMenu] = '<table cellSpacing="0" cellPadding="0" class="MMenu" id="menu'+ iMenu +'">'+
'	<tr>'+
'		<td width="502">&nbsp;</td>'+
'		<td valign="top">'+
'		<table class="WMenu" cellspacing="0" cellpadding="2" >'+
'			<tr>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Programy/"><img src="'+host+'/Img/Int/Menu/m,programy.gif" border="0"><br>Programy</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Uaktualnienia/"><img src="'+host+'/Img/Int/Menu/m,uaktualnienia.gif" border="0"><br>Uaktualnienia</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Skiny/"><img src="'+host+'/Img/Int/Menu/m,skiny.gif" border="0"><br>Skiny</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Sterowniki/"><img src="'+host+'/Img/Int/Menu/m,sterowniki.gif" border="0"><br>Sterowniki</a></td>'+
'			</tr>'+
'		</table>'+
'		</td>'+
'	</tr>'+
'</table>';
NoweMenu();

   
iMenu++;
trescM[iMenu] = '<table cellSpacing="0" cellPadding="0" class="MMenu" id="menu'+ iMenu +'">'+
'	<tr>'+
'		<td width="604">&nbsp;</td>'+
'		<td valign="top">'+
'		<table class="WMenu" cellspacing="0" cellpadding="2" >'+
'			<tr>'+
'				<td width="85" height="60" align="center" valign="top"><a href="http://forum.centrumxp.pl/"><img src="'+host+'/Img/Int/Menu/m,forum.gif" border="0"><br>Forum</a></td>'+
'			</tr>'+
'		</table>'+
'		</td>'+
'	</tr>'+
'</table>';
NoweMenu();

iMenu++;
trescM[iMenu] = '<table cellSpacing="0" cellPadding="0" class="MMenu" id="menu'+ iMenu +'">'+
'	<tr>'+
'		<td width="619">&nbsp;</td>'+
'		<td valign="top">'+
'		<table class="WMenu" cellspacing="0" cellpadding="2">'+
'			<tr>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Aktualnosci/"><img src="'+host+'/Img/Int/Menu/m,aktualnosci.gif" border="0"><br>Aktualno&#347ci</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="http://msblog.centrumxp.pl/"><img src="'+host+'/Img/Int/Menu/m,blogi.gif" border="0"><br>MS Blog</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Publicystyka/"><img src="'+host+'/Img/Int/Menu/m,publicystyka.gif" border="0"><br>Publicystyka</a></td>'+
'			</tr>'+
'		</table>'+
'		</td>'+
'	</tr>'+
'</table>';
NoweMenu();

iMenu++;
trescM[iMenu] = ''+
'<table border="0" cellPadding="0" class="MMenu" id="menu'+ iMenu +'">'+
'	<tr>'+
'		<td width="619">&nbsp;</td>'+
'		<td valign="top">'+
'		<table class="WMenu" cellspacing="0" cellpadding="2">'+
'			<tr>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Slownik/"><img src="'+host+'/Img/Int/Menu/m,slownik.gif" border="0"><br>S&#322ownik komputerowy</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/ASPX/Profil/Profil.aspx"><img src="'+host+'/Img/Int/Menu/m,profil.gif" border="0"><br>Profil na CentrumXP.pl</a></td>'+
'				<td width="85" height="60" align="center" valign="top"><a href="'+host+'/Home/515,1,Serwisy_specjalne_oraz_dodatki.aspx"><img src="'+host+'/Img/Int/Menu/m,serwisy.gif" border="0"><br>Serwisy specjalne</a></td>'+
'			</tr>'+
'		</table>'+
'		</td>'+
'	</tr>'+
'</table>';
NoweMenu();

otwarte = false;
function cwiczenie()
{
	if(otwarte)
	{
		cwiczenieZ.style.display = 'none';
		cwiczenieA.innerHTML = '<a href="javascript:cwiczenie()"><b>Poka&#380 rozwi&#261zanie</b></a>';
	}
	else
	{
		cwiczenieZ.style.display = 'block';
		cwiczenieA.innerHTML = '<a href="javascript:cwiczenie()"><b>Ukryj rozwi&#261zanie</b></a>';
	}
	otwarte = !otwarte;
}

function bold(id)
{
    document.all["T"+id].style.fontWeight = 'bold';
}

function Ulubione()
{
    window.external.addFavorite(this.location.href, this.document.title);
}

function Drukuj()
{
    url = location.href
    url = url.substring(url.lastIndexOf('/')+1);
    url = url.substring(0, url.indexOf(','));
    window.open('/Druk/'+url+'.aspx');
}

function DrukujAktualnosc()
{
    url = location.href
    url = url.substring(url.lastIndexOf('/')+1);
    url = url.substring(0, url.indexOf(','));
    window.open('/DrukAktualnosc/'+url+'.aspx');
}

function Link()
{
    wiadomosc  = "Hej!";
    wiadomosc += String.fromCharCode(13);
    wiadomosc += "Znalazlem strone, ktora moze Cie zainteresowac:";
    wiadomosc += String.fromCharCode(13)+String.fromCharCode(13);
    wiadomosc += document.title;
    wiadomosc += String.fromCharCode(13);
    wiadomosc += location.href;
    wiadomosc += String.fromCharCode(13)+String.fromCharCode(13);
    window.open('mailto:?subject=Link do portalu CentrumXP.pl&body='+escape(wiadomosc));
}

function initMenu()
{
	document.write(trescMenu);
}

kolory = new Array();
kolory[0] = '#D6E3EF';
kolory[1] = '#DBE7F0';
kolory[2] = '#E1EAF3';
kolory[3] = '#E7EEF5';
kolory[4] = '#EDF2F8';
kolory[5] = '#F3F7FA';
kolory[6] = '#F9FBFD';
kolory[7] = '#FFFFFF';

start = new Array();
czas = new Array();
inte = 50;

function tn_zmien(kierunek, id, czasL)
{
	if(start[id] == undefined)
	{
		start[id] = 0;
	}
	if(czasL == czas[id])
	{
		start[id] += kierunek;
		document.all['TN'+id].style.backgroundColor = kolory[start[id]];
		if(start[id] >= 0 && start[id] <= 7)
		{
			setTimeout('tn_zmien(' + kierunek + ', ' + id + ', ' + czasL + ')', inte);
		}
	}
}

function tn_na(id)
{
	if(czas[id] == undefined)
	{
		czas[id] = 0;
	}
	czas[id]++;
	tn_zmien(1, id, czas[id]);
	document.all['TN'+id].style.borderColor = '#B1BBC5';
}

function tn_z(id)
{
	if(czas[id] == undefined)
	{
		czas[id] = 0;
	}
	czas[id]++;
	tn_zmien(-1, id, czas[id]);
	document.all['TN'+id].style.borderColor = '#D6E3EF';
}

function sh_na(id)
{
    if(ie)
    {
        HomePanelPM.innerHTML = document.all['Div' + id].innerHTML;
    }
    else
    {
        document.getElementById('HomePanelPM').innerHTML = document.getElementById('Div' + id).innerHTML;
    }
}