<!--

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://www3.webng.com/ngocsonbg88/nhacclub/iloveyou.jpg" width=545 height=417><tr><td><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><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=500 height=65></embed><br></td></tr></table><br><a href="$1" target="_blank"><center><img src="http://rap.vn/diendan/images/download.gif" 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(\'Chon Nhac Vao Bai Viet (alt + m)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="v" value="Video" onclick="tagVideo();" class="codebuttons" name="video" onmouseover="mota(\'Chon phim Vao Bai Viet (alt + v)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="f" value="Flash" onclick="tagFlash();" class="codebuttons" name="flash" onmouseover="mota(\'Chon Nhac Flash Vao Bai Viet (alt + f)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="b" value="Bgmusic" onclick="tagbgmusic();" class="codebuttons" name="Bgmusic" onmouseover="mota(\'Chon nhac nen Vao Bai Viet (alt + b)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="t" value="Bgimage" onclick="tagbgimage();" class="codebuttons" name="Bgimage" onmouseover="mota(\'Chon hinh nen vo bi viet (alt + t)\')">'
x[y].innerHTML +='&nbsp;<input type="button" accesskey="h" value="Hightlight" onclick="taghightlight();" class="codebuttons" name="Hightlight" onmouseover="mota(\'Hightlight text trong bi vi?t (alt + h)\')">'
x[y].innerHTML +='<br>'

}}}

//-->
