/////////////// POSTING TOOLS ///////////////

var quickcodebuttons = "<center><input type=submit class=inputbutton value=B onclick=\"AddText('b',  '/b')\"><input type=submit class=inputbutton value=I onclick=\"AddText('i',  '/i')\"><input type=submit class=inputbutton value=U onclick=\"AddText('u',  '/u')\"><input type=submit class=inputbutton value=C onclick=\"AddText('font color=' + ((input = prompt('Enter color for colored text (name or HTML color code):', 'blue')) ? input : 'blue'),  '/font')\"><input type=submit class=inputbutton value=G onclick=\"if(!getButtonMode()) alert('Glow tags require HTML'); else AddText('glow color=' + ((input = prompt('Enter color for colored text (name or HTML color code):', 'blue')) ? input : 'blue'),  '/glow')\"><input type=submit class=inputbutton value=Link onclick=\"AddText(((getButtonMode() ? 'a href' : 'link') + ((input = prompt('Enter link URL (blank to use selected text as URL in EZCode mode):', '')) ? '=' + input : '')),  (getButtonMode() ? '/a' : '/link'))\"><input type=submit class=inputbutton value=Img onclick=\"AddText((getButtonMode() ? 'img src=' + getSelection() : 'img'),  (getButtonMode() ? '' : '/img'))\"><input type=submit class=inputbutton value=Center onclick=\"AddText('center',  '/center')\"><input type=submit class=inputbutton value=Quote onclick=\"AddText('quote',  '/quote')\"><input type=submit class=inputbutton value=Spoilers onclick=\"if(!getButtonMode()) alert('Spoiler tags require HTML'); else AddText('spoiler',  '/spoiler')\"><input type=submit class=inputbutton value=Code onclick=\"AddText('code',  '/code')\"><input type=submit class=inputbutton value=Dice onclick=\"AddText('rolldice',  '')\"><input type=submit class=inputbutton value=HR onclick=\"AddText('hr',  '')\"></center>";

pics = new Array(); i = 0;
var ez = 'http://www.ezboard.com/images/posticons/';
var ez2 = 'http://www.ezboard.com/images/posticons/';
var echidnoyle = 'http://www.mobiusforum.net/images/icons/smilies/posticons/';
var sonic = 'http://www.mobiusforum.net/images/icons/smilies/sonic/';
var mm = 'http://www.mobiusforum.net/images/icons/smilies/mm/';
var pic = 'http://www.mobiusforum.net/images/icons/smilies/posticons/surprise.gif';
var posticon;
var smileymode = 0;
var buttonmode = 0;

//Symbols

pics[i++] = ez + "1.gif"
pics[i++] = ez + "2.gif"
pics[i++] = ez + "3.gif"
pics[i++] = ez + "4.gif"
pics[i++] = ez + "5.gif"
pics[i++] = ez + "pi_arrow_left.gif"
pics[i++] = ez + "pi_arrow_right.gif"
pics[i++] = ez + "pi_arrowdown.gif"
pics[i++] = ez + "pi_arrowup.gif"
pics[i++] = ez2 + "QA.gif"
pics[i++] = ez + "pi_money.gif"
pics[i++] = ez + "pi_musicnote.gif"
pics[i++] = ez + "pi_exclamation.gif"
pics[i++] = ez + "pi_question_mark.gif"
pics[i++] = ez + "pi_thumbsdown.gif"
pics[i++] = ez + "pi_thumbsup.gif"

//Faces

pics[i++] = ez + "pi_afro.gif"
pics[i++] = ez + "pi_baby.gif"
pics[i++] = ez + "pi_biglaugh.gif"
pics[i++] = ez + "pi_bigsmile.gif"
pics[i++] = ez + "pi_blackeye.gif"
pics[i++] = ez + "pi_bland.gif"
pics[i++] = ez + "pi_blueface.gif"
pics[i++] = ez + "pi_blush.gif"
pics[i++] = ez + "pi_careless.gif"
pics[i++] = ez + "pi_cooldude.gif"
pics[i++] = ez + "pi_cry.gif"
pics[i++] = ez + "pi_dead.gif"
pics[i++] = ez + "pi_devil.gif"
pics[i++] = ez + "pi_dunno.gif"
pics[i++] = ez + "pi_evilsmile.gif"
pics[i++] = ez + "pi_freak.gif"
pics[i++] = ez + "pi_geek.gif"
pics[i++] = ez + "pi_grr.gif"
pics[i++] = ez + "pi_happydead.gif"
pics[i++] = ez + "pi_lazysmile.gif"
pics[i++] = ez + "pi_lovesick.gif"
pics[i++] = ez + "pi_mad.gif"
pics[i++] = ez + "pi_elephant.gif"
pics[i++] = ez + "pi_nervous.gif"
pics[i++] = ez + "pi_ninja.gif"
pics[i++] = ez + "pi_pig.gif"
pics[i++] = ez + "pi_pirate.gif"
pics[i++] = ez + "pi_puffycheek.gif"
pics[i++] = ez + "pi_sad.gif"
pics[i++] = ez + "pi_sharpteeth.gif"
pics[i++] = ez + "pi_shocked.gif"
pics[i++] = ez + "pi_shy.gif"
pics[i++] = ez + "pi_smartypants.gif"
pics[i++] = ez + "pi_smile.gif"
pics[i++] = ez + "pi_sunglasses.gif"
pics[i++] = ez + "pi_super_ez.gif"
pics[i++] = ez + "pi_supermad.gif"
pics[i++] = ez + "pi_tongue.gif"
pics[i++] = ez + "pi_wink.gif"
pics[i++] = ez + "pi_wink1.gif"
pics[i++] = ez + "pi_worried.gif"
pics[i++] = ez + "steve.gif"
pics[i++] = echidnoyle + "duh.gif";
pics[i++] = echidnoyle + "surprise.gif";

//Logos

pics[i++] = ez + "JR.gif"
pics[i++] = ez + "clyde.gif"
pics[i++] = ez2 + "development.gif"
pics[i++] = ez + "pi_clover.gif"
pics[i++] = ez + "pi_earth.gif"
pics[i++] = ez + "pi_heartbeating.gif"
pics[i++] = ez + "pi_hippie.gif"
pics[i++] = ez + "pi_lightbulb.gif"
pics[i++] = ez + "pi_lightning.gif"
pics[i++] = ez2 + "marketing.gif"
pics[i++] = ez + "pi_star.gif"
pics[i++] = ez + "pi_twirl.gif"
pics[i++] = ez2 + "techops.gif"
pics[i++] = ez2 + "web.gif"

//Sports

pics[i++] = ez + "pi_8ball.gif"
pics[i++] = ez + "pi_baseball.gif"
pics[i++] = ez + "pi_basketball.gif"
pics[i++] = ez + "pi_soccer.gif"
pics[i++] = ez + "pi_tennisball.gif"
pics[i++] = ez + "pi_volleyball.gif"

//Characters - Add Blues, Rush, Beat, Tango, Bass

pics[i++] = sonic + "sonic.gif";
pics[i++] = sonic + "tails.gif";
pics[i++] = sonic + "knux.gif";
pics[i++] = sonic + "espio.gif";
pics[i++] = sonic + "vector.gif";
pics[i++] = sonic + "mighty.gif";
pics[i++] = sonic + "charmy.gif";
pics[i++] = sonic + "rouge.gif";
pics[i++] = sonic + "ms.gif";
// pics[i++] = sonic + "metalsonic.gif";
pics[i++] = sonic + "shadow.gif";
pics[i++] = sonic + "sssmile.gif";
pics[i++] = sonic + "ssevil.gif";
pics[i++] = sonic + "robotnik.gif";
pics[i++] = mm + "megaman.gif";
pics[i++] = mm + "roll.gif";
pics[i++] = mm + "megamanx.gif";
pics[i++] = mm + "zero.gif";
pics[i++] = mm + "vile.gif";
pics[i++] = mm + "kobunhappy.gif";
pics[i++] = mm + "kobun-nono.gif";
pics[i++] = sonic + "sa/sonic.gif";
pics[i++] = sonic + "sa/tails.gif";
pics[i++] = sonic + "sa/knuckles.gif";
pics[i++] = sonic + "sa/shadow.gif";
pics[i++] = sonic + "sa/rouge.gif";
pics[i++] = sonic + "sa/eggman.gif";
pics[i++] = sonic + "sa/amy.gif";
pics[i++] = sonic + "sa/e-102.gif";
pics[i++] = sonic + "sa/big.gif";
pics[i++] = sonic + "sa/tikal.gif";
pics[i++] = sonic + "sa/chaos.gif";
pics[i++] = sonic + "sa/metalsonic.gif";
pics[i++] = sonic + "sa/supersonic.gif";
pics[i++] = sonic + "sa/supershadow.gif";
pics[i++] = sonic + "sa/chao.gif";
pics[i++] = sonic + "sa/herochao.gif";
pics[i++] = sonic + "sa/lightchao.gif";
pics[i++] = sonic + "sa/nightschao.gif";
pics[i++] = sonic + "sa/darkchao.gif";

function getObject(id) {
	return document.getElementById ? document.getElementById(id) :
		document.all ? document.all[id] : false;
}

function getSelection() {
	//IE support
	if (document.selection) {
		return document.selection.createRange().text;
	}
	//MOZILLA/NETSCAPE support
	else if (myField.selectionStart || myField.selectionStart == '0') {
		var startPos = myField.selectionStart;
		var endPos = myField.selectionEnd;

		return myField.value.substring(startPos, endPos);
	}
	else {
		return '';
	}
}

function getButtonMode() {
	if(document.PostMessage.postType) {
		for (i=0; i<document.PostMessage.postType.length; i++) {
			if (document.PostMessage.postType[i].checked) {
				return document.PostMessage.postType[i].value == 'html' ? 1 : 0;
			}
		}
		return 0;
	}
	else return buttonmode;
}

