function openPopup(url, width, height) {
	if (width == null) width = 600;
	if (height == null) height = 500;
	if(url.indexOf('?')<0) url += '?';
	jQuery('<a class=\"fancypopup\" href=\"'+ url +'&dim='+ width +','+ height +'\"></a>')
		.fancybox()
		.click();
}
function closePopup() {
	jQuery().fancybox.close();
}
