// JavaScript Document
function ubbcode(temp) {
var temp;
temp = temp.replace(/&amp;/ig,"&");
temp = temp.replace(/  /ig,"¡¡");
temp = temp.replace(/\[b\]/ig,"<b>");
temp = temp.replace(/\[\/b\]/ig,"<\/b>");
temp = temp.replace(/\[i\]/ig,"<i>");
temp = temp.replace(/\[\/i\]/ig,"<\/i>");
temp = temp.replace(/\[u\]/ig,"<u>");
temp = temp.replace(/\[\/u\]/ig,"<\/u>");
temp = temp.replace(/\[strike\]/ig,"<strike>");
temp = temp.replace(/\[\/strike\]/ig,"<\/strike>");
temp = temp.replace(/\[center\]/ig,"<center>");
temp = temp.replace(/\[\/center\]/ig,"<\/center>");
temp = temp.replace(/\[marquee\]/ig,"<marquee>");
temp = temp.replace(/\[\/marquee\]/ig,"<\/marquee>");
temp = temp.replace(/(\[font=)([^.:;`'"=\]]*)(\])/ig,"<FONT face='$2'>");
temp = temp.replace(/\[\/font\]/ig,"<\/FONT>");
temp = temp.replace(/(\[COLOR=)([^.:;`'"=\]]*)(\])/ig,"<FONT COLOR='$2'>");
temp = temp.replace(/\[\/COLOR\]/ig,"<\/FONT>");
temp = temp.replace(/(\[size=)([0-9]*)(\])/ig,"<FONT size='$2'>");
temp = temp.replace(/\[\/size\]/ig,"<\/FONT>");
temp = temp.replace(/(\[URL\])([^]]*)(\[\/URL\])/ig,"<A TARGET=_blank HREF='$2'>$2</A>");
temp = temp.replace(/(\[URL=)([^]]*)(\])/ig,"<A TARGET=_blank HREF='$2'>");
temp = temp.replace(/\[\/URL\]/ig,"<\/A>");
temp = temp.replace(/(\[EMAIL\])(\S+\@[^]]*)(\[\/EMAIL\])/ig,"<a href=mailto:$2>$2</a>");
temp = temp.replace(/(\[code\])([^]]*)(\[\/code\])/ig,"<BLOCKQUOTE><strong>´úÂë</strong>£º<HR Size=1>$2<HR SIZE=1><\/BLOCKQUOTE>");
temp = temp.replace(/(\[QUOTE\])(.*)(\[\/QUOTE\])/ig,"<BLOCKQUOTE><strong>ÒýÓÃ</strong>£º<HR Size=1>$2<HR SIZE=1><\/BLOCKQUOTE>");
temp = temp.replace(/(\[blue\])(.[^\[]*)(\[\/blue\])/ig,"<span STYLE='position:relative; width:580; height:50; filter:glow(Color=#7ec0ee,Strength=2); margin-left:8px'>$2<\/span>");
temp = temp.replace(/(\[yellow\])(.[^\[]*)(\[\/yellow\])/ig,"<font style='cursor:hand;width:575;color:ffff00;filter:glow(color=red, strength=2)'>$2<\/font>");
temp = temp.replace(/(\[black\])(.[^\[]*)(\[\/black\])/ig,"<SPAN style='FONT-SIZE: 9pt; FILTER: glow(color=#909090,strength=0) shadow(color:#000000,direction=125); WIDTH: 100%; COLOR: white; LINE-HEIGHT: 25pt; POSITION: relative'><SPAN class=shadow1><FONT size='3' color=#ffffff>$2<\/FONT><\/SPAN><\/SPAN>");
temp = temp.replace(/(\[white\])(.[^\[]*)(\[\/white\])/ig,"<table style='FILTER:glow(color=a4b6d7)'><b><font color=#ffffff style=font-size:12pt>$2<\/font><\/b><\/table>");
temp = temp.replace(/(\[red\])(.[^\[]*)(\[\/red\])/ig,"<table width='86%' border='0' cellspacing='0' cellpadding='0' ><td align=left style='font-size: 12pt; COLOR: #ffffff; FILTER: glow(color=000000,strength=2) dropshadow(color=#ff0000,offx=1, offy=1, positive=2); HEIGHT: 20px; MARGIN: 0px; TEXT-DECORATION: none'>$2<\/td><\/tr><\/table>");
temp = temp.replace(/(\[black2\])(.[^\[]*)(\[\/black2\])/ig,"<TABLE ><TBODY><TD style='FILTER: glow(color=#000000,strength=2)'><FONT size='3' color=#ffffff>$2<\/FONT><\/TD><\/tbody><\/table>");
temp = temp.replace(/(\[fly\])(.[^\[]*)(\[\/fly\])/ig,"<MARQUEE scrollAmount=3 behavior=alternate width='90%'><font size='3'>$2<\/font><\/MARQUEE>");
temp = temp.replace(/(\[move\])(.[^\[]*)(\[\/move\])/ig,"<MARQUEE scrollAmount=3><font size='3'>$2<\/font><\/MARQUEE>");
temp = temp.replace(/(\[glow\])(.[^\[]*)(\[\/glow\])/ig,"<TABLE width=255><span style='behavior:url(inc/font.htc)'>$2</span><\/TABLE>");
temp = temp.replace(/(\[shadow\])(.[^\[]*)(\[\/shadow\])/ig," <TABLE style='FILTER: shadow(color=blue, direction=1 ,strength=2)' width=255><font size='3'>$2<\/font><\/TABLE>");
temp = temp.replace(/(\[iframe\])(.[^\[]*)(\[\/iframe\])/ig,"<iframe width=575 height=400 frameborder=0 scrolling=yes src=$2><\/iframe>");
temp = temp.replace(/(\[FLASH=([0-9]*)\,([0-9]*)\])([^]]*)(\[\/FLASH\])/ig,"<embed width=$2 height=$3 src='$4' wmode=transparent>");
temp = temp.replace(/(\[FLASH\])([^]]*)(\[\/FLASH\])/ig,"<embed width=530 height=375 src='$2' wmode=transparent>");
temp = temp.replace(/(\[IMG\])([^]]*)(\[\/IMG\])/ig,"<img border=0 src='$2' onmousewheel='return yuzi_img(event,this)' onload='javascript:if(this.width>body.clientHeight)this.width=body.clientHeight'> ");
return (temp);
}
function htmlcode(temp)
{var temp;
temp = temp.replace(/&#59;/ig,";");
temp = temp.replace(/&lt;/ig,"<");
temp = temp.replace(/&gt;/ig,">");
temp = temp.replace(/&#92;/ig,"\\");
temp = temp.replace(/&#45;&#45;/ig,"--");
temp = temp.replace(/&#39;/ig,"\'");
temp = temp.replace(/&quot;/ig,"\"");
return (temp);
}
