/*
contents:Contents;Voting_Page:Voting Page;spirit_index:Spirit Index;spirit_BOZ:Battle of Zodiac;fun_battles:Fun Battles;spirit_s2s:Spirits 2 Shine;spirit_wq:Wizards Quest;spirit_SD:Southern Dreams;EG:EmperorsGate;LDC:LilDragonCastle;spirit_cd:Camalot Dreams;spirit_ge:Golden Elite;spirit_BOTA:BOTA;spirit_rumbles:The Rumbles;spirit_OCN:Our Country Nest;spirit_wotn:WebmastersOTNet;spirit_BOD:Battle of Dragons;JRPirates:Jolly Roger Pirates;spirit_wl:Web Leagues;voting_page2:Topsite Voting;
*/
/*
TEXTHIGHLIGHT:#CC6666;GRAPHICHIGHLIGHT:yes;FILENAME:Basic_Buttons_Royal_Blue;TEXTMOUSEOVER:#CC6666;BACKGROUNDHIGHLIGHT:none;FONTFORMATBOLD:Bold;GRAPHIC:Basic_Buttons;GRAPHICMOUSEOVER:yes;FONTSTYLE:Times New Roman,adobe-times,Times;BACKGROUNDMOUSEOVER:none;ORIENTATION:HORIZONTAL;STYLENAME:Basic_Buttons;GRAPHICSTYLE:BUTTONS;NUMPAGES:20;FONTCOLOR:#000000;FONTSIZE:2;GRAPHICCOLOR:Purple;VERTICALSPACE:14;COLORSCHEME:Royal_Blue;HORIZONTALSPACE:14;
*/
var tabWidth = 114;
var tabHeight = 31;
var buttonsPerRow = 6; 
var nVerticalLinkGapInCell = 14;
var nHorizontalLinkGapInCell = 14;

Spirit_PagesbuttonOnImage = new Image(tabWidth, tabHeight);
Spirit_PagesbuttonOnImage.src = "/~site/Layout/Buttons/Basic_Button_Lavender.gif";
Spirit_PagesbuttonOffImage = new Image(tabWidth, tabHeight);
Spirit_PagesbuttonOffImage.src = "/~site/Layout/Buttons/Basic_Button_Purple.gif";
function Spirit_PagesmouseOn(graphicName) { document.images[graphicName].src = Spirit_PagesbuttonOnImage.src; }
function Spirit_PagesmouseOff(graphicName) { document.images[graphicName].src = Spirit_PagesbuttonOffImage.src; }


function Spirit_PagestextMouseOn(textObj) { textObj.style.color="#CC6666"; }
function Spirit_PagestextMouseOff(textObj) { textObj.style.color="#000000"; }

