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);

function gLoad() {
	if (document.getElementById("map")) {
		if (GBrowserIsCompatible()) {
			var map = new GMap2(document.getElementById("map"));
			var locatie = new GLatLng(50.974552, 3.512278);
			http://maps.google.be/maps?ie=UTF8&ll=50.974552,3.512278&spn=0.002459,0.004823&t=h&z=18
			//var icon = new GIcon();
			//icon.image = "site/images/googleMaps.png";
			//icon.iconSize = new GSize(96, 48);
			//icon.iconAnchor = new GPoint(29, 46);
			map.addControl(new GSmallMapControl());
			//map.addControl(new GMapTypeControl());
			map.setCenter(locatie, 15);
			var marker = new GMarker(locatie, {clickable: true, draggable: false});
			map.addOverlay(marker);
		}
	}
}

function googleUnload() {
	if (document.getElementById("map")) {
		GUnload();
	}
}


function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			if (oldonload) {
				oldonload();
			}
			func();
		}
	}
}

function addUnLoadEvent(func1) {
	var oldonunload = window.onunload;
	if (typeof window.onunload != 'function') {
		window.onunload = func1;
	} else {
		window.onunload = function() {
			if (oldonunload) {
				oldonunload();
			}
			func1();
		}
	}
}

addLoadEvent(gLoad);
addUnLoadEvent(googleUnload);

function changeImage() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  if (myWidth <= 1280 && document.getElementById('corner')) {
  	document.getElementById('corner').style.width=360 + 'px';
  } else if (myWidth > 1292 && document.getElementById('corner')) {
  	document.getElementById('corner').style.width=366 + 'px';
  }
}

addLoadEvent(changeImage);