//Define global variables
var timerID = null;
var timerOn = false;
// Change this to the time delay that you desire
var timecount = 1; 

// Toggles the layer visibility on
function show(layerName) {
 document.getElementById(layerName).style.display ='block';
}

// Toggles the layer visibility off
function hide(layerName) {
 document.getElementById(layerName).style.display ='none';
}

function hideAll() {
  hide('start');
  hide('foretaget');
  hide('jobbref');
  hide('lgh');
  hide('contact');
//Put all layers used in the nav here.
//Copy the hideLayer() function above.
}

function startTime() {
 if (timerOn == false) {
  timerID=setTimeout( "hideAll()" , timecount);
  timerOn = false;
 }
}

function stopTime() {
 if (timerOn) {
  clearTimeout(timerID);
  timerID = null;
  timerOn = false;
 }
}