/*
saddledoctor:Home;usedsaddles:Used Saddles;ridinglessons:Riding Lessons;daycamp:Day Camp;parties:Parties;events:Events;kingpeppy:TSD King Peppy;saddletackrepair:S & T Repair;history:History;
*/
/*
TEXTHIGHLIGHT:#FF0033;FONTFORMATITALIC:Italic;GRAPHICHIGHLIGHT:yes;BACKGROUNDHIGHLIGHT:none;TEXTMOUSEOVER:#000000;FONTFORMATBOLD:Bold;FILENAME:Basic_Button_Royal_Blue;GRAPHIC:Basic_Buttons;COLOR NAME *:Black;GRAPHICMOUSEOVER:yes;BACKGROUNDMOUSEOVER:none;FONTSTYLE:Courier New,adobe-courier,Courier;ORIENTATION:VERTICAL;NUMPAGES:9;GRAPHICSTYLE:BUTTONS;STYLENAME:Basic_Button;FONTSIZE:2;FONTCOLOR:#000000;GRAPHICCOLOR:Tan;VERTICALSPACE:10;COLORSCHEME:Royal_Blue;HORIZONTALSPACE:10;
*/
var tabWidth = 114;
var tabHeight = 31;
var buttonsPerRow = 6; 
var nVerticalLinkGapInCell = 10;
var nHorizontalLinkGapInCell = 10;

homebuttonOnImage = new Image(tabWidth, tabHeight);
homebuttonOnImage.src = "/~site/Layout/Buttons/Basic_Button_Brown.gif";
homebuttonOffImage = new Image(tabWidth, tabHeight);
homebuttonOffImage.src = "/~site/Layout/Buttons/Basic_Button_Tan.gif";
function homemouseOn(graphicName) { document.images[graphicName].src = homebuttonOnImage.src; }
function homemouseOff(graphicName) { document.images[graphicName].src = homebuttonOffImage.src; }


function hometextMouseOn(textObj) { textObj.style.color="#000000"; }
function hometextMouseOff(textObj) { textObj.style.color="#000000"; }

