

// Get the URL and location of a slash before the filename

var sPath = window.location.href;

var iLastSlash = sPath.lastIndexOf('/');



// Get the filename without the extension (last slash up to the .)

var sPage = sPath.substring(iLastSlash + 1);

sPage = sPage.substring(0, sPage.lastIndexOf('.'));



// Get the directory this file is in

var iSecondLastSlash = sPath.substring(0, iLastSlash).lastIndexOf('/');

subDir = sPath.substring(iSecondLastSlash + 1, iLastSlash);





/***********************************************/

image1 = new Image();

image1.src = "images/navigation/home_on.gif";

image2 = new Image();

image2.src = "images/navigation/about_on.gif";

image3 = new Image();

image3.src = "images/navigation/installations_on.gif";

image4 = new Image();

image4.src = "images/navigation/pictures_on.gif";

image5 = new Image();

image5.src = "images/navigation/producers_on.gif";

image6 = new Image();

image6.src = "images/navigation/ads_on.gif";
image7 = new Image();
image7.src = "images/navigation/information_on.gif";

image8 = new Image();
image8.src = "images/navigation/blog_on.gif";

image9 = new Image();
image9.src = "images/navigation/retaining_walls_on.gif";

image10 = new Image();
image10.src = "images/navigation/mailbox_on.gif";

function MakeNavButton(name, width, height)

{

  if (name == "home")

    var linkName = name;

  else

    var linkName = name + "/" + name;



  if (sPage == linkName || subDir == name)

    var state = '_on'; 

  else

    var state = '_off'; 



  var HTML = "";

  HTML += '<A HREF="' + linkName + '.html"><IMG SRC="images/navigation/' + name + state + '.gif" ';

  HTML += 'WIDTH="' + width + '" HEIGHT="' + height + '" BORDER="0" ';

  HTML += 'ONMOUSEOVER="javascript:this.src=\'images/navigation/' + name + '_on.gif\';" ';

  HTML += 'ONMOUSEOUT="javascript:this.src=\'images/navigation/' + name + state + '.gif\';"></A>';

  return HTML;

}





/***********************************************/

var header = "";

header += '<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="736" BORDER="0">';
header += '<TR><TD COLSPAN="3"><a href="http://www.pyzique.com/HTML/home.html"><IMG SRC="images/header_banner.jpg" WIDTH="736" HEIGHT="108" ALT="Pyzique Corporation" BORDER="0"></a></TD></TR>';
header += '<TR><TD><IMG SRC="images/navigation/nav_bg.gif" WIDTH="3" HEIGHT="30"></TD><TD TD BACKGROUND="images/navigation/nav_bg.gif" STYLE="color:#a2a2a2;" HEIGHT="30" ALIGN="left" NOWRAP>';

header += MakeNavButton("home", 84, 30);

header += MakeNavButton("about", 84, 30);

header += MakeNavButton("installation", 84, 30);

header += MakeNavButton("pictures", 84, 30);

header += MakeNavButton("producers", 84, 30);

header += MakeNavButton("ads", 84, 30);

header += MakeNavButton("retaining_walls", 108, 30);

header += '</TD><TD><IMG SRC="images/navigation/nav_bg.gif" WIDTH="3" HEIGHT="30"></TD></TR>';
header += '<TR><TD><IMG SRC="images/navigation/nav_bg.gif" WIDTH="3" HEIGHT="30"></TD><TD BACKGROUND="images/navigation/nav_bg.gif" STYLE="color:#FFFFFF;" ALIGN="left" HEIGHT="30" NOWRAP>';

header += MakeNavButton("mailbox", 140, 30);

header += MakeNavButton("information", 84, 30);


header += '</TD><TD><IMG SRC="images/navigation/nav_bg.gif" WIDTH="3" HEIGHT="30"></TD></TR>';

header += '<TR><TD><IMG SRC="images/spacer.gif" WIDTH="1" HEIGHT="2" ALT=""></TD></TR>';

header += '</TABLE>';



document.write(header);



