if (location.href.match(/board=/i))
{
/*
Main page/boards image highlight

Created by Peter

This code cannot be reposted at anywhere other than SSDesigns or ProBoards, without permission.

This header must stay intact at all times.
*/

// Image for the mouseover
var overImage = "http://img.photobucket.com/albums/v498/mozambique/tco/thread.jpg";

var iCell = document.getElementsByTagName("td");

for(c = 0; c < iCell.length; c ++){
    if(iCell.item(c).className.match(/^windowbg/i) && iCell.item(c).width.match(/^(66|48|43)%/)){
       if(document.all){
          iCell.item(c).onmouseenter = function(){
             this.style.backgroundImage = "url('" + overImage + "')";
          }
          iCell.item(c).onmouseleave = function(){
             this.style.backgroundImage = "";
          }
       } else {
          for(a = 0; a < iCell.item(c).attributes.length; a ++){
             if(iCell.item(c).attributes.item(a).nodeName.match(/^onmouseover$/i)){
                with(iCell.item(c).attributes.item(a)){
                   nodeValue = "this.style.backgroundImage = 'url(\\'" + overImage + "\\')'; " + nodeValue;
                }
             }
             if(iCell.item(c).attributes.item(a).nodeName.match(/^onmouseout$/i)){
                with(iCell.item(c).attributes.item(a)){
                   nodeValue = "this.style.backgroundImage = ''; " + nodeValue;
                }
             }
          }
       }
    }
}

/* Change Announcements Divider Class & Height */
var td=document.getElementsByTagName("td");
for(i=0;i<td.length;i++){
if(td[i].colSpan=="7" && td[i].className=="windowbg2" && td[i].height=="5"){
td[i].height="15";
td[i].className="anndiv";
}
}

}
document.write('</td></tr></table><img src="http://img.photobucket.com/albums/v498/mozambique/tco/base.jpg" border="0" /></br><a href="http://charmedskins.co.nr" target="_Blank"><img src="http://img.photobucket.com/albums/v498/mozambique/tco/cop_off.jpg" border="0" /></a></center></br>');
document.write('<style type="text/css"> textarea {color: 000000;background-color: F1E6E4;border: 1px solid #000000;}.catbg {text-align: center;}</style>');

// Gradients in Popups by CD
// Do not redistribute without permission

popupGrad = "http://img.photobucket.com/albums/v498/mozambique/tco/tittlebg.gif";

function popWindow(x){
xWin = window.open("index.cgi?action="+x, "popWindow2", "directories=0, location=0, menubar=0, resizable=1, scrollbars=1, status=1, toolbar=0, top=100, left=100, width=400, height=275");
xWin.focus();
if(!document.all)
xWin.window.onload = function(){
xWin.document.styleSheets[0].insertRule(".popuptitlebg { background-image: url("+popupGrad+") }",0);
}
else
setTimeout("ieCheck()",500);
}

function ieCheck(){
if(xWin.document.getElementsByTagName("TD").length > 2)
xWin.document.styleSheets[0].addRule(".popuptitlebg","background-image: url("+popupGrad+")");
else
setTimeout("ieCheck()",500);
}

/* switch-it */
var font=document.getElementsByTagName("font");
function switchit(t1,t2){
    for(i=0;i<font.length;i++){
        var f=font[i].innerHTML;
        if(f.match(t1) && !location.href.match(/(headers|modify)/)){
            font[i].innerHTML=f.replace(t1,t2);
        }
    }
}
switchit(/on <b>tod/i,'<b>Tod');
switchit(/on yest/i,'Yest');

// Image rollover effect

function doRollOver(oldsrc, newsrc, title){
    var img = {
       oldsrc: null,
       oldtitle: null
    };
    var iImg = document.getElementsByTagName("img");
    for(i = 0; i < iImg.length; i ++){
       if(iImg.item(i).src.match(new RegExp(oldsrc))){
          iImg.item(i).onmouseover = function(){
             img.oldsrc = this.src;
             img.oldtitle = this.alt;
             this.src = newsrc;
             this.title = title;
          }
          iImg.item(i).onmouseout = function(){
             this.src = img.oldsrc;
             this.title = img.oldtitle;
          }
       }
    }
}

doRollOver("http://img.photobucket.com/albums/v498/mozambique/tco/cop_off.jpg", "http://img.photobucket.com/albums/v498/mozambique/tco/cop_on.jpg", "Template by Charmed_boy - www.CharmedSkins.co.nr     All images Copyrighted to Charmed Skins - 2007.");

/*
Forum width
*/

var boardwidth = document.getElementsByTagName('TABLE');
for(i=0;i<boardwidth.length;i++) {
if(boardwidth[i].width=="92%"){
boardwidth[i].width='631';
}
}