var italic = 0;

		//该函数用来在Content文本框中输出文本。
		//Content是title_add.asp中用来输入内容的文本框的ID，myform是表单的ID。
		function textwrite(newtext) {
			document.myform.Content.value += newtext;
			document.myform.Content.focus();
		}

		//该函数用来设置斜体
		function ubbitalic() {
				toadd = "[i][/i]";
			textwrite(toadd);
		}

		//该函数用来设置粗体
		function ubbbold() {
				toadd = "[b][/b]";
			textwrite(toadd);
		}

		//该函数用来设置下划线
		function ubbunder() {
				toadd = "[u][/u]";
			textwrite(toadd);
		}

		//该函数用来设置超链接
		function ubburl() {
			toadd = "[url][/url]";
			textwrite(toadd);
		}

		//该函数用来设置图像
		function ubbimage() {
			toadd = "[img][/img]";
			textwrite(toadd);
		}

		//该函数用来设置E-mail
		function ubbemail() {
			toadd = "[email][/email]";
			textwrite(toadd);
		}

		//该函数用来设置FLASH
		function ubbflash() {
			toadd = "[flash=500,350]http://[/flash]";
			textwrite(toadd);
		}

		//该函数用来设置rm播放器
		function ubbrm() {
			toadd = "[rm=500,350,1]http://[/rm]";
			textwrite(toadd);
		}

		//该函数用来设置颜色
		function ubbcolor() {
			toadd = "[color=red][/color]";
			textwrite(toadd);
		}
        
		//该函数用来设置文字背景
		function ubbquote() {
			toadd = "[quote][/quote]";
			textwrite(toadd);
		}
        
		//该函数用来设置文字飞翔效果
		function ubbfly() {
			toadd = "[fly][/fly]";
			textwrite(toadd);
		}

		//该函数用来设置文字移动效果
		function ubbmove() {
			toadd = "[move][/move]";
			textwrite(toadd);
		}

		//该函数用来设置文字发光效果
		function ubbglow() {
			toadd = "[glow][/glow]";
			textwrite(toadd);
		}

		//该函数用来设置文字居中效果
		function ubbcenter() {
			toadd = "[center][/center]";
			textwrite(toadd);
		}


		//该函数用来设置文字阴影效果
		function ubbshadow() {
			toadd = "[SHADOW=255,blue,1][/SHADOW]";
			textwrite(toadd);
		}
        
		//以下函数用来插入表情符号
		function ubbface1() {
			toadd = ":)";
			textwrite(toadd)
		}

		function ubbface2() {
			toadd = ":(";
			textwrite(toadd)
		}
		
		function ubbface3() {
			toadd = ":o";
			textwrite(toadd)
		}
		
		function ubbface4() {
			toadd = ":D";
			textwrite(toadd)
		}

		function ubbface5() {
			toadd = ";)";
			textwrite(toadd)
		}

		function ubbface6() {
			toadd = ":p";
			textwrite(toadd)
		}

		function ubbface7() {
			toadd = ":cool:";
			textwrite(toadd)
		}

		function ubbface8() {
			toadd = ":mad:";
			textwrite(toadd)
		}

		function ubbface9() {
			toadd = ":eek:";
			textwrite(toadd)
		}