/*
This code is based on a code example from the article "Javascript
navigation - cleaner, not meaner" by Christian Heilmann
URL:
http://www.evolt.org/article/Javascript_navigation_cleaner_not_meaner/17/60273/index.html
*/

function initShowHide() {
       if (document.getElementById && document.getElementsByTagName &&
document.createTextNode) {
               hide();
               var toggle = document.getElementById('toggle');
               var as = toggle.getElementsByTagName('a');
               for (var i = 0; i < as.length; i++) {
                       as[i].onclick = function() {
                               show(this);
                               return false;
                       }
                       as[i].onkeypress=function(){
                               show(this);
                               return false
                       }
               }
       }
}

function show(s) {
       hide();
       var id = s.href.match(/#(\w.+)/)[1];
       showById(id);
}

function showById(id) {
       document.getElementById(id).style.display = 'block';
}

function hide() {
       var toggleable =
document.getElementById('toggleable').getElementsByTagName('div');
       for (var i = 0; i < toggleable.length; i++) {
               toggleable[i].style.display = 'none';
       }
}

function startUp() {
       initShowHide();
       showById('job14');
}

window.onload = startUp;