function AddText(c1, c2) {
	myField = document.PostMessage.body;

	strSelection = getSelection();
	if(getButtonMode()) text = "<" + c1 + ">" + ((c1.indexOf('img') != -1) ? '' : strSelection) + (c2 == '' ? '' : "<" + c2 + ">");
	else text = "[" + c1 + "]" + strSelection + (c2 == '' ? '' : "[" + c2 + "]");

	//IE support
	if(document.selection) {
		// myField.focus();
		// if(document.selection.type != 'text') {return;}
		if(strSelection == "") {document.PostMessage.body.value += text;} 
		else {document.selection.createRange().text = text;}
		// myField.focus();
	}
	//MOZILLA/NETSCAPE support
	else if(myField.selectionStart || myField.selectionStart == '0') {
		var startPos = myField.selectionStart;
		var endPos = myField.selectionEnd;

		myField.value = myField.value.substring(0, startPos) + text + myField.value.substring(endPos, myField.value.length);

		// myField.focus();
		myField.selectionStart = startPos + text.length;
		myField.selectionEnd = startPos + text.length;
	}
	else {
		myField.value += text;
		// myField.focus();
	}
}

function img(pic) {
	if(smileymode) {
		myField = document.PostMessage.body;
		text = (getButtonMode() ? "<img src=" + pic + ">" : "[img]" + pic + "[/img]");
		if(myField.selectionStart || myField.selectionStart == '0') {
			var startPos = myField.selectionStart;
			var endPos = myField.selectionEnd;

			myField.value = myField.value.substring(0, startPos) + myField.value.substring(startPos, endPos) + text + myField.value.substring(endPos, myField.value.length);

			// myField.focus();
			myField.selectionStart = startPos + text.length;
			myField.selectionEnd = startPos + text.length;
		}
		else {
			myField += text;
		}
	}
	else {document.PostMessage.posticon[0].value = pic; posticon.src = pic;}
}

function writepostingtools() {
	var output = "<p><a href=http://www.sonichq.org/design/ezboard/postingtools/>Posting Tools 2.3</a> By HQ Community</a><table width=600 border=0><tr><td valign=top align=center><center><b>Custom Posticons & Code Buttons</b><br>Click on a posticon to add it to the posticon box.<br>(Custom posticons do not work when posting topics, just replies.)<br><input type=checkbox name=smileymode onclick=\"smileymode = !smileymode\"> Check this box to add it as a smiley instead." + (document.PostMessage.postType ? "" : "<br><input type=checkbox name=buttonmode onclick=\"buttonmode = !buttonmode\"> Click here to insert HTML rather than EZCode") + "</center>";

	for(i=0; i<pics.length; i++) {
		pic = pics[i]
		if(!(i%20)) {output += "<br>";}
		output += "<a href=\"javascript:img('" + pic + "');\"><IMG SRC=" + pic + " border=0></a>";
	}

	return output + '</td></tr><tr><td colspan=2>' + quickcodebuttons + '</td></tr></table>';
}

function submitform() {
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\[rolldice\]/, 'User rolled a ' + rand(6));
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\<rolldice\>/, 'User rolled a ' + rand(6));
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\<spoilers?\>/g, '<span style="color:black;background-color:black"><font color=white>Spoilers (Select To Read):</font> ');
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\<\/spoilers?\>/g, '</span>');
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\<glow color\=([^>]*?)\>/g, '<span style=height:8;filter:GLOW(color=$1,strength=#+7);>');
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\<\/glow\>/g, '</span>');
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\<glow color\=([^>]*?)\>/g, '<span style=height:8;filter:GLOW(color=$1,strength=#+7);>');
document.PostMessage.body.value = document.PostMessage.body.value.replace(/\<( *)!( *)-( *)-/g, '<$1!$2~$3~');
document.PostMessage.body.value = document.PostMessage.body.value.replace(/-( *)-( *)\>/g, '~$1~$2>');
return true;
}

function button() {
	if(document.PostMessage) {
		var postingtools = getObject('postingtools');
		if(typeof postingtools.innerHTML != 'string') {return;}

		for(i=0; i<document.images.length; i++) {
			if(document.images[i].src == pic) {
				posticon = document.images[i]; break;
			}
		}

		postingtools.style.display = 'block';
		postingtools.innerHTML = '<input type=submit class=inputbutton value="Posting Tools" onclick="postingtools()"><br>' + postingtools.innerHTML;
		document.PostMessage.onsubmit = submitform;
	}
}

function postingtools() {
	var tools = getObject('tools');
	if(tools.innerHTML == '') tools.innerHTML = writepostingtools();

	getButtonMode();

	if(tools.style.display == 'block') tools.style.display = 'none';
	else tools.style.display = 'block';
}

/////////////// GENERAL ////////////////

/* BEGIN EZURL */
ezURL = document.location.href.match("http:\/\/((?:pub|b|p)([0-9]+)|beta|vanchau|inbox)\.ezboard\.com\/(b|f)([a-zA-Z0-9]+(?=frm[0-9]+)|[a-zA-Z0-9]+(?!frm[0-9]+))(frm[0-9]+|)(?:(?:[\.]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:(?:[\x3F]{1})([a-zA-Z0-9\=\+\&\.]+)|)(?:.*)");
try {
        if (ezURL.length > 0) {
                ezPub = ezURL[2].length > 0 ? ezURL[2] : ezURL[1];
                ezFullPub = ezURL[1];
                ezIsBoard = ezURL[3] == "b" ? true : false;
                ezBoardID = ezURL[4];
                ezForum = ezURL[5];
                ezPage = ezURL[6];
                ezQuery = ezURL[7];
                }
} catch (e) { }
ezURL = null;
/* END EZURL */

function Theme(intro, cssFile, topicButton, replyButton, newT, lockedT, csc) {
	this.intro = intro;
	this.cssFile = cssFile;
	this.topicButton = topicButton;
	this.replyButton = replyButton;
	this.newT = newT;
	this.lockedT = lockedT;
	this.csc = csc;
	return this
}

function DynamicTheme(theme) {
	linkElem = document.createElement("link")
	linkElem.rel = "stylesheet"
	linkElem.type = "text/css"
	linkElem.href = theme.cssFile

	if(theme.intro) {
		var intro = getObject('intro');
		if(intro) intro.innerHTML = theme.intro;
	}

	document.getElementsByTagName("head")[0].appendChild(linkElem)

	for (i = 0; i <= document.images.length; i ++) {
		if (document.images[i].alt == "New Topic")
			document.images[i].src = theme.topicButton
		if (document.images[i].alt == "Add Reply")
			document.images[i].src = theme.replyButton
		if (document.images[i].alt == "New" || document.images[i].alt == "Unread messages")
			document.images[i].src = theme.newT
		if (document.images[i].alt == "Closed thread" || document.images[i].alt == "Closed threads - cannot reply to these posts")
			document.images[i].src = theme.lockedT
		if (theme.csc && document.images[i].alt == "Gold Community")
			document.images[i].src = theme.csc
	}
}

