
function showHideDiv(sID, bState) { 
	var e = document.getElementById(sID);
	if (e != null) { 
		if (bState) { 
			e.style.display = '';
		} else { 
			e.style.display = 'none';
		}
	}
}


function launchScaledWindow(ref, iWidth, iHeight) { 
	var iWidthMax = screen.width - 120;
	var iHeightMax = screen.height - 120;
	var p = iWidth / iHeight;
	if (iWidth > iWidthMax) { 
		iWidth = iWidthMax;
		iHeight = iWidthMax / p;
	} 
	if (iHeight > iHeightMax) { 
		iHeight = iHeightMax;
		iWidth = iHeightMax * p;
	} 
	var sFeatures = 'width='+iWidth+',height='+iHeight+',scrollbars=0,resizable=0,toolbar=0,location=0,directories=0,status=0,menubar=0,copyhistory=0';
	window.open(ref.href, ref.target, sFeatures); 
	return false;
}

function navAlbumAction(sURL) { 
	document.location.href = sURL+'?iAlbum='+document.selectAlbum.elements.iAlbum.value;
	return false;
}
