/** 跳出視窗
 * Pop-up a new window with specified url
 */
function popup_win(url, title, width, height)
{
	var param = "toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no";

	// Remove spaces and hypens from title that may cause IE error as its version <= 8.
	title = title.replace(/\s+/g, "");
	title = title.replace(/-/g, "");

	if (typeof(width) != "undefined" && width > 0) param = param + ",width=" + width;
	if (typeof(height) != "undefined" && height > 0) param = param + ",height=" + height;

	window.open(url, title, param);
}