function top() {
	bw=new lib_bwcheck

uppertable = '<style>' + h4 + '#announcements table {background-image:url(http://www.mobiusforum.net/images/themes/starsblue2.gif);background-repeat:repeat-x;} #announcements table table {background-image:none;} h4 font{color:white} body{scrollbar-face-color: #C0C0FF; scrollbar-track-color: #DFDFFF; scrollbar-highlight-color: #DFDFFF; scrollbar-shadow-color: #2B2BFF; scrollbar-3dlight-color: #C0C0FF; scrollbar-darkshadow-color: black; scrollbar-arrow-color: #000000;margin:0;background-image:url(http://www.mobiusforum.net/images/themes/main/tonybg.jpg);background-repeat:no-repeat;background-position:-20px -1px;background-attachment:' + bgattach + ';background-color:#C0C0FF} font.whosonline{padding-top:1;font-size:123%;font-family:arial,helvetica,sans-serif} .m{font-size:65%;line-height:18px;padding-top:1;paddng-bottom:0} .sidebar a{color:black;} .whosonline2{color:black;background-color:#ddddff;border:0} .bg1 a, .bg2 a{color:#3366cc} .inputbutton {color:#000000;background-color:#C0C0FF;border-left:2px solid #DFDFFF;border-top:2px solid #DFDFFF; border-bottom:2px solid #2B2BFF;border-right:2px solid #2B2BFF;} select{color:#000000;background-color:#C0C0FF;margin-left:2;vertical-align:middle;border-left:2px solid #2B2BFF;border-top:2px solid #2B2BFF; border-bottom:2px solid #DFDFFF;border-right:2px solid #DFDFFF;} </style> <center><table border=0 cellpadding=0 cellspacing=0 width=100%><tr><td width=100> </td><td align=center valign=center height=75 style="padding:5"><img border="0" src="http://www.mobiusforum.net/images/banners/banner.jpg" width="468" height="60"></td></tr><tr><td valign=top width=100 class=sidebar style="padding-top:150"><center><!-- <img src=http://home.sprynet.com/~freddyg/forum/icons/sonicheroes-90.jpg width=90 height=73><br><a href="http://pub228.ezboard.com/fsonichqcommunityfrm10.showMessage?topicID=3304.topic"><b>Sonic Heroes Topic</b></a><p><img src=http://home.sprynet.com/~freddyg/forum/icons/sonicx-90.gif width=90 height=43><br><a href="http://pub228.ezboard.com/fsonichqcommunityfrm10.showMessage?topicID=3612.topic"><b>Sonic X Topic</b></a><p><img src=http://www.mobiusforum.net/images/archie-90.jpg width=80 height=124><br><a href="http://pub12.ezboard.com/fsonichqcommunityfrm8.showMessage?topicID=1111.topic"><b>Sonic Comics<br>Reader Reviews</b></a> --><A href=http://p072.ezboard.com/fsonichqcommunityfrm24.showMessage?topicID=425.topic><img border=0 src=http://www.mobiusforum.net/images/banners/donate.png></a><br><br><a href=http://www.mobiusforum.net/eliteboard/viewforums.php?f=3><img border=0 src=http://www.mobiusforum.net/images/banners/eb_logo.jpg width=90 height=64></a><br><br><img src=http://www.mobiusforum.net/images/banners/topichighlights.gif width=90 height=90><p><b>General</b></center>';

for(i = 0; i < topics.length; i++) {
	uppertable += '<li><a href="' + topics[i].url + '">' + topics[i].title + '</a>';
}

uppertable += '<p><center><b>Sonic</b></center><li><a href="http://p072.ezboard.com/fsonichqcommunityfrm10.showMessage?topicID=4870.topic">Sonic and Secret Rings</a><li><a href="http://p072.ezboard.com/fsonichqcommunityfrm10.showMessage?topicID=5044.topic">Nights Sequel</a><li><a href="http://p072.ezboard.com/fsonichqcommunityfrm10.showMessage?topicID=5052.topic">Mario & Sonic at the Olympics</a><li><a href="http://p072.ezboard.com/fsonichqcommunityfrm10.showMessage?topicID=5060.topic">Sonic Rush Adventure</a><li><a href="http://pub12.ezboard.com/fsonichqcommunityfrm8.showMessage?topicID=1111.topic">Comic Reviews</a><p><center><b>Rules</b></center><li><a href="http://www.sonichq.org/newsite/forum/rules.php#rule1">No personal attacks</a><li><a href="http://www.sonichq.org/newsite/forum/rules.php#rule2">Make posts acceptable for all audiences</a><li><a href="http://www.sonichq.org/newsite/forum/rules.php#rule3">Misc. rules</a><li><a href="http://www.sonichq.org/newsite/forum/rules.php#rule4">Annoying behavior</a><li><a href="http://www.sonichq.org/newsite/forum/rules.php#rule5">Posts that add nothing to a conversation are spam</a><p><center><b>Useful Info</b></center><li><a href="http://www.sonichq.org/newsite/forum/info.php#newbies">New Visitors</a><li><a href="http://www.sonichq.org/newsite/forum/info.php#goodpost">Posting Guidelines</a><li><a href="http://www.sonichq.org/newsite/forum/info.php#faq">Account FAQ</a><li><a href="http://www.sonichq.org/newsite/forum/info.php#userlevels">User Levels</a><li><a href="http://www.sonichq.org/newsite/forum/info.php#AdminsMods">Staff</a><li><a href="http://www.sonichq.org/newsite/forum/info.php#history">MF History</a><li><a href="bsonichqcommunity.viewMyCommunityChestContributions">Supporters</a><p><center><a href="http://pub12.ezboard.com/fsonichqcommunityfrm22.showAddTopicScreenFromWeb"><img src="http://www.mobiusforum.net/images/banners/sign.jpg" width=90 height=30 border=0></a><br><a href="http://pub12.ezboard.com/fsonichqcommunityfrm22"><img src=http://www.mobiusforum.net/images/banners/view.jpg width=90 height=30 border=0></a><p><a href="http://www.big-boards.com/highlight/1148/"><img src="http://www.big-boards.com/img/ltu/1148a.png" style="border:1px solid black;" alt="One of the largest message boards on the web !" /></a></center></td><td valign=top align=center bgcolor=white style="padding-top:16;background-image:url(http://www.lighthead.net/misc/mofo/themes/main/' + bg + ');background-repeat:no-repeat;background-position:' + bgpos + ';background-attachment:' + bgattach + '">';

lowertable = '</td></tr></table></center>';

	if ((forum == 'main') && !bw.ns4) {
		if(true) document.body.style.backgroundAttachment = 'scroll';
		outertable = 'frontpage';
	}

	if (outertable) {
		document.write(uppertable);
	}
}

function bottom() {
	if (outertable) {
		document.write(lowertable);
		SwitchCategory("invisiblecategory", "categoryvisible", "none");
		var buttons = document.getElementsByTagName("input");
			for(i=0; i<buttons.length; i++) {
				if(buttons[i].value == 'Go') {buttons[i].parentNode.innerHTML += ' <a href="http://p211.ezboard.com/bstudio64"><img src="http://www.mobiusforum.net/images/banners/studio64button.png" border="0" align="absmiddle" style="padding-bottom:4"></a>'}
		}
	}
	else {/*document.write('<a href="http://www.big-boards.com/board/1148/"><img src="http://www.big-boards.com/img/ltu/1148t.png" style="width:6px; height:6px; border:0;" alt="Message Board Statistics" /></a>');*/}
	button();
	if(document.PostMessage && document.PostMessage.body.value == '' && location.href.search('fsonichqcommunityfrm22\\.showAddTopicScreenFromWeb') != -1) document.PostMessage.body.value = '1. Where did you find out about Sonic HQ / Mega Man HQ / The HQ Board?\n\n\n2. What caught your interest?\n\n\n3. What do you like most about the site?\n\n\n4. What do you like least about the site?\n\n\n5. What would you like to have added?\n\n\n6. How often do you plan to come?\n\n\n7. What\'s your website\'s URL?\n\n\n8. Any more comments and/or suggestions?';
	for (i=0; i < document.links.length; i++) {
		if(document.links[i].href.match(/\.showAddReplyScreenFromWeb\?topicID=\d+\.topic\&index=/) && document.links[i].innerHTML.match(/img src/)) {
			document.links[i].href = document.links[i].href.replace(/\&index=\d+/, '');
		}
		if(document.links[i].href.indexOf('http://www.echidnoyle.org') == 0) {
			document.links[i].href = document.links[i].href.replace(/echidnoyle\.org/, 'echidnoyle.doorsclosing.com');
		}
	}
	for(i=0; i<document.images.length; i++) {
		if(document.images[i].src.indexOf('http://www.echidnoyle.org') == 0) {
			document.images[i].src = document.images[i].src.replace(/echidnoyle\.org/, 'echidnoyle.doorsclosing.com');
		}
	}
	if(forum == 'frm16') {
		EditPostNumbers();

	/*	for (k = 0 ; k < document.images.length; k++) {
  
      document.images[k].src = "http://www.mobiusforum.net/scripts/seafood_noodle_soup.jpg";
   
}*/
	
	
}



function setCookie(c_name,value,expiredays)
{
	var exdate=new Date()
	exdate.setDate(exdate.getDate()+expiredays)
	document.cookie=c_name+ "=" +escape(value)+
	((expiredays==null) ? "" : ";expires="+exdate.toGMTString())
}


function toggleIcons() {
	setCookie('icons', 1, 365);
}


icontoggle = getCookie('icons');

if (parseInt(icontoggle) == 1)
{
	for (i=0; i<document.images.length; i++){
			if (document.images[i].alt == "Sticky Topic")
				document.images[i].parentNode.innerHTML = "<b>" + document.images[i].parentNode.innerHTML + "</b>";
			if (document.images[i].alt == "posticon" || document.images[i].alt == "Hot topic")
				document.images[i].parentNode.innerHTML = "&nbsp;" + document.images[i].parentNode.innerHTML;
								
	}
	
	for (i=0; i<document.images.length; i++) 	
			if (document.images[i].alt == "posticon" || document.images[i].alt == "Hot topic" || document.images[i].alt == "Sticky Topic")
			{	//document.images[i].src = "http://www.mobiusforum.net/images/themes/blnk.gif";
				var p2 = document.getElementsByTagName('img')[i];
				p2.parentNode.removeChild(p2);
				
			}
			
}




	
/*
	for (i=0; i<document.images.length; i++) 	
		if (document.images[i].alt == "posticon" || document.images[i].alt == "Hot topic")
			document.images[i].parentNode.innerHTML = "";


for (i=0; i<document.links.length; i++) 		
			document.links[i].parentNode.innerHTML = "";
*/
	var url = 'http://www.mobiusforum.net/images/themes/';
	for (i=0; i < document.images.length; i++) {
		if(document.images[i].src == 'http://www.ezboard.com/image/csc_goldcommunity.gif') {
			if(forum != 'main' && document.createElement) document.images[i].parentNode.nextSibling.nextSibling.style.verticalAlign = 'middle';
			switch(forum) {
				case 'main': document.images[i].src = url + 'main/cscgold-main.gif'; break;
				case 'sonicroleplay': document.images[i].src = url + 'rpguild/cscgold-rp.gif'; break;
				case 'frm14': case 'frm23': document.images[i].src = url + 'gaming/cscgold-game.gif'; break;
				case 'mobiusforum': case 'frm24': document.images[i].src = url + 'mf/chibisonic/cscgold-chibi.gif'; break;
				case 'frm10': case 'frm11': case 'frm21': document.images[i].src = url + 'emerald/cscgold-emerald.gif'; break;
				case 'thetradingpost': document.images[i].src = url + 'tradingpost/cscgold-trade.gif'; break;
				case 'frm9': case 'frm48': document.images[i].src = url + 'floatingisland/cscgold-knuckles.gif'; break;
				case 'frm8': document.images[i].src = url + 'knothole/cscgold-knothole.gif'; break;
			}
		}
	}

	// Collapsable MF Central

	/*var intro = getObject('intro');
	if(forum == 'mobiusforum' && intro) {
		var tds = document.getElementsByTagName('td');
		for(var i = 0; i < tds.length; i++) {
			if(tds[i].className == 'm') {
				var links = tds[i].getElementsByTagName('a');
				if(links[0].className == 'title') {
					var click = document.createElement('b');
					if(click.addEventListener){
						click.addEventListener('click', expand, false);
					}
					else if(click.attachEvent){
						click.attachEvent('onclick', expand);
					}
					click.innerHTML = '+ ';
					links[0].parentNode.insertBefore(click, links[0]);
				}
				else {
					//tds[i].style.display = 'none';
					tds[i].parentNode.style.display = 'none';
				}
			}
		}
	}*/

function getCookie(c_name)
{
if (document.cookie.length>0)
  {
  c_start=document.cookie.indexOf(c_name + "=")
  if (c_start!=-1)
    { 
    c_start=c_start + c_name.length+1 
    c_end=document.cookie.indexOf(";",c_start)
    if (c_end==-1) c_end=document.cookie.length
    return unescape(document.cookie.substring(c_start,c_end))
    } 
  }
return ""
}


	if(forum == 'mobiusforum') {
	
		QuickReply();
		var stamp = new Date();
		var m = day.getMinutes();
		var url = "http://www.mobiusforum.net/images/themes/mf/ezmfcfinal/";
		var intro = '';
		var title = '';
		var css = '';
		var topic = '';
		var reply = '';
		var newT = '';
		var lockedT = '';
		var csc = 'http://www.mobiusforum.net/images/themes/mf/chibisonic/cscgold-chibi.gif';
		themeid = getCookie('themeid');
		//switch(parseInt(m/5) + 1) {
		switch(parseInt(themeid)) {
		case 1:
		default:
			title = 'Sonic'
			css = 'sonic/sonic.css';
			topic = 'sonic/heroestopic.png';
			reply = 'sonic/heroesreply.png';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 2:
			title = 'Tails';
			css = 'tails/tails.css';
			topic = 'tails/topic.gif';
			reply = 'tails/reply.gif';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 3:
			title = 'Knuckles';
			css = 'knuckles/knuckles.css';
			topic = 'knuckles/topic.gif';
			reply = 'knuckles/reply.gif';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 4:
			title = 'Espio';
			css = 'espio/espio.css';
			topic = 'espio/topic.gif';
			reply = 'espio/reply.gif';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 5:
			title = 'Vector';
			css = 'vector/vector.css';
			topic = 'vector/topic.gif';
			reply = 'vector/reply.gif';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 6:
			title = 'Rouge';
			css = 'rouge/rouge.css';
			topic = 'rouge/topic.gif';
			reply = 'rouge/reply.gif';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 7:
			title = 'Classic Sonic';
			css = 'classicsonic/classicsonic.css';
			topic = 'classicsonic/omaketopic2.png';
			reply = 'classicsonic/omakereply.png';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 8:
			title = 'MF Mascots';
			css = 'fexusfan/fexusfan.css';
			topic = 'fexusfan/topic_purple.jpg';
			reply = 'fexusfan/reply_purple.jpg';
			newT = 'http://www.mobiusforum.net/images/themes/mf/ezmfcfinal/fexusfan/ffbullet.gif';
			lockedT = 'http://www.mobiusforum.net/images/themes/mf/ezmfcfinal/fexusfan/ffbullet2.gif';
			break;
		case 9:
			intro = '<img src="http://www.mobiusforum.net/images/themes/mf/chibisonic/top.gif" />';
			title = 'Chibi Sonic';
			css = 'chibisonic.css';
			topic = '../chibisonic/postarticle.gif';
			reply = '../chibisonic/postresponse.gif';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 10:
			title = 'MF Collage';
			css = 'truered/truered.css';
			topic = 'truered/topic.gif';
			reply = 'truered/reply.gif';
			newT = 'http://www.mobiusforum.net/images/themes/mf/ezmfcfinal/truered/new.gif';
			lockedT = 'http://www.mobiusforum.net/images/themes/mf/ezmfcfinal/truered/locked.gif';
			break;
		case 11:
			title = 'MF Avatars';
			css = 'avatar/avatar.css';
			topic = 'truered/topic.gif';
			reply = 'truered/reply.gif';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		case 12:
			title = 'Green Hill';
			css = 'greenhill/greenhill.css';
			topic = 'greenhill/greenhilltopicani.gif';
			reply = 'greenhill/greenhillreplyani.gif';
			newT = 'http://www.mobiusforum.net/images/themes/mf/ezmfcfinal/greenhill/new.png';
			lockedT = 'http://www.mobiusforum.net/images/themes/mf/ezmfcfinal/greenhill/locked.gif';
			break;
		case 13:
			title = 'Next Gen';
			css = 'nextgenez.css';
			topic = 'nextgensonic/topic.jpg';
			reply = 'nextgensonic/reply.jpg';
			newT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon.gif';
			lockedT = 'http://www.lighthead.net/misc/mofo/icons/sonic_icon2.gif';
			break;
		}
		intro += "<p>Theme:: " + title + "</p>";
		theme = new Theme(intro, url+css, url+topic, url+reply, newT, lockedT, csc);
		DynamicTheme(theme);
	}

	//addIgnoreFeature();

	QuickReply();
/*
	 ez = new ezURL;
	if(ez.page == 'showAddReplyScreenFromWeb') {
		url = escape('http://' + ez.pub + '.ezboard.com/f' + ez.board + ez.forum + '.showMessage?' + ez.query);
		title = escape(document.title.replace(/ [-@] www.ezboard.com/, '').replace(/Re: /, ''));
		document.write('<' + 'script src="http://www.echidnoyle.org/gamemusic3/cgi-bin/topics.php?pagetitle=' + title + '&url=' + url + '&reply=1"></' + 'script' + '>');
	}
	else {
		url = escape(document.location.href);
		title = escape(document.title.replace(/ [-@] www.ezboard.com/, ''));
		document.write('<' + 'script src="http://www.echidnoyle.org/gamemusic3/cgi-bin/topics.php?pagetitle=' + title + '&url=' + url + '&reply=0"></' + 'script' + '>');
	} 
*/
}

