//'sniff browser'.
var bIE = (document.all) ? 1 : 0;
var bDOM = (document.getElementById) ? 1 : 0;
var bHigh = bIE + bDOM;

/*dit zou ook wel eens kunnen werken:
if((!bDOM) && (bIE)) document.getElementById = function(v) { return document.all[v]; };
*/
var loaded = false;

//roller BEGIN//
if(bIE) {
	roll = function(v,s) {
		if(document.all[v]) document.all[v].style.visibility = s;
	}
} else if (bDOM) {
	roll = function(v,s) {
		if(document.getElementById(v)) document.getElementById(v).style.visibility = s;
	}
} else {
	roll = function(v,s) { }
}
	
function rollOver(v) {
	roll(v,'visible');
}
function rollOut(v) {
	roll(v,'hidden');
}
//roller END//

//top flipper BEGIN//

var IEVersion = 0;

function dofliptop(v) {
	//alert(v + ' en ' + curMenu);
	rollOut('map_'+curMenu);
	rollOver('map_'+v);
	
	fadeapply();
	rollOut('menu_'+curMenu);
	rollOver('menu_'+v);
	fadeplay();
	
	curMenu = v;
}

if(bIE) {
	var ua = window.navigator.userAgent.toLowerCase();
	var i = ua.indexOf('msie');
	IEVersion = parseFloat('0' + ua.substr(i+5));
	if(IEVersion >= 5.0) {
		fadeapply = function() {
			document.all.container.filters[0].apply();
		}
		fadeplay = function() {
			document.all.container.filters[0].play();
		}
	} else {
		fadeapply = function() { }
		fadeplay = function() { }
	}
} else {
	fadeapply = function() { }
	fadeplay = function() { }
}

function init() {
	if(bIE) { //set fade if we're on IE.
		var s;
		if (IEVersion >= 5.5) { //ie5.5 and higher need a totally different filter syntax.
			s = 'progid:DXImageTransform.Microsoft.Fade(duration=1.0,overlap=1.0)'
		} else {
			s = 'blendTrans(Duration=0.5)';
		}
		document.all.container.style.filter = s;
	}
}

//top flipper END//