function getCategory(name_variable)
{
	width = 400;
	height = 500;
	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;
		}
	}
	else
	{
		height = height+5;
	}
	posLeft = parseInt(screen.width / 2 - width / 2);
	posTop = parseInt(screen.height / 2 - height / 2);
	window.open('category.php?v='+name_variable,'Category','top='+posTop+',left='+posLeft+',toolbar=no,scrollbars=yes,directories=no,status=yes,menubar=no,resizable=no,width='+width+',height='+height);
}

function openWindow(id, 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;
		}
		autoScroll = 'yes';
	}
	else
	{
		autoScroll = 'no';
	}
	posLeft = parseInt(screen.width / 2 - width / 2);
	posTop = parseInt(screen.height / 2 - height / 2);
	window.open('foto.php?id='+id,'Evelyn'+width+'x'+height,'top='+posTop+',left='+posLeft+',toolbar=no,scrollbars='+autoScroll+',directories=no,status=no,menubar=no,resizable=no,width='+width+',height='+height);
}

function openWindow2(id, 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;
		}
		autoScroll = 'yes';
	}
	else
	{
		autoScroll = 'no';
	}
	posLeft = parseInt(screen.width / 2 - width / 2);
	posTop = parseInt(screen.height / 2 - height / 2);
	window.open('foto2.php?id='+id,'Evelyn'+width+'x'+height,'top='+posTop+',left='+posLeft+',toolbar=no,scrollbars='+autoScroll+',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 hideElement(name)
{
	getElement(name).style.display = 'none';
}

function viewElement(name)
{
	getElement(name).style.display = 'block';
}
