var d, dom, ie, ie4, ie5x, moz, mac, win, lin, old, ie5mac, ie5xwin, op;

d = document;
n = navigator;
na = n.appVersion;
nua = n.userAgent;
win = ( na.indexOf( 'Win' ) != -1 );
mac = ( na.indexOf( 'Mac' ) != -1 );
lin = ( nua.indexOf( 'Linux' ) != -1 );

if ( !d.layers ){
	dom = ( d.getElementById );
	op = ( nua.indexOf( 'Opera' ) != -1 );
	konq = ( nua.indexOf( 'Konqueror' ) != -1 );
	saf = ( nua.indexOf( 'Safari' ) != -1 );
	moz = ( nua.indexOf( 'Gecko' ) != -1 && !saf && !konq);
	ie = ( d.all && !op );
	ie4 = ( ie && !dom );

	/*
	ie5x tests only for functionality. ( dom||ie5x ) would be default settings. 
	Opera will register true in this test if set to identify as IE 5
	*/

	ie5x = ( d.all && dom );
	ie5mac = ( mac && ie5x );
	ie5xwin = ( win && ie5x );
}

	d = document;// shorthand so we don't have to write out document each time..
	if ( ie5mac ) {
		alert("Your browser should be well supported!\n\nPlease report problems if any.\nThanks in advance.");
	}
	else if ( d.layers ){
		alert("Your browser is NOT supported!\n\n");
		parent.location.href = "http://www.microsoft.com/downloads/details.aspx?displaylang=nl&FamilyID=9ae91ebe-3385-447c-8a30-081805b2f90b"; 
	}
	else if ( ie4 ){
		alert("Your browser is NOT supported!\n\n");
		parent.location.href = "http://www.microsoft.com/downloads/details.aspx?displaylang=nl&FamilyID=9ae91ebe-3385-447c-8a30-081805b2f90b"; 
	}
	else if ( moz ){
		alert("Your browser is NOT supported!\n\nDownload MS IE 7.0 to visit this website.");
		parent.location.href = "http://www.microsoft.com/downloads/details.aspx?displaylang=nl&FamilyID=9ae91ebe-3385-447c-8a30-081805b2f90b"; 
	}