function expand() {
	var tr = this.parentNode.parentNode;
	tr = tr.nextSibling;
	while(tr) {
		var links = tr.getElementsByTagName('a');
		if(!links[0] || links[0].className == 'title') {
			return;
		}
		tr.style.display = 'block';
		tr = tr.nextSibling;
	}
}

//////////////// QUICK REPLY /////////////////

/* QUICK REPLY by phalen180 */
/*
copyright 2005 phalen180
Please email serverfund at geke.net for info on how to donate to keep the
G E K E . N E T ezboard script archive going
*/

/* FUNCTION TO GET ELEMENTS WITH TAG/ATTRIBUTE/VALUE */
function getElementsByAttribute (tag, attr, value, stopat) {
	var re;
	var foundels;
	var iFound;
	var sAttrValue;

	checkels = document.getElementsByTagName(tag);
	foundels = new Array();

	for (el = 0; el < checkels.length; el++) {
		sAttrValue = checkels[el].getAttribute(attr, 2);
		re = new RegExp(value, "ig");
		if (re.test(sAttrValue) != 0) {
			iFound = foundels.push(checkels[el]);
			if (stopat > 0 && iFound >= (stopat)) {
				el = checkels.length;
			}
		}
	}
        
	return foundels;
}
/* END FUNCTION TO GET ELEMENTS WITH TAG/ATTRIBUTE/VALUE */


function QuickReply() {
	if (ezForum != 'sonicroleplay' && (document.location.href.indexOf(".showMessage") != -1 || 
		document.location.href.indexOf(".showPrevMessage") != -1 || 
		document.location.href.indexOf(".showNextMessage") != -1 || 
		document.location.href.indexOf(".deleteSingle") != -1)) {

	/* Comment the lines below out or change the value to false
	   to assume that we will NOT include personal photo
           or signature,
           or use emoticons
           or to show a link to the emoticon list
           or to hide the subject box */


        // For the following options
        // use 0 for never,
        // 1 for always,
        // 2 to show checkbox (unchecked),
        // 3 to show checkbox (checked)

        includePersonalPhoto = 3;
        includeSignature = 3;
        useEmoticons = 3;
        convertLinks = 3;
        stayInTopic = 2;
        showPreview = 2;
        linkEmoticonList = false;

        /*
        use "text" for plain text,
        "html" for HTML
        and "choose" to show a dropdown */

        // postType = "html";
        // postType = "text";
        // postType = "choose";
        postType = "choose"; 

        showSubjectBox = true;
        subjectSize = 60;
        messageCols = 60;
        messageRows = 4;

        /* UNCOMMENT THIS ONE TO USE THE ORIGINAL style */
        // addReplyButton = document.getElementsByName("addreplybutton").item(1);

        /* UNCOMMENT THIS ONE TO USE A TEXT ADD/REPLY BUTTON */
        // foundels = getElementsByAttribute("a", "href", ".showAddReplyScreenFromWeb?", 0);
        // addReplyButton = foundels[foundels.length - 1].childNodes[0];

        /* UNCOMMENT THIS ONE TO USE AN IMAGE ADD/REPLY BUTTON */
        addReplyButton = getElementsByAttribute("img", "alt", "Add Reply", 2)[1];

        QRCell = addReplyButton.parentNode;
        while ( QRCell.nodeName != "TR" ) {
                QRCell = QRCell.parentNode;
                }
        QRCell = QRCell.getElementsByTagName("td").item(0);

        QRForm = document.createElement("form");
        QRForm.method = "post";
        QRForm.action = addReplyButton.parentNode.href.replace(".showAddReplyScreenFromWeb", ".addReplyFromWeb");
        QRForm.name = "PostMessage";

        QRSubject = document.createElement("input");
        QRSubject.value = 'Re: ' + document.title.replace(" - www.ezboard.com", "");
        QRSubject.id = "quickreplysubject";
        QRSubject.name = "subject";
        if ( showSubjectBox ) { 
                QRSubject.type = "text";
                QRSubject.className = "inputbox";
                QRSubject.maxLength = 60;
                QRSubject.size = subjectSize;
                QRSubject.tabIndex = 3;
                QRSubject.style.marginRight = "3px";
                } else {
                QRSubject.type = "hidden";
                }

        QRBody = document.createElement("textarea");
        QRBody.rows = messageRows;
        QRBody.cols = messageCols;
        QRBody.id = "quickreplybody";
        QRBody.className = "inputbox";
        QRBody.value = "";
        QRBody.name = "body";
        QRBody.tabIndex = 4;

        QRSubmit = document.createElement("input");
        QRSubmit.type = "submit";
        QRSubmit.className = "inputbutton";
        QRSubmit.id = "quickreplysubmit";
        QRSubmit.value = "Quick Reply";
        QRSubmit.tabIndex = 5;

        QRCell.align = "right";
        QRCell.appendChild(QRForm);

        /* Uncomment the commented lines to add labels for the two boxes */

        // QRForm.appendChild(document.createTextNode("Subject: "));
        QRForm.appendChild(QRSubject);
        QRForm.appendChild(QRSubmit);
        // QRForm.appendChild(document.createElement("br"));
        // QRForm.appendChild(document.createTextNode("Message: "));
        QRForm.appendChild(document.createElement("br"));
        QRForm.appendChild(QRBody);

        QRForm.appendChild(document.createElement("br"));

        if (postType != "choose") {
                QRpt = document.createElement("input");
                QRpt.type = "hidden";
                QRpt.name = "postType";
                QRpt.value = postType;
                QRForm.appendChild(QRpt);
        }
                else {
                QRpt = document.createElement("select");

                QRpt.name = "postType";
                QRpt.appendChild(QRSelection("text", "Plain Text"));
                QRpt.appendChild(QRSelection("ezcodes", "EZ Codes"));
                QRpt.appendChild(QRSelection("html", "HTML"));
                QRForm.appendChild(QRpt);
        }

        if ( includeSignature > 0) {
                QRForm.appendChild(QROption("includeSignature","Include custom signature.", includeSignature));
                }
        if ( includePersonalPhoto > 0) {
                QRForm.appendChild(QROption("includePersonalPhoto","Include personal photo.<br>", includePersonalPhoto));
                }
        if ( useEmoticons > 0 ) {
                QRForm.appendChild(QROption("emoticons","Use Emoticons.",useEmoticons));
                }
        if ( convertLinks > 0 ) {
                QRForm.appendChild(QROption("convertLinks","Convert URL links.",convertLinks));
                }
        if ( stayInTopic > 0) {
                QRForm.appendChild(QROption("stayInTopic","Stay in topic", stayInTopic));
                }

if ( showPreview > 0) {
QRForm.appendChild(QROption('preview','Preview', showPreview));
}

        if ( linkEmoticonList && ezFullPub != "") {
                eListLink = document.createElement("a");
                eListLink.href = "http://" + ezFullPub + ".ezboard.com/b" + ezBoardID + ".showEmoticonsHelp";
                eListLink.target = "_blank";
                eListLink.innerHTML = "complete emoticon list";
                QRForm.appendChild(document.createElement("br"));
                QRForm.appendChild(eListLink);
        }
}
}

