function viewPicture(pic, width, height)
{
	if ((document.body.clientWidth < width) || (document.body.clientHeight < height))
	{
		if (document.body.clientWidth >= width) width = width + 20;
		if (document.body.clientWidth < width) width = document.body.clientWidth;
		if (document.body.clientHeight < height) height = document.body.clientHeight;
		autoScroll = 'yes';
	}
	else
	{
		autoScroll = 'no';
	}
	posLeft = parseInt(screen.width / 2 - width / 2);
	posTop = parseInt(screen.height / 2 - height / 2);
	window.open('../www.webon.pl/picturee644.html?pic='+pic,'WebOn'+width+'x'+height,'top='+posTop+',left='+posLeft+',toolbar=no,scrollbars='+autoScroll+',directories=no,status=no,menubar=no,resizable=no,width='+width+',height='+height);
}

function openWindow(url, width, height)
{
	if ((document.body.clientWidth < width) || (document.body.clientHeight < height))
	{
		if (document.body.clientWidth < width) width = document.body.clientWidth;
		if (document.body.clientHeight < height) height = document.body.clientHeight;
	}
	posLeft = parseInt(screen.width / 2 - width / 2);
	posTop = parseInt(screen.height / 2 - height / 2);
	window.open(url,'WebOn'+width+'x'+height,'top='+posTop+',left='+posLeft+',toolbar=no,scrollbars=yes,directories=no,status=no,menubar=no,resizable=no,width='+width+',height='+height);
}

function getElement(id)
{
	with (document) var element = getElementById ? getElementById(id) : all ? all[id] : layer[id];
	if(!element.style) element.style = element;
	return element;
}

function hideBanner()
{
	getElement('mainBanner').style.visibility = 'hidden';
}

function viewBanner()
{
	getElement('mainBanner').style.left = parseInt(document.body.clientWidth / 2) - 220;
	getElement('mainBanner').style.top = 270;
}

function viewBanner2()
{
	getElement('mainBanner').style.left = parseInt(document.body.clientWidth / 2) - 175;
	getElement('mainBanner').style.top = 270;
}
