function A2U() {
	//ASCII -> Unicode
	if (parseFloat(ScriptEngineMajorVersion() + '.' + ScriptEngineMinorVersion()) < 5.5){ 
	alert('您的脚本引擎版本过低，请升级为5.5以上'); 
	return; 
	}
	if (source.value == '') { 
	alert('文本框中没有代码！'); 
	return; 
	}
	result.value = '';
	for (var i=0; i<source.value.length; i++)
	result.value += '&#' + source.value.charCodeAt(i) + ';';
}
function U2A() { 
	//Unicode -> ASCII
	var code = source.value.match(/&#(\d+);/g);
	if (code == null) { 
	alert('文本框中没有合法的Unicode代码！'); 
	return; 
	}
	result.value = '';
	for (var i=0; i<code.length; i++)
	result.value += String.fromCharCode(code[i].replace(/[&#;]/g, ''));
}
function preview() {
	var win = window.open();
	win.document.open('text/html', 'replace');
	win.document.writeln(result.value);
	win.document.close();
}