// this source file contains the two display routines, displayHeader and displayFooter, used at the top and bottom of each and every page

var pages = new Array();
pages.push( makePage( "HOME",  "index.html", "Go to our homepage" ));
pages.push( makePage( "ABOUT US", "about.html", "Who we are" ));
pages.push( makePage( "CONTACT US", "contactUs.html", "Contact us" ));
pages.push( makePage( "CURRENT PROMOTIONS", "promotions.html", "See our current promotions" ));
pages.push( makePage( "CUSTOMER TESTIMONIALS &amp; FRIENDS", "testimonials.html", "See our customer testimonials & friends" ));
var year = new Date().getFullYear();
var re_page = /.*\/(.*)/;
var page = ( document.URL.match( re_page ))[1];
if( page == "" ) {
  page = "index.html";
}

function displayHeader() {

  // fixed header

  document.writeln( "        <table width=100% style=\"padding-bottom: 6pt; \">" );
  document.writeln( "          <tr>" );
  document.writeln( "            <td width=50% style=\"text-align: left; vertical-align: center; \">" );
  document.writeln( "              <img src=\"images/FrontRangeSigns_logo.jpg\" alt=\"\" style=\"border: thin; height: 131px; width: 301px; \" /><br />" );
  document.writeln( "              <p style=\"padding-top: 0pt; \" class=\"serving\">Serving the Entire Colorado Front Range</p>" );
  document.writeln( "            </td>" );
//  document.writeln( "            <td rowspan=2 width=50% style=\"text-align: right; vertical-align: top; \" class=\"membership\">" );
//  document.writeln( "              Proud member of the <span style=\"font-weight: bolder; \">United States Sign Council</span><br />and the <span style=\"font-weight: bolder; \">Denver Better Business Bureau<br /></span>" );
//  document.writeln( "              <img src=\"images/UnitedStatesSignCouncil_logo.jpg\" title=\"United States Sign Council\" style=\"padding-bottom: 10pt; padding-top: 5pt; \" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" );
//  document.writeln( "              <a href=\"http://www.bbb.org/denver/business-reviews/30614-00/front-range-sign-company-90096744\" target=\"_blank\">" );
//  document.writeln( "               <img src=\"http://www.justgoodbusiness.biz/logoonline/getimage.php?bid=90096744&c=blue&h=1&s=50\" width=\"87\" height=\"35\" border=\"0\"" );
//  document.writeln( "                    title=\"Click to verify BBB accreditation and to see a BBB report.\" alt=\"Click to verify BBB accreditation and to see a BBB report.\"" );
//  document.writeln( "                    oncontextmenu=\"alert('Use without permission is prohibited. The BBB Accreditation seal is a trademark of the Council of Better Business Bureaus, Inc.'); return false;\" style=\"padding-bottom: 10pt; padding-top: 5pt; \" />" );
//  document.writeln( "              </a>" );
//  document.writeln( "              <p style=\"padding-top: 0pt; \" class=\"contact_us\">CONTACT US:</p>" );
//  document.writeln( "              <p class=\"contact_us\">Phone: (303) 946-0124<br /></p>" );
//  document.writeln( "              <p class=\"contact_us\">Fax: (303) 895-2350<br /></p>" );
//  document.writeln( "              <p class=\"contact_us\">12744 W Iliff Ave, Lakewood, CO 80228</p>" );
//  document.writeln( "              <a href=\"mailto:sales@FrontRangeSigns.com\" class=\"contact_us\" style=\"background-color: #222f67; \"" );
//  document.writeln( "                 title=\"Click to send us a message\">&nbsp;E-mail Us&nbsp;</a>" );
//  document.writeln( "            </td>" );
  document.writeln( "            <td rowspan=2 width=50% style=\"text-align: right; vertical-align: top; \" class=\"membership\">" );
  document.writeln( "              Proud member of the <span style=\"font-weight: bolder; \">United States Sign Council</span><br />" );
  document.writeln( "              <img src=\"images/UnitedStatesSignCouncil_logo.jpg\" title=\"United States Sign Council\" style=\"padding-bottom: 10pt; padding-top: 5pt; \" />" );
//  document.writeln( "              <a href=\"http://www.bbb.org/denver/business-reviews/30614-00/front-range-sign-company-90096744\" target=\"_blank\">" );
//  document.writeln( "               <img src=\"http://www.justgoodbusiness.biz/logoonline/getimage.php?bid=90096744&c=blue&h=1&s=50\" width=\"87\" height=\"35\" border=\"0\"" );
//  document.writeln( "                    title=\"Click to verify BBB accreditation and to see a BBB report.\" alt=\"Click to verify BBB accreditation and to see a BBB report.\"" );
//  document.writeln( "                    oncontextmenu=\"alert('Use without permission is prohibited. The BBB Accreditation seal is a trademark of the Council of Better Business Bureaus, Inc.'); return false;\" style=\"padding-bottom: 10pt; padding-top: 5pt; \" />" );
//  document.writeln( "              </a>" );
  document.writeln( "              <p style=\"padding-top: 0pt; \" class=\"contact_us\">CONTACT US:</p>" );
  document.writeln( "              <p class=\"contact_us\">Phone: (303) 946-0124<br /></p>" );
  document.writeln( "              <p class=\"contact_us\">Fax: (303) 895-2350<br /></p>" );
  document.writeln( "              <p class=\"contact_us\">12744 W Iliff Ave, Lakewood, CO 80228</p>" );
  document.writeln( "              <a href=\"mailto:sales@FrontRangeSigns.com\" class=\"contact_us\" style=\"background-color: #222f67; \"" );
  document.writeln( "                 title=\"Click to send us a message\">&nbsp;E-mail Us&nbsp;</a>" );
  document.writeln( "            </td>" );
  document.writeln( "          </tr>" );
  document.writeln( "          <tr>" );
  document.writeln( "            <td class=\"follow_us\">" );
  document.writeln( "              <span style=\"vertical-align: 50%; \">Follow us on</span>" );
  document.writeln( "              <a href=\"http://www.facebook.com/home.php?#!/pages/Front-Range-Signs-Denver-Business-Signage/102398636469833\"" );
  document.writeln( "                 title=\"Visit us on Facebook\" target=\"_blank\">" );
  document.writeln( "                <img height=\"24\" width=\"24\" src=\"images/FaceBook-icon.png\">" );
  document.writeln( "              </a>" );
  document.writeln( "              <span style=\"vertical-align: 50%; \">and</span>" );
  document.writeln( "              <a href=\"http://twitter.com/FrontRangeSigns\"" );
  document.writeln( "                 title=\"Visit us on Twitter\" target=\"_blank\">" );
  document.writeln( "                <img height=\"24\" width=\"24\" src=\"images/Twitter-icon.png\">" );
  document.writeln( "              </a>" );
  document.writeln( "            </td>" );
  document.writeln( "          </tr>" );
  document.writeln( "        </table>" );
  document.writeln();
  document.writeln( "        <table width=100%>" );
  document.writeln( "          <tr class=\"header_menu\">" );

  // display all menu options except this one

  var heading;
  for( var i = 0; i < pages.length; i++ ) {
    if( pages[i].href == page ) {
      heading = pages[i].heading;
    }
    else {
      document.writeln( "            <td class=\"header_menu\"><a href=\"" + pages[i].href + "\" title=\"" +
                        pages[i].title + "\" style=\"color: #ffffff\">" + pages[i].heading + "</a></td>" );
    }
  }

  // close it back up with the title and link to Wirth Business Credit

  document.writeln( "          </tr>" );
  document.writeln( "        </table>" );
  document.writeln();
  document.writeln( "        <div style=\"background: transparent url(images/backgroundimage_1x40.png) repeat-x scroll center center; height: 40px; \">" );
//  document.writeln( "          <br />" );
//  document.writeln( "          <br />" );
  document.writeln( "          <p class=\"heading\">" + heading + "</p>" );
  if( heading != "ABOUT US" ) {
    document.writeln( "          <p class=\"wirth\">" );
    document.writeln( "            <a href=\"https://wirthbc.com/signin.aspx?remotesystem=denver&username=idenver&destination=quickapplication&menu=true&ExitUrl=http://www.wirthbusinesscredit.com/denver\"" );
    document.writeln( "               class=\"financing\" title=\"Click to open new window at Wirth Business Credit\"" );
    document.writeln( "               target=_blank>&nbsp;Financing&nbsp;offered&nbsp;through&nbsp;Wirth&nbsp;Business&nbsp;Credit&nbsp;</a>" );
    document.writeln( "          </p>" );
  }
  document.writeln( "          <br />" );
  document.writeln( "          <br />" );
  document.writeln( "        </div>" );
//  document.writeln( "        <br />" );
};

