IE = (document.all)
NS = (navigator.appName=="Netscape" && navigator.appVersion >= "4")

function moveOut() {
if (window.cancel) {clearTimeout(cancel);}
if (window.moving2) {clearTimeout(moving2);}
if ((IE && batesburg.style.pixelLeft<0)||(NS && document.batesburg.left<0)) {
if (IE) {batesburg.style.pixelLeft += 10;}
if (NS) {document.batesburg.left += 10;}
moving1 = setTimeout('moveOut()', slideSpeed)}
else {clearTimeout(moving1)}};
function moveBack() {
cancel = setTimeout('moveBack1()', waitTime)}
function moveBack1() {
if (window.moving1) {clearTimeout(moving1)}
if ((IE && batesburg.style.pixelLeft>(-menuWidth))||(NS && document.batesburg.left>(-menuWidth))) {
if (IE) {batesburg.style.pixelLeft -= 10;}
if (NS) {document.batesburg.left -= 10;}
moving2 = setTimeout('moveBack1()', slideSpeed)}
else {clearTimeout(moving2)}};

lastY = 0;
function makeStatic(mode) {
if (IE) {winY = document.body.scrollTop;var NM=batesburg.style}
if (NS) {winY = window.pageYOffset;var NM=document.batesburg}
if (mode=="smooth") {
if ((IE||NS) && winY!=lastY) {
smooth = .2 * (winY - lastY);
if(smooth > 0) smooth = Math.ceil(smooth);
else smooth = Math.floor(smooth);
if (IE) NM.pixelTop+=smooth;
if (NS) NM.top+=smooth;
lastY = lastY+smooth;}
setTimeout('makeStatic("smooth")', 1)}
else if (mode=="advanced") {
if ((IE||NS) && winY>YOffset-staticYOffset) {
if (IE) {NM.pixelTop=winY+staticYOffset}
if (NS) {NM.top=winY+staticYOffset}}
else {
if (IE) {NM.pixelTop=YOffset}
if (NS) {NM.top=YOffset-7}}
setTimeout('makeStatic("advanced")', 1)}}

function initSlide() {
if (IE) {
batesburg.style.pixelLeft = -menuWidth;
batesburg.style.visibility = "visible"}
else if (NS) {
document.batesburg.left = -menuWidth;
document.batesburg.visibility = "show"}
else {alert('Choose either the "smooth" or "advanced" static modes!')}}

function startMenu() {
if (IE) {document.write('<DIV ID="batesburg" style="visibility:hidden;Position : Absolute ;Left : 0px ;Top : '+YOffset+'px ;Z-Index : 20;width:1px" onmouseover="moveOut()" onmouseout="moveBack()">')}
if (NS) {document.write('<LAYER visibility="hide" top="'+YOffset+'" name="batesburg" bgcolor="'+menuBGColor+'" left="0" onmouseover="moveOut()" onmouseout="moveBack()">')}
tempBar=""
for (i=0;i<barText.length;i++) {
tempBar+=barText.substring(i, i+1)+"<BR>"}
document.write('<table border="0" cellpadding="0" cellspacing="1" width="'+(menuWidth+barWidth+2)+'" bgcolor="'+menuBGColor+'"><tr><td bgcolor="'+hdrBGColor+'" WIDTH="'+(menuWidth-1)+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'">&nbsp;<font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+menuHeader+'</b></font></td><td align="center" rowspan="100" width="'+barWidth+'" bgcolor="'+barBGColor+'" valign="'+barVAlign+'"><p align="center"><font face="'+barFontFamily+'" Size="'+barFontSize+'" COLOR="'+barFontColor+'"><B>'+tempBar+'</B></font></p></TD></tr>')}

function addItem(text, link, target) {
if (!target) {target=linkTarget}
document.write('<TR><TD BGCOLOR="'+linkBGColor+'" onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" ALIGN="'+linkAlign+'" WIDTH="'+(menuWidth-1)+'"><ILAYER><LAYER onmouseover="bgColor=\''+linkOverBGColor+'\'" onmouseout="bgColor=\''+linkBGColor+'\'" WIDTH="100%" ALIGN="'+linkAlign+'"><FONT face="'+linkFontFamily+'" Size="'+linkFontSize+'">&nbsp;<A HREF="'+link+'" target="'+target+'" CLASS="batesburgItems">'+text+'</LAYER></ILAYER></TD></TR>')}

function addHdr(text) {
document.write('<tr><td bgcolor="'+hdrBGColor+'" HEIGHT="'+hdrHeight+'" ALIGN="'+hdrAlign+'" VALIGN="'+hdrVAlign+'">&nbsp;<font face="'+hdrFontFamily+'" Size="'+hdrFontSize+'" COLOR="'+hdrFontColor+'"><b>'+text+'</b></font></td></tr>')}

function endMenu() {
document.write('<tr><td bgcolor="'+hdrBGColor+'"><font size="0" face="Arial">&nbsp;</font></td></TR></table>')
if (IE) {document.write('</DIV>')}
if (NS) {document.write('</LAYER>')}
if ((IE||NS) && (menuIsStatic=="yes"&&staticMode)) {makeStatic(staticMode);}
}

YOffset=10; // no quotes!!
staticYOffset=10; // no quotes!!
staticMode="advanced";
slideSpeed=30; // no quotes!!
waitTime=2; // no quotes!! this sets the time the menu stays out for after the mouse goes off it.
menuBGColor="#000000";//controls color of lines around box
menuIsStatic="yes";
menuHeader="Town";
menuWidth=130; // Must be a multiple of 10! no quotes!!
hdrFontFamily="times new roman";//this is the words in the headers inside the slide out box
hdrFontSize="2";
hdrFontColor="#000000";//controls the color of the words in the header box
hdrBGColor="#ffffff";//controls the color of each header box
hdrAlign="center";
hdrVAlign="center";
hdrHAlign="center";
hdrHeight="7";
linkFontFamily="times new roman";//this is what controls each of the links
linkFontSize="2";
linkBGColor="#ffffff";//box for links
linkOverBGColor="#ccccff";
linkTarget="_self";
linkAlign="Left";
barBGColor="#000088";//side bar that you see before it slides out
barFontFamily="times new roman";
barFontSize="2";
barFontColor="#ffffff";
barText="Batesburg | Leesville    "; // this is what controls the words on the slide out bar before it slides out.
barVAlign="center";
barHAlign="left";
barWidth=13; // no quotes!!
startMenu()//all of the additems are the jump menu commands
addItem(' Home Page', '/poultry/indexp.htm', '');
addItem(' Towns Home Page', '/index.htm', '');
addItem(' Fire Department', '/firedept/fireindex.htm', '');
addItem(' Police Department', '/police/indexpd.htm', '');
addItem(' Email Directory','/edirectory.htm', '');
addHdr('Poultry Festival Pages');
addItem(' 2006 Festival Schedule', '/poultry/2006festivalschedule.htm', '');
addItem(' 2006 Brochure', '/poultry/06BROCHURE.pdf', '');
addItem(' Festival Forms', '/poultry/poultryforms.htm', '');
addHdr('Stage Schedules');
addItem(' Main Stage', '/poultry/blpms.htm', '');
addItem(' Stage 1', '/poultry/blpstage1.htm', '');
addItem(' Stage 2', '/poultry/blpstage2.htm', '');
addItem(' Stage 3', '/poultry/Stage 3.htm', '');
addItem(' Haynes Auditorium', '/poultry/blphaynes.htm', '');
endMenu()
window.onload=initSlide
//-->

