function putFlash(file, width, height, fields, style, id) {
	var code = '';
	if (!fields) {
		var fields = [];
	}
	if (!fields["quality"]) { fields["quality"] = "high"; }
	if (!fields["wmode"]) { fields["wmode"] = "transparent"; }
	if (!fields["menu"]) { fields["menu"] = "false"; }

	code += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + width + '" height="' + height + '" style="' + style + '" VIEWASTEXT id="' + id + '">';
	code += '<param name="movie" value="' + file + '">';
	for (var key in fields) {
		code += '<param name="' + key + '" value="' + fields[key] + '">';
	}
	code += '<embed src="' + file + '" width="' + width + '" height="' + height + '" style="' + style + '" id="' + id + '"';
	for (var key in fields) {
		code += ' ' + key + '="' + fields[key] + '"';
	}
	code += '></embed>';
	code += '</object>';
	document.write(code);
}

function checkEmail(str) {
	return /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})$/.test(str);
}

function gotoUrl(url, win) {
	if (!win) {
		location.href = url;
	} else {
		window.open(url, '_blank');
	}
}
