//split up tables
var him = []; var fim = [];


// EDIT HERE
var type = 3;
// 1 = Original ACS type. Text in head image.
// 2 = Head/Base images with cat name in normal row.
// 3 = Head/Base images with cat name in the Forum Name row spot.

var markAsReadType = 1;
// 0 = Mark as read button is not shown at all.
// 1 = Mark as read button is in own row in final category.
// 2 = Mark as read button is in the footer image underneath final category

him["URL"] = "URL OF HEAD IMAGE"; // URL of your header image. Required only if using type 1.
him["height"] = 19; // Pixel height of your head image. Required if using a head image

fim["URL"] = "URL OF BASE IMAGE"; // URL of your footer image. Required only if markAsReadType is 2
fim["height"] = 19; // Pixel height of your base image. Required if using a footer image.

var forumName = 0;
// 0 = Don't include the forum name row. Note: This can mess up the cell sizes.
// 1 = Include the forum name row.

var defaultCats = [ // These are the category ids for the categoriess that will be hidden on the first time the page is viewed. Last one does not have a comma.
"category1id",
"category2id",
"category3id",
"category4id" // NO COMMA ON LAST LINE
];

var spacing = 15; // Space between the categories.

// DO NOT EDIT
var aTB = document.getElementsByTagName("TABLE");
var isIE = (document.all?true:false);

if(!document.cookie.match(/debo=1/i)){
defaultCats.push("debo");
for(a=0;a<defaultCats.length;a++){
document.cookie = defaultCats[a]+"=1;expires="+(new Date()).toGMTString().replace(/\d{4}/,"2050");
}
}

function hideShow(i){
var i2 = document.getElementById(i);
i2.style.display = (i2.style.display=="none"?"":"none");
document.cookie = i+"="+(i2.style.display == ""?"0":"1")+";expires="+(new Date()).toGMTString().replace(/\d{4}/,"2050");
}

var div = document.createElement("DIV");
var sp = document.createElement("DIV");
sp.style.height = spacing;

if(location.href.match(/action=home$/i) || !location.href.match(/(action|board)=/i))
document.write("<script type='text/Javascript' src='http://www.iycatacombs.com/codes/acsv3/normal"+type+".js'><\/script>");








//<!--
/* Code for user's display name in posts or PMs
by california, [url]http://socal.proboards26.com[/url] */

var usercode="\\[#username\\]";

var td=document.getElementsByTagName("td");
var re = new RegExp(usercode,"g");
if(!location.href.match(/headersfooters/) && !document.postForm && !document.ammForm){
    if(document.title.match(re)){
        document.title=document.title.replace(re, pb_displayname);
    }
    for(i=0;i<td.length;i++){
        if(td[i].innerHTML.match(re)){
            td[i].innerHTML = td[i].innerHTML.replace(re, pb_displayname);
        }
    }
}
// -->







/*
Leave message in deleted posts
by Todge
Copyright © 2006
Please keep this header intact
*/

//Edit below...

var staffMessage = 'This message has been deleted by a Staff Member.';
var memberMessage = 'This message was deleted by the original poster.';

//Edit above...



if(location.href.match('action=display'))
{
var miniPro = document.getElementsByTagName('td');
for(t=0; t<miniPro.length; t++)
{
if(miniPro[t].width=='20%'&&miniPro[t].className.match('windowbg')&&miniPro[t].vAlign=='top')
{
var del = miniPro[t+1].getElementsByTagName('a');
for(a=0; a<del.length; a++)
{

if(del[a].href.match('action=deletepost') && !pb_username.match("serge"))
{
if(!pb_username.match("serge")&& (miniPro[t+1].innerHTML.match(memberMessage) || miniPro[t+1].innerHTML.match(staffMessage)))
{
del[a].style.display = 'none';
del[a-1].style.display = 'none';
}
if(miniPro[t].innerHTML.match('user='+pb_username))
{
del[a].href = del[a-1].href+'&message='+memberMessage;
}
else
{
//del[a].href = del[a-1].href+'&message='+staffMessage;
}}}}}}

if(location.href.match('action=modifypost') && (document.postForm.message.value==memberMessage||document.postForm.message.value==staffMessage))
{
var formTable;
var tbl = document.getElementsByTagName('a');

for(t=0; t<tbl.length; t++)
{
if(tbl[t].className=='nav')
{
tbl[t].style.display='none';
tbl[t].parentNode.removeChild(tbl[t].nextSibling);
formTable = tbl[t].parentNode.parentNode.parentNode.parentNode;
}}

var verifyDel = formTable.getElementsByTagName('TD');
for(t=0; t<verifyDel.length; t++)
{
if(!verifyDel[t].innerHTML.match('value="Modify Post"'))
{
verifyDel[t].parentNode.style.display='none';
}
else
{
if(verifyDel[t].firstChild.nodeName=='FONT')
{
verifyDel[t].firstChild.size=5;
verifyDel[t].firstChild.innerHTML='Are you sure you want to delete this post?';

var button = verifyDel[t].getElementsByTagName('input')
for(i=0; i<button.length; i++)
{
if(button[i].value=='Modify Post')
{
button[i].value='Delete';
}
else if(button[i].value=='Reset')
{
button[i].value='Cancel';
button[i].onmousedown = function(){location.href=document.referrer;}
}
else
{
button[i].style.display='none';
}}}}}}



/*
Sub Boards listing in board cells
Created by ProBoards.com
[url]http://support.proboards.com[/url] - for support.
*/

if(location.href.match(/\/(index\.cgi(\?(action=home)?|#\w+)?)?$/i)) {

var exclude = ["archive"];
var boardCell = document.getElementsByTagName('td');
var boards = new Array ();
var subboards = new Array ();
var forumJumpOpts = document.getElementById('forumjump').getElementsByTagName('option');
var boardNumber = 0;
var c = 0;

for (a=0;a<forumJumpOpts.length;a++) {
if (forumJumpOpts[a].innerHTML.match(/^- (.*)$/) && (forumJumpOpts[a+1] && forumJumpOpts[a+1].innerHTML.match(/--- (.*)$/))) {
forumJumpOpts[a].value.match(/board\=(.*)$/);
if (exclude.join("-").match(new RegExp("(^|-)"+RegExp.$1+"(-|$)","i")))
continue;
boards.push(RegExp.$1);
subboards[boardNumber] = new Array ();
while (forumJumpOpts[a+1] && forumJumpOpts[a+1].innerHTML.match(/--- (.*)$/)) {
subboards[boardNumber].push(RegExp.$1+'-|-'+forumJumpOpts[a+1].value);
a++;
}
boardNumber++;
}
}

for (b=6;b<boardCell.length;b++) {
var board = 'board='+boards[c]+'$';
if (boardCell[b].width == "66%" && boardCell[b].getElementsByTagName('a')[0].href.match(board) && subboards[c]) {
for (d=0;d<subboards[c].length;d++)
boardCell[b].innerHTML += ((d == 0) ? '<br />[ <font size="1">Sub Boards:</font>' : ',') + ' <a href="'+subboards[c][d].split("-|-")[1]+'" class="nav">'+subboards[c][d].split("-|-")[0]+'</a>' + ((d == subboards[c].length-1) ? ' ]' : '');
c++
}

}
}