var rotoic = 6;     // Number of alternative images
var rotoxo = new Array(rotoic);  // Array to hold filenames

rotoxo[0] = "images/topphotob.jpg";
rotoxo[1] = "images/topphotofooz.jpg";
rotoxo[2] = "images/topphotopool.jpg";
rotoxo[3] = "images/topphotobongo.jpg";
rotoxo[4] = "images/topphotoguitar.jpg";
rotoxo[5] = "images/topphotobarmen.jpg";

function pickRandom(range) {
if (Math.random)
return Math.round(Math.random() * (range-1));
else {
var rotonow = new Date();
return (rotonow.getTime() / 1000) % range;
}
}
var rotochoice = pickRandom(rotoic);

function PP_preloadImages() {
  var PP_cod=document; if(PP_cod.images){ if(!PP_cod.PP_p) PP_cod.PP_p=new Array();
    var PP_cnti,PP_locj=PP_cod.PP_p.length,PP_ara=PP_preloadImages.arguments; for(PP_cnti=0; PP_cnti<PP_ara.length; PP_cnti++)
    if (PP_ara[PP_cnti].indexOf('#')!=0){ PP_cod.PP_p[PP_locj]=new Image; PP_cod.PP_p[PP_locj++].src=PP_ara[PP_cnti];}}
}

function imgOnOff(imgName,imgFile,othName,othFile) {
   if (document.images) {
       document[imgName].src = 'images/' + imgFile;
       if (othName>'') {
       document[othName].src = 'images/' + othFile; }
   }
}

function glue(passname) {
  var myform = document.getElementById( 'fortform' );
  myform.recipient.value = passname.value+"@fortsavannah.com";
}

function calendarlogo() {

document.write("<table cellpadding=0 cellspacing=0 ><tr>");
document.write("<td class='broll'  background='images/m.gif' width='156' height='19'");
document.write("onmouseover=\"this.background='images/black.gif'; style.cursor='hand'\"");
document.write("onMouseOut=\"this.background='images/m.gif'\"");
document.write("onClick=\"location.href='calendar.htm'\"");
document.write("title='Calendar of Events, Specials and Entertainment.'>");
document.write("<img src='images/calendarlogo.gif' width='156' height='19'>");
document.write("</td></tr></table>");
}


function PP_Loader() {
var PP_LoadList="'images/fortlogo36red.gif','images/fortlogo36black.gif','images/rb.gif','images/w.gif','images/black.gif','images/m.gif'";
PP_preloadImages(PP_LoadList);
}


function PP_LogoWrite() {
document.write("<table id='logo_top' class='logo_top' border='0' cellspacing='0' cellpadding='0' width='150' background='images/chick_leftec150.gif'");
document.write("onMouseOver=\"this.background='images/chick_leftec150o.gif';\" ");
document.write("onMouseOut=\"this.background='images/chick_leftec150.gif';\" ><TR>");
document.write("<td width=59><a href='../sf/index.htm' title=\"Cluck on me to go to the Fair!\"><img src='nav/space2.gif' width='59' height='96' border='0'></a><td>");
document.write("<td class='ectopr' valign='bottom'>");
document.write("<a href='../sf/index.htm' class='ectopr'>Visit the State Fair Web Site.</a></td></tr></table>");
}

function PP_BotMenWrite() {
document.write("<center><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td class='b'><center>");
document.write("<a href='mm_dvd.htm'>Mountain Mourning</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='cat/catorder.htm'>Buy Movies</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='pocahontastimes.htm'>-30- Cal Price</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='ots.htm'>Out of the Storm</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='inspiration.htm'>Inspiration Series</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='previews.htm'>View Film Previews</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='parade.htm'>Greenbrier on Parade</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='about.htm'>Photos &amp; Awards</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='trainsdvd.htm'>Other Films</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='godsgift.htm'>WV Wilderness</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href=''></a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='filmscreenings.htm'>Film Screenings</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='wvhills.htm'>RiseUp West Virginia</a>&nbsp;");
document.write("</center></td></tr></table></center>");
}
function PP_BotLinksWrite() {
document.write("<center><table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td class='b'><center>");
document.write("<img src='images/hr.gif' width='600' height='10'><BR><B>Customers</B><BR>");
document.write("<img src='images/globe.gif'><a href='http://www.pocahontaslibrary.org/hb/index.htm' target = '_new'");
document.write(" title=\"Hillsboro utilizes the Red_Soft theme.  The town is the birth place of Pearl S. Buck and the colors honor the history of the Hillsboro High School Red Devils.\">");
document.write("Hillsboro Library</a>&nbsp;");
document.write("<img src='images/globe.gif'><a href='http://www.lewisburg.org/history' target = '_new'");
document.write(" title=\"The project director actually liked the Durbin look so much, with its dark green colors.       The project director actually liked the Durbin look so much, with its dark green colors.       The project director actually\">");
document.write("Lewisburg History</a>&nbsp;");
document.write("<BR>");
document.write("<img src='images/hr.gif' width='600' height='10'><BR><B>Resourses</B><BR>");
document.write("<img src='images/house.gif'><a href='databases.htm'");
document.write(" title=\"Sumary of the links listed in this section.\">");
document.write("Databases</a>&nbsp;");
document.write("<BR>");
document.write("</center></td></tr></table></center>");
}

function PP_OrgWrite() {
document.write("<p align='center' class='footerorg'>");
document.write("204 N Jefferson St<BR>");
document.write("Lewisburg, WV 24901<BR>");
document.write("Phone: (304) 645-9050<BR>");
document.write("</p><BR>");
}

function PP_Mex_Write() {
document.write("<a href='facilities.htm' class='ectopr' title=\"A look at the buildings and grounds at the fair.\">Facilities</a>&nbsp;");
document.write("|&nbsp;<a href='maps.htm' class='ectopr' title=\"Maps, Directions, Accomodations and More.\">Maps</a>&nbsp;");
}

