
var FNT_2VN_BLK	= "<font face=Verdana,Sans-Serif,Arial size=2 color=black>";
var FNT_2VN_GR9	= "<font face=Verdana,Sans-Serif,Arial size=2 color=999999>";
var FNT_2VN_LNK	= "<font face=Verdana,Sans-Serif,Arial size=2 color=0033cc>";
var FNT_2VN_PGT	= "<font face=Verdana,Sans-Serif,Arial size=2 color=" + ((typeof PAGE_TEXT != "undefined")?PAGE_TEXT:"a52121") + ">";
var FNT_2VB_BLK = FNT_2VN_BLK + "<b>";
var FNT_2VB_LNK = FNT_2VN_LNK + "<b>";
var FNT_2VB_PGT = FNT_2VN_PGT + "<b>";
var FNT_2VB_RED	= "<font face=Verdana,Sans-Serif,Arial size=2 color=red><b>";
var FNT_1VN_BLK	= "<font face=Verdana,Sans-Serif,Arial size=1 color=black>";
var FNT_1VN_GR6	= "<font face=Verdana,Sans-Serif,Arial size=1 color=666666>";
var FNT_1VN_GR9	= "<font face=Verdana,Sans-Serif,Arial size=1 color=999999>";
var FNT_1VN_LNK	= "<font face=Verdana,Sans-Serif,Arial size=1 color=0033cc>";
var FNT_1VB_BLK	= FNT_1VN_BLK + "<b>";
var FNT_1VB_LNK	= FNT_1VN_LNK + "<b>";
var FNT_1VB_GR9 = FNT_1VN_GR9 + "<b>";
var FNT_1VB_PGT	= "<font face=Verdana,Sans-Serif,Arial size=1 color=" + ((typeof PAGE_TEXT != "undefined")?PAGE_TEXT:"a52121") + "><b>";
var SPACE	= FNT_1VN_BLK + "&nbsp;</font>";
var BREAK	= FNT_1VN_BLK + "<br></font>";
var SORT_COLS	= 1;
var SORT_ORDER	= "asc";
var MSGS_PER_PG	= 10;
var NAV_NS		= (navigator.appName.search(/netscape/i) > -1)?true:false;
var NAV_IE		= (navigator.appName.search(/microsoft internet explorer/i) > -1)?true:false;
var NAV_WEBTV	= (navigator.appName.search(/webtv/i) > -1)?true:false;
var NAV_WIN		= (navigator.platform.search(/win/i) > -1)?true:false;
var NAV_MAC		= (navigator.platform.search(/mac/i) > -1)?true:false;
var NAV_VER		= NAV_NS?((navigator.userAgent.search(/netscape6/i) > 0)?6.0:parseFloat(navigator.appVersion)):parseFloat(navigator.appVersion.replace(/.*msie (\d+\.*\d*).*/i,"$1"));
var WIN_W	= (NAV_NS)?window.innerWidth:screen.availWidth;
var WIN_H	= (NAV_NS)?window.innerHeight:screen.availHeight;
var MSG_ID 		= 0;
var MSG_UNUM	= 1;
var MSG_USER	= 2;
var MSG_EMAIL	= 3;
var MSG_TEXT	= 4;
var MSG_SUBJ	= 5;
var MSG_POST_DT	= 6;
var MSG_NUM		= 7;
var MSG_ICON	= 8;
var MSG_RATING	= 9;
var MSG_NUMRATE = 10;
var TPC_ID		= 0;
var TPC_SUBJ	= 1;
var TPC_AUTHOR	= 2;
var TPC_UNUM	= 3;
var TPC_MSGS	= 4;
var TPC_UPDT_DT	= 5;
var TPC_POST_DT	= 6;
var BRD_ID		= 0;
var BRD_SUBJ	= 1;
var BRD_TPCS	= 2;
var BRD_MSG_DT	= 3;
var BRD_TPC_DT	= 4;
var BRD_MSGS	= 5;
var BRD_HTML	= 6;
var BRD_LINK	= 7;
var CAT_ID		= 0;
var CAT_SUBJ	= 1;
var SRCH_MID	= 0;
var SRCH_TID	= 1;
var SRCH_BID	= 2;
var SRCH_TEXT	= 3;
var SRCH_SUBJ	= 4;
var SRCH_UNUM	= 5;
var SRCH_USER	= 6;
var SRCH_DT		= 7;
var SRCH_BRD	= 8;
function getDate(date) {
if (isNaN(date)) return "";
var mn = date.getMonth() + 1;
var dy = date.getDate();
var yr = String(date.getFullYear());
var hrs = date.getHours();
var min = date.getMinutes();
var time12h = ((hrs < 10 || (hrs > 12 && hrs < 22))?"0":"") + ((hrs > 12)?(hrs - 12):hrs) + ":" + ((min < 10)?("0" + min):min) + ((hrs < 12 || hrs == 24)?"am":"pm");
return (((mn < 10)?("0" + mn):mn) + "/" + ((dy < 10)?("0" + dy):dy) + "/" + yr.substring(yr.length - 2,yr.length) + " " + time12h);
}
function tableHTML(text) {
var args = arguments;
var pad = (args.length > 1)?args[1]:2;
var space = (args.length > 2)?args[2]:0;
var border = (args.length > 3)?args[3]:0;
var bg = (args.length > 4)?args[4]:false;
var w = (args.length > 5)?args[5]:"100%";
return "<table cellpadding=" + pad + " cellspacing=" + space + " border=" + border + (bg?(" bgcolor=" + bg):"") + ((w == "")?"":(" width=" + w)) + ">" + text + "</table>";
//return "<table cellpadding=" + pad + " cellspacing=" + space + " border=1" + (bg?(" bgcolor=" + bg):"") + ((w == "")?"":(" width=" + w)) + ">" + text + "</table>";
}
function lineHTML() {
var args = arguments;
var color = (args.length > 0 && args[0] != null)?args[0]:"6699ff";
var h = (args.length > 1 && args[1] != null)?args[1]:1;
return tableHTML("<tr><td bgcolor=" + color + ">" + tableHTML("<tr><td height=" + h + "></td></tr>",0) + "</td></tr>",0);
}
function sortList(a,b) {
var type = typeof a[SORT_COLS];
var s = (type == "string")?a[SORT_COLS].toUpperCase():a[SORT_COLS];
var t = (type == "string")?b[SORT_COLS].toUpperCase():b[SORT_COLS];
if (type == "string" || (type == "object" && s.constructor == "Date")) {
if (s > t) return 1;
else if (s == t) return 0;
else return -1;
} else return s - t;
}
function errorMsg(code,msg) {
if (code == 1)
document.write(tableHTML("<tr><td>" + FNT_2VB_BLK + "Please address the following errors:<br>" + FNT_2VB_RED + msg + "</b></font></td></tr>",5,0,0,"fefec5") + BREAK);
else
document.write(FNT_2VN_BLK,"We're sorry but an error has occurred. Please hit the &quot;Back&quot; button on your browser or click <a href=",boards_url,taxonomyJSP,">",FNT_2VN_LNK,"here</font></a> to go to the Message Boards homepage.</font>");
}
function msgList(msgs,rev,ignore) {
var color = "white";
var maxChars = Math.max(Math.floor((WIN_W - 230) * 1 / 25),40);
var sr = rev?"&sr=1":"";
var html = "<tr bgcolor=#D2D0F2><td>" + SPACE + "</td><td align=right width=1% height=20><font face=verdana,sans-serif size=2 color=#000000><b>#</b></font></td><td width=75%><font face=verdana,sans-serif size=2 color=#000000><b>Subject</b></font></td><td><font face=verdana,sans-serif size=2 color=#000000><b>Author</b></font></td><td width=1% nowrap><font face=verdana,sans-serif size=2 color=#000000><b>Date/Time (ET)</b></font></td></tr>";
if (typeof msgs != "undefined" && msgs.length > 0) {
for (var x = 0;x < msgs.length;x++) {
html += "<tr bgcolor=" + color + " valign=top><td height=20>" + ((x == curMsg)?(FNT_2VB_RED + "&#187;</font>"):SPACE) + "</td><td align=right>" + FNT_2VN_BLK + msgs[x][MSG_NUM] + "</font></td><td>" + FNT_2VN_BLK;
if (ignore.indexOf("," + msgs[x][MSG_UNUM] + ",") < 0) html += "<a href=" + boards_url + topicViewJSP + "?tid=" + topic[TPC_ID] + "&tm=" + (msgs[x][MSG_NUM]) + sr + ">" + ((strDecode(msgs[x][MSG_SUBJ],false).length > maxChars)?(strDecode(msgs[x][MSG_SUBJ],false).substring(0,maxChars) + "..."):strDecode(msgs[x][MSG_SUBJ],false)) + "</a>";
else html += "<i>" + msgs[x][MSG_USER] + "</i> is on your ignore list.";
html += "</font></td><td>" + FNT_1VN_BLK + msgs[x][MSG_USER] + "</font></td><td nowrap>" + FNT_1VN_BLK + getDate(msgs[x][MSG_POST_DT]) + "</font></td></tr>";
color = (color == "white")?"f2f0f0":"white";
}
} else html += "<tr><td colspan=4>" + FNT_2VN_BLK + "(No Messages)</font></td></tr>";
document.write(tableHTML(html,3));
}
function catsList(title,cats) {
if (cats.length > 0) {
var half = Math.ceil(cats.length / 2);
var col1 = col2 = "";
for (var x = 0;x < half;x++)
col1 += "<tr><td><a href=" + boards_url + taxonomyJSP + "?did=" + cats[x][CAT_ID] + "><b>" + FNT_2VN_LNK + cats[x][CAT_SUBJ] + "</b></font></a></td></tr>";
for (var x = half;x < cats.length;x++)
col2 += "<tr><td><a href=" + boards_url + taxonomyJSP + "?did=" + cats[x][CAT_ID] + "><b>" + FNT_2VN_LNK + cats[x][CAT_SUBJ] + "</b></font></a></td></tr>";
document.write(tableHTML("<tr><td>" + FNT_2VB_PGT + "&nbsp;" + title + " Categories</td></tr><tr bgcolor=e3e3e3><td>" + tableHTML("<tr><td valign=top width=50%>" + tableHTML(col1,0) + "</td><td valign=top width=50%>" + tableHTML(col2,0) + "</td></tr>",8) + "</td></tr>",2,0,0,PAGE_HEAD),"<font size=1><br></font>");
}
}
function postMsg(msg) {
document.msgForm.subj.value = ((strDecode(msg[MSG_SUBJ],false).substring(0,4) != "RE: ")?"RE: ":"") + strDecode(msg[MSG_SUBJ],false);
document.msgForm.submit();
}
function articleNav(prev,next,rev,exp) {
var msg = exp?"&va=":"&tm=";
var sr = rev?"&sr=1":"";
document.write(FNT_1VB_BLK + "<b>Go To:</b> &lt;" + ((prev < 0)?(FNT_1VB_GR9 + "Previous Article</b></font>"):("<a href=" + boards_url + topicViewJSP + "?tid=" + prev + msg + "1" + sr + ">" + FNT_1VB_LNK + "Previous Article</b></font></a>")) + "&#124;" + ((next < 0)?(FNT_1VB_GR9 + "Next Article</b></font>"):("<a href=" + boards_url + topicViewJSP + "?tid=" + next + msg + "1" + sr + ">" + FNT_1VB_LNK + "Next Article</b></font></a>")) + "&gt;</font>");
}
function msgTools(brd,tpc,rev,exp) {
if (!exp) document.write(tableHTML("<tr><form action=" + boards_url + topicViewJSP + " name=msgform><td>" + tableHTML("<tr><td height=20>" + FNT_2VB_PGT + "&nbsp;Go To Message</b></font></td></tr><tr><td bgcolor=white align=center>" + FNT_2VN_BLK + "Message # <input type=hidden name=tid value=" + tpc + ">" + (rev?"<input type=hidden name=sr value=1>":"") + "<input name=" + (exp?"va":"tm") + " type=text size=2 maxlength=4>&nbsp;<input type=submit value=Go></td></tr>") + "</td></form></tr>",2,0,0,PAGE_HEAD),BREAK);
document.write(tableHTML("<tr><td>" + tableHTML("<tr><td height=20>" + FNT_2VB_PGT + "&nbsp;Community Tools</b></font></td></tr><tr><td bgcolor=white>" + tableHTML("<tr><td>" + SPACE + "<a href=" + boards_url + messageSearchJSP + ">" + FNT_2VN_LNK + "Message Search</font></a></td></tr>" + (NAV_WEBTV?"":("<tr><td>" + SPACE + "<a href='javascript:email(540,568);'>" + FNT_2VN_LNK + "Email This Page</font></a></td></tr>")) + (NAV_NS?"":"<tr><td>" + SPACE + "<a href='javascript:window.print();'>" + FNT_2VN_LNK + "Print This Page</font></a></td></tr>") + "<tr><td>" + SPACE + "<a href=" + boards_url + ignorePostForm + "?ru=" + escape(current_url) + ">" + FNT_2VN_LNK + "Ignore User Options</font></a></td></tr><tr><td>" + SPACE + "<a href=" + boards_url + messagePostForm + "?bid=" + brd + "&tp=1&rt=1&ru=" + escape(current_url) + ">" + FNT_2VN_LNK + "Post New Article</font></a></td></tr>",0,2) + "</td></tr>") + "</td></tr>",2,0,0,PAGE_HEAD),BREAK);
}
function msgOptions() {
var html = "";
html += "<table cellpadding=2 cellspacing=0 border=0 width=100%>";
html += "<tr><td align=right><font size=2>";
//html += "<a href='javascript:email(540,568);'><font face=verdana,sans-serif size=1 color=#0033CC>Email This Page</font></a>&nbsp;|&nbsp;";
html += "<a href='javascript:eMail_Friend(540,568);'><font face=verdana,sans-serif size=1 color=#0033CC>Email This Page</font></a>&nbsp;|&nbsp;";
html += "<a href='javascript:window.print();'><font face=verdana,sans-serif size=1 color=#0033CC>Print This Page</font></a>&nbsp;|&nbsp;";
html += "<a href=" + boards_url + ignorePostForm + "?ru=" + escape(current_url) + "><font face=verdana,sans-serif size=1 color=#0033CC>Ignore User Options</font></a>";
html += "</font></td></tr></table>";
document.write(html);
}
function msgNav(tpc,cur,prev,next,first,last,rev,exp) {
var msg = exp?"&va=":"&tm=";
var sr = rev?"&sr=1":"";
var msgIndex = (rev && exp);
document.write(tableHTML("<tr><td nowrap>" + FNT_2VN_BLK + (exp?"Pages:":"Replies:") + "</b> &lt;" + ((first < 0)?(FNT_2VN_GR9 + "First</b></font>"):("<a href=" + boards_url + topicViewJSP + "?tid=" + tpc + msg + first + sr + ">" + FNT_2VN_LNK + "First</b></font></a>")) + "&#124;" + ((prev < 0)?(FNT_2VN_GR9 + "Previous</b></font>"):("<a href=" + boards_url + topicViewJSP + "?tid=" + tpc + msg + prev + sr + ">" + FNT_2VN_LNK + "Previous</b></font></a>")) + "&#124;" + ((next < 0)?(FNT_2VN_GR9 + "Next</b></font>"):("<a href=" + boards_url + topicViewJSP + "?tid=" + tpc + msg + next + sr + ">" + FNT_2VN_LNK + "Next</b></font></a>")) + "&#124;" + ((last < 0)?(FNT_2VN_GR9 + "Last</b></font>"):("<a href=" + boards_url + topicViewJSP + "?tid=" + tpc + msg + last + sr + ">" + FNT_2VN_LNK + "Last</b></font></a>")) + "&gt;</font></td><td align=right nowrap>" + FNT_2VN_BLK + "Views:</b> " + "<a href=" + boards_url + topicViewJSP + "?tid=" + tpc + (exp?"&tm=":"&va=") + cur + sr +">" + FNT_2VN_LNK + (exp?"Collapse":"Expand") + "</b></font></a>&nbsp;&nbsp;&nbsp;Sort: " + "<a href=" + boards_url + topicViewJSP + "?tid=" + tpc + msg + cur + (rev?"":"&sr=1") + ">" + FNT_2VN_LNK + (rev?"Ascending":"Descending") + "</b></font></a>" + "</font></td></tr>"));
document.write("<font size=1><br></font>");
//var html = "";
//html += "<font size=1 face=verdana,sans-serif>Message Nav right here<br></font>";
//html += "<table cellpadding=0 cellspacing=0 width=100% border=0><tr><td>";
//html += "</td></tr></table>";
//document.write(html);
}
function postSrch(form) {
if (form.sf.value != "") {
form.un.value = (form.au[2].checked)?form.sf.value:"";
for (var x = 0;x < form.au.length;x++) form.au[x].name = (form.au[0].checked)?"tx":"sj";
return true;
} else return false;
}
function urlDecode(txt) {
//var txtBefore = txt;
if (txt.length > 0) txt = unescape(txt.replace(/\+/g," "));
//alert('Before URLDecoding:\n\n' + txtBefore + '\n\nAfter URLDecoding:\n\n' + txt);
return txt;
}
function strEncode(txt,rtOn) {
//alert('Before Encoding: ' + txt);
if (txt.length <= 0) return txt;
var txtBefore = txt;
if (rtOn) {
txt = txt.replace(/<\s*img[^>]*src="?http:\/\/ak.imgfarm.com\/ex\/brds\/(an|em)_([^\.]*).gif"?>/gi,"%$2%");
txt = txt.replace(/<(\/)?strong>/gi,"~$1b~");
txt = txt.replace(/<(\/)?em>/gi,"~$1i~");
txt = txt.replace(/<(\/)?u>/gi,"~$1u~");
txt = txt.replace(/<font color=([^\s>]+)>/gi,"~f|c|$1~");
txt = txt.replace(/<font style="background-color: ([^"]+)">/gi,"~f|b|$1~");
txt = txt.replace(/<font size=([^\s>]+)>/gi,"~f|s|$1~");
txt = txt.replace(/<font face=("[^>"]+"|[^>\s]+)>/gi,"~f|f|$1~");
txt = txt.replace(/<font( style="background-color: ([^"]+)")*( face=("[^>"]+"|[^\s>]+))*( color=([^\s>]+))*( size=([^\s>]+))*>/gi,"~f|a|$2|$4|$6|$8~");
txt = txt.replace(/<\/font>/gi,"~/f~");
txt = txt.replace(/<div align=([^\s>]+)>/gi,"~d|$1~");
txt = txt.replace(/<\/div>/gi,"~/d~");
txt = txt.replace(/<(\/)?blockquote[^>]*>/gi,"~$1bq~");
txt = txt.replace(/<(p|pre|xmp)>(.+)<\/\1>/gi,"$2~p~");
txt = txt.replace(/<(p|br)>/gi,"~$1~");
txt = txt.replace(/%angry%\s*/gi,">:o");
txt = txt.replace(/(%bashful%|:-\[)\s*/gi,":[");
txt = txt.replace(/(%cool%|8-\)|\s8\)\s)\s*/gi,"8-)");
txt = txt.replace(/(%cry%|:'\()\s*/gi,":'");
txt = txt.replace(/(%flirt%|:-\*)\s*/gi,":*");
txt = txt.replace(/(%fun%|;-\))\s*/gi,";)");
txt = txt.replace(/(%good%|o:-\)|[oO0]:\))\s*/gi,"O:)");
txt = txt.replace(/(%happiness%|:-\)|:[oO0]\))\s*/gi,":)");
txt = txt.replace(/(%sad%|:-\()\s*/gi,":(");
txt = txt.replace(/(%silly%|:-p)\s*/gi,":p");
txt = txt.replace(/(%speechless%|:-x)\s*/gi,":x");
txt = txt.replace(/(%surprise%|=-[oO0]|:-[oO0])\s*/gi,":-o");
txt = txt.replace(/(%worried%|:-\$)\s*/gi,":\$");
txt = txt.replace(/\/\/(flag|img\d+) /gi,"%$1%");
}
txt = txt.replace(/<script[^>]*>(.*\n)+<\/script>/gi,"");
txt = txt.replace(/\&nbsp\;/gi," ");
txt = txt.replace(/\\/gi,"\&\#92\;");
if ((NAV_IE)&&(NAV_VER>=5.0)&&(NAV_VER<5.5)) {
txt = txt.replace(/<[^>]+>/gi,"");
} else {
var htmlRemoved = "";
var regExprPattern = new RegExp('<[^>]*>','gi');
var tempArray;
var ii = 0;
while ((tempArray = regExprPattern.exec(txt)) != null) {
htmlRemoved += txt.substring(ii,tempArray.index);
ii = tempArray.index + tempArray[0].length;
if (tempArray[0].search(/<a [^>]*>/i) >= 0) {
htmlRemoved += tempArray[0];
} else if (tempArray[0].search(/<img[^>]*(.smileycentral.com)[^>]*>/i) >= 0) {
htmlRemoved += tempArray[0];
} else if (tempArray[0].search(/<img[^>]*(i1img.com\/images\/smileycentral\/stamps)[^>]*>/i) >= 0) {
htmlRemoved += tempArray[0];
} else if (tempArray[0].search(/<img[^>]*(www.mymailsignature.com)[^>]*>/i) >= 0) {
htmlRemoved += tempArray[0];
} else if (tempArray[0].search(/<\/a>/i) >= 0) {
htmlRemoved += tempArray[0];
}
}
htmlRemoved += txt.substring(ii,txt.length);
txt = htmlRemoved;
}
//alert('Before Encoding:\n\n' + txtBefore + '\n\nAfter Encoding:\n\n' + txt);
//alert('After Encoding: ' + txt);
return txt;
}
function strDecode(txt,rtOn) {
if (txt.length <= 0) return txt;
var txtBefore = txt;
txt = urlDecode(txt);
txt = strEncode(txt,rtOn);
if (rtOn) {
var imgServer = "http://ak.imgfarm.com/ex/brds";
txt = txt.replace(/~(\/)?b~/gi,"<$1b>");
txt = txt.replace(/~(\/)?i~/gi,"<$1i>");
txt = txt.replace(/~(\/)?u~/gi,"<$1u>");
txt = txt.replace(/~f\|c\|([^~]+)~/gi,"<font color=$1>");
txt = txt.replace(/~f\|b\|([^~]+)~/gi,'<font style="background-color: $1">');
txt = txt.replace(/~f\|s\|([^~]+)~/gi,"<font size=$1>");
txt = txt.replace(/~f\|f\|([^~]+)~/gi,'<font face="$1">');
txt = txt.replace(/~f\|a\|([^\|]*)\|([^\|]*)\|([^\|]*)\|([^~]*)~/gi,'<font style="background-color: $1" face=$2 color="$3" size="$4">');
txt = txt.replace(/ (style="background-color:"|face=""|color=""|size="")/gi,"");
txt = txt.replace(/ (face= |color= |size= )/gi," ");
txt = txt.replace(/~\/f~/gi,"</font>");
txt = txt.replace(/~d\|([^~]+)~/gi,"<div align=$1>");
txt = txt.replace(/~\/d~/gi,"</div>");
txt = txt.replace(/~bq~/gi,'<blockquote dir=ltr style="margin-right: 0px">');
txt = txt.replace(/~\/bq~/gi,'</blockquote>');
txt = txt.replace(/~(br|p)~/gi,"<$1>");
if (navigator.userAgent.search(/opera/i) == -1)
txt = txt.replace(/[\r\f]/gi,"<p>");
//txt = txt.replace(/(http:\/\/[^\s<>][^\s<>]+)/gi,"<a href='$1'>$1</a>");
txt = txt.replace(/>((http|ftp|https):\/\/[^\s<>]{46})[^\s<>]+/gi,">$1...");
txt = txt.replace(/>:o/gi,"<img src=" + imgServer + "/em_angry.gif>");
txt = txt.replace(/:\[/gi,"<img src=" + imgServer + "/em_bashful.gif>");
txt = txt.replace(/8-\)/gi,"<img src=" + imgServer + "/em_cool.gif>");
txt = txt.replace(/:('|\&\#39\;)/gi,"<img src=" + imgServer + "/em_cry.gif>");
txt = txt.replace(/:\*/gi,"<img src=" + imgServer + "/em_flirt.gif>");
txt = txt.replace(/;\)/gi,"<img src=" + imgServer + "/em_fun.gif>");
txt = txt.replace(/o:\)/gi,"<img src=" + imgServer + "/em_good.gif>");
txt = txt.replace(/:\)/gi,"<img src=" + imgServer + "/em_happiness.gif>");
txt = txt.replace(/:\(/gi,"<img src=" + imgServer + "/em_sad.gif>");
txt = txt.replace(/:p/gi,"<img src=" + imgServer + "/em_silly.gif>");
txt = txt.replace(/:x/gi,"<img src=" + imgServer + "/em_speechless.gif>");
txt = txt.replace(/:-o/gi,"<img src=" + imgServer + "/em_surprise.gif>");
txt = txt.replace(/:\$/gi,"<img src=" + imgServer + "/em_worried.gif>");
txt = txt.replace(/\%(flag)\%/gi,"<img src=" + imgServer + "/em_$1.gif>");
txt = txt.replace(/\%(img\d+)\%/gi,"<img src=" + imgServer + "/an_$1.gif width=30 height=30 border=0>");
} else {
txt = txt.replace(/\&(\#39)\;/gi,"\'");
txt = txt.replace(/\&(\#92)\;/gi,"\\");
if (txt.length > 0) txt = txt.replace(/([^\s<>]{20})[^\s<>]+/gi,"$1... ");
}
txt = txt.replace(/\&(\#34|quot)\;/gi,"\"");
//alert('Before Decoding:\n\n' + txtBefore + '\n\nAfter Decoding:\n\n' + txt);
return txt;
}
function srchAdv() {
msgBoardHeader();
var html = "";
html += "<table cellpadding=0 cellspacing=0 border=0 width=100%><tr><td align=center>";
html += "<table border=0 cellpadding=3 cellspacing=0><form name=method=get action=" + boards_url + messageSearchJSP + " onSubmit='return postSrch(this);'><tr><td align=right nowrap>" + FNT_2VB_BLK + "Search for:</b></font></td><td colspan=3><input type=text name=sf size=60></td></tr>";
html += "<tr><td align=right>" + FNT_2VB_BLK + "In:</b></font></td><td>" + FNT_2VN_BLK + "<input type=radio name=au checked> Message Text</font></td><td align=center>" + FNT_2VN_BLK + "<input type=radio name=au> Subject</font></td><td align=right>" + FNT_2VN_BLK + "<input type=radio name=au> Author</font></td></tr><tr><td>&nbsp;</td><td align=center>" + FNT_2VN_BLK + "Results per page <select name=nr><option value=10 selected>10<option value=15>15<option value=20>20<option value=25>25<option value=50>50</select></font></td><td align=center><input type=submit value=Search></td><td align=right><input type=reset value=Reset></td></tr><input type=hidden name=un></form></table>";
html += "</td></tr></table>";
document.write(html);
}
function srchResults(msgs) {
var args = arguments;
if (typeof msgs != "undefined") {
var first = (args.length > 1)?args[1]:0;
var step = (args.length > 2)?args[2]:10;
var total = (args.length > 3)?args[3]:0;
var sf = (args.length > 4)?args[4]:"";
var srch = ((args.length > 5)?args[5]:("?sf=" + sf)) + "&fr=" + (first + step) + "&nr=" + step;
var more = ((first + step) < total)?("<a href=" + boards_url + messageSearchJSP + srch + ">" + FNT_2VB_LNK + "Next " + (((first + 2 * step) < total)?step:(total - first - step)) + " Results (" + (first + step + 1) + (((first + step + 1) != total)?("-" + (((first + 2 * step) > total)?total:(first + 2 * step))):"") + ")</b></font></a>"):SPACE;
document.write(tableHTML("<tr><td>" + FNT_2VB_BLK + ((total > 0)?("Results " + (first + 1) + "-" + (((first + step) < total)?(first + step):total) + " of " + total):("&nbsp;No messages were found ")) + ((sf != "")?(" for &quot;" + sf + "&quot;"):"") + "</b></font></td><td align=right>" + more + "</td></tr>",0),BREAK);
for (var x = 0;x < msgs.length;x++)
document.write(tableHTML("<tr bgcolor=#E3E3E3><td colspan=2 height=20><font face=verdana,sans-serif size=2 color=#000000><b>&nbsp;Board: <a href=" + boards_url + boardViewJSP + "?bid=" + msgs[x][SRCH_BID] + "><font face=verdana,sans-serif size=2 color=#000000><b>" + msgs[x][SRCH_BRD] + "</b></font></a></font></td></tr><tr><td>" + SPACE + "</td><td height=20><a href=" + boards_url + topicViewJSP + "?tid=" + msgs[x][SRCH_TID] + "&fi=" + msgs[x][SRCH_MID] + ">" + FNT_2VN_LNK + "<b>" + strDecode(msgs[x][SRCH_SUBJ],true) + "</b></font></a></td></tr><tr><td>" + SPACE + "</td><td>" + FNT_2VN_BLK + strDecode(msgs[x][SRCH_TEXT],true) + "</font></td></tr><tr><td colspan=2>" + FNT_1VN_BLK + "Posted by: <b>" + msgs[x][SRCH_USER] + "</b> on " + msgs[x][SRCH_DT] + "</font></td><tr>"),BREAK);
if (total > 0) document.write(tableHTML("<tr><td align=right>" + more + "</td></tr>",10),"<font size=1><br><br><br></font>");
}
}
var bShowHeader = true;
function msgBoardHeader() {
if (bShowHeader) {
var html = "<table cellpadding=2 cellspacing=0 border=0 width=100%><tr bgcolor=" + PAGE_HEAD + "><td colspan=3>" + FNT_2VB_PGT + "&nbsp;Message Boards</td></tr>";
html += "<tr bgcolor=#DADADA><td width=100%><font face=verdana,sans-serif size=2 color=#000000><b>";
if (typeof crumbs != "undefined") {
for (var x = 0;x < crumbs[0].length;x++) {
if (crumbs[2][x] == "Default")
crumbs[2][x] = "Categories";
if (x != (crumbs[0].length -1)) { //not last crumb - link and use pipe
html += "&nbsp;<a href='" + boards_url + crumbs[1][x] + "'>" + urlDecode(crumbs[2][x]) + "</a>&nbsp;</b>|<b>";
} else if (crumbs[2][x] == "Categories") { //the last crumb is categories, so don't use pipe, and link
html += "&nbsp;<a href='" + boards_url + crumbs[1][x] + "'>" + urlDecode(crumbs[2][x]) + "</a>";
} else {
html += "&nbsp;" + urlDecode(crumbs[2][x]);
}
}
}
html += "</b></font></td><td align=right><a href='http://help.myway.com/boards/boardshelp.html'><font face=verdana,sans-serif size=1 color=#605CA8>Help</font></a></td><td align=right><a href='" + boards_url + messageSearchJSP + "'><font face=verdana,sans-serif size=1 color=#605CA8>Search</font></a></td></tr></table><font size=1><br></font>";
document.write(html);
bShowHeader = false;
}
}
function msgViews(brd,tpc,msgs,index) {
if (msgs.length > 0 && typeof msgs[0] != "undefined") {
var html = "";
html += "<table cellpadding=0 cellspacing=0 width=100% border=0 bgcolor=#FFFFFF>";
//the form tags are for the reply link
html += "<form name=msgForm method=post action=" + boards_url + messagePostForm + "><input type=hidden name=msg><input type=hidden name=subj><input type=hidden name=rt value=1><input type=hidden name=bid value=" + brd[BRD_ID] + "><input type=hidden name=tid value=" + tpc[TPC_ID] + "><input type=hidden name=ru value=" + current_url + "></form>";
for (var x = 0;x < msgs.length;x++) {
var bodyBG = "e3e3e3";
if (ignoreList.indexOf(msgs[x][MSG_UNUM]) < 0) {
var block = false;
} else {
var block = true;
}
html += "<tr valign=top><td bgcolor=#E3E3E3><img src=http://ak.imgfarm.com/images/spacer.gif width=130 height=5 alt='' border=0><br><table cellpadding=0 cellspacing=0 border=0><tr><td><img src=http://ak.imgfarm.com/images/spacer.gif width=15 height=1 alt='' border=0></td><td><font face=verdana,sans-serif size=2 color=#000000><b>" + msgs[x][MSG_USER] + "</b><br><a href=javascript:posts('" + msgs[x][MSG_UNUM] + "')><font size=1 color=#000000>posts</font></a><font size=1 color=#000000>&nbsp;|&nbsp;</font>";
if (block) {
html += "<a href=" + boards_url + ignorePostForm + "?ru=" + escape(current_url) + "><font size=1 color=#000000>un-ignore</font></a><br>";
} else {
html += "<a href=" + boards_url + ignorePostForm + "?ia=" + msgs[x][MSG_UNUM] + "&ru=" + escape(current_url) + "><font size=1 color=#000000>ignore</font></a><br>";
}
if (msgs[x][MSG_EMAIL] != "") { //then an email exists
html += "<a href='mailto:" + msgs[x][MSG_EMAIL] + "'><font size=1 color=#000000>email</font></a>";
}
html += "</font></td></tr></table></td>";
html += "<td><img src=http://ak.imgfarm.com/images/spacer.gif width=4 height=1 alt='' border=0></td>"; //spacer column
html += "<td width=100%>"; //second column
html += "<table cellpadding=2 cellspacing=0 border=0 width=100%>";
if (block) {
html += "<tr bgcolor=#E3E3E3><td width=100%><font face=verdana,sans-serif size=1 color=#000000><b>" + msgs[x][MSG_USER] + " is on your ignore list.</b></font></td>";
} else {
html += "<tr bgcolor=#E3E3E3><td width=100%><font face=verdana,sans-serif size=1 color=#000000>" + strDecode(msgs[x][MSG_SUBJ],false) + "</font></td>";
}
html += "<td nowrap><font face=verdana,sans-serif size=1 color=#000000><small>" + getDate(msgs[x][MSG_POST_DT]) + "&nbsp;</small></font><a href='javascript:postMsg(messages[" + ((index > 0)?index:x) + "],false);'><font size=2 color=#0033CC><b>reply</b></font></a></td><td><img src=http://ak.imgfarm.com/images/spacer.gif width=1 height=20 alt='' border=0></td></tr></table>";
if (block) {
var body = "<font face=verdana,sans-serif size=2 color=#000000>You have chosen to ignore messages from this user. If you would like to read this message, please remove this user from your ignore list by <a href=" + boards_url + ignorePostForm + "?ru=" + current_url + "><font color=#0033CC>clicking here</font></a>.</font>";
} else {
var body = "<font face=verdana,sans-serif size=2 color=#000000>" + strDecode(msgs[x][MSG_TEXT],true) + "</font>";
}
html += "<table cellpadding=4 cellspacing=0 border=0 width=100% bgcolor=#FFFFFF><tr><td><font size=1>&nbsp;</font></td><td width=100%>" + body + "</td></tr></table>";
html += "</td></tr><tr><td><td><img src=http://ak.imgfarm.com/images/spacer.gif width=1 height=4 alt='' border=0></td></td></tr>";
}
html += "</table><font size=1><br></font>";
document.write(html);
}
}
function profile(usr) {
var x = (NAV_VER < 4)?0:((screen.width - 800) / 2);
var y = (NAV_VER < 4)?0:((screen.height - 600) / 2);
var args = "width=800,height=600,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx=" + x + ",screeny=" + y + ",left=" + x + ",top=" + y;
window.open("http://profiles.myway.com/profiles/user_profile.jsp?unme=" + usr,"Profile",args);
}
function posts(usr) {
var x = (NAV_VER < 4)?0:((screen.width - 800) / 2);
var y = (NAV_VER < 4)?0:((screen.height - 600) / 2);
var args = "width=800,height=600,location=0,menubar=0,resizable=1,scrollbars=1,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx=" + x + ",screeny=" + y + ",left=" + x + ",top=" + y;
window.open(boards_url + messageSearchJSP + "?ui=" + usr,usr + "Posts",args);
}
function email(w,h) {
var url = escape(document.URL);
var title = escape(document.title);
var jsp = "http://mailit.excite.com/mailit/EmailArticle.jsp?AU=" + url + "&AT=" + title;
var x = (NAV_VER < 4)?0:((screen.width - w) / 2);
var y = (NAV_VER < 4)?0:((screen.height - h) / 2);
var args = "width=" + w + ",height=" + h + ",location=0,menubar=0,resizable=1,scrollbars=0,status=0,titlebar=0,toolbar=0,hotkeys=0,screenx=" + x + ",screeny=" + y + ",left=" + x + ",top=" + y;
window.open(jsp,"emailFriend",args);
}
function footer() {
document.write(tableHTML("<tr><td align=center>" + tableHTML("<tr><td>" + FNT_1VB_BLK + "Important Notice:</b> The My Way Message Boards are trafficked by My Way users ages 13 and older. They may include mature topics or adult content. Use by persons under the age of 18 should be under the supervision of a parent or guardian. Please refer to the <a href='http://info.myway.com/index/id/terms.html'>" + FNT_1VN_LNK + "My Way Community Guidelines</font></a> for the acceptable use policy and code of conduct within the public posting/chatting areas of our site. To ensure a safe and enjoyable Community experience, we ask that you not post anything to a public My Way board that is unlawful, harmful, abusive, threatening or otherwise objectionable. As My Way does not monitor its boards, anything in violation of the My Way Terms of Service or the Community Guidelines they contain should be reported to us through the <a href='http://myway2.custhelp.com/cgi-bin/myway2.cfg/php/enduser/ask.php'>" + FNT_1VN_LNK + "Community Alerts</font></a> link.</font></td></tr>",5,0,0,"f2f0f0") + "</td></tr>",2) + "<font size=1><br></font>");
}
function list(title,type) {
msgBoardHeader();
var IS_TPC		= (type == "tpc")?true:false;
var LIST_SUBJ		= (IS_TPC)?TPC_SUBJ:BRD_SUBJ;  //THIS IS ALWAYS 1
var LIST_ENTRIES	= (IS_TPC)?TPC_MSGS:BRD_TPCS;
var LIST_START	= (IS_TPC)?TPC_SUBJ:BRD_SUBJ;  //THIS IS ALWAYS 1
//BRD_SUBJ = 1;
var args = arguments;
var maxChars = Math.max(Math.floor((WIN_W - 218) * 1 / 25),40);
var aligns = (args.length > 5 && typeof args[4] == "object")?args[4]:(IS_TPC?topicsAlign:boardsAlign);
var hdrs = (args.length > 6 && typeof args[5] == "object")?args[5]:(IS_TPC?topicsTitles:boardsTitles);
var list = (args.length > 7 && typeof args[6] == "object")?args[6]:(IS_TPC?topicsList:boardsList);
SORT_COLS = (args.length > 2 && args[2] != null)?args[2]:0;
SORT_ORDER  = (args.length > 3 && args[3] != null)?args[3]:"asc";
var html = "<tr>";
for (var x = LIST_START;x < hdrs.length;x++) {
if (hdrs[x] != "User ID") {
html += "<td" + ((aligns[x] != "")?" align=":"") + aligns[x] + ((x == LIST_START)?" width=45%":"") + " height=" + (NAV_NS?"26":"20") + " nowrap>";
//html += FNT_1VB_BLK + ((hdrs[x] == "")?SPACE:hdrs[x]) + "</b></font>";
html += FNT_2VB_BLK + hdrs[x] + "</b></font>";
html += "</td>";
}
}
if (IS_TPC) html += "<td align=right>" + FNT_2VB_BLK + "Read</b></font></td>";
html += "</tr><tr><td colspan=" + (hdrs.length - LIST_START + (IS_TPC?2:1)) + ">"  + lineHTML("e2e2e2") + "</td></tr>";
if (list.length > 0) {
if (SORT_COLS >= 0) list.sort(sortList);
for (var x = (SORT_ORDER == "asc")?0:(list.length - 1);(SORT_ORDER == "asc")?eval("x < list.length"):eval("x >= 0");x += (SORT_ORDER == "asc")?1:-1) {
var subj = strDecode(list[x][LIST_SUBJ],false);
if (IS_TPC){
subj = subj.replace(/</g,"&lt;");
subj = subj.replace(/>/g,"&gt;")
}
var lid = list[x][IS_TPC?TPC_ID:BRD_ID];
var block = (!IS_TPC || ignoreList.indexOf(list[x][TPC_UNUM]) < 0)?false:true;
html += "<tr valign=middle>";
html += "<td" + ((aligns[LIST_SUBJ] != "")?" align=":"") + aligns[LIST_SUBJ] + " height=20>" + FNT_2VN_BLK + "<a href=" + boards_url + (IS_TPC?(topicViewJSP + "?va=1&tid="):(boardViewJSP + "?bid=")) + lid + ">" + (block?("<i>" + list[x][TPC_AUTHOR] + "</i> is on your ignore list."):((subj.length > maxChars)?(subj.substring(0,maxChars) + "..."):subj)) + "</a></font></td>";
for (var y = LIST_START + 1;y < list[x].length;y++)
if (!IS_TPC || y != TPC_UNUM) {
if ((hdrs[y] == "Last Post") || (hdrs[y] == "Read")) {
html += "<td" + ((aligns[y] != "")?(" align=" + aligns[y]):"") + " nowrap>" + FNT_1VN_BLK + ((typeof list[x][y] == "object" && list[x][y].constructor == Date)?getDate(list[x][y]):urlDecode(list[x][y])) + "</font></td>";
} else {
html += "<td" + ((aligns[y] != "")?(" align=" + aligns[y]):"") + " nowrap>" + FNT_2VN_BLK + ((typeof list[x][y] == "object" && list[x][y].constructor == Date)?getDate(list[x][y]):urlDecode(list[x][y])) + "</font></td>";
}
}
if (IS_TPC)
html += "<td align=right nowrap>" + ((list[x][LIST_ENTRIES] > 0)?(FNT_1VN_BLK + "<a href=" + boards_url + topicViewJSP + "?tid=" + lid + "&va=1>" + FNT_1VN_LNK + "Exp.</font></a>|<a href=" + boards_url + topicViewJSP + "?tid=" + lid + "&tm=0>" + FNT_1VN_LNK + "Last</font></a>|<a href=" + boards_url + topicViewJSP + "?tid=" + lid + "&sr=1>" + FNT_1VN_LNK + "Rev.</font></a></font>"):SPACE) + "</td>";
//html += "</tr>";
html += "</tr><tr><td colspan=9>" + lineHTML("e2e2e2") + "</td></tr>";
}
} else html += "<tr><td colspan=" + (hdrs.length - LIST_START + (IS_TPC?2:1)) + " height=26>" + FNT_2VN_BLK + "(No " + (IS_TPC?"Topics":"Boards") + ")<font></td></tr>";
document.write(tableHTML(html,2,0,0));
document.write('<font size=1><br></font>');
jumpForumDropdown();
}
function jumpToForum(val) {
var url = boards_url + taxonomyJSP + "?did=" + val;
window.location.href = url;
}
function jumpForumDropdown() {
var html = "";
html += "<table cellpadding=0 cellspacing=0 width=100% border=0><tr><td align=right>";
html += "<font face=verdana,sans-serif size=2 color=#000000>Jump Forum: ";
html += "<select name=jumpForum size=1 onChange='jumpToForum(this.value);'>";
html += "<option value='0' selected>Choose Forum</option>";
html += "<option value='1'>Arts &amp; Entertainment</option>";
html += "<option value='2'>Business &amp; Finance</option>";
html += "<option value='3'>Celebrities</option>";
//html += "<option value='4'>Fashion</option>";
html += "<option value='5'>Games</option>";
html += "<option value='6'>Health</option>";
html += "<option value='7'>Lifestyles</option>";
html += "<option value='8'>Relationships</option>";
html += "<option value='9'>News &amp; Current Events</option>";
html += "<option value='10'>Sound Off</option>";
html += "<option value='11'>Sports &amp; Recreation</option>";
html += "<option value='12'>Tech Talk</option>";
html += "<option value='13'>Travel</option>";
html += "</select>";
html += "</font></td></tr></table>";
document.write(html);
}
function breadcrumbs(crumbs) {
var html = FNT_1VB_BLK + "Return To</b>";
html += ": <a href=http://www1.myway.com/home/0,12175,,00.html>" + FNT_1VB_LNK + "My Way</b></font></a>";
if (typeof crumbs != "undefined")
for (var x = (crumbs[0].length > 3)?(crumbs[0].length - 3):0;x < crumbs[0].length - 1;x++)
html += ": <a href=" + boards_url + crumbs[1][x] + ">" + FNT_1VB_LNK + urlDecode(crumbs[2][x]) + "</b></font></a>";
document.write(html,"</font>");
}