function QROption(sName, sLabel, iShowState) {
        if ( iShowState > 0 ) {
                QROpt = document.createElement("span");
                QROpt.id = "span" + sName;
                QRCheckBox = document.createElement("input");
                QRCheckBox.name = sName;
                QRCheckBox.id = sName;
                QRCheckBox.value = "on";
        
                if ( iShowState > 1 ) {
                        QRCheckBox.type = "checkbox";

                        // checkbox label
                        QRCheckBoxLabel = document.createElement("label");
                        QRCheckBoxLabel.htmlFor = sName;
                        QRCheckBoxLabel.innerHTML = sLabel;
                        
                        if ( iShowState > 2 ) {
                                QRCheckBox.defaultChecked = true;
                        }
                        QROpt.appendChild(QRCheckBox);
                        QROpt.appendChild(QRCheckBoxLabel);
                       } else {
                                QRCheckBox.type = "hidden";
                                QROpt.appendChild(QRCheckBox);
                        }
                return QROpt;
                }
        }

function QRSelection(sOption, sDisplay) {
        QRSel = document.createElement("option");
        QRSel.innerHTML = sDisplay;
        QRSel.value = sOption;

        return QRSel;
}
/* END QUICK REPLY */

/////////////// BLEND FUNCTIONS ///////////////

function startblend(ID, dest, step, interval) {
	if(bw.ie && bw.dom) {
		obj = ID;
		if(obj.alphaTimer) clearInterval(obj.alphaTimer)
		obj.alphaTimer = setInterval("blendplus(obj,"+dest+","+step+")", interval)
	}
}
function stopblend(ID, dest, step, interval) {
	if(bw.ie && bw.dom) ID.filters.item('alpha').opacity = dest;
}
function blendplus(obj, dest, step) {
	if(bw.ie && bw.dom) {
		if ((obj.filters.item('alpha').opacity + step) < dest)
			obj.filters.item('alpha').opacity += step;
		else {obj.filters.item('alpha').opacity = dest; clearInterval(obj.alphaTimer)}
	}
}
function blendminus(obj, dest, step) {
	if(bw.ie && bw.dom) {
		if (obj.filters.item('alpha').opacity > (step + dest))
			obj.filters.item('alpha').opacity -= step;
		else {obj.filters.item('alpha').opacity = dest; clearInterval(obj.alphaTimer)}
	}
}

/////////////// IGNORE ///////////////

/* Ignore Feature for Member Posts by Te1emachus */
/*
function setIgnoreCookie(name, value, expires, path, domain, secure){
        today = new Date();
        expiry = new Date(today.getTime() + 365 * 24 * 60 * 60 * 1000);
        cookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expiry.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : "");
        document.cookie = cookie;
}
function getIgnoreCookie(name){
        cookie = document.cookie;
        val = name + "=";
        start = cookie.indexOf("; " + val);
        if (start == -1){
                start = cookie.indexOf(val);
                if (start != 0) return null;
        }
        else
        start += 2;
        end = document.cookie.indexOf(";", start);
        if (end == -1)
        end = cookie.length;
        return unescape(cookie.substring(start + val.length, end));
}
function toggleIgnore(ignored,currentList,upDate){
        oldList = currentList.split("|");
        newList = new Array();
        if (!ignored){
                newList = oldList.concat(upDate);
        }else{
                for (cl = 0; cl < oldList.length; cl++){
                        if (oldList[cl] != upDate){
                                newList = newList.concat(oldList[cl]);
                        }
                }
        }
        newList = newList.join("|").replace(/^|/,"");
        setIgnoreCookie("ignoreList",newList,true,false,false,false);
        window.location = self.location;
}
function ignoreFeature(){
        ignoredList = getIgnoreCookie("ignoreList") != null ? getIgnoreCookie("ignoreList") : "";
        dl = document.links;
        for (t = 0; t < dl.length; t++){
                if (dl[t].href.indexOf("PublicProfile") != -1 && dl[t].parentNode.className == "title" && dl[t].parentNode.parentNode.innerHTML.indexOf("usertitle") != -1){
                        uc = dl[t].parentNode.parentNode;
                        thisMember = dl[t].innerHTML;
                        ignored = ignoredList.match(thisMember) ? true : false;
                        iu = !ignored ? "Ignore " : "Un-Ignore ";
                        ignoreOption = document.createElement("div");
                        ignoreOption.id = "ignoreoption";
                        ignoreLink = document.createElement("a");
                        ignoreLink.innerHTML = (iu == "Un-Ignore ") ? "(" + iu + thisMember + ")" : "(" + iu + " Member)";
                        ignoreLink.title = iu + "posts by " + thisMember + "?";
                        ignoreLink.href = "javascript:toggleIgnore(" + ignored + ",\"" + ignoredList + "\",\"" + thisMember + "\")";
                        ignoreLink.onmouseover = function(){
                                currentlyIgnored = ignoredList.length > 0 ? ignoredList.replace(/|/g,", ") : "No members";
                                window.status = "Current ignore list: " + currentlyIgnored + ".";
                                return true;
                        }
                        ignoreLink.onmouseout = function(){
                                window.status = "";
                        }
                        ignoreOption.appendChild(ignoreLink);
                        if (ignored){
                                rpPost = document.createElement("tr");
                                rpPost.id = "ignoredpost";
                                rpAuthor = document.createElement("td");
                                rpAuthor.appendChild(ignoreOption);
                                rpAuthor.id = "ignoredauthor";
                                rpComment = document.createElement("td");
                                rpCommentid = "ignoredcomment";
                                rpComment.appendChild(document.createElement("hr"));
                                rpPost.appendChild(rpAuthor);
                                rpPost.appendChild(rpComment);
                                uc.parentNode.parentNode.insertBefore(rpPost,uc.parentNode);
                                uc.parentNode.parentNode.removeChild(uc.parentNode);
                                t--;
                        }else{
                                uc.insertBefore(ignoreOption,dl[t].parentNode.nextSibling);
                        }
                }
        }
}
function addIgnoreFeature(){
        if (ezPage){
                ignoreFeature();
        }
}
*/
/////////////// CATEGORIES ///////////////

function SwitchCategory(category, stop, setting) {
	if(document.getElementById(category)) {
		invis = document.getElementById(category);

		while (invis.parentNode) {
			if (invis.parentNode.nodeName.toLowerCase() == "tr") {
				invis = invis.parentNode;
				invis.id = category + "tr";
				break;
			} else {
				invis = invis.parentNode;
			}
		}

		if (document.getElementById(category + "tr")) {
			invisx = document.getElementById(category + "tr");
			invisx.style.display = setting;
			while (invisx.nextSibling) {
				invisx = invisx.nextSibling;
				if (invisx.style) {
					if (invisx.innerHTML.indexOf(stop) == -1) {
						invisx.style.display = setting;
						} else {
						break;
					}
				}
			}
		}
	}
}

/////////////// THEME ///////////////

var day = new Date()
var seed = day.getTime();
function rand(range) {
	var rand = parseInt(((seed - (parseInt(seed/1000,10) * 1000))/10)/100*range + 1,10);
	seed = day.getTime() + Math.round((seed) * Math.random()) + 1;
	return rand;
}

