function createMenu(posM){

menuArray = new Array("home.html","leiding.html","deavond.html","fotos.html","kamp.html","http://orakelheemstede.hyves.nl/");

	var koppen = 6;

	var thisDiv = document.getElementById("menu"+posM).style;
		thisDiv.top = (divCentrPosV-70)/2+50;
		thisDiv.left = Math.round(2+(divCentrWidth/(koppen+2))*posM);
		thisDiv.height = 32;
		thisDiv.width = Math.round(divCentrWidth/(koppen+2))-4;
	posM = posM+1;

	if(posM<=koppen){createMenu(posM);}
	if(posM>koppen){
		document.getElementById("menu"+pos).style.background = "#AAAABB";
	if(pos!=6){parent.frames['inhFrame'].location.reload();}
	}

		if(location.search.substring(1)=="kamp"){change(5);}
		if(location.search.substring(1)=="fotos"){change(4);}
return;
}

function hoover(i){
	var thisDiv = document.getElementById("menu"+i).style;
		thisDiv.background = "#ECEEFF";
	if(i==pos){thisDiv.background = "#DBDDEE"};
}


function xHoover(i){
	var thisDiv = document.getElementById("menu"+i).style;
		thisDiv.background = "#C9CCDD";
	if(i==pos){thisDiv.background = "#AAAABB"};
}


function change(i){
	thisDiv = document.getElementById("menu"+i).style;
		thisDiv.borderStyle = "inset";
		thisDiv.background = "#9999AA";

	var thisDiv = document.getElementById("menu"+pos).style;
		thisDiv.background = "#C9CCDD";
	
	pos = i; loc = menuArray[pos-1];
//		if(j.length>0){
//			if(j.substr(0,1)=="_"){loc=j;}
//		}
	change1();
}


function change1(){
	j=0;
	fade=fade-10;
	var thisDiv = document.getElementById("inhoudDiv").style;
	thisDiv.filter = 'alpha(opacity=' + fade + ')'; thisDiv.opacity = (fade/100);
	if(fade>5){i=setTimeout('change1()',10);}
	if(fade<=5){
		fade=0;
		thisDiv.filter = 'alpha(opacity=' + fade + ')'; thisDiv.opacity = (fade/100);
		clearTimeout(i);
			var frameSrc = document.getElementById("inhoudFrame");
			frameSrc.src = loc;

		setTimeout('change2()',1000);
	}
}

function change2(){
	var thisDiv = document.getElementById("inhoudDiv").style;
	thisDiv.filter = 'alpha(opacity=' + fade + ')';thisDiv.opacity = (fade/100);
	fade=fade+10;
	if(fade<100){i=setTimeout('change2()',10);}
	if(fade>=100){
		clearTimeout(i);
		fade=100;
		thisDiv.filter='alpha(opacity=100)';thisDiv.opacity = 1;
		thisDiv.className = "inhoudDiv";
		thisDiv = document.getElementById("menu"+pos).style;
			thisDiv.borderStyle = "outset";
			thisDiv.background = "#AAAABB";
	}

}

function zoomIn(){
	var thisFrame = document.getElementById("inhoudFrame").style;
	thisFrame.visibility = "hidden";

	j = divInhPosV;
	k = divInhPosH;
	l = divInhWidth;
	m = divInhHeight;

	zoomIn2();
}

function zoomIn2(){

	var top = -divCentrPosV+((divCentrPosV-70)/2+50);
	var left = 0;
	var width = divCentrWidth;
	var height = divCentrHeight+((divCentrPosV-70)/2+40);

	j = Math.round(j+(top-divInhPosV)/20);
	k = Math.round(k+(left-divInhPosH)/20);
	l = Math.round(l+(width-divInhWidth)/20);
	m = Math.round(m+(height-divInhHeight)/20);

	var thisDiv = document.getElementById("inhoudDiv").style;
	thisDiv.top = j;
	thisDiv.left = k;
	thisDiv.width = l;
	thisDiv.height = m;

		if(k>left){i=setTimeout('zoomIn2()',10);}
		if(k<=left){
	clearTimeout(i);
		thisDiv.top = top;
		thisDiv.left = left;
		thisDiv.width = width;
		thisDiv.height = height;
			var thisFrame = document.getElementById("inhoudFrame").style;
			thisFrame.visibility = "visible";
			if(pos<6){parent.frames['inhFrame'].location.reload();}
				fade=70; change2();
		}
}

function zoomOut(){
	var thisFrame = document.getElementById("inhoudFrame").style;
	thisFrame.visibility = "hidden";

	j = -divCentrPosV+((divCentrPosV-70)/2+50);
	k = 0;
	l = divCentrWidth;
	m = divCentrHeight+((divCentrPosV-70)/2+40);

	zoomOut2();
}

function zoomOut2(){

	var top = -divCentrPosV+((divCentrPosV-70)/2+40);
	var left = 0;
	var width = divCentrWidth;
	var height = divCentrHeight+((divCentrPosV-70)/2+50);

	j = Math.round(j-(top-divInhPosV)/20);
	k = Math.round(k-(left-divInhPosH)/20);
	l = Math.round(l-(width-divInhWidth)/20);
	m = Math.round(m-(height-divInhHeight)/20);

	var thisDiv = document.getElementById("inhoudDiv").style;
	thisDiv.top = j;
	thisDiv.left = k;
	thisDiv.width = l;
	thisDiv.height = m;

		if(j<divInhPosV){i=setTimeout('zoomOut2()',10);}
		if(j>=divInhPosV){
	clearTimeout(i);
		var thisDiv = document.getElementById("inhoudDiv").style;
		thisDiv.top = divInhPosV;
		thisDiv.left = divInhPosH;
		thisDiv.width = divInhWidth;
		thisDiv.height = divInhHeight;
			var thisFrame = document.getElementById("inhoudFrame").style;
			thisFrame.visibility = "visible";
			if(pos<6){parent.frames['inhFrame'].location.reload();}
				fade=70; change2();
		}

}


function refresh(){
	parent.frames['inhFrame'].location.reload();
}


function extra(i){
	var thisDiv = document.getElementById("extraDiv");
		thisDiv.style.visibility = "visible";
		if(i==1){
			var innerA = "_files/8ball/8ball.swf";
			thisDiv.style.background = "#000000";
		}
		if(i==3){
			thisDiv.style.background = "url('_img/zwartniet2.gif')";
		}
		thisDiv.innerHTML =  innerA + "<div class='xButton'><a class='xButton' href='javascript:hide(" + '"extraDiv"' + ")'>&nbsp;&#215;&nbsp;</a></div>";
}


function hide(i){
	var thisDiv = document.getElementById(i).style;
		thisDiv.visibility = "hidden";
}

function naInschrijven(){
	i=setTimeout('change(5)',2000);
return;
}
	
