sfHover = function() {
	var sfEls = document.getElementById('nav').getElementsByTagName('LI');
	for (var i = 0; i < sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}

if (window.attachEvent) window.attachEvent("onload", sfHover);

/*var runOnLoad = new Array();
function removeOutlines() {
	for(var i = 0; i < runOnLoad.length; i++) runOnLoad[i]() 
}
if(document.getElementsByTagName)
for(var i in a = document.getElementsByTagName('a')) {
	a[i].onmousedown = function() { 
		this.blur();                 // most browsers 
		this.hideFocus = true;       // internet explorer
		this.style.outline = 'none'; // mozilla
	}   
	a[i].onmouseout = a[i].onmouseup = function() { 
		this.blur();                 // most browsers 
		this.hideFocus = false;      // internet explorer    
		this.style.outline = null;   // mozilla 
	}
}*/

function initialize() {
	var locatie = new google.maps.LatLng(51.143043, 4.442875);
	var myOptions = {
		zoom: 15,
		center: locatie,
		streetViewControl: false,
		mapTypeId: google.maps.MapTypeId.ROADMAP
	}
	var map = new google.maps.Map(document.getElementById("map"), myOptions);
	
	var marker = new google.maps.Marker({
		position: locatie, 
		map: map
	});
}

function loadScript() {
	var script = document.createElement("script");
	script.type = "text/javascript";
	script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=initialize";
	document.body.appendChild(script);
}

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

if (document.getElementById("map")) {
	addLoadEvent(loadScript);
}
//addLoadEvent(removeOutlines);