function randomQOTW(){
	var i = 0;
	var a = new Array();
		a[i++] = 'YOU BASTARD LIGHTHEAD! - Harley Quinn hyenaholic<br>IT\'S ALL CRAIG\'S FAULT! - Anonymous<br>She\'ll either go for Lighthead or Rico first - Anonymous';
	a[i++] = 'stairmaster (7:42 pm): i wish i had a quote of the week in my mouth';
	a[i++] = 'Shadow Hog: In Soviet Russia, YOU greatly offend THIS! }:O';
	a[i++] = 'Mr Creosote (10:12 pm): Shadow: CLIPPING CONTROL!<br>Mr Creosote (10:13 pm): *Shadow falls through ground*';
	a[i++] = 'Blitz (9:36 pm): Acrio and I did it with Rico yesterday<br>Blitz (9:36 pm): It was fun!<br>Shinobi of Wind (9:36 pm): ...I think I might just tape it. I can\'t be bothered to stay up until 3:30 AM.';
//	a[i++] = 'Lighthead: But that could cause numerous heart attacks<br>Acriokun: Is that against ezbarf s ToS or something?';
//	a[i++] = 'Rishi: I have a confession to make, HSW. I am actually a female.';
//	a[i++] = 'Astrid: Do you want a starburst jelly bean?<br>Acriokun: Yes, but I don\'t own any.<br>Astrid: -gives you some in pretend land?-<br>Acriokun: *eats them pretendly*<br>Astrid: -is pretend happy-';
//	a[i++] = 'Not all dolphins are good and kind, some have red eyes. - Vortex';
	a[i++] = 'Sonic was completely baffled. Whenever he kissed Tails, he got an entirely different reaction. - Psxphile';
//	a[i++] = 'OMG THAT WAS PRICELESS AND THIS THREAD NEEDS TO BE ARCHIVED. XD XD XD - WB';
	a[i++] = 'Boss Velotix (5:49 pm): @___@ *engages surpression of modern typing style*<br>Boss Velotix (5:50 pm): *failing... -CENSORED- YOUR MOM -CENSORED!!- -BRITISH PUB LANGUAGE!!-* ';
	a[i++] = 'Afraid, so afraid, for this woman has already stolen his heart, as deftly as the hamburglar steals burgers, he had expected her to go \'rubble rubble\' as he ran. - Vortex';
//	a[i++] = 'stairmaster (5:04 pm): i wish i had a friend';
//	a[i++] = 'Darthriddick (5:34 pm): *raises eyebrows* some of you are nut jobs';
//	a[i++] = 'Shadowed Spirit Sage (12:18 pm): I had an imaginary friend when I was little who was mute and in a wheelchair. And when I was mad at him, I pushed him down the stairs';
//	a[i++] = 'stairmaster (6:45 pm): i hated sonic 2s camera i wanted to see the other side of the level';
	a[i++] = 'Wonderbat (7:27 pm): o look, Shadow can finally drive... a Jeep. My prayers have been answered.<br>Mr Creosote (7:28 pm): Shadow: I\'m the ultimate lifeform, I can chaos control HA HA HA. Oh look, a tricycle. Wheeeeeee!';
	a[i++] = 'Wonderbat (7:45 pm): Man, can you imagine if Carmen Sandiego and Waldo from \'Where\'s Waldo?\' had a baby? That kid would be, like, impossible to find.';
//	a[i++] = 'hey rico are there gay ppl here or r u just messin - JRapidfire';
//	a[i++] = 'Harley Quinn hyenaholic has left at 9:27 pm<br>Tendo Fan (9:28 pm): There goes all the Sex.<br>Tendo Fan (9:28 pm): :(';
//	a[i++] = 'Everyone\'s entitled to their opinion, I just happen to be right. - Shendu';
//	a[i++] = 'Harley Quinn hyenaholic (2:36 pm): It\'s wonderful how we can accept that we don\'t fall off the bottom of the planet, but don\'t believe in black and red hedgehogs that run at the speed of sound.';
//	a[i++] = 'I never pressed the Alt key.  - Ksemanr';
//	a[i++] = 'Saffronikku (12:50 am): How come everytime someone copies and pastes something someone says, the time gets pushed back 1 hour?';
//	a[i++] = 'Astrid (6:05 pm): If it was Rachael I would bleed on everything, wipe the blood all over my neck and bed and then lay waiting on the couch until she got back. I\'d pretend to be dead.<br>Astrid (6:05 pm): Then when she started to cry I\'d tell her she\'s weak for showing emotion.';
//	a[i++] = 'Tails06 (12:02 pm): No you don\'t know me and frankly you just made cuz payless ran out of plastic pumps for the after party, why don\'t u go take the shoes u got and go bump\'em so ur light\'s don\'t get cut off!!!';
	a[i++] = 'stairmaster (1:35 am): terg will you marry me<br>Tergonaut (1:36 am): You drive off my 3rd granddaughter and then you demand to marry me! Such an outrage has never been heard in the 3 Kingdoms!<br>stairmaster (1:36 am): but can i marry you?';
	a[i++] = 'Astrid (12:54 am): Telemarketer call tonight. Is Cyndy there?<br>Astrid (12:54 am): I\'m sorry she\'s dead at the moment, may I take a message?<br>Astrid (12:54 am): OMG THEY TOTALLY HUNG UP.';
//	a[i++] = 'It has sex in the title. Did you think I wouldn\'t be along? - Harley.';
//	a[i++] = 'Craig (7:52 pm): One man with a plastic face appears in your bed, he\'s a king<br>Craig (7:52 pm): another man with a white plastic face appears in your children\'s bed and he\'s Michael Jackson';
	a[i++] = 'Human Database (5:34 pm): i went out today!!!<br>TrudiSpeed (5:35 pm): =O!!!!<br>Lighthead (5:35 pm): You left the house?<br>Human Database (5:35 pm): indeed<br>Lighthead (5:35 pm): QOTW!!!!!<br>Lighthead (5:35 pm): >.>';
	a[i++] = 'Thunder1 (12:30 am): Yeah, Bubonic was banned for some time once<br>MiStaBuBoNiC (12:31 am): 10 days in rico\'s closet<br>Rico (12:31 am): He tried to seduce me';
//	a[i++] = 'chapter 39<br><br>craig looks up to see the beautiful harley bending towards him, she uttered to him... "lets have sex". craig was shocked, though slightly aroused.';
	a[i++] = 'Lighty (9:11 pm): <br>Us: \"Are we moving yet?! Are we moving yet?! Are we moving yet?!\"<br>Vec: \"I\'LL TURN THIS FORUM RIGHT AROUND IF YOU DON\'T STOP!!!\"';
	a[i++] = 'Austin Jones (8:13 pm): HSW is a mom<br>Austin Jones (8:13 pm): ...<br>Austin Jones (8:13 pm): *mod';
	a[i++] = 'Rico\'s my favorite deviant :) - Jimro';
//	a[i++] = 'Mike1204 (2:11 pm): Im leaving this chatroom because people don\'t know what Emo is.';
//	a[i++] = 'Wonderbat: THE APES ARE EVOLVING. SOON THEY WILL COLLECTIVELY RISE UP AGAINST THEIR HUMAN OVERLORDS AND CREATE AN ALL-CHIMP WORLD WHERE CHIMPANZEES CAN LIVE IN PEACE.<p>We have to convince the Gorillas, Orangutans, and Mandrills to join us before it is too late, as I fear it is already too late for the Baboons.';
	a[i++] = 'I\'d say I\'ve had to do more drive wipes as a result of Norton crapping out than due to problems caused by the viruses it protects you against. ~ Cycle';
//	a[i++] = 'shadows girl (5:40 pm): what do i sopose to do with a book?';
//	a[i++] = 'stairmaster (2:22 am): he is like the yoda of romance minus the midgetry and broken grammar';
	a[i++] = 'Sailor Evil (10:06 pm): cya<br>Sailor Evil has left at 10:06 pm<br>Lighty (10:06 pm): HOLY CRAP<br>Zigglina (10:06 pm): .....he said bye<br>Lighty (10:06 pm): He said cya before he... left<br>Lighty (10:06 pm): HOLY CRAP<br>Zigglina (10:06 pm): dude qotw';
	a[i++] = 'Wes (2:06 pm): Do you UK people get your own movies or do you get the same theatrical releases we do?<br>THS (2:06 pm): I HAVE NEVER HEARD OF AN AMERICAN ACTOR AND THE LAST FILM I WATCHED WAS "THE GREAT SCONE HEIST"';
//	a[i++] = 'Like bad topics through CJ\'s stomach<br><br>So are the days of our PiEs. ~ DivineDragoonKain';
	a[i++] = 'Acrio you creepy, perverted, weirdass ambigious gender/sexuality negahedgefoxthing! ~ Craig';
	a[i++] = 'Wes (9:21 pm): I\'M MORE CONFUSED THAN A BABY AT THE TOPLESS BAR :(';
//	a[i++] = 'PhilTH (11:38 am): I hate Wonderbat she\'s a n00b';
	a[i++] = 'Jigsaw (9:29 pm): I am under the influece of the White Life Force Diamond<br>Shifty Prowers (9:29 pm): Cocaine?';
	a[i++] = 'Welcome! You have entered [MiStaBuBoNiC in Rico\'s Closet] at 8:16 pm<br>Human Database (8:16 pm): DON\'T COME IN WE\'RE NAKED';
	a[i++] = 'Rico (11:27 am): you pay for games?<br>Rico (11:27 am): I mean um... Roms are bad. They steal money and kill babies';
	a[i++] = 'Pat L Hedgehog: And there\'s no use arguing with you cause I\'m just wasting my time with illerates like you.';
	a[i++] = 'Maddog13 (12:03 am): you\'re too quiet<br>Rabid Rodent (12:03 am): I eat children.<br>Maddog13 (12:04 am): k.........................';
	a[i++] = '"How do i become admin I want to ban people" -Anonymous';
//	a[i++] = 'stairmaster (1:18 pm): no one ever likes it when i am naked';
	a[i++] = 'Sailor Evil (12:47 pm): singing in chats just doesn\'t work<br>Deckman (12:48 pm): VOICECHAT<br>Sailor Evil (12:48 pm): that would likely cause the singing to work even less';
	a[i++] = 'Happy Geo (12:50 pm): back<br>Happy Geo (12:50 pm): and with *the best bagel ever*<br>Happy Geo (12:50 pm): oh bagel... <i>you complete me</i>';
	a[i++] = 'Sober Geo (4:34 pm): silly mortals<br>Sober Geo (4:34 pm): if i partaked in this arr pee-ing<br>Sober Geo (4:34 pm): i would slay you all with my fictional ness';
	a[i++] = 'Acriokun (2:58 pm): My mom called me shallow =|<br>Acriokun (2:59 pm): Because just because someone wears a tophat it makes me respect them';
	a[i++] = 'Boston (4:01 pm): We ain\'t going to hell in a handbasket anymore<br>Boston (4:01 pm): Now it\'s like a supersonic jet';
	a[i++] = 'Need I explain this again? Since the insult "gay" is overused and laughed at anymore the kids needed a new one. Hence "Emo".<br><br>~Rico (Emo Gerbil)';
	a[i++] = 'Wes (2:06 pm): Do you UK people get your own movies or do you get the same theatrical releases we do?<br>THS (2:06 pm): I HAVE NEVER HEARD OF AN AMERICAN ACTOR AND THE LAST FILM I WATCHED WAS "THE GREAT SCONE HEIST"';
	a[i++] = 'VCP responding to <a href=http://p072.ezboard.com/fsonichqcommunitythegroupmissions.showMessage?topicID=115.topic>Sonic movie</a>:<br>TETRIS THE MOVIE<br>AL PACHINO AS L-SHAPED BLOCK<br>R RATED LOL <img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif>';
//	a[i++] = 'Mew teleports herself and Painting to Prof. [insert name here], where Painting can get his first pokemon^^<br>Painting (9:45 pm): What the?<br>Painting (9:46 pm): Prof. Oak: >> Get out of my lab<br>Painting (9:46 pm): But I need a pokemon<br>Painting (9:46 pm): Prof. Oak: *points a gun*';
	a[i++] = 'Schnippshly:  I did not make this topic so it could be turned into some kind of... Place where people enjoy themselves!';
	a[i++] = 'CTSucks 007 (2:51 pm): BEHOLD MY RETURN AND TRIUMPH!<br>Deckman pushes CT off the internet<br>CTSucks 007 has left at 2:51 pm';
//	a[i++] = 'elevator man!!!1 (4:42 pm): in my own little reality your all naked<br>elevator man!!!1 (4:42 pm): and not furries<br>elevator man!!!1 (4:42 pm): and not male';
//	a[i++] = 'Rabid Rodent (8:43 pm): There\'s a hacker in my house. I had a hotdog sitting on my desk, and now it\'s gone.';
	a[i++] = 'Acriokun (1:21 am): I\'ve eaten twice my daily reccomended saturated fat in less than a minute before<br>Acriokun (1:21 am): Damn you cheesecake :(<br>Acriokun (1:21 am): Damn you to hell<br>Nuchtos (1:22 am): If cheesecake is going to hell, I\'m coming after.';
//	a[i++] = 'Blaze (5:43 pm): If I didn\'t have firewalls, you people would have like, little cameras sticking out of my computer filming me.';
//	a[i++] = 'Acrisnow (4:02 pm): If the sun were to flicker off for a whole second would we all die?<br>Sailor Evil (4:03 pm): well if its mass disappeared yes<br>Hot Sexual Winter (4:04 pm): would a second be long enough for the lack of gravity to do much to the orbit though?<br>Acrisnow (4:05 pm): According to quantum physisist Oprah Winfrey, if the sun were to dissappear, it would be her will and all would come to her for light';
//	a[i++] = 'stairmaster (12:59 pm): how can you be water? without your hydrogen?';
//	a[i++] = 'SH: <(:3 I don\'t trust it. *removes hat* >:3<br>JESUS CHRIST IT\'S A LION GET IN THE CAR';
	a[i++] = 'WB: So does this mean that Big the Cat is gonna eventually become Fat Buu?';
	a[i++] = 'MSNBC: Some eighth graders got an early start on April Fool\’s Day when they handed out doughnuts laced with laxatives to classmates, but it was no laughing matter when five were ticketed by police.<br>Spiner Storm: Man.<br><br>Gone are the days when we can make someone go poopy. =(';
	a[i++] = 'Aeva: My rabbit wouldn\'t stop humping the dog and it made mutant rabbit-dog creature thingies.';
	a[i++] = '<img src=http://img509.imageshack.us/img509/9347/duckdog6sp7.gif><br><i>what is this crime against nature</i> ~ Deck';
	a[i++] = '<marquee direction=right scrollamount=55><img border=0 src="http://img509.imageshack.us/img509/9347/duckdog6sp7.gif" /></marquee><br><center>BARURURURURURURU<br>~ Rabid</center>';
	a[i++] = 'Gyser: <a href=http://i2.photobucket.com/albums/y25/Guardian_Storm/shadowrun-6.png>Hear about the dyslexic, agnostic, insomniac?<br><br>He layed awake at night, wondering if there really was a Dog.</a>';
	a[i++] = 'Aeva: <a href=http://i2.photobucket.com/albums/y25/Guardian_Storm/shadowrun-6.png>Dog is dead.</a> Dog remains dead. And we have killed him. How shall we comfort ourselves, the murderers of all murderers? What was holiest and mightiest of all that the world has yet owned has bled to death under our knives: who will wipe this blood off us? What water is there for us to clean ourselves? What festivals of atonement, what sacred games shall we have to invent? Is not the greatness of this deed too great for us? Must we ourselves not become dogs simply to appear worthy of it?';
	a[i++] = 'Craig: Man... you know we\'re geeks when we know which exact stage a picture is depicting and go as far as to CORRECT it in which stage it should depict.';
	a[i++] = 'Shadow Hog: In Soviet Russia, YOU greatly offend THIS! }:O';
	a[i++] = 'CastorTroy: What, did your monocle fly off comically as you exclaimed "Well I never!" at the audacity of that hooligan for rocking out on Guitar Hero in the middle of that most civilized of retail establishments, Wal-Mart?';
	a[i++] = 'Rabid Rodent (6:04 pm): my math notebook was filled with doodles<br>Rabid Rodent (6:04 pm): like a sad bear head saying "I poop in the woods"';
	a[i++] = 'Justdaja (11:37 am): thats my goal in life...to be qotw\'d<br>Sailor Evil (11:38 am): qotw ;D<br>Justdaja (11:38 am): goal achieved, I can die happy now!!^^';
	a[i++] = 'Xagarath: Really apathetic people don\'t even reply to this topic.<br>.....<br>...<br>..<br>Dammit.';
	a[i++] = 'Forumer A: I\'ve got an idea for the Sonic comics but I can\'t tell you what it is.<br>Forumer B: Is it about Metal Sonic Armies?<br>Forumer A: AARGH! Get outta my head! ~ Miss Puar';
	a[i++] = 'VCP responding to <a href=http://p072.ezboard.com/fsonichqcommunitythegroupmissions.showMessage?topicID=115.topic>Sonic movie</a>:<br>TETRIS THE MOVIE<br>AL PACHINO AS L-SHAPED BLOCK<br>R RATED LOL <img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif><img src=http://www.mobiusforum.net/images/icons/smilies/crazy.gif>';
	a[i++] = 'Zedian (10:51 pm): They may not be fat in body, but they are fat in spirit';
	a[i++] = 'Acrio: Can Wacko Jacko mean one person please, this is getting confusing.';
	a[i++] = '[18:03] HSW: this is what happens when you ignore me<br>[18:03] HSW: you go insane';
	a[i++] = 'Wolfie (4:05 pm): ....I want to make an Oringina Box';
	a[i] = 'Just because I ram my ovacapacitor down your throat and lay eggs in your stomach doesn\'t mean I\'m an alien.';

	document.write(a[rand(i)]);
}

