function multiPopUp(URL, title, width, height) {
	width = parseInt(width);
	height = parseInt(height);
	day = new Date();
	id = day.getTime();
	filtype = URL.substring(URL.lastIndexOf(".")+1, URL.length);
	filtype = filtype.toLowerCase();
	if (width>1008 && height>752) {
		scrollbars = 1;
		winWidth = 1024;
		winHeight = 768;
	} else if (width>1008) {
		scrollbars = 1;
		winWidth = 1024;
		winHeight = height+16;
	} else if (height>752) {
		scrollbars = 1;
		winWidth = width+16;
		winHeight = 768;
	} else {
		scrollbars = 0;
		winWidth = width;
		winHeight = height;
	}
	if (filtype=="jpg" ||filtype=="jpeg" ||filtype=="gif" ||filtype=="png" ||filtype=="bmp") {
		eval("page" + id + " = window.open('', '" + id + "', 'toolbar=0,scrollbars=" + scrollbars + ",location=0,statusbar=0,menubar=0,resizable=1,width=" + winWidth + ",height=" + winHeight + ",left=320,top=240');");
		eval("page" + id + ".document.write(\"<html><head><title>" + title + "</title></head>\");");
		eval("page" + id + ".document.write('<body topmargin=\"0\" rightmargin=\"0\" bottommargin=\"0\" leftmargin=\"0\" marginheight=\"0\" marginwidth=\"0\" onload=\"this.focus();\" onblur=\"window.close();\">');");
		eval("page" + id + ".document.write('<img src=\"" + URL + "\" width=\"" + width + "\" height=\"" + height + "\" alt=\"" + URL + "\" border=\"0\" />');");
		eval("page" + id + ".document.write(\"</body></html>\");");
		eval("page" + id + ".document.close();");
		if (window.focus) {
			eval("page" + id + ".focus();");
		}
	} else {
		eval("page" + id + " = window.open(URL, 'apricore_cms_popup', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + ",left=320,top=240');");
		if (window.focus) {
			eval("page" + id + ".focus();");
		}
	}
}
