var delay = 1;
var Opera = window.opera ? true : false;
var fixedElement, elWidth, elHeight, tid;
var l = 0;
var y = 0;

function initFixing (id)
{
	if (document.layers)
	{
		fixedElement = document[id];
		elWidth = fixedElement.document.width;
		elHeight = fixedElement.document.height;
	}
	else if (document.getElementById && !Opera)
	{
		fixedElement = document.getElementById(id);
		elWidth = fixedElement.offsetWidth;
		elHeight = fixedElement.offsetHeight;
	}
	else if (document.all && !Opera)
	{
		fixedElement = document.all[id];
		elWidth = fixedElement.offsetWidth;
		elHeight = fixedElement.offsetHeight;
	}
	else if (Opera)
	{
		fixedElement = document.getElementById(id);
		elWidth = fixedElement.style.pixelWidth;
		elHeight = fixedElement.style.pixelHeight;
	}

	fixPosition();

	if (document.layers)
		fixedElement.visibility = 'show';
	else
		fixedElement.style.visibility = 'visible';

	if (document.all && !Opera)
		window.onscroll = fixPosition;
	else
		tid = setInterval('fixPosition()', delay);
}

function fixPosition ()
{
	if (document.layers)
	{
		fixedElement.left = l;
		fixedElement.top = window.pageYOffset + y;
	}
	else if (document.all && !Opera)
	{
		fixedElement.style.pixelLeft = l;
		fixedElement.style.pixelTop = document.body.scrollTop + y;
	}
	else if (document.getElementById && !Opera)
	{
		if (elWidth == 0)  // workaround for bug of NN6 to compute width
			elWidth = fixedElement.offsetWidth;
		fixedElement.style.left = l + 'px';
		fixedElement.style.top = (window.pageYOffset) + y + 'px';
	}
	else if (Opera)
	{
		fixedElement.style.pixelLeft = l;
		fixedElement.style.pixelTop = window.pageYOffset + y;
	}
}

function GaNaarBlz(keuze, taal)
{
	var doc = document.URL.substr(document.URL.lastIndexOf("nidoba") + 7);
	var x = document.URL.length - doc.length;
	var root = "http://www.nidoba.nl/";
	var vurl;

	if ( taal == "n" )
	{
		if ( keuze == 1 ) { vurl = root + "index.html"; }
		else if (keuze == 2 ) { vurl = root + "cat/ned.html"; }
		else if (keuze == 3 ) { vurl = root + "kit/tekstn.html"; }
		else if (keuze == 4 ) { vurl = root + "akat/akatn.html"; }
		else if (keuze == 5 ) { vurl = root + "gand/gandn.html"; }
		else if (keuze == 6 ) { vurl = root + "myst/mystn.html"; }
		else if (keuze == 7 ) { vurl = root + "qant/qantn.html"; }
		else if (keuze == 8 ) { vurl = root + "ntv/tekstn.html"; }
		else if (keuze == 9 ) { vurl = root + "asiel/asieln.html"}
		else if (keuze == 10 ) { vurl = root + "extra/leuk/leukn.html"; }
	}
	else if (taal == "e")
	{
		if ( keuze == 1 ) { vurl = root + "indexe.html"; }
		else if (keuze == 2 ) { vurl = root + "cat/eng.html"; }
		else if (keuze == 3 ) { vurl = root + "kit/tekste.html"; }
		else if (keuze == 4 ) { vurl = root + "akat/akate.html"; }
		else if (keuze == 5 ) { vurl = root + "gand/gande.html"; }
		else if (keuze == 6 ) { vurl = root + "myst/myste.html"; }
		else if (keuze == 7 ) { vurl = root + "qant/qante.html"; }
		else if (keuze == 8 ) { vurl = root + "ntv/tekste.html"; }
		else if (keuze == 9 ) { vurl = root + "asiel/asiele.html"}
		else if (keuze == 10 ) { vurl = root + "extra/leuk/leuke.html"; }
	}

//	document.URL  = vurl;
	return vurl;
}


