/* menu */
function init() {
	if (!document.getElementById) return
	imgarr = document.getElementsByTagName('img');

	var clicked;
	var preloadarr = Array();

	for (var i = 0; i < imgarr.length; i++) {
		imgarr[i].setAttribute( "orgsrc", imgarr[i].getAttribute( "src" ) );

		imgarr[i].onmouseover = function() {
			if( clicked != this && this.getAttribute('hsrc') ) {
				this.setAttribute('src',this.getAttribute('hsrc'))
			}
		}

		imgarr[i].onmouseout = function() {
			if( clicked != this ) {
				this.setAttribute('src',this.getAttribute('orgsrc'))
			}
		}

		imgarr[i].onclick = function() {
			if( this.getAttribute('clicksrc') ) { 
				clearAll();

				this.setAttribute('src',this.getAttribute('clicksrc'))
				clicked = this;
			}
		}

		/* Preload - Start */
		if( imgarr[i].getAttribute( "hsrc" ) ) {
			x = preloadarr.length;

			preloadarr[x] = new Image();
			preloadarr[x].src = imgarr[i].getAttribute( "hsrc" );
		}

		if( imgarr[i].getAttribute( "clicksrc" ) ) {
			x = preloadarr.length;

			preloadarr[x] = new Image();
			preloadarr[x].src = imgarr[i].getAttribute( "clicksrc" );
		}
		/* Preload - Einde */
	}
}

function clearAll() {
	if (!document.getElementById) return
	for (var i = 0; i < imgarr.length; i++) {
		imgarr[i].setAttribute( "src", imgarr[i].getAttribute( "orgsrc" ) );
	}
}
window.onload=init;

/* popup */
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
/*  popup - Einde */


