var Quote = 0;
var Bold  = 0;
var Italic = 0;
var Underline = 0;
var Code = 0;
var text_enter_url      = "请输入主页地址";
var text_enter_fly      = "请输入文字";
var text_enter_move      = "请输入文字";
var text_enter_col      = "使文字产生光晕效果.用法: [GLOW=宽度, 颜色, 边界]要产生光晕效果的文字[/GLOW]";
var text_enter_image    = "请输入图片地址";
var text_enter_email    = "请输入邮件地址";
var text_enter_flash    = "请输入Flash地址";
var text_enter_sound    = "请输入音乐地址";
var error_no_url        = "您必须输入地址";
var error_no_fly        = "您必须输入文字";
var error_no_move       = "您必须输入文字";
var error_no_flash       = "您必须输Flash的地址";
var error_no_col        = "您必须输入各项参数!";
var error_no_title      = "您必须输入主页标题";
var error_no_email      = "您必须输入邮件地址";
var error_no_sound      = "您必须输入音乐地址";
function msgWrite(NewCode) {
document.form.msg.value+=NewCode;
document.form.msg.focus();
return;
}
function fly() {
var FoundErrors = '';
var enterTXT   = prompt(text_enter_fly, "请输入您要书写的文字");
if (!enterTXT)    {
FoundErrors += "\n" + error_no_fly;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[fly]"+enterTXT+"[/fly]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function move() {
var FoundErrors = '';
var enterTXT   = prompt(text_enter_move, "请输入您要书写的文字");
if (!enterTXT)    {
FoundErrors += "\n" + error_no_move;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[move]"+enterTXT+"[/move]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function glow() {
var FoundErrors = '';
var enterURL   = prompt(text_enter_col, "请输入您要书写的文字");
var enterCOL   = prompt(text_enter_col, "255,red,2");
if (!enterURL||!enterCOL)    {
FoundErrors += "\n" + error_no_col;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[glow="+enterCOL+"]"+enterURL+"[/glow]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function YBBCurl() {
var FoundErrors = '';
var enterURL   = prompt(text_enter_url, "http://");
if (!enterURL)    {
FoundErrors += "\n" + error_no_url;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[URL="+enterURL+"]"+enterURL+"[/URL]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function YBBCimage() {
var FoundErrors = '';
var enterURL   = prompt(text_enter_image, "http://");
if (!enterURL) {
FoundErrors += "\n" + error_no_url;
}
if (FoundErrors) {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[IMG]"+enterURL+"[/IMG]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function YBBCemail() {
var emailAddress = prompt(text_enter_email,"");
if (!emailAddress) { alert(error_no_email); return; }
var ToAdd = "[EMAIL]"+emailAddress+"[/EMAIL]";
msgWrite(ToAdd);
}
function flash() {
var FoundErrors = '';
var enterURL   = prompt(text_enter_flash, "http://");
if (!enterURL)    {
FoundErrors += "\n" + error_no_flash;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[flash=350,250]"+enterURL+"[/flash]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function bgsound() {
var soundAddress = prompt(text_enter_sound,"http://");
if (!soundAddress) { alert(error_no_sound); return; }
var ToAdd = "[bgsound]"+soundAddress+"[/bgsound]";
msgWrite(ToAdd);
}
function realone() {
var realoneAddress = prompt(text_enter_sound,"http://");
if (!realoneAddress) { alert(error_no_sound); return; }
var ToAdd = "[rm]"+realoneAddress+"[/rm]";
msgWrite(ToAdd);
}
function mediaplay() {
var mediaAddress = prompt(text_enter_sound,"http://");
if (!mediaAddress) { alert(error_no_sound); return; }
var ToAdd = "[ra]"+mediaAddress+"[/ra]";
msgWrite(ToAdd);
}
function YBBCbold() {
var FoundErrors = '';
var enterTXT   = prompt(text_enter_move, "请输入您要书写的文字");
if (!enterTXT)    {
FoundErrors += "\n" + error_no_move;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[B]"+enterTXT+"[/B]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function YBBCitalic() {
var FoundErrors = '';
var enterTXT   = prompt(text_enter_move, "请输入您要书写的文字");
if (!enterTXT)    {
FoundErrors += "\n" + error_no_move;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[I]"+enterTXT+"[/I]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}
function YBBCunder() {
var FoundErrors = '';
var enterTXT   = prompt(text_enter_move, "请输入您要书写的文字");
if (!enterTXT)    {
FoundErrors += "\n" + error_no_move;
}
if (FoundErrors)  {
alert("错误!"+FoundErrors);
return;
}
var ToAdd = "[u]"+enterTXT+"[/u]";
document.form.msg.value+=ToAdd;
document.form.msg.focus();
}