function focusNaam(x)
{
	var doc = document.URL.substr(document.URL.lastIndexOf("nidoba") + 7);
	var x = document.URL.length - doc.length;
	var root = document.URL.substr(0, x);
	if ( root.substr(0,4) =="http") { root = "http://www.nidoba.nl/"; }
//alert(root.substr(0,4));
	var f = root + "images/"

	document.menun.src= f + "menu.gif";
	if ( ( window.event.clientY < 25 ) &&  (window.event.clientY > 4 ) )
			document.menun.src=f+"menu1.gif";
	else if ( ( window.event.clientY < 51 ) && ( window.event.clientY > 35 ) )
			document.menun.src=f+"menu2.gif";
	else if ( ( window.event.clientY < 80 ) && ( window.event.clientY > 63 ) )
			document.menun.src=f+"menu3.gif";
	else if ( ( window.event.clientY < 107 ) && ( window.event.clientY > 89 ))
			document.menun.src=f+"menu4.gif";
	else if ( ( window.event.clientY < 137 ) && ( window.event.clientY > 119 ) )
			document.menun.src=f+"menu5.gif";
	else if ( ( window.event.clientY < 160 ) && ( window.event.clientY > 143 ) )
			document.menun.src=f+"menu6.gif";
	else if ( ( window.event.clientY < 190 ) && ( window.event.clientY > 173 ) )
			document.menun.src=f+"menu7.gif";
	else if ( ( window.event.clientY < 230 ) && ( window.event.clientY > 200 ) )
			document.menun.src=f+"menu8.gif";
	else if ( ( window.event.clientY < 263 ) && ( window.event.clientY > 245 ) )
			document.menun.src=f+"menu9.gif";
	else if ( ( window.event.clientY < 288 ) && ( window.event.clientY > 270 ) )
			document.menun.src=f+"menu0.gif";
	else
			document.menun.src=f+"menu.gif";
}

function focusName(x)
{
	var doc = document.URL.substr(document.URL.lastIndexOf("nidoba") + 7);
	var x = document.URL.length - doc.length;
	var root = document.URL.substr(0, x);
	var f = root + "images/"

	document.menue.src= f + "menue.gif";
	if (x == 1)
	{
		if ( ( window.event.clientY < 25 ) &&  (window.event.clientY > 4 ) )
				document.menun.src=f+"menue1.gif";
		else if ( ( window.event.clientY < 51 ) && ( window.event.clientY > 35 ) )
				document.menun.src=f+"menue2.gif";
		else if ( ( window.event.clientY < 80 ) && ( window.event.clientY > 63 ) )
				document.menun.src=f+"menue3.gif";
		else if ( ( window.event.clientY < 107 ) && ( window.event.clientY > 89 ))
				document.menun.src=f+"menue4.gif";
		else if ( ( window.event.clientY < 137 ) && ( window.event.clientY > 119 ) )
				document.menun.src=f+"menue5.gif";
		else if ( ( window.event.clientY < 160 ) && ( window.event.clientY > 143 ) )
				document.menun.src=f+"menue6.gif";
		else if ( ( window.event.clientY < 190 ) && ( window.event.clientY > 173 ) )
				document.menun.src=f+"menue7.gif";
		else if ( ( window.event.clientY < 230 ) && ( window.event.clientY > 200 ) )
				document.menun.src=f+"menue8.gif";
		else if ( ( window.event.clientY < 263 ) && ( window.event.clientY > 245 ) )
				document.menun.src=f+"menue9.gif";
		else if ( ( window.event.clientY < 288 ) && ( window.event.clientY > 270 ) )
				document.menun.src=f+"menue0.gif";
		else
				document.menun.src=f+"menue.gif";
	}
}


function SchrijfMail()
{
	var naame = "vriend@";
	var domain = "nidoba.net";
	document.write('\"mailto:'+ naame + domain + '\">');
}


