/* humanjazz.js
 * Israel Evans - (modified from original, by mike@cross-browser.com)
*/

var cbeBasePath = window.location.protocol;
cbeBasePath = cbeBasePath.toLowerCase();
if (cbeBasePath.indexOf('file') != -1)
   cbeBasePath = "file:///C:/Documents and Settings/ievans.HERBIE/My Documents/websites/humanjazz/scripts/";
else {
  var h = window.location.host;
  if (h.indexOf('cross-browser.com') != -1) cbeBasePath = "http://www.humanjazz.com/";
  else cbeBasePath = "";
}  

function topNavBarEx(pg) {
  if (!pg) pg = 0;
  var nb = commonTitleBar1();
  nb += commonTitleBar2();
  document.write(nb);
}

function bottomNavBarEx(pg) {
  if (!pg) pg = 0;
  var nb =
    "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
    +"<tr>"
    +"  <td class='clsNav' height='22'>";
  nb += commonNavBar(pg);
  nb +=
    ("&nbsp;|&nbsp;"
    +"<a class='clsAMenu' href='#topofpage' title='Top of Page'>Top</a>"
    +"</td></tr></table>");
  document.write(nb);
}

function commonTitleBar1() {
  var nb =
    "<table width='100%' border='0' cellspacing='0' cellpadding='0'>"
    +"<tr>"
    +"  <td class='clsNav' align='right' valign='top'><image src='images/humanjazz.jpg' align='top'>";
  return nb;
}
function commonTitleBar2() {
  var nb = "</td></tr></table>";
  return nb;
}


function commonNavBar(pg) {
  var nb =
    "&nbsp;"
    +"<a class='clsAMenu' href='"+(pg==1?"javascript:show(1)":"javascript:showC(1)")+"' title=''>Home</a>"
    +"&nbsp;&nbsp;"
    +"<a class='clsAMenu' href='"+(pg==1?"javascript:show(6)":"javascript:showC(6)")+"' title=''>News</a>"
    +"&nbsp;&nbsp;"
    +"<a class='clsAMenu' href='"+(pg==1?"javascript:show(3)":"javascript:showC(3)")+"' title=''>Documents</a>"
    +"&nbsp;&nbsp;"
    +"<a class='clsAMenu' href='"+(pg==1?"javascript:show(4)":"javascript:showC(4)")+"' title=''>Examples</a>"
    +"&nbsp;&nbsp;"
    +"<a class='clsAMenu' href='"+(pg==1?"javascript:show(7)":"javascript:showC(7)")+"' title=''>Projects</a>"
    +"&nbsp;&nbsp;"
    +"<a class='clsAMenu' href='"+(pg==1?"javascript:show(5)":"javascript:showC(5)")+"' title=''>Support</a>"
    +"&nbsp;&nbsp;"
    +"<a class='clsAMenu' href='"+(pg==1?"javascript:show(2)":"javascript:showC(2)")+"' title=''>Downloads</a>";
  return nb;
}

function showC(n) {
  if (window.cbeSetCookie) {
    if (n) cbeSetCookie('c', n.toString());
  }  
  if (n) window.location = cbeBasePath+"index.html";
  else window.history.back();
}
