/* Revamped 2 ~ Gfx & Coding by Scorpian */
/* Copyright (c)2006 Roddy Innovations Designs */

var imgBase = 'http://roddyinnovations.com/templates/rev2/';
var riTable = document.getElementsByTagName('table');
var riSelect = document.getElementsByTagName('select');
var riTd = document.getElementsByTagName('td');
var riImg = document.getElementsByTagName('img');
var riBr = document.getElementsByTagName('br');
var isIe = (document.all) ? true : false;
function getId(id){ return document.getElementById(id); }
var tPm = (riTd[2].innerHTML.match(/">(\d+)\smessage(s)?/i)) ? RegExp.$1 : 0;
var nPm = (riTd[2].innerHTML.match(/,\s(\d+)\s(is|are)/i)) ? RegExp.$1 : 0;

document.write("<link rel='stylesheet' href='" + imgBase + "style.css' />");

riTd[5].innerHTML = riTd[5].innerHTML.replace(new RegExp('&nb'+'sp;','gi'),'<img src=\'http://proboards.com/images/blank.gif\' height=\'7px\' width=\'5px\' alt=\'\'/>');
var pmTab = "<table width='100%' cellspacing='0' cellpadding='0' border='0'><tr>";
pmTab += "<td align='left' valign='middle'>" + riTd[5].firstChild.innerHTML + "</td><td align='right' valign='middle'>";
if(!pb_username != 'guest'){
	pmTab += "<a href='?action=pm' title=\"" + nPm + " new PM's\"><img src='";
	pmTab += (nPm==0) ? imgBase + 'menu/nonewpms.gif' : imgBase + 'menu/newpms.gif';
	pmTab += "' border='0' alt='Check PMs' /></a>";
}
pmTab += "</td></tr></table>";

document.write("<table width='800' cellspacing='0' cellpadding='0' border='0' align='center'>");
document.write("<tr><td style='background-image:url(" + riImg[0].src + ");height:139px;width:800px;'></td></tr>");
document.write("<tr><td class='menubg' valign='middle'>" + pmTab + "</td></tr>");
document.write("<tr><td class='border-top'></td></tr><tr><td class='border-mid'>");
document.write("<div style='width:791px;' align='center'>");
riBr[0].style.display = 'none';
riTable[0].style.display = 'none';

/*=== Pre-Create the Complex Tables ===*/
var theMainTable = document.createElement('table');
theMainTable.cellSpacing = 0;
theMainTable.cellPadding = 0;
theMainTable.border = 0;
theMainTable.align = 'center';
theMainTable.width = '728';
var tMtRow1 = theMainTable.insertRow(0).insertCell(0);
tMtRow1.height = 26;
tMtRow1.style.backgroundImage = 'url(' + imgBase + 'head.gif)';
var tMtRow2 = theMainTable.insertRow(-1).insertCell(0);
tMtRow2.style.backgroundImage = 'url(' + imgBase + 'boardbg.gif)';
tMtRow2.style.backgroundRepeat = 'repeat-y';
var tMtRow3 = theMainTable.insertRow(-1).insertCell(0);
tMtRow3.height = 5;
tMtRow3.style.backgroundImage = 'url(' + imgBase + 'base.gif)';
var theSecondTable = document.createElement('table');
theSecondTable.cellSpacing = 1;
theSecondTable.cellPadding = 4;
theSecondTable.border = 0;
theSecondTable.align = 'center'
theSecondTable.width = '718'
theSecondTable.className = 'bordercolor';
var theTbody = document.createElement('tbody');
theSecondTable.appendChild(theTbody);
tMtRow2.appendChild(theSecondTable);
var gapDiv = document.createElement('div');
gapDiv.style.height = '20px';