function homegetMouseOverHandler(strImgName, textObjName, bIsCurrPage) {
 
if (bIsCurrPage) return '';

var strHTMLMouseOver = '';
var strHTMLMouseOut = '';

if (navigator.userAgent.indexOf("IE") != -1) {
strHTMLMouseOver += 'homemouseOn(\'' + strImgName + '\');';
strHTMLMouseOut += 'homemouseOff(\'' + strImgName + '\');';
}


strHTMLMouseOver += 'hometextMouseOn(' + textObjName + ');';
strHTMLMouseOut += 'hometextMouseOff(' + textObjName + ');';

return 'onMouseOver="' + strHTMLMouseOver + '" onMouseOut="' + strHTMLMouseOut + '"';
}
function homeisCurrentPage(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 homegetHTML(navID, strLinkName, strImg, strLink, nOptionNum, strImgName, bLastOption) {
var nRowIndex = 0;
var nColIndex = 0;
strImgName = strImgName + '_' + navID;
 
nColIndex = 0;
nRowIndex = nOptionNum - 1;


var bIsCurrPage = homeisCurrentPage(strLink);
if (bIsCurrPage) {

strImg = '/~site/Layout/Buttons/Basic_Button_Brown.gif';


strFontColor = '#FF0033';

} else {
strFontColor = '#000000';
}

if (navigator.userAgent.indexOf("IE") != -1) {
return homegetIEHTML(strLinkName, strImg, strLink, nOptionNum, nRowIndex, nColIndex, strImgName, strFontColor, bIsCurrPage);
} else {
return homegetNSHTML(strLinkName, strImg, strLink, nOptionNum, nRowIndex, nColIndex, strImgName, bLastOption, strFontColor, bIsCurrPage);
}
}
function goToLink(link) { parent.location = link; }
function homegetIEHTML(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 += homegetMouseOverHandler(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" ' + homegetMouseOverHandler(strImgName, divID, bIsCurrPage) + ' onClick=goToLink("' + strLink + '")>';
strHTML += '<IMG SRC="/tp.gif" HEIGHT="' + tabHeight + '" WIDTH="1" ALIGN="absmiddle">';
strHTML += '<FONT FACE="Courier New,adobe-courier,Courier" SIZE="2">'; 
var strFormattingStart = ''; 
var strFormattingEnd = '';

strFormattingStart += '<I>';
strFormattingEnd += '</I>';


strFormattingStart += '<B>';
strFormattingEnd += '</B>';

strHTML += '<SPAN ID="' + divID + '" STYLE="color:' + strFontColor + '"';
strHTML += '>' + strFormattingStart + strLinkName + strFormattingEnd + '</SPAN>';
strHTML += "</FONT></DIV></DIV>";
return strHTML;
}
function homegetNSHTML(strLinkName, strImg, strLink, nOptionNum, nRowIndex, nColIndex, strImgName, bLastOption, strFontColor, bIsCurrPage) {
var strHTML = '';
if (nOptionNum == 1) {
strHTML += '<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0"';

strHTML += '>';
}
if (nColIndex == 0) strHTML += '<TR>';
strHTML += '<TD WIDTH="'+ tabWidth + '" HEIGHT="' + tabHeight + '" ALIGN="CENTER" VALIGN="MIDDLE" BACKGROUND="' + strImg + '">';
var strFormattingStart = ''; 
var strFormattingEnd = '';

strFormattingStart += '<I>';
strFormattingEnd += '</I>';


strFormattingStart += '<B>';
strFormattingEnd += '</B>';

strHTML += '<A TARGET="_parent" HREF="' + strLink + '">';
strHTML += '<FONT COLOR="' + strFontColor + '" FACE="Courier New,adobe-courier,Courier" SIZE="2">'; 
strHTML += strFormattingStart + strLinkName + strFormattingEnd + '</A></FONT>';
strHTML += '</TD>';
 
strHTML += '</TR>';
strHTML += '<TR><TD>';
strHTML += '<IMG SRC="/tp.gif" WIDTH="1" HEIGHT="'+nVerticalLinkGapInCell+'" BORDER="0" ALT=""/>';
strHTML += '</TD></TR>';


if (bLastOption) strHTML += '</TABLE>';
return strHTML;
}
function homenavElement() {
if(typeof homecounter == "undefined") {
homecounter = 1;
} else {
homecounter += 1;
}
var navID = homecounter;
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(homegetHTML(navID, "Home", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "saddledoctor.html", 1, "homeGRAPHIC1", 0));
document.write(homegetHTML(navID, "Used Saddles", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "usedsaddles.html", 2, "homeGRAPHIC2", 0));
document.write(homegetHTML(navID, "Riding Lessons", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "ridinglessons.html", 3, "homeGRAPHIC3", 0));
document.write(homegetHTML(navID, "Day Camp", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "daycamp.html", 4, "homeGRAPHIC4", 0));
document.write(homegetHTML(navID, "Parties", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "parties.html", 5, "homeGRAPHIC5", 0));
document.write(homegetHTML(navID, "Events", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "events.html", 6, "homeGRAPHIC6", 0));
document.write(homegetHTML(navID, "TSD King Peppy", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "kingpeppy.html", 7, "homeGRAPHIC7", 0));
document.write(homegetHTML(navID, "S & T Repair", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "saddletackrepair.html", 8, "homeGRAPHIC8", 0));
document.write(homegetHTML(navID, "History", "/~site/Layout/Buttons/Basic_Button_Tan.gif", "history.html", 9, "homeGRAPHIC9", 1));

}
}
function homenetscapeDivCheck() {
var strAppName = navigator.appName;
var appVer = parseFloat(navigator.appVersion);
if ( (strAppName == "Netscape")&&
(appVer >= 4.0 && appVer < 5) ) { 
document.write("</DIV>");
}
}
var homecounter;
homenavElement();
homenetscapeDivCheck();
