<!--

var username, tds = document.getElementsByTagName('td');

for (i = 0; i < tds.length; i++) {

if (tds[i].innerHTML.match('Log In')) {

  username = "Guest";

} else if (tds[i].innerHTML.match('Logged in as:')) {

  username = tds[i].getElementsByTagName('a')[0].innerHTML;

}

}



var Tags = new Array();



Tags[0] = new Array(

/\[hightlight\](.*)\[\/hightlight\]/,

/\[youtube\](.*)\[\/youtube\]/,

/\[videogoogle\](.*)\[\/videogoogle\]/,

/\[iframe\](.*)\[\/iframe\]/,

/\[flash\](.*)\[\/flash\]/,

/\[video\](.*)\[\/video\]/,

/\[music\](.*)\[\/music\]/,

/\[bgimage\](.*)\[\/bgimage\]/,

/\[center\](.*)\[\/center\]/,

/\[bgmusic\](.*)\[\/bgmusic\]/,

/\[you\]/); 



Tags[1] = new Array('<span style="background-color:yellow">$1</span>','<center><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/$1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></center>','<center><object width="425" height="350"><param name="movie" value="http://video.google.com/googleplayer.swf?docId=$1"></param><param name="wmode" value="transparent"></param><embed src="http://video.google.com/googleplayer.swf?docId=$1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></center>','<iframe src="$1" width=550 height=380 scrolling="yes" frameborder="1"></iframe>','<table border="2" width="424" cellspacing="5" cellpadding="0"><tr><td><embed height=400 src="$1" width=542 quality="high" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></td></tr></table>','<center><table border="2" width="525" cellspacing="5" cellpadding="0"><tr><td><embed height=380 src="$1" width=525 autostart="true" loop="true" hidden="false"></td></tr></table></center>','<table align="center" background="http://www.freewebs.com/ledinh/lollipop_nghenhac.jpg" width=308 height=203><tr><td><br><br><br><br><br><br><br><br><center><br><br><embed enableContextMenu=0 type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="$1" type="application/x-mplayer2" ShowStatusBar="1" AutoStart="true" loop="true" ShowControls="1" width=294 height=65></embed><br></td></tr></table><br><a href="$1" target="_blank"><center><img src="http://img194.imageshack.us/img194/5012/1bb1.jp" border="0"></center></a></center>','<div class="bushitaxvabg" style="background-image:url($1);">','<center>$1</center>','<embed src="$1" autostart="1" loop="true" hidden="true"</embed>',username);



if (location.href.match('showtopic=') || location.href.match('act=Msg')|| location.href.match('act=Post')|| location.href.match('act=ST')|| location.href.match('index.php?')) {

TDS = document.getElementsByTagName('TD');

for(i=0;i<TDS.length;i++){



if (TDS[i].className == "post1" || TDS[i].className == "post2" || TDS[i].className == "row1") {

for (p = 0; p < Tags[1].length; p++) {

TDS[i].innerHTML = TDS[i].innerHTML.replace(Tags[0][p], Tags[1][p]);

}

}

}

}

if(location.href.match('act=Post') || location.href.match('act=Msg') || location.href.match('index.php?')){
function tagMusic()
{
col = prompt("Enter the complete URL for the hyperlink ", "http://");
document.getElementsByName('Post')[0].value += "[music]"+col+"[/music]"
}
function tagVideo()
{
col = prompt("Enter the complete URL for the hyperlink ", "http://");
document.getElementsByName('Post')[0].value += "[video]"+col+"[/video]"
}
function tagFlash()
{
col = prompt("Enter the complete URL for the hyperlink ", "http://");
document.getElementsByName('Post')[0].value += "[flash]"+col+"[/flash]"
}
function tagbgmusic()
{
col = prompt("Enter the complete URL for the background music ", "http://");
document.getElementsByName('Post')[0].value += "[bgmusic]"+col+"[/bgmusic]"
}
function tagbgimage()
{
col = prompt("Enter the complete URL for the background image ", "http://");
document.getElementsByName('Post')[0].value += "[bgimage]"+col+"[/bgimage]"
}
function taghightlight()
{
col = prompt("Enter text to hightlight ", "bushitaxva");
document.getElementsByName('Post')[0].value += "[hightlight]"+col+"[/hightlight]"
}
function tagyoutube()
{
col = prompt("Enter the complete ID ", "bushitaxva");
document.getElementsByName('Post')[0].value += "[youtube]"+col+"[/youtube]"
}
function taggoogle()
{
col = prompt("Enter the complete ID ", "bushitaxva");
document.getElementsByName('Post')[0].value += "[videogoogle]"+col+"[/videogoogle]"
}
function tagIframe()
{
col = prompt("Enter the complete URL for the hyperlink ", "http://");
document.getElementsByName('Post')[0].value += "[iframe]"+col+"[/iframe]"
}
function tagYou()
{
document.getElementsByName('Post')[0].value += "[you]"
}
function tagCenter()
{
col = prompt("Enter text to align center ", "");
document.getElementsByName('Post')[0].value += "[center]"+col+"[/center]"
}

function mota(text) {
document.REPLIER.helpbox.value = text;
}

var x = document.getElementsByTagName('td')
for(y=0;y<x.length;y++){
if(x[y].innerHTML.match(/Close all Tags/i) && x[y].className == "pformright"){
x[y].innerHTML +='<br>'
x[y].innerHTML +='<input type="button" accesskey="m" value="Music" onclick="tagMusic();" class="codebuttons" name="music" onmouseover="mota(\'Chèn Nh?c Vào Bài Vi?t (alt + m)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="v" value="Video" onclick="tagVideo();" class="codebuttons" name="video" onmouseover="mota(\'Chèn phim , nh?c hình vào bài vi?t (alt + v)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="f" value="Flash" onclick="tagFlash();" class="codebuttons" name="flash" onmouseover="mota(\'Chèn Nh?c Flash vào baig vi?t (alt + f)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="b" value="Bgmusic" onclick="tagbgmusic();" class="codebuttons" name="Bgmusic" onmouseover="mota(\'Chèn nh?c n?n vào bài vi?t (alt + b)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="t" value="Bgimage" onclick="tagbgimage();" class="codebuttons" name="Bgimage" onmouseover="mota(\'Chèn hình n?n vào bài vi?t (alt + t)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="h" value="Hightlight" onclick="taghightlight();" class="codebuttons" name="Hightlight" onmouseover="mota(\'Hightlight text trong bài vi?t (alt + h)\')">'
x[y].innerHTML +='<br>'
x[y].innerHTML +='<input type="button" accesskey="a" value="Youtube" onclick="tagyoutube();" class="codebuttons" name="Youtube" onmouseover="mota(\'Chèn video Youtube vào bài vi?t (alt + a)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="o" value="Google" onclick="taggoogle();" class="codebuttons" name="Google" onmouseover="mota(\'Chèn video Google vào bài vi?t (alt + o)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="r" value="Frame" onclick="tagIframe();" class="codebuttons" name="iframe"  onmouseover="mota(\'Chèn 1 trang web vào bài vi?t (alt + r)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="c" value="Center" onclick="tagCenter();" class="codebuttons" name="center" onmouseover="mota(\'Chèn th? giúp ch? hi?n ? gi?a bài vi?t (alt + c)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="y" value="You" onclick="tagYou();" class="codebuttons" name="you" onmouseover="mota(\'Chèn th? [you] vào trong n?i dung (alt + y)\')">'
}}}

//-->