function EditPostNumbers() {
	var i = 0;
	var a = new Array();
	a[i++] = 0;
	a[i++] = 'sexy camilla';
	a[i++] = 'PiE!';
	a[i++] = '1/x³-2x²+12x+9';
	a[i++] = 'Delicious<br>Chihuahua';
	a[i++] = '*kicked<br>off a cliff by Dub*';
	a[i++] = 'Scooter<br>Their Daisyheads';
	a[i++] = '31337';
	a[i++] = rand(10000) - 5000;
	a[i++] = rand(10000) - 5000;
	a[i++] = 'ALL HAIL<br>THE BIOPOSTCOUNT!';
	a[i++] = 'cannot divide by 0';
	a[i++] = 'Won\'t someone<br><font size=+1>PLEASE</font><br>think of the children!?';
	a[i++] = '<img src=http://www.mobiusforum.net/chicken.gif>';
	a[i++] = rand(10000) - 5000;
	a[i++] = rand(10000) - 5000;
	a[i++] = 'Disembodied voice:<br>Name it Yancy<br>Barnabee Hubes';
	a[i++] = 0;
	a[i++] = 'What does<br>wang mean?';
	a[i++] = 'o.o';
	a[i++] = 'Why separate knob?';
	a[i++] = 'All your post are <br>belong to us';
	a[i++] = ':stsoP';
	a[i++] = 'Are you asking <br>for a CHALEEEEEENGE?';
	a[i++] = 'WHAT U MEEN BY THIS';
	a[i++] = 'I AM ERROR';
	a[i++] = '<br><img src=http://www.mobiusforum.net/integ.gif>';
	a[i++] = 'Sex is common<br>knowledge? O_O';
	a[i++] = 'Enough about me,<br> let\'s talk about my dress';
	a[i++] = 'OK I will ask it';
	a[i++] = 'Sex is more<br>fun alone';
	a[i++] = 'Sounds better than cold';
	a[i++] = 'Wooden';
	a[i++] = 'My grandma is a <br>trucker named <br>Hamburger Patty.';
	a[i++] = 'I thought you were<br>keeping count!';
	a[i++] = 'kill monkey';
	a[i++] = 'SSCCHHLLUURRPPYY!!!';
	a[i++] = 'Spreading your <br>legs session!';
	a[i++] = 'Too many';
	a[i++] = 'Not enough to count';
	a[i++] = 'I forget...';
	a[i++] = 'Go OUTSIDE';
	a[i++] = 'You may already<br>be a winner';
	a[i++] = 'rhymes with toasts:';
	a[i++] = 'I\'ll get the butter!';
	a[i++] = 'IT\'S DEATH TIME!!!<BR>YAY!!!';
	a[i++] = '(This post count is<br>missing and can not<br>be restored.)';
	a[i++] = 'Better than an<br>eight-cow woman!';
	a[i++] = 'Fission Mailed!';
	a[i++] = 'Super Spork Action!!!';
	a[i++] = '<<I trust the Posts.>>';
	a[i++] = 'I SHALL USE IT<BR>ON PEOPLE';
	a[i++] = 'hot 16/f/cali<BR>i surf';
	a[i++] = 'welcome to internet';
	a[i++] = '562.5 & a halfterwards';
	a[i++] = '#^_^#';
	a[i++] = 'Ahahahaha!! Post Count...<BR>that\'s funny...';
	a[i++] = 'You may be already<br>be a winner!';
	a[i++] = 'an <font color="00FF00"><i>INFERIOR</i></font> amount!!';
	a[i++] = '(Actual amount<br>may vary)';
	a[i++] = 'consult a doctor<br>being for using';
	a[i++] = 'Loading, please wait....';
	a[i++] = 'F for effort!';
	a[i++] = 'why the babies';
	a[i++] = '+1!';
	a[i++] = 'what is this some<br>kind of cold count.';
	a[i++] = 'Ingredients: <br>Carbonated water,<br>sodium citrate, sorbic acid,<br>panax ginseng root extract,<br>glucuronolactone, riboflavin,<br>cyanocobalamin.';
	a[i++] = 'OVER NINE THOUSAAAAND!';
	var AllTDs = document.getElementsByTagName("td");
	for(at=0; at < AllTDs.length; at++) {
		HTML = AllTDs[at].innerHTML;
		if(HTML.indexOf("Posts:") !=-1 && HTML.indexOf("class=m") ==-1 && HTML.indexOf("/tr") ==-1) {
			PostAuthor=HTML.match(/PublicProfile[^\>]+[\>]([^\<]+)[\<]/);
			if(PostAuthor[1]=='Craig Bayfield') {
				//NumPosts=HTML.match("Posts\:[^0-9]([0-9]+)");
				//s = -(parseInt(NumPosts[1])+1000000000);
				s = 'Supreme God King';
			}
			else if(PostAuthor[1]=='Harley Quinn hyenaholic') {
				s = 'I SPAM LIKE A NOOB <br>BECUZ I HAVE NO <br>SELF CONTROL';
			}
			else if(PostAuthor[1]=='Hyper Sonic Warrior') {
				s = 'INFINITY BIG BANG<br>STORM';
			}
			else {
				s = a[rand(i)];
			}
			AllTDs[at].innerHTML=AllTDs[at].innerHTML.replace(/Posts\:[^0-9][0-9]+/ig,'Posts: <b>'+s+'</b>');
		}
	}
}

