
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( 'fairform' );
  myform.recipient.value = passname.value+"@wvstatefair.com";
}

function mex(PP_mex_x,PP_mex_o) {
   mexsi='mexsign'+ PP_mex_x; mexwi='mexword';
   if (PP_mex_o=='1') {
      mexwf='images/mexword_' + PP_mex_x + '.gif'; mexsf='images/mexsign' + PP_mex_x + '_o.gif';}
   else { mexwf='images/mexword.gif'; mexsf='images/mexsign' + PP_mex_x + '.gif';}
   document[mexwi].src = mexwf; document[mexsi].src = mexsf;
}


function PP_Loader() {
var PP_LoadList="'images/mexword.gif','images/mexword_a.gif','images/mexword_b.gif','images/mexword_c.gif'";
PP_LoadList+=",'images/mexsigna.gif','images/mexsignb.gif','images/mexsignc.gif'";
PP_LoadList+=",'images/mexsigna_o.gif','images/mexsignb_o.gif','images/mexsignc_o.gif'";
PP_LoadList+=",'globe.gif','page.gif','plus.gif','images/logo_word.gif','images/logo_word_o.gif'";
PP_LoadList+=",'images/ec_logo_smb.gif','images/ec_logo_smb2.gif'";
PP_preloadImages(PP_LoadList);
}


function PP_LogoWrite() {
document.write("<table id='logo_top' class='logo_top' border='0' cellpadding='0' cellspacing='0' width='150'><tr><td>");
document.write("<a href='../ec/index.htm' title=\"Year 'round Activities at the State Fair Event Center.\"");
document.write("onMouseOver=\"imgOnOff('logo','ec_logo_smb2.gif','logoword','logo_word_o.gif')\"");
document.write("onMouseOut=\"imgOnOff('logo','ec_logo_smb.gif','logoword','logo_word.gif')\" >");
document.write("<img NAME='logo' border='0' src='images/ec_logo_smb.gif' width='150' height='62'><BR>");
document.write("<img name='logoword' src='images/logo_word.gif' border='0'></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='ourstories.htm' title=\"The Ties that Bind - Telling Our Stories\">Our Stories</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='events.htm' title=\"Find out what's going on\">Events</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='volunteer.htm' title=\"Help\">You Can Help</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='didyouknow.htm' title=\"Interesting Local History\">Did You Know?</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='studentactivities.htm' title=\"Young People are Helping\">Student Activities</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='filmnews.htm' title=\"All of our News\">News</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='exhibit.htm' title=\"About the Exhibit at Lewisburg City Hall\">'Our Place'</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='history.htm' title=\"Greenbrier County History\">Local History</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='about_us.htm' title=\"Learn more about the people behind this project.\">Our Team</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='exhibit.htm'>The Exhibit</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='links.htm'>Links</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='grbonparade.htm'>Greenbrier on Parade</a>&nbsp;");
document.write("<img src='images/bullet3.gif'>&nbsp;<a href='womanstouch.htm'>A Woman's Touch</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("</center></td></tr></table></center>");
}

function PP_OrgWrite() {
document.write("<p align='center' class='footersfw'>");
document.write("P.O. Drawer 986<BR>");
document.write("Lewisburg, WV 24901<BR>");
document.write("Phone: (304) 645-1090<BR>");
document.write("Fax: (304) 645-6660<BR>");
document.write("</p><BR>");
}


function PP_Mex_Write() {
document.write('<table border="0" cellpadding="0" cellspacing="0" class="MrMex" width="127" height="82"><tr>');
document.write('<td colspan="3"><img name="mexword" src="images/mexword.gif" width="127" height="29" border="0"></td></tr>');
document.write('<td><a href="entertainment.htm" onMouseOut="mex(\'a\',\'0\')" onMouseOver="mex(\'a\',\'1\')">');
document.write('<img name="mexsigna" src="images/mexsigna.gif" width="40" height="53" border="0"></a></td>');
document.write('<td><a href="tickets.htm" onMouseOut="mex(\'b\',\'0\')" onMouseOver="mex(\'b\',\'1\')">');
document.write('<img name="mexsignb" src="images/mexsignb.gif" width="42" height="53" border="0"></a></td>');
document.write('<td><a href="maps.htm"  onMouseOut="mex(\'c\',\'0\')" onMouseOver="mex(\'c\',\'1\')">');
document.write('<img name="mexsignc" src="images/mexsignc.gif" width="45" height="53" border="0"></a></td>');
document.write('</tr></table>');
}
