
function pages_html_pic_popup(url,w,h,name) {

	//var w = ".($config["pages_html_pics_pic_big_width"] + 40).";
	//var h = ".($config["pages_html_pics_pic_big_width"] + 40).";
	if(!w) w = 640; else w+=16;
	if(!h) h = 480; else h+=4;
	if(!name) name = 'pic_popup';
	var wint =0;
 	if(screen.width){
		var winl = (screen.width - w)/2;
		var wint = (screen.height - h)/2;
	}else{
		var winl = 0;
	}
	if (winl < 0) winl = 0;
	if (wint < 0) wint = 0;
	var settings = 'height=' + h + ',';
	settings += 'width=' + w + ',';
	settings += 'top=' + wint + ',';
	settings += 'left=' + winl + ',';
	settings += 'scrollbars=yes';
	try{
		var win = window.open(url, name, settings);
		win.focus();
	}catch(e){
		alert('Popup kon niet geopend worden');
		return false;
	}
	return true;
}