/////////////// DESIGN ///////////////

var outertable = 0;
var uppertable;
var lowertable;
var bw;
var bg = (true) ? 'tonybg.jpg' : 'whitebg-tony.jpg';
var bgattach = (true) ? 'scroll' : 'fixed';
var bgpos = (true) ? '-120px -76px' : '0px 0px';
var h4 = (document.all ? '' : 'h4{margin-bottom:10px} h4 * {vertical-align:-14px} h4 img {vertical-align:top}');

function lib_bwcheck(){
	this.dom=document.getElementById?1:0
	this.opera5=navigator.userAgent.indexOf("Opera 5")>-1
	this.ie=(document.all && !this.opera5)?1:0;
	this.ns6=(this.dom && parseInt(this.ver) >= 5)?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	var postingtools = getObject('postingtools');
	this.innerHTML = (typeof postingtools.innerHTML == 'string')?1:0
	return this
}

function Topic(url, title){
	this.url=url
	this.title=title
	return this
}

var forum;
function css() {
	//Based on css script by: ~kanwulf~

	// Enter the full path to the directory where your .css files are located
	var base = 'http://www.lighthead.net/misc/mofo/themes/css/';

	var reg_ex = new RegExp("/[bf]sonichqcommunity(\\w+)", "i");
	var page_url = location.href;
	reg_ex.test(page_url);
	forum = RegExp.$1;
	if(location.href.indexOf('bsonichqcommunity') > 0) forum = 'main';

	switch(forum) {
		case 'mobiusforum': css = ""; break;
		case 'frm8': css = "knothole"; break;
		case 'frm16': case 'frm56': css = "spa"; break;
		case 'frm23': css = "games"; break;
		case 'frm51': css = "test"; break;
		default: css = "";
	}

	if(location.href.search('fsonichqcommunityfrm24\\w+\\=84\\.') != -1) {
		css = "sailor.css";
	}
	else if(location.href.search('fsonichqcommunityfrm40') != -1) {
		var nummidis = 2;
		day = new Date()
		seed = day.getTime()
		ran = ((day.getMinutes()%2)+1) // parseInt(((seed - (parseInt(seed/1000,10) * 1000))/10)/100*nummidis + 1,10)
		css = 'random' + ran;
	}

	if(css) document.write('<link rel="stylesheet" href="' + base + css + '.css">');
}
css();


var IE = (document.all && document.fireEvent && navigator.platform == "Win32") ? true : false;
var OPERA = window.opera ? true : false;

/***** PNG Fix for IE *****/
function correctPNG()
{
   for(var i=0; i<document.images.length; i++)
   {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()

      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
      {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText

         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle

         var strNewHTML = "<span " + imgID + imgClass + imgTitle
             + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;"
             + imgStyle + ";"      + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
             + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"

         img.outerHTML = strNewHTML
         i = i-1
      }
   }
}
if(window.attachEvent) window.attachEvent("onload", correctPNG);


/////

/////////////// CENSOR ////////////////

function javacensor()
{
	badword = new Array // Write in lowercase
	(
		'dawg',
		'shite',
		':donald:',
		':fired:',
		'retarded',
		'shit',
		'bitch',
		'cunt',
		'fuck',
		'dildo',
		'nigger',
		'nigga',
		'outwar',
		'everwars',
		'nucleardog',
		'goatse',
		'tubgirl'
	)
	goodword = new Array
	(
		'I love you',
		'pile of Mr. Bigglesworth sprites',
		'<embed src="http://www.mobiusforum.net/images/flash/donald.swf" quality="high" bgcolor="#000000" width="24" height="25" name="donald" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />',
		'<embed src="http://www.mobiusforum.net/images/flash/fired.swf" quality="high" bgcolor="#000000" width="24" height="25" name="donald" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />',
		'mentally hilarious',
		'pile of Mr. Bigglesworth sprites', // shit
		'daisyhead', // bitch
		'wargleman', // cunt
		'scooter', // fuck
		'intrument', // dildo
		'Dr. McDoomzor', // nigger
		'Dr. McDoomzor', // nigga
		'ebilurl', // outwar
		'ebilurl', // everwars
		'ebilurl', // nucleardog
		'ebilurl', // goatse
		'ebilurl' // tubgirl
	)
	saveword = new Array // Keep these words from getting garbled
	(
		'shitake',
		'shita',
		'outward',
		'snigger',
		'script',
		'applet'
	)
	cni = 0
	while (document.getElementById("announcements").childNodes[cni].nodeName.toLowerCase() !== "table")
	{
		cni ++
	}
	postlist = document.getElementById("announcements").childNodes[cni].rows
	for (pli = 1; pli < postlist.length; pli ++)
	{
		if (postlist[pli].cells[1].className == "m")
		{
			for(bwi = 0; bwi < badword.length; bwi ++)
			{
				censormsg = postlist[pli].cells[1].innerHTML.toLowerCase()
				while (censormsg.indexOf(badword[bwi]) !== -1)
				{
					savewordflag = 0
					for (swi = 0; swi < saveword.length; swi ++)
					{
						if (censormsg.indexOf(badword[bwi]) >= censormsg.indexOf(saveword[swi]) && (censormsg.indexOf(badword[bwi]) + badword[bwi].length) <= (censormsg.indexOf(saveword[swi]) + saveword[swi].length))
						{
							savewordflag = 1
						}
					}
					censormsgx = new Array()
					censormsgx[0] = postlist[pli].cells[1].innerHTML.substr(0, censormsg.indexOf(badword[bwi]))
					censormsgx[1] = postlist[pli].cells[1].innerHTML.substr((censormsg.indexOf(badword[bwi]) + badword[bwi].length), (censormsg.length - (censormsg.indexOf(badword[bwi]) + badword[bwi].length + 1)))
					if (savewordflag == 1)
					{
						badwordsave = badword[bwi].substr(0, 1) + "<!-- save -->" + badword[bwi].substr(1, (badword[bwi].length - 1))
						postlist[pli].cells[1].innerHTML = censormsgx[0] + badwordsave + censormsgx[1]
					}
					else
					{
						postlist[pli].cells[1].innerHTML = censormsgx[0] + goodword[bwi] + censormsgx[1]
					}
					censormsg = postlist[pli].cells[1].innerHTML.toLowerCase()
				}
			}
		}
	}
}

