/*
$Id: js_functions.inc.js 1957 2006-05-16 05:45:21Z fesh $
*/
function popup_image(image_url, title) {
	var winl = (screen.width - 200)/2;
	var wint = (screen.height - 300)/2;
	var settings ='top='+wint+',';
	settings +='left='+winl+',';
	settings +='width=200, ';
	settings +='height=300, ';
	settings +='scrollbars=no,';
	settings +='resizable=yes';

	title = title.replace(/\s/g, '%20');

	win=window.open('/image_popup.php?image_url='+image_url+'&title='+title, 'image',settings);

	if(parseInt(navigator.appVersion) >= 4) {
		win.window.focus();
	}
}

function popup_gallery(g, i, w, h) {
	var winl = (screen.width - 700)/2;
	var wint = (screen.height - 500)/2;
	var settings ='top='+wint+',';
		settings +='left='+winl+',';
		settings +='width=700, ';
		settings +='height=500, ';
		settings +='scrollbars=no,';
		settings +='resizable=yes';

	win=window.open('/gallery_popup.php?g='+g+'&i='+i+'&w='+w+'&h='+h, 'image',settings);

	if(parseInt(navigator.appVersion) >= 4) {
	   win.window.focus();
	}
}

/* preload images */
if (document.images) {
	var spacerOn = new Image();
	spacerOn.src = "images/spacer.gif";
}
