a = 360;
v = 0;
w = -133;
x = 14;
z = -133;
y = 14;
t = 300;

function Is() {
	var agent = navigator.userAgent.toLowerCase();
	this.major = parseInt(navigator.appVersion);
	this.minor = parseFloat(navigator.appVersion);
	this.ns  = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
	this.ns2 = (this.ns && (this.major == 3));
	this.ns3 = (this.ns && (this.major == 3));
	this.ns4 = (this.ns && (this.major >= 4));
	this.ie   = (agent.indexOf("msie") != -1);
	this.ie3  = (this.ie && (this.major == 2));
	this.ie4  = (this.ie && (this.major >= 4));
	this.op3 = (agent.indexOf("opera") != -1);
}

var is = new Is()

if(is.ns4) {
	doc = "document";
	sty = "";
	htm = ".document"
} else if(is.ie4) {
	doc = "document.all";
	sty = ".style";
	htm = ""
}

var count = 0;


function preLoad() {
	load01 = new Image();
	load01.onLoad = loadCheck();
	load01.src = "images/loading01.jpg";	

	load02 = new Image();
	load02.onLoad = loadCheck();
	load02.src = "images/loading02.jpg";	

	load03 = new Image();
	load03.onLoad = loadCheck();
	load03.src = "images/loading03.jpg";	

	load04 = new Image();
	load04.onLoad = loadCheck();
	load04.src = "images/loading04.jpg";	

	load05 = new Image();
	load05.onLoad = loadCheck();
	load05.src = "images/loading05.jpg";	

	load06 = new Image();
	load06.onLoad = loadCheck();
	load06.src = "images/loading06.jpg";	
}

function loadCheck() {
	count++;
	if(count == 6) {
		preLoad2();
	}
}

function preLoad2() {

	corr = new Image();
	corr.onLoad = setTimeout("loadGroup01()",t);
	corr.src = "images/corr.jpg";	
}

function loadGroup01() {
	document.status.src="images/loading01.jpg";
	window.status="Loading Graphics : 16%";

	interf = new Image();
	interf.onLoad =	check01();
	interf.src = "images/interface.gif";	

	animarr = new Image();
	animarr.onLoad = check01();
	animarr.src = "images/animarr.gif";	

	bg01 = new Image();
	bg01.onLoad = check01();
	bg01.src = "images/bg01.gif";	

	bord = new Image();
	bord.onLoad = check01();
	bord.src = "images/bord.jpg";	

	contact = new Image();
	contact.onLoad = check01();
	contact.src = "images/contact.gif";

	credits = new Image();
	credits.onLoad = check01();
	credits.src = "images/credits.gif";	

	foto1 = new Image();
	foto1.onLoad = check01();
	foto1.src = "images/foto1.jpg";	
}

function check01() {
	count++;
	if(count == 13) {
		setTimeout("loadGroup02()",t);		
	}
}

function loadGroup02() {
	
	document.status.src="images/loading02.jpg";
	window.status="Loading Graphics : 33%";

	itm = new Image();
	itm.onLoad = check02();
	itm.src = "images/items.jpg";	

	foto2 = new Image();
	foto2.onLoad = check02();
	foto2.src = "images/foto2.jpg";	

	foto3 = new Image();
	foto3.onLoad = check02();
	foto3.src = "images/foto3.jpg";	

	foto4 = new Image();
	foto4.onLoad = check02();
	foto4.src = "images/foto4.jpg";	

	fuiven = new Image();
	fuiven.onLoad = check02();
	fuiven.src = "images/fuiven.gif";	

	gevel = new Image();
	gevel.onLoad = check02();
	gevel.src = "images/gevel.jpg";	

	kas = new Image();
	kas.onLoad = check02();
	kas.src = "images/kas.gif";	

}

function check02() {
	count++;
	if(count == 20) {
		setTimeout("loadGroup03()",t);
	}
}

