
// 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('.'));

var sPagesub = sPath.substring(iLastSlash + 1);
sPagesub = sPagesub.substring(0, sPagesub.lastIndexOf('_'));
sPagesub = sPagesub + ".html";

// Get the filename without the extension (last slash up to the .)
var sPagehtml = sPath.substring(iLastSlash + 1);

// Get the directory this file is in
var iSecondLastSlash = sPath.substring(0, iLastSlash).lastIndexOf('/');
subDir = sPath.substring(iSecondLastSlash + 1, iLastSlash);


var iAnchor = window.location.hash;


var menuHTML = "";
var bgc = "";
var bgc1 = "";
var bgc2 = "";
var bgc3 = "";
var bgc4 = "";
if (subDir == "solutions"){
bgc = 'on';
}
if (subDir == "advantage"){
bgc1 = 'on';
}
if (subDir == "about"){
bgc2 = 'on';
}
if (subDir == "contact"){
bgc3 = 'on';
}
if (subDir == "feature"){
bgc4 = 'on';
}


menuHTML += '<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0">';
menuHTML += '<TR>';
menuHTML += '<TD><IMG SRC="../images/spacer.gif" ALT="" WIDTH="15" HEIGHT="21"></TD>';
menuHTML += '<TD CLASS="subnav" WIDTH="55" ALIGN="center"><A HREF="../index.html">Home</A></TD>';
menuHTML += '<TD><IMG SRC="../images/divider.gif" ALT="" WIDTH="1" HEIGHT="21"></TD>';
menuHTML += '<TD CLASS="subnav'+ bgc +'" WIDTH="118" ALIGN="center"><A HREF="../solutions/index.html">Kontek Solutions</A></TD>';
menuHTML += '<TD><IMG SRC="../images/divider.gif" ALT="" WIDTH="1" HEIGHT="21"></TD>';
menuHTML += '<TD CLASS="subnav'+ bgc1 +'"  WIDTH="150" ALIGN="center"><A HREF="../advantage/index.html">The Kontek Advantage</A></TD>';
menuHTML += '<TD><IMG SRC="../images/divider.gif" ALT="" WIDTH="1" HEIGHT="21"></TD>';
menuHTML += '<TD CLASS="subnav'+ bgc2 +'" WIDTH="100" ALIGN="center"><A HREF="../about/index.html">About Kontek</A></TD>';
menuHTML += '<TD><IMG SRC="../images/divider.gif" ALT="" WIDTH="1" HEIGHT="21"></TD>';
menuHTML += '<TD CLASS="subnav'+ bgc3 +'"  WIDTH="84" ALIGN="center"><A HREF="../contact/index.html">Contact Us</A></TD>';
menuHTML += '<TD><IMG SRC="../images/divider.gif" ALT="" WIDTH="1" HEIGHT="21"></TD>';
menuHTML += '<TD CLASS="subnav'+ bgc4 +'"  WIDTH="118" ALIGN="center"><A HREF="../feature/index.html">Feature Project</A></TD>';
menuHTML += '</TR>';
menuHTML += '</TABLE>';


document.write(menuHTML);
