function _calc_height() {
	if (window.navigator.userAgent.indexOf("Safari") >= 0) {
		return 44;
	} else {
		return 20;
	}
}

function view(url, album, item, width, height) {
	w = eval(width) + 200;
	h = eval(height) + _calc_height() + 150;
	var viewer_window = window.open (
		url + '/viewPicture?' + album + '&' + item,
		'ViewerWindow',
		'width=50, height=50, menubar=no, toolbar=no, scrollbars=no, resizable=no, status=no');
	viewer_window.resizeTo(w, h);
	return;
}

function reload(url, album, item, width, height) {
	w = eval(width) + 200;
	h = eval(height) + _calc_height() + 150;
	window.resizeTo(w, h);
	window.location.replace(url + '/viewPicture?' + album + '&' + item);
	return;
}