// JavaScript Document
nn4 = (document.layers)? true : false;
ie4 = (document.all)? true : false;
dom = (document.createTextNode)? true : false;

function popup(fileUrl, winW, winH, winN) {
	var scrollbars = 'yes';
	var winWidth = (winW)? winW : 540;
	var winHeight = (winH)? winH : 600;
	var winName = (winN)? winN : 'popupWin';
	if (nn4 || ie4 || dom) {
		if (screen.width < winWidth + 50) { winWidth = screen.width - 50; scrollbars = 'yes' }
		if (screen.height < winHeight + 100) { winHeight = screen.height - 100; scrollbars = 'yes' }
		posX = Math.round((screen.width - winWidth) / 2);
		posY = Math.round((screen.height - winHeight) / 2);
		posCode = (nn4 || dom)? "screenX="+posX+",screenY="+posY : "left="+posX+",top="+posY;
	} else {
		posCode = "";
	}
	var popupWin = window.open(fileUrl, winName,"menubar=no,toolbar=no,resizable=yes,scrollbars=" + scrollbars + ",status=yes,width=" + winWidth + ",height=" + winHeight + "," + posCode);
	if (popupWin) popupWin.focus();
}

function showpicture(id, filename)
{
	var item = document.getElementById('img'+id);
	if (filename)
	{
		item.style.display='block';
		item.innerHTML = '<a href=# onclick="return false"><img border=0 src=pic_prod/'+filename+'></a>';
	}
	else item.style.display='none';
}