function loadGroup03() {
	document.status.src="images/loading03.jpg";
	window.status="Loading Graphics : 49%";

	menu = new Image();
	menu.onLoad = check03();
	menu.src = "images/menu.jpg";	

	linkborder = new Image();
	linkborder.onLoad = check03();
	linkborder.src = "images/linkborder.jpg";	

	logo = new Image();
	logo.onLoad = check03();
	logo.src = "images/logo.jpg";	

	nota01 = new Image();
	nota01.onLoad = check03();
	nota01.src = "images/nota01.jpg";	

	nota02 = new Image();
	nota02.onLoad = check03();
	nota02.src = "images/nota02.jpg";	

	nota03 = new Image();
	nota03.onLoad = check03();
	nota03.src = "images/nota03.jpg";	

	opening = new Image();
	opening.onLoad = check03();
	opening.src = "images/opening.jpg";	
}

function check03() {
	count++;
	if(count == 27) {
		setTimeout("loadGroup04()",t);
	}
}

function loadGroup04() {
	document.status.src="images/loading04.jpg";
	window.status="Loading Graphics : 67%";

	online = new Image();
	online.onLoad =	check04();
	online.src = "images/onlineanim.gif";	

	secretariaat = new Image();
	secretariaat.onLoad = check04();
	secretariaat.src = "images/secretariaat.jpg";	

	sub01 = new Image();
	sub01.onLoad = check04();
	sub01.src = "images/sub01.gif";	

	sub02 = new Image();
	sub02.onLoad = check04();
	sub02.src = "images/sub02.gif";	

	sub03 = new Image();
	sub03.onLoad = check04();
	sub03.src = "images/sub03.gif";	

	sub04 = new Image();
	sub04.onLoad = check04();
	sub04.src = "images/sub04.gif";	
}

function check04() {
	count++;
	if(count == 33) {
		setTimeout("loadGroup05()",t);
	}
}

function loadGroup05() {
	document.status.src="images/loading05.jpg";
	window.status="Loading Graphics : 82%";

	tb = new Image();
	tb.onLoad = check05();
	tb.src = "images/titlebar.gif";	

	sub05 = new Image();
	sub05.onLoad = check05();
	sub05.src = "images/sub05.gif";	

	sub06 = new Image();
	sub06.onLoad = check05();
	sub06.src = "images/sub06.gif";	

	sub07 = new Image();
	sub07.onLoad = check05();
	sub07.src = "images/sub07.gif";	

	sub08 = new Image();
	sub08.onLoad = check05();
	sub08.src = "images/sub08.gif";	

	subfuiven = new Image();
	subfuiven.onLoad = check05();
	subfuiven.src = "images/subfuiven.gif";	
}

function check05() {
	count++;
	if(count == 39) {
		setTimeout("loadGroup06()",t);
	}
}

function loadGroup06() {
	document.status.src="images/loading06.jpg";
	window.status="Loading Graphics : 100%";

	xhb = new Image();
	xhb.onLoad = check06();
	xhb.src = "images/xhb.jpg";	

	title01 = new Image();
	title01.onLoad = check06();
	title01.src = "images/title01.jpg";	

	title02 = new Image();
	title02.onLoad = check06();
	title02.src = "images/title02.jpg";	

	tv = new Image();
	tv.onLoad = check06();
	tv.src = "images/tv.jpg";	

	uitleen = new Image();
	uitleen.onLoad = check06();
	uitleen.src = "images/uitleen.jpg";	

	werkgroepen = new Image();
	werkgroepen.onLoad = check06();
	werkgroepen.src = "images/werkgroepen.jpg";	
}

function check06() {
	count++;
	if(count == 45) {
		setTimeout("openLocation()",t);
	}
}

function openLocation() {
	window.location.replace("start.html");
}

function layerSetup() {
	itemsLyr = eval(doc + '["items"]' + sty);
	menuLyr = eval(doc + '["menu"]' + sty);
	logoLyr = eval(doc + '["logo"]' + sty);
}

function showMenu() {
	menuLyr.visibility="visible";
}

function hideMenu() {
	if (v==0) {
	menuLyr.visibility="hidden";
	}
}

function menuSlide() {

	if (x==y)
	{
		v = 1;
		SlideAdd();

	} else {
		v = 0;
		SlideSub();
	}
}

function SlideAdd() {
	if (x<z)
	{
		x = x + 7;
		w = w - 7;
		itemsLyr.left = x;
		logoLyr.left = w;
		setTimeout("SlideAdd()",10);
	}
}

function SlideSub() {
	if (x>y)
	{
		x = x - 7;
		w = w + 7;
		itemsLyr.left = x;
		logoLyr.left = w;
		setTimeout("SlideSub()",10);	
	}
}