function displayFooter() {

  // fixed footer

  document.writeln( "        <div style=\"height: 20px; \"></div>" );
  document.writeln( "        <table width=100% class=\"footer_menu\">" );
  document.writeln( "          <tr style=\"font-weight: normal\">" );
//  document.writeln( "            <td rowspan=2>" );
//  document.writeln( "              <table width=\"100%\">" );
//  document.writeln( "                <tr>" );
//  document.writeln( "                  <td colspan=2 style=\"text-align: center\">Follow us</td>" );
//  document.writeln( "                </tr>" );
//  document.writeln( "                <tr>" );
//  document.writeln( "                  <td>" );
//  document.writeln( "                    <a href=\"http://www.facebook.com/home.php?#!/pages/Front-Range-Signs-Denver-Business-Signage/102398636469833\"" );
//  document.writeln( "                       title=\"Visit us on Facebook\" target=\"_blank\">" );
//  document.writeln( "                      <img height=\"24\" width=\"24\" src=\"images/FaceBook-icon.png\">" );
//  document.writeln( "                    </a>" );
//  document.writeln( "                  </td>" );
//  document.writeln( "                  <td>" );
//  document.writeln( "                    <a href=\"http://twitter.com/FrontRangeSigns\"" );
//  document.writeln( "                       title=\"Visit us on Twitter\" target=\"_blank\">" );
//  document.writeln( "                      <img height=\"24\" width=\"24\" src=\"images/Twitter-icon.png\">" );
//  document.writeln( "                    </a>" );
//  document.writeln( "                  </td>" );
//  document.writeln( "                </tr>" );
//  document.writeln( "              </table>" );
//  document.writeln( "            </td>" );
  document.writeln( "            <td rowspan=2></td>" );
  document.writeln( "            <td style=\"padding-top: 5pt; \">Front Range Sign Company" );
  document.writeln( "              &nbsp;&nbsp;|&nbsp;&nbsp;" );
  document.writeln( "              Phone: 303-946-0124" );
  document.writeln( "              &nbsp;&nbsp;|&nbsp;&nbsp;" );
  document.writeln( "              Fax: 303-895-2350" );
  document.writeln( "              &nbsp;&nbsp;|&nbsp;&nbsp;" );
  document.writeln( "              <a href=\"mailto:sales@frontrangesigns.com?subject=Inquiry\" title=\"Click to send us a message\">" );
  document.writeln( "                Sales@FrontRangeSigns.com" );
  document.writeln( "              </a>" );
  document.writeln( "            </td>" );
  document.writeln( "          </tr>" );
  document.writeln( "          <tr>" );
  document.writeln( "            <td style=\"padding-bottom: 5pt; \">" );

  // display all menu options except this one

  var choices = new Array();
  for( var i = 0; i < pages.length; i++ ) {
    if( pages[i].href != page ) {
      choices.push( "              <a href=\"" + pages[i].href + "\" title=\"" + pages[i].title + "\">" + pages[i].heading + "</a>\n" );
    }
  }
  document.writeln( choices.join( "              &nbsp;&nbsp;|&nbsp;&nbsp;\n" ));

  // close it back up

  document.writeln( "            </td>" );
  document.writeln( "          </tr>" );
  document.writeln( "        </table>" );
  document.writeln();

  // display copyright

  document.writeln( "        <table width=100%>" );
  document.writeln( "          <tr>" );
  document.writeln( "            <td width=100% class=\"copyright\">Copyright&copy; " + year + " Front Range Sign Company</td>" );
  document.writeln( "          </tr>" );
  document.writeln( "        </table>" );
};

function makePage( heading, href, title ) {

  var pageInfo = new Object;
  pageInfo.heading = heading;
  pageInfo.href = href;
  pageInfo.title = title;

  return( pageInfo );
};
