function $(id) {
  return document.getElementById(id);
}

var myScroll;
function naviPressed(e, uri, num){
	if(myScroll != undefined){
		if(location.hash == '#'+uri +'/'){locationChanged();}
		else{location.hash = uri +'/';}
		//myScroll.scrollToElement('li:nth-child('+num+')', 600);
	} else { return true; }
	return false;
}

var gab;
function GAB(){
  gab = document.createElement('div');
  gab.setAttribute('id', 'GAB');
  gab.innerHTML='<div class="gabmid"><h1>Diese Seite ist nicht f&uuml;r '+BrowserDetect.browser+' '+BrowserDetect.version+' gemacht !</h1><span>Diese Browser werden empfohlen</span><ul><li><a href="http://getfirefox.com">Mozilla Firefox</a></li><li><a href="http://opera.com">Opera</a></li></ul><span><br/><a href="#" onclick="return hideGAB();">schliessen</a></span></div><div class="logo'+company+'"></div>';
  document.body.appendChild(gab);

}
function hideGAB(){
  document.body.removeChild(gab);
  gab = null;
  return false;
}

var lasthash = '';
hashChecker = function(){ return setInterval(function() { if(lasthash !== location.hash) { locationChanged(); } }, 50); } 
function locationChanged() {
	lasthash = location.hash;
	if(myScroll != undefined){myScroll.scrollToElement('li:nth-child('+hashed[lasthash]+')', 600);}
}
