function pageLogo() {
  document.write('<img src="images/ppc_logo.jpg" width="573" height="223" alt="PPC Series"><p>');
}

function pageLogo_gallery() {
  document.write('<img src="../../images/mainlogo2.gif" width="600" height="72" alt="PPC Series">');
}

function pageLogo_results() {
  document.write('<img src="../images/mainlogo2.gif" width="600" height="72" alt="PPC Series">');
}

function display_date() {
  var d=new Date();
  var weekday=new Array(7)
  weekday[0]="Sunday"
  weekday[1]="Monday"
  weekday[2]="Tuesday"
  weekday[3]="Wednesday"
  weekday[4]="Thursday"
  weekday[5]="Friday"
  weekday[6]="Saturday"

  var month=new Array(12)
  month[0]="January"
  month[1]="February"
  month[2]="March"
  month[3]="April"
  month[4]="May"
  month[5]="June"
  month[6]="July"
  month[7]="August"
  month[8]="September"
  month[9]="October"
  month[10]="November"
  month[11]="December"

  document.write(weekday[d.getDay()] + ', ' + month[d.getMonth()] + ' ' + d.getDate() + ', ' + d.getFullYear());
}

function display_menuTab(p_label,p_style,p_url) {
  if(p_style=="SELECTED") {
     lcl_class="menuTextSelected";
     lcl_image="_selected";
  }else{
     lcl_class="menuText";
     lcl_image="";
  }
  document.write('<table border="0" cellspacing="0" cellpadding="0" class="' + lcl_class + '">');
  document.write('<tr><td><img src="images/tab_left' + lcl_image + '.jpg" border="0" width="8" height="25" style="cursor: hand" onClick="javascript:window.location.href=\'' + p_url + '\'"></td>');
  document.write('    <td background="images/tab_bg' + lcl_image + '.jpg" style="cursor: hand"><a href="javascript:window.location.href=\'' + p_url + '\'" class="' + lcl_class + '">' + p_label + '</a></td>');
  document.write('    <td><img src="images/tab_right' + lcl_image + '.jpg" border="0" width="8" height="25"style="cursor: hand" onClick="javascript:window.location.href=\'' + p_url + '\'"></td></tr>');
  document.write('</table>');
}

function menubar(p_page) {
  document.write('<table border="0" cellspacing="0" cellpadding="0">');
  document.write('  <tr>');
<!-- HOME -->
    if(p_page=="HOME") {
       document.write('<td>')
       display_menuTab("Home","SELECTED","index.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("Home","N","index.html");
       document.write('</td>');
    }
<!-- SERIES DATES -->
    if(p_page=="CALENDAR") {
       document.write('<td>')
       display_menuTab("Series&nbsp;Dates","SELECTED","calendar.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("Series&nbsp;Dates","N","calendar.html");
       document.write('</td>');
    }
<!-- LOCATIONS -->
    if(p_page=="LOCATIONS") {
       document.write('<td>')
       display_menuTab("Locations","SELECTED","locations.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("Locations","N","locations.html");
       document.write('</td>');
    }
<!-- STANDINGS -->
    if(p_page=="STANDINGS") {
       document.write('<td>')
       display_menuTab("Standings","SELECTED","standings.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("Standings","N","standings.html");
       document.write('</td>');
    }
<!-- RULES -->
    if(p_page=="RULES") {
       document.write('<td>')
       display_menuTab("Rules","SELECTED","rules.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("Rules","N","rules.html");
       document.write('</td>');
    }
<!-- WAIVER -->
    if(p_page=="WAIVER") {
       document.write('<td>')
       display_menuTab("Waiver","SELECTED","waiver.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("Waiver","N","waiver.html");
       document.write('</td>');
    }
<!-- PPC FAQs -->
    if(p_page=="FAQS") {
       document.write('<td>')
       display_menuTab("FAQs","SELECTED","faqs.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("FAQs","N","faqs.html");
       document.write('</td>');
    }
<!-- LINKs -->
    if(p_page=="LINKS") {
       document.write('<td>')
       display_menuTab("Links","SELECTED","links.html");
       document.write('</td>');
    }else{
       document.write('<td>')
       display_menuTab("Links","N","links.html");
       document.write('</td>');
    }
  document.write('      <td align="right" width="100%" height="25" background="images/tab_underline.jpg" class="dateText">');
  display_date();
  document.write('      &nbsp;&nbsp;</td>');
  document.write('  </tr>');
  document.write('</table>');
}

function footer() {
  document.write('<table border="0" cellspacing="2" cellpadding="0" width="100%" class="bodyText">');
  document.write('  <tr><td align="center">');
  document.write('        footer');
  document.write('      </td></tr>');
  document.write('</table>');
}

function fOpenWin(page,p_wintype,p_width,p_height) {
  var winWidth  = screen.availWidth;
  var winHeight = screen.availHeight;

  if ((p_wintype=="")||(p_wintype==undefined)) {
       s_wintype="new";
  }else{
       s_wintype=p_wintype;
  }
  if ((p_width=="")||(p_width==undefined)) {
       s_width=600;
  }else{
       s_width=p_width;
  }
  if ((p_height=="")||(p_height==undefined)) {
       s_height=700;
  }else{
       s_height=p_height;
  }

  s_left = ((winWidth / 2) - (s_width / 2));
  s_top  = ((winHeight / 2) - (s_height / 2));

  OpenWin = window.open(page, s_wintype, "status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes,width="+s_width+",height="+s_height+",left="+s_left+",top="+s_top+",screenx=0,screen=0");
  if (document.images) {OpenWin.focus();}
}