function Spirit_PagesgetMouseOverHandler(strImgName, textObjName, bIsCurrPage) {
 
if (bIsCurrPage) return '';

var strHTMLMouseOver = '';
var strHTMLMouseOut = '';

if (navigator.userAgent.indexOf("IE") != -1) {
strHTMLMouseOver += 'Spirit_PagesmouseOn(\'' + strImgName + '\');';
strHTMLMouseOut += 'Spirit_PagesmouseOff(\'' + strImgName + '\');';
}


strHTMLMouseOver += 'Spirit_PagestextMouseOn(' + textObjName + ');';
strHTMLMouseOut += 'Spirit_PagestextMouseOff(' + textObjName + ');';

return 'onMouseOver="' + strHTMLMouseOver + '" onMouseOut="' + strHTMLMouseOut + '"';
}
function Spirit_PagesisCurrentPage(currentPage) {
var page = new String(window.location);
var size = currentPage.length;
var tildePage = currentPage.substring(0, size - 5 ); 
tildePage += "~"; 
if(page.indexOf(currentPage) != -1 || page.indexOf(tildePage) != -1 ) { 
return true;
} else {
return false;
}
}
function Spirit_PagesgetHTML(navID, strLinkName, strImg, strLink, nOptionNum, strImgName, bLastOption) {
var nRowIndex = 0;
var nColIndex = 0;
strImgName = strImgName + '_' + navID;

 

nRowIndex = Math.floor((nOptionNum-1)/buttonsPerRow);
nColIndex = (nOptionNum - 1) % buttonsPerRow;


var bIsCurrPage = Spirit_PagesisCurrentPage(strLink);
if (bIsCurrPage) {

strImg = '/~site/Layout/Buttons/Basic_Button_Lavender.gif';


strFontColor = '#CC6666';

} else {
strFontColor = '#000000';
}

if (navigator.userAgent.indexOf("IE") != -1) {
return Spirit_PagesgetIEHTML(strLinkName, strImg, strLink, nOptionNum, nRowIndex, nColIndex, strImgName, strFontColor, bIsCurrPage);
} else {
return Spirit_PagesgetNSHTML(strLinkName, strImg, strLink, nOptionNum, nRowIndex, nColIndex, strImgName, bLastOption, strFontColor, bIsCurrPage);
}
}
function goToLink(link) { parent.location = link; }
function Spirit_PagesgetIEHTML(strLinkName, strImg, strLink, nOptionNum, nRowIndex, nColIndex, strImgName, strFontColor, bIsCurrPage) {
var strHTML;
var nLeftPos = 0;
var nTopPos = 0;
var divID = "link_text_" + strImgName;
nTopPos = (-2 * tabHeight * (nOptionNum - 1)) + ((tabHeight + nVerticalLinkGapInCell) * nRowIndex);
nLeftPos = nColIndex * (tabWidth + nHorizontalLinkGapInCell);
strHTML = '<DIV style="position:relative;top:' + nTopPos + 'px;left:'
+ nLeftPos + 'px;width:' + tabWidth + 'px;height:'+ tabHeight + 'px">';
strHTML += '<A TARGET="_parent" HREF="' + strLink + '" ';
strHTML += Spirit_PagesgetMouseOverHandler(strImgName, divID, bIsCurrPage);
strHTML += '><IMG SRC="' + strImg + '" NAME="' + strImgName + '" WIDTH=' + tabWidth + ' HEIGHT=' + tabHeight + ' BORDER="0">';
strHTML += '</A>'
strHTML += '<DIV ALIGN="center" style="position:relative;top:-' + tabHeight + 'px;left:0px;width:' + tabWidth + 'px;height:' + tabHeight + 'px;cursor:hand" ' + Spirit_PagesgetMouseOverHandler(strImgName, divID, bIsCurrPage) + ' onClick=goToLink("' + strLink + '")>';
strHTML += '<IMG SRC="/tp.gif" HEIGHT="' + tabHeight + '" WIDTH="1" ALIGN="absmiddle">';
strHTML += '<FONT FACE="Times New Roman,adobe-times,Times" SIZE="2">'; 
var strFormattingStart = ''; 
var strFormattingEnd = '';


strFormattingStart += '<B>';
strFormattingEnd += '</B>';

strHTML += '<SPAN ID="' + divID + '" STYLE="color:' + strFontColor + '"';
strHTML += '>' + strFormattingStart + strLinkName + strFormattingEnd + '</SPAN>';
strHTML += "</FONT></DIV></DIV>";
return strHTML;
}
function Spirit_PagesgetNSHTML(strLinkName, strImg, strLink, nOptionNum, nRowIndex, nColIndex, strImgName, bLastOption, strFontColor, bIsCurrPage) {
var strHTML = '';
if (nOptionNum == 1) {
strHTML += '<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"';
 

var nTblWidth;
if(20 > buttonsPerRow) {
nTblWidth = (tabWidth+nHorizontalLinkGapInCell) * buttonsPerRow;
} else {
nTblWidth = (tabWidth+nHorizontalLinkGapInCell) * 20;
}

strHTML += ' WIDTH="' + nTblWidth + '"';

strHTML += '>';
}
if (nColIndex == 0) strHTML += '<TR>';
strHTML += '<TD WIDTH="'+ tabWidth + '" HEIGHT="' + tabHeight + '" ALIGN="CENTER" VALIGN="MIDDLE" BACKGROUND="' + strImg + '">';
var strFormattingStart = ''; 
var strFormattingEnd = '';


strFormattingStart += '<B>';
strFormattingEnd += '</B>';

strHTML += '<A TARGET="_parent" HREF="' + strLink + '">';
strHTML += '<FONT COLOR="' + strFontColor + '" FACE="Times New Roman,adobe-times,Times" SIZE="2">'; 
strHTML += strFormattingStart + strLinkName + strFormattingEnd + '</A></FONT>';
strHTML += '</TD>';

 
strHTML += '<TD>';
strHTML += '<IMG SRC="/tp.gif" WIDTH="'+nHorizontalLinkGapInCell+'" HEIGHT="1" BORDER="0" ALT="">';
strHTML += '</TD>';

if (bLastOption || nColIndex == buttonsPerRow - 1) strHTML += '</TR>';


if (bLastOption) strHTML += '</TABLE>';
return strHTML;
}
function Spirit_PagesnavElement() {
if(typeof Spirit_Pagescounter == "undefined") {
Spirit_Pagescounter = 1;
} else {
Spirit_Pagescounter += 1;
}
var navID = Spirit_Pagescounter;
if (navigator.userAgent.indexOf("Mozilla/3") != -1) {
var msg = 'Sorry, since you are using an old version of Netscape, you may not be able to access all the pages in this Web site.';	
document.write(msg);
} else {
document.write(Spirit_PagesgetHTML(navID, "Contents", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "contents.html", 1, "Spirit_PagesGRAPHIC1", 0));
document.write(Spirit_PagesgetHTML(navID, "Voting Page", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "Voting_Page.html", 2, "Spirit_PagesGRAPHIC2", 0));
document.write(Spirit_PagesgetHTML(navID, "Spirit Index", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_index.html", 3, "Spirit_PagesGRAPHIC3", 0));
document.write(Spirit_PagesgetHTML(navID, "Battle of Zodiac", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_BOZ.html", 4, "Spirit_PagesGRAPHIC4", 0));
document.write(Spirit_PagesgetHTML(navID, "Fun Battles", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "fun_battles.html", 5, "Spirit_PagesGRAPHIC5", 0));
document.write(Spirit_PagesgetHTML(navID, "Spirits 2 Shine", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_s2s.html", 6, "Spirit_PagesGRAPHIC6", 0));
document.write(Spirit_PagesgetHTML(navID, "Wizards Quest", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_wq.html", 7, "Spirit_PagesGRAPHIC7", 0));
document.write(Spirit_PagesgetHTML(navID, "Southern Dreams", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_SD.html", 8, "Spirit_PagesGRAPHIC8", 0));
document.write(Spirit_PagesgetHTML(navID, "EmperorsGate", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "EG.html", 9, "Spirit_PagesGRAPHIC9", 0));
document.write(Spirit_PagesgetHTML(navID, "LilDragonCastle", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "LDC.html", 10, "Spirit_PagesGRAPHIC10", 0));
document.write(Spirit_PagesgetHTML(navID, "Camalot Dreams", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_cd.html", 11, "Spirit_PagesGRAPHIC11", 0));
document.write(Spirit_PagesgetHTML(navID, "Golden Elite", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_ge.html", 12, "Spirit_PagesGRAPHIC12", 0));
document.write(Spirit_PagesgetHTML(navID, "BOTA", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_BOTA.html", 13, "Spirit_PagesGRAPHIC13", 0));
document.write(Spirit_PagesgetHTML(navID, "The Rumbles", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_rumbles.html", 14, "Spirit_PagesGRAPHIC14", 0));
document.write(Spirit_PagesgetHTML(navID, "Our Country Nest", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_OCN.html", 15, "Spirit_PagesGRAPHIC15", 0));
document.write(Spirit_PagesgetHTML(navID, "WebmastersOTNet", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_wotn.html", 16, "Spirit_PagesGRAPHIC16", 0));
document.write(Spirit_PagesgetHTML(navID, "Battle of Dragons", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_BOD.html", 17, "Spirit_PagesGRAPHIC17", 0));
document.write(Spirit_PagesgetHTML(navID, "Jolly Roger Pirates", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "JRPirates.html", 18, "Spirit_PagesGRAPHIC18", 0));
document.write(Spirit_PagesgetHTML(navID, "Web Leagues", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "spirit_wl.html", 19, "Spirit_PagesGRAPHIC19", 0));
document.write(Spirit_PagesgetHTML(navID, "Topsite Voting", "/~site/Layout/Buttons/Basic_Button_Purple.gif", "voting_page2.html", 20, "Spirit_PagesGRAPHIC20", 1));

}
}
function Spirit_PagesnetscapeDivCheck() {
var strAppName = navigator.appName;
var appVer = parseFloat(navigator.appVersion);
if ( (strAppName == "Netscape")&&
(appVer >= 4.0 && appVer < 5) ) { 
document.write("</DIV>");
}
}
var Spirit_Pagescounter;
Spirit_PagesnavElement();
Spirit_PagesnetscapeDivCheck();