function Goed(hoofdstuk, vraag, antwoord)
{
	if (hoofdstuk == 1 )
	{
		if (vraag < 8 )
		{
			if ( antwoord == 1)
			{
				if ( vraag != 4) { popUp("../a/j.html",125,210); }
				else if (vraag == 4 ) { popUp("../a/bbn.html",700,400); }
			}
			else if ( vraag < 3 )	{ popUp("../a/zzn.html",700,480); }
			else if ( vraag == 3 ) { popUp("../a/bbn.html",700,350); }
			else if ( vraag == 4 ) { popUp("../a/j.html",125,210); 	}
			else if ( vraag == 5 || vraag == 6 || vraag == 7)
				{ popUp("../a/bzn.html",720,610); }
		}
		else
		{
			if ( vraag == 8 ) { popUp("../a/nest1n.html",700,550); }
			else if( vraag == 9 ) { popUp("../a/nest2n.html",700,500);}
		}
	}
	else if (hoofdstuk == 2 )
	{
		if (vraag == 2 || vraag == 4 || vraag == 9 || vraag == 11 || vraag == 13 || vraag == 20 || vraag == 27 || vraag == 29 || vraag == 31)
		{
			if (antwoord == 2 ) {	popUp("../a/j.html",125,210); }
			else
			{
				if (vraag == 2 ) {	popUp("../a/2b.html",600, 420); }
				else if (vraag == 4 ) {	popUp("../a/2d.html",600, 420); }
				else if (vraag == 9 ) {	popUp("../a/2i.html",700, 520); }
				else if (vraag == 11) {	popUp("../a/2k.html",700, 600); }
				else if (vraag == 13) {	popUp("../a/2m.html",700, 520); }
				else if (vraag == 20) {	popUp("../a/2t.html",500, 320); }
				else if (vraag == 27) {	popUp("../a/2aa.html",750, 650); }
				else if (vraag == 29) {	popUp("../a/2ac.html",650, 450); }
				else if (vraag == 31) {	popUp("../a/2ae.html",700, 340); }
			}
		}
		else if ( vraag < 33 )
		{
			if (antwoord == 1 ) {	popUp("../a/j.html",125,210); }
			else
			{
				if (vraag == 1 ) {	popUp("../a/2a.html",700, 520); }
				else if (vraag == 3 ) {	popUp("../a/2c.html", 700, 470); }
				else if (vraag == 5 ) {	popUp("../a/2e.html",700, 670); }
				else if (vraag == 6 ) {	popUp("../a/2f.html",700, 620); }
				else if (vraag == 7 ) {	popUp("../a/2g.html",600, 470); }
				else if (vraag == 8 ) {	popUp("../a/2h.html",700, 520); }
				else if (vraag == 10) {	popUp("../a/2j.html",700, 520); }
				else if (vraag == 12) {	popUp("../a/2l.html",700, 470); }
				else if (vraag == 14) {	popUp("../a/2n.html",700, 470); }
				else if (vraag == 15) {	popUp("../a/2o.html",700, 470); }
				else if (vraag == 16) {	popUp("../a/2p.html",700, 420); }
				else if (vraag == 17) {	popUp("../a/2q.html",700, 420); }
				else if (vraag == 18) {	popUp("../a/2r.html",700, 520); }
				else if (vraag == 19) {	popUp("../a/2s.html",700, 550); }
				else if (vraag == 21) {	popUp("../a/2u.html",700, 520); }
				else if (vraag == 22) {	popUp("../a/2v.html",700, 420); }
				else if (vraag == 23) {	popUp("../a/2w.html",700, 420); }
				else if (vraag == 24) {	popUp("../a/2x.html",820, 450); }
				else if (vraag == 25) {	popUp("../a/2y.html",700, 640); }
				else if (vraag == 26) {	popUp("../a/2z.html",800, 640); }
				else if (vraag == 28) {	popUp("../a/2ab.html",700, 460); }
				else if (vraag == 30) {	popUp("../a/2ad.html",700, 480); }
				else if (vraag == 32) {	popUp("../a/2af.html",700, 560); }
			}
		}
	}
	else if (hoofdstuk == 3 )
	{
		if (vraag == 1 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 2 && antwoord == 4 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 3 && antwoord == 2 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 4 && antwoord == 1 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 5 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 6 && antwoord == 2 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 7 && antwoord == 1 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 8 && antwoord == 1 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 9 && antwoord == 4 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 10 && antwoord == 1 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 11 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 12 && antwoord == 2 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 13 && antwoord == 2 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 14 && antwoord == 4 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 15 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 16 && antwoord == 1 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 17 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 18 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 19 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if (vraag == 20 && antwoord == 3 ) {	popUp("../a/j.html",125,210); }
		else if ( vraag < 17 ) { popUp("../a/3" + vraag + ".html", 575, 425); }

	}
}


function popUp(page, w, h)
{
	eval("antwoord = window.open(page, '', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+ w + ",height=" + h +"');");
	antwoord.focus();
	antwoord.showDelay = 200;
	antwoord.autoClose = -1;

}




//<script language="JavaScript1.2">
//<!--
//if (document.all) { top.window.resizeTo(650,700);}
//else { top.window.outerHeight = 700;
//	top.window.outerWidth = 6050;}
// -->
//</script>

