//-------------------------------------------------------------//
//-------------------------------------------------------------//
//-------------------------------------------------------------//
function Init()
{
	try
	{
		dominant = ob_Geluid("ob_dominant", "wav/dominant.wav", false)
		tonica = ob_Geluid("ob_tonica", "wav/tonica.wav", false)
		clave = ob_Geluid("ob_clave", "wav/clave.wav", false)
		conga = ob_Geluid("ob_conga", "wav/conga.wav", false)
		gui_s = ob_Geluid("ob_gui_s", "wav/gui_s.wav", false)
		gui_l = ob_Geluid("ob_gui_l", "wav/gui_l.wav", false)
		maracas = ob_Geluid("ob_maracas", "wav/maracas.wav", false)
		bell = ob_Geluid("ob_bell", "wav/bell.wav", false)
		koe = ob_Geluid("ob_koe", "wav/koe.wav", false)
		knal = ob_Geluid("ob_knal", "wav/knal.wav", false)
		tik = ob_Geluid("ob_tik", "wav/tik.wav", false)
		glass = ob_Geluid("ob_glass", "wav/glass.wav", false)
		au = ob_Geluid("ob_au", "wav/au.wav", false)
		afspeler = ob_Geluid("mplayer", "wav/knal.wav", true)

		mysound = document.forms["dumsnd"]
		Paginas = new pg_Paginas()
		Personen = new ps_Personen()
		LogIn = new lg_LogIn()
		Fotos = new ft_Fotos()
//		AgendaRecs = new ag_Records()
		Geluiden = new gl_Geluiden()
		Sprites = new sp_Sprites()
		Geluiden.set("AUD")
		MuisPos = new Object()
		MuisPos.x = 0
		MuisPos.y = 0
		MuisPos.xv = 0
		MuisPos.yv = 0

		if (isBrowser() == 1) 
		{
			document.captureEvents(Event.MOUSEMOVE) // Defines what events to capture for Navigator
		}
		document.onmousemove = processEvent // start capturing
	}
	catch(e)
	{
		alert("0 : " + e.message)
	}
}
//-------------------------------------------------------------//
//----------------- AGENDA ------------------------------------//
//-------------------------------------------------------------//
function ag_Records()
{
	try
	{
		var Tekst = document.forms["fm_agenda"].innerHTML,
			Ar,
			i, 
			Sub, 
			Records = new Array(),
			t,
			vandaag = new Date(),
			v,
			Kleur
		Ar = Tekst.split("#")

		vandaag.setHours(0, 0, 0, 0)
		v=vandaag.getTime()

		for (i in Ar)
		{
			if (Ar[i].indexOf("-") > 0)
			{
				Sub = Ar[i].split("|")
				if (Sub.length > 3)
					Records[i] = new ag_Record(Sub)
			}
		}
		Records.sort(ag_Sort)

		Tekst = '<table class="a_table" border="1">'
		for (i = 0; i < Records.length; i++)
		{
			if (Records[i])
			{
				t = Records[i].Datum.getTime()
				if (t == v)
					Kleur="#FFCCCC"
				else if (t > v)
					Kleur="#CCCCFF"
				else
					Kleur="#FFFFFF"

				Tekst = Tekst + '<tr valign="top">'
				Tekst = Tekst + '<td width="15%" align="center" bgcolor="'+ Kleur + '">'
				Tekst = Tekst + Records[i].Datum.getDate() + '-' + (Records[i].Datum.getMonth() + 1) + '-' + Records[i].Datum.getFullYear()
				Tekst = Tekst + '</td>'
				Tekst = Tekst + '<td width="15%" align="center" bgcolor="'+ Kleur + '">'
				Tekst = Tekst + Records[i].Tijd
				Tekst = Tekst + '</td>'
				Tekst = Tekst + '<td width="20%" align="center" bgcolor="'+ Kleur + '">'
				if (Records[i].Link.substr(0, 1) == '-')
					Tekst = Tekst + Records[i].Naam
				else
				{
					Tekst = Tekst + '<br><a href="#" onclick="'
					Tekst = Tekst + "window.open('" + Records[i].Link + "', 'lnk_a" + i + "'); return false"
					Tekst = Tekst + '">' + Records[i].Naam + '</a>'
				}
				Tekst = Tekst + '</td>'
				Tekst = Tekst + '<td width="20%" align="center" bgcolor="'+ Kleur + '">'
				Tekst = Tekst + Records[i].Adres
				if (Records[i].URL.substr(0, 1) != '-')
				{
					Tekst = Tekst + '<br><a href="#" onclick="'
					Tekst = Tekst + "window.open('" + Records[i].URL + "', 'lnk_b" + i + "'); return false"
					Tekst = Tekst + '">' + Records[i].URL + '</a>'
				}
				Tekst = Tekst + '</td>'
				Tekst = Tekst + '<td width="30%" align="center" bgcolor="'+ Kleur + '">'
				Tekst = Tekst + Records[i].Opmerking
				Tekst = Tekst + '</td>'
				Tekst = Tekst + '</tr>'
			}
		}
		Tekst = Tekst + '</table>'
		document.forms["fm_agenda_tb"].innerHTML = Tekst
	}
	catch(e)
	{
		alert("ag_Rec " + e.message)
	}
}
//-------------------------------------------------------------//
function ag_Record(Sub)
{
	var ar=Sub[0].split("-")
	this.Datum = new Date(ar[2], ar[1]-1, ar[0])
	this.Tijd = Sub[1]
	this.Naam = Sub[2]
	this.Link = Sub[3]
	this.Adres = Sub[4]
	this.Vervoer = Sub[5]
	this.Opmerking = Sub[6]
	this.URL = Sub[7]
}
//-------------------------------------------------------------//
function ag_Sort(a, b)
{
	return b.Datum.getTime() - a.Datum.getTime()
}
//-------------------------------------------------------------//
//------------------ AFSPELER OBJECTEN ------------------------//
//-------------------------------------------------------------//
function ob_Geluid(ObjNaam, FileNaam, IsAfsp)
{
	try
	{
		var Ob = null
		if (isBrowser() == 3)
			Ob = document.getElementById(ObjNaam)
		else
			Ob = eval('document.all["' + ObjNaam + '"]')

		if (!Ob.FileName)
		{
			Ob.FileName = FileNaam
			if (IsAfsp)
			{
				Ob.run = pl_run
				Ob.stop = pl_stop
			}
			else
			{
				Ob.run = df_run
				Ob.stop = df_stop
			}
		}
		return Ob
	}
	catch(e)
	{
		alert("ob_gl "+ e.message)
	}
}
//-------------------------------------------------------------//
//------------------ DEFAULT AFSPELER -------------------------//
//-------------------------------------------------------------//
function df_run()
{
	try
	{
		var tekst = ""
		mysound.innerHTML = tekst

		var tekst = ""
		tekst = '<embed '
		tekst = tekst + 'name="em_snd" '
		tekst = tekst + 'id="em_snd" '
		tekst = tekst + 'src="' + this.FileName + '" '
		tekst = tekst + 'type="application/x-mplayer2" '
		tekst = tekst + 'Width="0" '
		tekst = tekst + 'height="0" '
		tekst = tekst + 'AutoStart="true" '
		tekst = tekst + 'pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/ ">'
		tekst = tekst + '</embed>'
		mysound.innerHTML = tekst
		this.Vorige = this.FileName
	}
	catch(e)
	{
		alert("14.1 " + e.message)
	}
//	mysound.innerHTML = "<embed name='em_snd' src='' hidden=true autostart=true loop=false>";
//	mysound.innerHTML = "<embed name='em_snd' src='" + this.FileName + "' hidden=true autostart=true loop=false>";
}
//-------------------------------------------------------------//
function df_stop()
{
	try
	{
		if (this.Vorige == this.FileName)
		{
			mysound.innerHTML = ""
			this.Vorige = this.FileName
		}
		else
			this.run()
	}
	catch(e)
	{
		alert("14.2 " + e.message)
	}
}
//-------------------------------------------------------------//
function pl_run()
{
	try
	{
		var tekst = ""
		tekst = '<embed '
		tekst = tekst + 'name="bd_mplayer" '
		tekst = tekst + 'id="bd_mplayer" '
		tekst = tekst + 'src="' + this.FileName + '" '
		tekst = tekst + 'type="application/x-mplayer2" '
		tekst = tekst + 'ShowStatusBar="0" '
		tekst = tekst + 'Width="810" '
		tekst = tekst + 'height="45" '
		tekst = tekst + 'DisplaySize="0" '
		tekst = tekst + 'Loop="1" '
		tekst = tekst + 'AutoStart="true" '
		tekst = tekst + 'pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"> '
		tekst = tekst + '</embed>'
		document.forms["play_form"].innerHTML = tekst
		this.CurrentState = 2
		this.Vorige = this.FileName
	}
	catch(e)
	{
		alert("14.2 " + e.message)
	}
}
//--------------------------------------------------------------------------------//
function pl_stop()
{
	try
	{
		if (this.Vorige == this.FileName)
		{
			document.forms["play_form"].innerHTML = ""
			this.CurrentState = 0
			this.Vorige = this.FileName
		}
		else
			this.run()
	}
	catch(e)
	{
		alert("14.4 " + e.message)
	}
}
//--------------------------------------------------------------------------------//
//------------------- AUDIO/VIDEO -----------------------------//
//-------------------------------------------------------------//
function gl_Geluiden()
{
	try
	{
		var i, nr, td,
			tekst = "",
			gl_Form = document.forms["gl_form"]

		this.a = new Array(18),
		this.Naam = "Geluiden"

		this.bancontim = new gl_Geluid("bancontim",
								"mp3/track01.mp3",
								"Ban Con Tim",
								"mambo",
								"AUD", 
								this)
		this.hendenan = new gl_Geluid("hendenan",
								"mp3/track02.mp3",
								"Hendenan A Llega",
								"ritmo combina",
								"AUD", 
								this)
		this.marinero = new gl_Geluid("marinero",
								"mp3/track03.mp3",
								"El hombre Marinero",
								"merengue",
								"AUD", 
								this)
		this.yallego = new gl_Geluid("yallego",
								"mp3/track04.mp3",
								"Ya llego la Orquesta",
								"son montuno",
								"AUD", 
								this)
		this.cubana = new gl_Geluid("cubana",
								"mp3/track05.mp3",
								"Juana la Cubana",
								"socarengue",
								"AUD", 
								this)
		this.lovesomebody = new gl_Geluid("lovesomebody",
								"mp3/track06.mp3",
								"To love somebody",
								"reggae",
								"AUD", 
								this)
		this.oyecomova = new gl_Geluid("oyecomova",
								"mp3/track07.mp3",
								"Oye como va",
								"chacha montuno",
								"AUD", 
								this)
		this.calibella = new gl_Geluid("calibella",
								"mp3/track08.mp3",
								"Cali bella",
								"son montuno",
								"AUD", 
								this)
		this.subidora = new gl_Geluid("subidora",
								"mp3/track09.mp3",
								"La Subidora",
								"merengue panbiche",
								"AUD", 
								this)
		this.getloud = new gl_Geluid("getloud",
								"mp3/track10.mp3",
								"Let's get Loud",
								"disco chacha",
								"AUD", 
								this)
		this.quimbara = new gl_Geluid("quimbara",
								"mp3/track11.mp3",
								"Quimbara",
								"guaguanco",
								"AUD", 
								this)
		this.orizaheh = new gl_Geluid("orizaheh",
								"mp3/track12.mp3",
								"Orizah eh",
								"ritmo oriza",
								"AUD", 
								this)
		this.smooth = new gl_Geluid("smooth",
								"mp3/track13.mp3",
								"Smooth",
								"chacha montuno",
								"AUD", 
								this)
		this.oyela = new gl_Geluid("oyela",
								"mp3/track14.mp3",
								"Oyela gozala",
								"guaracha",
								"AUD", 
								this)
		this.vuelve = new gl_Geluid("vuelve",
								"mp3/track15.mp3",
								"Vuelve",
								"son caribeno",
								"AUD", 
								this)
		this.sisupieras = new gl_Geluid("sisupieras",
								"mp3/track16.mp3",
								"Si Supieras",
								"son montuno",
								"AUD", 
								this)
		this.colegiala = new gl_Geluid("colegiala",
								"mp3/track17.mp3",
								"La colegiala",
								"cumbia",
								"AUD", 
								this)
		this.novideo = new gl_Geluid("novideo",
								"-",
								"Er zijn nog geen video's beschikbaar",
								"jammer maar helaas",
								"VID", 
								this)
		this.Selected = null
		this.set = gl_set
		this.speel = gl_speel
		this.Categorie = "AUD"

		tekst = '<table id="tafel">'
		for (i = 0; i < 18; i += 3)
		{
			tekst = tekst + '<tr valign="top">'
			tekst = tekst + '<td width="200">'
			tekst = tekst + '<span class="sp_hide" id="gl_a' + i + '" onclick="Geluiden.speel(' + i + ')"></span>'
			tekst = tekst + '</td>'
			tekst = tekst + '<td width="10"></td>'
			tekst = tekst + '<td width="200">'
			tekst = tekst + '<span class="sp_hide" id="gl_a' + (i + 1) + '" onclick="Geluiden.speel(' + (i + 1) + ')"></span>'
			tekst = tekst + '</td>'
			tekst = tekst + '<td width="10"></td>'
			tekst = tekst + '<td width="200">'
			tekst = tekst + '<span class="sp_hide" id="gl_a' + (i + 2) + '" onclick="Geluiden.speel(' + (i + 2) + ')"></span>'
			tekst = tekst + '</td>'
			tekst = tekst + '</tr>'
		}
		tekst = tekst + '</table>'
		gl_Form.innerHTML = tekst
		if (isBrowser() == 3)
		{
			for (i = 0; i < 18; i++)
			{
				txt = "gl_a" + i
				this.a[i] = document.getElementById(txt)
			}
		}
		else
		{
			for (i = 0; i < 18; i++)
			{
				txt = "gl_a" + i
				this.a[i] = document.all[txt]
			}
		}
	}
	catch(e)
	{
		alert("gl_ " + e.message)
	}
}
//-------------------------------------------------------------//
function gl_Geluid(Naam,
				Bestand,
				Titel,
				SubTitel,
				Categorie,
				Parent)
{
	try
	{
		this.Naam = Naam
		this.Bestand = Bestand
		this.Titel = Titel
		this.SubTitel = SubTitel
		this.Categorie = Categorie
		this.Parent = Parent
		this.Nummer = 0
		this.a = null
	}
	catch(e)
	{
		alert("gl_init " + e.message)
	}
}
//-------------------------------------------------------------//
function gl_set(categorie)
{
	try
	{
		var i, j = 0, k, elm, sel = null,
			fm_au_vid = document.forms["au_vid"]

		this.Categorie = categorie
		this.Selected = null

		if (categorie == "AUD")
		{
			fm_au_vid.audio.className = "but_aan"
			fm_au_vid.video.className = "but"
		}
		else if (categorie == "VID")
		{
			fm_au_vid.audio.className = "but"
			fm_au_vid.video.className = "but_aan"
		}
		for (i in this)
		{
			elm = this[i]
			if (elm && elm.Categorie && elm.Categorie == categorie)
			{
				elm.a = this.a[j]
				elm.Nummer = j
				if (j)
					this.a[j].className = "item_a"
				else
				{
					sel = elm
					this.a[j].className = "highlight_a"
				}
				this.a[j].innerHTML = "<font size='3'>" + elm.Titel + "</font><br><font size='1'>" + elm.SubTitel + "</font>"
				j++
			}
		}
		for (k = j; k < 17; k++)
			this.a[k].className = "sp_hide"

		this.Selected = sel
		afspeler.FileName = this.Selected.Bestand
		if (this.Selected.Ext2 == "Patroon")
		{
			afspeler.PlayCount = 0
		}
		else
		{
			afspeler.PlayCount = 1
		}
	}
	catch(e)
	{
		alert("gl_set " + e.message)
	}
}
//-------------------------------------------------------------//
function gl_speel(nr)
{
	try
	{
		var i, elm
		for (i in this)
		{
			elm = this[i]
			if (elm && elm.Naam && elm.Nummer == nr && elm.Categorie == this.Categorie)
			{
				if (elm != this.Selected)
				{
					afspeler.FileName=elm.Bestand
					this.Selected.a.className="item_a"
					elm.a.className="highlight_a"
					this.Selected = elm
				}
				if (afspeler.CurrentState == 2)
					afspeler.stop();
				else
					afspeler.run();

				break
			}
		}
		return false
	}
	catch(e)
	{
		alert("gl_sp " + e.message)
	}
}
//--------------------------------------------------------------------------------//
//-------------------------------------------------------------//
//------------------ LEDEN INLOGGEN ---------------------------//
//-------------------------------------------------------------//
function lg_LogIn()
{
	try
	{
		var i
		this.Status = 0
		this.ps_Persoon = null
		this.Wachtwoord = ""
		this.Naam = ""
		this.Verwerk = lg_Verwerk
		this.Reset = lg_Reset
		if (isBrowser() == 3)
		{
			this.obj_f = document.getElementById("ww_f")
			this.obj_0 = document.getElementById("ww_0")
			this.obj_naam_0 = document.getElementById("l_naam_0")
			this.obj_1 = document.getElementById("ww_1")
			this.obj_naam_1 = document.getElementById("l_naam_1")
			this.obj_2 = document.getElementById("ww_2")
			this.obj_naam_2 = document.getElementById("l_naam_2")
		}
		else if (document.all)
		{
			this.obj_f = document.all["ww_f"]
			this.obj_0 = document.all["ww_0"]
			this.obj_naam_0 = document.all["l_naam_0"]
			this.obj_1 = document.all["ww_1"]
			this.obj_naam_1 = document.all["l_naam_1"]
			this.obj_2 = document.all["ww_2"]
			this.obj_naam_2 = document.all["l_naam_2"]
		}
	}
	catch(e)
	{
		alert("1 : " + e.message)
	}
}
//-------------------------------------------------------------//
function lg_Reset(Verbose)
{
	try
	{
		this.Status = 0
		document.forms["upagenda"].wachtw.value = ""
		this.obj_f.className="ww_show"
		this.obj_0.className="ww_hide"
		this.obj_1.className="ww_hide"
		this.obj_2.className="ww_hide"
	}
	catch(e)
	{
		alert("1 : " + e.message)
	}
}
//-------------------------------------------------------------//
function lg_Verwerk(Verbose)
{
	try
	{
		var i, p
		this.Status = 0
		this.Wachtwoord = document.forms["upagenda"].wachtw.value
		this.Naam = document.forms["upagenda"].lidnaam.value

		for (i in Personen)
		{
			p = Personen[i]
			if (p && p.Naam && p.Naam == this.Naam)
			{
				this.Status = 1
				this.ps_Persoon = p

				set_cookie("clb_naam", this.Naam)
			}
		}
		if (this.Status == 1)
		{
			if (this.Wachtwoord == "pasteitje")
			{
				this.Status = 2
				this.obj_f.className="ww_hide"
				this.obj_0.className="ww_hide"
				this.obj_1.className="ww_hide"
				this.obj_2.className="ww_show"
				this.obj_naam_2.innerHTML = this.Naam
				this.obj_naam_2.style.color = "#008800"
				set_cookie("clb_wachtwoord", this.Wachtwoord)
			}
			else if (Verbose)
			{
				this.obj_f.className="ww_show"
				this.obj_0.className="ww_hide"
				this.obj_1.className="ww_show"
				this.obj_2.className="ww_hide"

				this.obj_naam_1.innerHTML = this.Naam
				this.obj_naam_1.style.color = "#880000"
			}
		}
		else if (Verbose)
		{
			this.obj_f.className="ww_show"
			this.obj_0.className="ww_show"
			this.obj_1.className="ww_hide"
			this.obj_2.className="ww_hide"

			this.obj_naam_0.innerHTML = this.Naam
			this.obj_naam_0.style.color = "#880000"
		}
	}
	catch(e)
	{
		alert("2 : " + e.message)
	}
}
//-------------------------------------------------------------//
//--------------------- PERSOONS GEGEVENS ---------------------//
//-------------------------------------------------------------//
function ps_Personen()
{
	try
	{
		var Tekst = document.forms["fm_bios"].innerHTML,
			Ar = Tekst.split("#"),
			i, 
			elm,
			Sub
		this.pop = document.ps_pop

		this.Doy = new ps_Persoon({left : 164, top : 230},
							 "Doy",
							 "Salsbach", 
							 "muzikale leiding",
							 "popfoto/pop_doy.jpg",
							 this)
		this.Dave = new ps_Persoon({left : 275, top : 220},
							 "Dave",
							 "Meertins", 
							 "conga's",
							 "popfoto/pop_dave.jpg",
							 this)
		this.Hein = new ps_Persoon({left : 548, top : 188},
							 "Hein",
							 "van der Zee", 
							 "trompet",
							 "popfoto/pop_hein.jpg",
							 this)
		this.Karin = new ps_Persoon({left : 490, top : 390},
							 "Karin",
							 "de Bye", 
							 "bongo's & handpercussie",
							 "popfoto/pop_karin.jpg",
							 this)
		this.Linda = new ps_Persoon({left : 240, top : 480},
							 "Linda",
							 "Roemer", 
							 "zang",
							 "popfoto/pop_linda.jpg",
							 this)
		this.Armand = new ps_Persoon({left : 688, top : 200},
							 "Armand",
							 "Promes", 
							 "basgitaar",
							 "popfoto/pop_armand.jpg",
							 this)
		this.Patricia = new ps_Persoon({left : 710, top : 410},
							 "Patricia",
							 "Herrera-Torres", 
							 "zang",
							 "popfoto/pop_patricia.jpg",
							 this)
		this.Marcel = new ps_Persoon({left : 374, top : 196},
							 "Marcel",
							 "Smit", 
							 "tenor saxofoon",
							 "popfoto/pop_marcel.jpg",
							 this)
		this.Reginald = new ps_Persoon({left : 430, top : 166},
							 "Reginald",
							 "Savans", 
							 "slagwerk",
							 "popfoto/pop_reginald.jpg",
							 this)
		this.Eric = new ps_Persoon({left : 630, top : 184},
							 "Eric",
							 "Justiana", 
							 "piano",
							 "popfoto/pop_eric.jpg",
							 this)
		this.Harry = new ps_Persoon({left : 818, top : 190},
							 "Harry",
							 "Debeye", 
							 "alt saxofoon",
							 "popfoto/pop_harry.jpg",
							 this)
		this.Joop = new ps_Persoon({left : 900, top : 224},
							 "Joop",
							 "van Engelen",
							 "bariton saxofoon",
							 "popfoto/pop_joop.jpg",
							 this)
		this.Janella = new ps_Persoon({left : 600, top : 370},
							 "Janella",
							 "Martis", 
							 "zang",
							 "popfoto/pop_janella.jpg",
							 this)
		for (i in Ar)
		{
			Sub = Ar[i].split("|")
			if (Sub.length == 2)
			{
				elm = eval("this." + Sub[0])
				elm.Bios = Sub[1]
			}
		}
		this.BiosUit = ps_BiosUit
	}
	catch(e)
	{
		alert("3 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ps_Persoon(pos_pop,
				Naam,
				Achternaam,
				Instr,
				PopFoto,
				Parent)
{
	try
	{
		this.Naam = Naam
		this.Achternaam = Achternaam
		this.Instr = Instr
		this.PopFoto = PopFoto
		this.Parent = Parent
		this.pos_pop = pos_pop
		this.MuisOver = ps_Muisover
		this.PopBios = ps_PopBios
		this.tekst1 = Naam + " " + Achternaam
	}
	catch(e)
	{
		alert("4 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ps_Muisover(Aan)
{
	try
	{
		if (Aan)
		{
			window.status=this.tekst1 

			if (document.layers)
				this.Parent.pop.visibility = true;
			else
				this.Parent.pop.className = 'pop_show';
			this.Parent.pop.style.left = this.pos_pop.left;
			this.Parent.pop.style.top = this.pos_pop.top;
			this.Parent.pop.bar1.value = this.tekst1;
			this.Parent.pop.bar1.size = this.tekst1.length;
			this.Parent.pop.bar2.value = this.Instr;
			this.Parent.pop.bar2.size = this.Instr.length;
		}
		else
		{
			if (document.layers)
				this.Parent.pop.visibility = false;
			else
				this.Parent.pop.className = 'pop_hide';
		}
	}
	catch(e)
	{
		alert("5 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ps_PopBios()
{
	try
	{
		window.status=this.Naam 
		var i
		var pop = document.ft_bios,
			tekst

		tekst = '<div class="k_div">'
		tekst = tekst + '<table width="600" border="1" bordercolor="green">'
		tekst = tekst + '<tr>'
		tekst = tekst + '<td width="100" align="left">'
		tekst = tekst + '<span class="ft_vet">' + this.tekst1 + '</span>'
		tekst = tekst + '</td>'
		tekst = tekst + '<td width="400" align="left">'
		tekst = tekst + '<table><tr><td width="10"></td><td>'
		tekst = tekst + '<span class="ft_vet">' + this.Instr + '</span>'
		tekst = tekst + '</td><td width="10"></td></tr></table>'
		tekst = tekst + '</td>'
		tekst = tekst + '</tr>'
		tekst = tekst + '<tr>'
		tekst = tekst + '<td width="200">'
		tekst = tekst + '<img alt="" src="' + this.PopFoto + '">'
		tekst = tekst + '</td>'
		tekst = tekst + '<td valign="top">'
		tekst = tekst + '<table><tr><td width="10"></td><td>'
		tekst = tekst + '<span class="ft_vet">' + this.Bios + '</span>'
		tekst = tekst + '</td><td width="10"></td></tr></table>'
		tekst = tekst + '</td>'
		tekst = tekst + '</tr>'
		tekst = tekst + '</table>'
		tekst = tekst + '</div>'
		pop.innerHTML = tekst

		if (document.layers)
			pop.visibility = true;
		else
			pop.className = 'pop_show';

		if (isBrowser() == 2)
		{
			if (document.compatMode && document.compatMode != "BackCompat")
			{
				pop.style.left = document.documentElement.scrollLeft + 48
				pop.style.top = document.documentElement.scrollTop
			}
			else
			{
				pop.style.left = document.body.scrollLeft + 48
				pop.style.top = document.body.scrollTop - 48
			}
		}
		else
		{
			pop.style.left = pageXOffset + 48
			pop.style.top = pageYOffset
		}
		Sprites.Vries(true)
	}
	catch(e)
	{
		alert("12 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ps_BiosUit()
{
	Sprites.Vries(false)
	if (document.layers)
		document.ft_bios.visibility = false;
	else
		document.ft_bios.className = 'pop_hide';
}
//-------------------------------------------------------------//
//------------------ DANSENDE HOOFDEN --------------------------//
//-------------------------------------------------------------//
function ft_Fotos()
{
	try
	{
		this.pop89 = new ft_Foto(89,
									"popfoto/pop89.jpg",
									"",
									"",
									"Colegio Latino Band",
									{left:96, top:100},
									{left:96, top:224},
									{left:96, top:400},
									this)
		this.pop18 = new ft_Foto(18,
									"popfoto/pop18.jpg",
									"",
									"",
									"tropische sfeer",
									{left:306, top:256},
									{left:306, top:256},
									{left:96, top:400},
									this)
		this.pop55 = new ft_Foto(55,
									"popfoto/pop55.jpg",
									"popfoto/pop50.jpg",
									"",
									"de blazers",
									{left:48, top:400},
									{left:496, top:10},
									{left:96, top:400},
									this)
		this.pop59 = new ft_Foto(59,
									"popfoto/pop59.jpg",
									"popfoto/pop85.jpg",
									"",
									"de ritme sectie",
									{left:96, top:400},
									{left:496, top:50},
									{left:96, top:400},
									this)
		this.pop67 = new ft_Foto(67,
									"popfoto/pop67.jpg",
									"popfoto/pop75.jpg",
									"popfoto/pop33.jpg",
									"de zangeressen",
									{left:96, top:450},
									{left:48, top:200},
									{left:400, top:100},
									this)
		this.pop71 = new ft_Foto(71,
									"popfoto/pop71.jpg",
									"",
									"",
									"de dansvloer",
									{left:200, top:280},
									{left:200, top:280},
									{left:96, top:400},
									this)
		this.pop25 = new ft_Foto(25,
									"popfoto/pop25.jpg",
									"",
									"",
									"de bandleider",
									{left:48, top:400},
									{left:96, top:400},
									{left:96, top:400},
									this)
		this.popmap = new ft_Foto(0,
									"popfoto/popmap.jpg",
									"",
									"",
									"het repertoire",
									{left:48, top:200},
									{left:96, top:400},
									{left:96, top:400},
									this)
		this.danseres = new ft_Foto(3,
									"popfoto/danseres.jpg",
									"",
									"",
									"dansworkshop",
									{left:48, top:200},
									{left:96, top:400},
									{left:96, top:400},
									this)
		this.nsj = new ft_Foto(4,
									"popfoto/nsj.jpg",
									"",
									"",
									"North Sea Jazzfestival",
									{left:48, top:100},
									{left:96, top:400},
									{left:96, top:400},
									this)
		this.limbo = new ft_Foto(5,
									"popfoto/limbo.jpg",
									"",
									"",
									"Showdansgroep",
									{left:48, top:100},
									{left:96, top:400},
									{left:96, top:400},
									this)
		this.show19 = new ft_Foto(6,
									"popfoto/show19.jpg",
									"",
									"",
									"Culturele evenementen",
									{left:48, top:-20},
									{left:96, top:400},
									{left:96, top:400},
									this)
		this.popbal = new ft_Foto(1,
									"popfoto/popbal.jpg",
									"",
									"",
									"feest!",
									{left:96, top:200},
									{left:96, top:400},
									{left:96, top:400},
									this)
		this.popknal = new ft_Foto(2,
									"popfoto/popknal.jpg",
									"",
									"",
									"feest!",
									{left:96, top:200},
									{left:96, top:400},
									{left:96, top:400},
									this)

		this.kop_doy = new ft_Foto(100,
									"popfoto/kop_doy.jpg",
									"popfoto/kop_karin.jpg",
									"popfoto/kop_hein.jpg",
									"Colegio Latino",
									{left:50, top:50},
									{left:200, top:250},
									{left:350, top:450},
									this)
		this.kop_karin = new ft_Foto(101,
									"popfoto/kop_karin.jpg",
									"popfoto/kop_hein.jpg",
									"popfoto/kop_janella.jpg",
									"Colegio Latino",
									{left:200, top:50},
									{left:350, top:250},
									{left:500, top:450},
									this)
		this.kop_hein = new ft_Foto(102,
									"popfoto/kop_hein.jpg",
									"popfoto/kop_janella.jpg",
									"popfoto/kop_linda.jpg",
									"Colegio Latino",
									{left:350, top:50},
									{left:500, top:250},
									{left:50, top:450},
									this)
		this.kop_janella = new ft_Foto(103,
									"popfoto/kop_janella.jpg",
									"popfoto/kop_linda.jpg",
									"popfoto/kop_patricia.jpg",
									"Colegio Latino",
									{left:500, top:50},
									{left:50, top:250},
									{left:200, top:450},
									this)
		this.kop_linda = new ft_Foto(104,
									"popfoto/kop_linda.jpg",
									"popfoto/kop_patricia.jpg",
									"popfoto/kop_dave.jpg",
									"Colegio Latino",
									{left:50, top:50},
									{left:200, top:250},
									{left:350, top:450},
									this)
		this.kop_patricia = new ft_Foto(105,
									"popfoto/kop_patricia.jpg",
									"popfoto/kop_dave.jpg",
									"popfoto/kop_armand.jpg",
									"Colegio Latino",
									{left:200, top:50},
									{left:350, top:250},
									{left:500, top:450},
									this)
		this.kop_dave = new ft_Foto(106,
									"popfoto/kop_dave.jpg",
									"popfoto/kop_armand.jpg",
									"popfoto/kop_joop.jpg",
									"Colegio Latino",
									{left:350, top:50},
									{left:500, top:250},
									{left:50, top:450},
									this)
		this.kop_armand = new ft_Foto(107,
									"popfoto/kop_armand.jpg",
									"popfoto/kop_joop.jpg",
									"popfoto/kop_eric.jpg",
									"Colegio Latino",
									{left:500, top:50},
									{left:50, top:250},
									{left:200, top:450},
									this)
		this.kop_joop = new ft_Foto(108,
									"popfoto/kop_joop.jpg",
									"popfoto/kop_eric.jpg",
									"popfoto/kop_eric.jpg",
									"Colegio Latino",
									{left:50, top:50},
									{left:200, top:250},
									{left:350, top:450},
									this)
		this.kop_eric = new ft_Foto(109,
									"popfoto/kop_eric.jpg",
									"popfoto/kop_reginald.jpg",
									"popfoto/kop_marcel.jpg",
									"Colegio Latino",
									{left:350, top:50},
									{left:500, top:250},
									{left:50, top:450},
									this)
		this.kop_reginald = new ft_Foto(110,
									"popfoto/kop_reginald.jpg",
									"popfoto/kop_marcel.jpg",
									"popfoto/kop_doy.jpg",
									"Colegio Latino",
									{left:500, top:50},
									{left:50, top:250},
									{left:200, top:450},
									this)
		this.kop_marcel = new ft_Foto(111,
									"popfoto/kop_marcel.jpg",
									"popfoto/kop_doy.jpg",
									"popfoto/kop_karin.jpg",
									"Colegio Latino",
									{left:50, top:50},
									{left:200, top:250},
									{left:350, top:450},
									this)
		this.kop_doy2 = new ft_Foto(112,
									"popfoto/kop_doy.jpg",
									"popfoto/kop_karin.jpg",
									"",
									"Colegio Latino",
									{left:200, top:50},
									{left:350, top:250},
									{left:500, top:450},
									this)
		this.kop_karin2 = new ft_Foto(113,
									"popfoto/kop_karin.jpg",
									"",
									"",
									"Colegio Latino",
									{left:350, top:50},
									{left:500, top:250},
									{left:50, top:450},
									this)
		this.Huidig = null
		this.Muisuit = ft_Muisuit
		this.pop1 = document.ft_pop1
		this.img1 = document.ft_pop1.ft_img
		this.pop2 = document.ft_pop2
		this.img2 = document.ft_pop2.ft_img
		this.pop3 = document.ft_pop3
		this.img3 = document.ft_pop3.ft_img
	}
	catch(e)
	{
		alert("6 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ft_Foto(
				Nummer,
				Bestandnaam1,
				Bestandnaam2,
				Bestandnaam3,
				Tekst,
				pos_pop1,
				pos_pop2,
				pos_pop3,
				Parent)
{
	try
	{
		this.Nummer = Nummer
		this.Bestandnaam1 = Bestandnaam1
		this.Bestandnaam2 = Bestandnaam2
		this.Bestandnaam3 = Bestandnaam3
		this.Tekst = Tekst
		this.pos_pop1 = pos_pop1
		this.pos_pop2 = pos_pop2
		this.pos_pop3 = pos_pop3
		this.Parent = Parent
		this.Muisover = ft_Muisover
	}
	catch(e)
	{
		alert("7 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ft_Muisover()
{
	try
	{
		if (this.Parent.Huidig == this)
				return

		window.status=this.Tekst 

		this.Parent.Huidig = this

		if (document.layers)
			this.Parent.pop1.visibility = true;
		else
			this.Parent.pop1.className = 'pop_show';
		this.Parent.pop1.style.left = this.pos_pop1.left;
		this.Parent.pop1.style.top = this.pos_pop1.top;
		this.Parent.img1.src = this.Bestandnaam1

		if (this.Bestandnaam2.length)
		{
			if (document.layers)
				this.Parent.pop2.visibility = true;
			else
				this.Parent.pop2.className = 'pop_show';
			this.Parent.pop2.style.left = this.pos_pop2.left;
			this.Parent.pop2.style.top = this.pos_pop2.top;
			this.Parent.img2.src = this.Bestandnaam2
		}
		if (this.Bestandnaam3.length)
		{
			if (document.layers)
				this.Parent.pop3.visibility = true;
			else
				this.Parent.pop3.className = 'pop_show';
			this.Parent.pop3.style.left = this.pos_pop3.left;
			this.Parent.pop3.style.top = this.pos_pop3.top;
			this.Parent.img3.src = this.Bestandnaam3
		}
		if (this.Nummer == 1)
		{
			setTimeout("ft_Knal()",1000)
		}
		if (this.Nummer >= 100)
		{
			setTimeout("ft_Kop(" + this.Nummer + ")",400)
		}
	}
	catch(e)
	{
		alert("8 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ft_Knal()
{
	try
	{
		if (Fotos.Huidig && Fotos.Huidig.Nummer == 1)
		{
			try
			{
				knal.stop()
				knal.run()
			}
			catch(e)
			{
				window.status=e.message
			}
			Fotos.popknal.Muisover()
		}
	}
	catch(e)
	{
		alert("9 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ft_Kop(Nr)
{
	try
	{
		var i
		Nr++
		if (Nr > 113)
			Nr = 100
		if (Fotos.Huidig && Fotos.Huidig.Nummer >= 100)
		{
			for (i in Fotos)
			{
				if (Fotos[i] && Fotos[i].Nummer && Fotos[i].Nummer == Nr)
				{
					Fotos.Muisuit()
					Fotos[i].Muisover()
					break
				}
			}
		}
	}
	catch(e)
	{
		alert("10 : " + e.message)
	}
}
//-------------------------------------------------------------//
function ft_Muisuit()
{
	try
	{
		if (document.layers)
		{
			this.pop1.visibility = false;
			this.pop2.visibility = false;
			this.pop3.visibility = false;
		}
		else
		{
			this.pop1.className = 'pop_hide';
			this.pop2.className = 'pop_hide';
			this.pop3.className = 'pop_hide';
		}
		this.Huidig = null
	}
	catch(e)
	{
		alert("11 : " + e.message)
	}
}
//-------------------------------------------------------------//
//------------------ PAGINA'S ---------------------------------//
//-------------------------------------------------------------//
function pg_Paginas()
{
	try
	{
		this.Home = new pg_Pagina(	"Home",
								"", 
								"", 
								"images/sub_0.jpg", 
								"images/sub_0c.jpg",
								dominant,
								tonica,
								this,
								true,
								null,
								document.images.S_Image0)
		this.Sub = new Object()
		
		this.Huidige = this.Home
		this.Act = this.Home
		this.IsHome = true
		this.Naam = "Paginas"

		this.DeBand = new pg_Pagina("DeBand",
								"images/home_0_1.jpg", 
								"images/home_0_1c.jpg", 
								"images/sub_1.jpg", 
								"images/sub_1c.jpg",
								clave,
								null,
								this,
								false,
								document.images.H_Image1,
								document.images.S_Image1)
		this.Video = new pg_Pagina("Video",
								"images/home_0_2.jpg", 
								"images/home_0_2c.jpg", 
								"images/sub_2.jpg", 
								"images/sub_2c.jpg",
								conga,
								null,
								this,
								false,
								document.images.H_Image2,
								document.images.S_Image2)
		this.Agenda = new pg_Pagina("Agenda",
								"images/home_0_3.jpg", 
								"images/home_0_3c.jpg", 
								"images/sub_3.jpg", 
								"images/sub_3c.jpg",
								gui_l,
								gui_s,
								this,
								false,
								document.images.H_Image3,
								document.images.S_Image3)
		this.Kontakt = new pg_Pagina("Kontakt",
								"images/home_0_4.jpg", 
								"images/home_0_4c.jpg", 
								"images/sub_4.jpg", 
								"images/sub_4c.jpg",
								maracas,
								maracas,
								this,
								false,
								document.images.H_Image4,
								document.images.S_Image4)
		this.Leden = new pg_Pagina("Leden",
								"images/home_0_5.jpg", 
								"images/home_0_5c.jpg", 
								"images/sub_5.jpg", 
								"images/sub_5c.jpg",
								bell,
								null,
								this,
								false,
								document.images.H_Image5,
								document.images.S_Image5)

		if (isBrowser() == 3)
		{
			this.Home.divob = document.getElementById("pg_home")
			this.Sub.divob = document.getElementById("pg_sub")
			this.DeBand.divob = document.getElementById("pg_deband")
			this.Video.divob = document.getElementById("pg_video")
			this.Agenda.divob = document.getElementById("pg_agenda")
			this.Kontakt.divob = document.getElementById("pg_kontakt")
			this.Leden.divob = document.getElementById("pg_leden")
			this.Leden.obj_hlp_a = document.getElementById("lg_hlp_a")
			this.Video.obj_hlp_a = document.getElementById("gl_hlp_a")
		}
		else
		{
			this.Home.divob = document.all["pg_home"]
			this.Sub.divob = document.all["pg_sub"]
			this.DeBand.divob = document.all["pg_deband"]
			this.Video.divob = document.all["pg_video"]
			this.Agenda.divob = document.all["pg_agenda"]
			this.Kontakt.divob = document.all["pg_kontakt"]
			this.Leden.divob = document.all["pg_leden"]
			this.Leden.obj_hlp_a = document.all["lg_hlp_a"]
			this.Video.obj_hlp_a = document.all["gl_hlp_a"]
		}
		this.Act.Set()
	}
	catch(e)
	{
		alert("13 : " + e.message)
	}
}
//-------------------------------------------------------------//
function pg_Pagina(Naam,
				H_Img_Aan, 
				H_Img_Uit, 
				S_Img_Aan, 
				S_Img_Uit, 
				Snd_Aan, 
				Snd_Uit, 
				Parent, 
				IsHome,
				H_Image,
				S_Image)
{
	try
	{
		this.Naam = Naam
		this.H_Img_Aan = H_Img_Aan
		this.H_Img_Uit = H_Img_Uit
		this.S_Img_Aan = S_Img_Aan
		this.S_Img_Uit = S_Img_Uit
		this.Parent = Parent
		this.IsHome = IsHome
		this.Snd_Aan = Snd_Aan
		this.Snd_Uit = Snd_Uit
		this.H_Image = H_Image
		this.S_Image = S_Image
		if (IsHome)
			this.Show = pg_Show_H
		else
			this.Show = pg_Show_S
		this.Set = pg_Set
		this.Sound = pg_Sound
		this.MuisOver = pg_MuisOver
		this.Help = pg_Help
		if (window.location.search == "?" + Naam)
		{
			this.Parent.Act = this
		}
	}
	catch(e)
	{
		alert("14 : " + e.message)
	}
}
//-------------------------------------------------------------//
function pg_Sound(Aan)
{
	try
	{
		if (Aan)
		{
			if (this.Snd_Uit)
				this.Snd_Uit.stop()
			this.Snd_Aan.run()
//			koe.stop()
		}
		else
		{
			this.Snd_Aan.stop()
			if (this.Snd_Uit)
				this.Snd_Uit.run()
			if (this.Naam == "Leden")
			{
				Koe++;
				if (!this.Parent.IsHome && Koe > 4)
				{
					this.S_Image.src = "images/sub_5k.jpg"
					koe.run()
					Koe = 0;
				}
			}
		}
	}
	catch(e)
	{
		window.status=e.message
	}
}
//-------------------------------------------------------------//
function pg_Set()
{
	try
	{
		if (this.obj_hlp_a)
			this.obj_hlp_a.className = "pop_hide"

		if (this == this.Parent.Huidige)
			return false

		window.status = this.Naam
		this.Parent.Huidige.Show(false)
		this.Show(true)
		this.Parent.Huidige = this
		window.scrollTo(0, 0)
		if (this.Naam == "Leden")
		{
			document.forms["upagenda"].wachtw.value = get_cookie("clb_wachtwoord")
			document.forms["upagenda"].lidnaam.value = get_cookie("clb_naam")
			LogIn.Verwerk(false)
		}
		if (this.Naam == "DeBand")
			setTimeout("sp_UpSprites()",100)

		return false
	}
	catch(e)
	{
		alert("15 : " + e.message)
	}
	return false
}
//-------------------------------------------------------------//
function pg_Show_H(Aan)
{
	try
	{
		this.Parent.IsHome = Aan
		if (Aan)
		{
			window.status = this.Naam
			this.Parent.Sub.divob.className = "home_hide"
			this.divob.className = "home_show"
			this.Sound(false)
		}
		else
		{
			this.S_Image.src = this.S_Img_Aan
			this.divob.className = "home_hide"
		}
	}
	catch(e)
	{
		alert("16 : " + e.message)
	}
}
//-------------------------------------------------------------//
function pg_Show_S(Aan)
{
	try
	{
		if (Aan)
		{
			window.status = this.Naam
			this.Parent.Sub.divob.className = "home_show"
			this.divob.className = "pag_show"
			this.Parent.Sub.divob.style.background="url(images/subb.jpg) no-repeat"
			this.Parent.Sub.divob.style.height=690
			this.Parent.Sub.divob.style.width=1024
			this.S_Image.src = this.S_Img_Aan
			this.H_Image.src = this.H_Img_Aan
			this.Sound(false)
		}
		else
		{
			this.divob.className = "pag_hide"
		}
	}
	catch(e)
	{
		alert("17 : " + e.message)
	}
}
//-------------------------------------------------------------//
function pg_MuisOver(Aan)
{
	try
	{
		if (Aan)
		{
			window.status = this.Naam
			this.Sound(true)
			if (this.Parent.IsHome)
			{
				if (this.H_Image)
					this.H_Image.src = this.H_Img_Uit
			}
			else
				this.S_Image.src = this.S_Img_Uit
		}
		else
		{
			if (this.Parent.IsHome)
			{
				if (this.H_Image)
					this.H_Image.src = this.H_Img_Aan
			}
			else
				this.S_Image.src = this.S_Img_Aan
			this.Sound(false)
		}
	}
	catch(e)
	{
		alert("18 : " + e.message)
	}
}
//-------------------------------------------------------------//
function pg_Help(Aan)
{
	if (Aan)
		this.obj_hlp_a.className = "help_txt"
	else
		this.obj_hlp_a.className = "pop_hide"
}
//-------------------------------------------------------------//
//---------------- WELKE BROWSER? -----------------------------//
//-------------------------------------------------------------//
function isBrowser() 
{
	try
	{
		if (document.layers) 
			return 1
		else if (document.all) 
			return 2
		else if (document.getElementById) 
			return 3
		else
			return 0
	}
	catch(e)
	{
		alert("19 : " + e.message)
	}
}
//-------------------------------------------------------------//
//----------------- MUIS-EVENTS -------------------------------//
//-------------------------------------------------------------//
function processEvent(e) 
{
	try
	{
		var x, y

		if (isBrowser() == 2) 
		{ // for IE
			if (document.compatMode && document.compatMode != "BackCompat")
			{ 
				y = window.event.clientY + document.documentElement.scrollTop
				x = window.event.clientX + document.documentElement.scrollLeft
			}
			else
			{ 
				y = window.event.clientY + document.body.scrollTop
				x = window.event.clientX + document.body.scrollLeft
			}
		}
		else
		{ // for Navigator
			y = e.clientY + window.pageYOffset
			x = e.clientX + window.pageXOffset
		}

//		window.status = "muis positie " + x + " : " + y
//		document.all["status"].innerHTML = "muis positie " + x + " : " + y
		MuisPos.xv = MuisPos.x
		MuisPos.yv = MuisPos.y
		MuisPos.x = x
		MuisPos.y = y

		Was = Nr;
		Nr = null;
		PWas = PNr;
		PNr = null;
		if (Paginas.Huidige.IsHome)
		{
			if (x >= 0 && x < 120)
			{
				if (y >= 100 && y < 700)
				{
					if (y < 192)
						Nr = Paginas.DeBand
					else if (y >= 200 && y < 392)
						Nr = Paginas.Video
					else if (y >= 400 && y < 492)
						Nr = Paginas.Agenda
					else if (y >= 500 && y < 592)
						Nr = Paginas.Kontakt
					else if (y >= 600 && y < 692)
						Nr = Paginas.Leden
				}
			}
			if (x >= 200 && x < 250 && y >= 120 && y < 190)
				PNr = Personen.Doy
			else if (x >= 295 && x < 345 && y >= 112 && y < 182)
				PNr = Personen.Dave
			else if (x >= 568 && x < 618 && y >= 110 && y < 180)
				PNr = Personen.Hein
			else if (x >= 524 && x < 578 && y >= 304 && y < 374)
				PNr = Personen.Karin
			else if (x >= 256 && x < 306 && y >= 360 && y < 430)
				PNr = Personen.Linda
			else if (x >= 705 && x < 755 && y >= 125 && y < 195)
				PNr = Personen.Armand
			else if (x >= 724 && x < 774 && y >= 324 && y < 394)
				PNr = Personen.Patricia
			else if (x >= 384 && x < 434 && y >= 104 && y < 174)
				PNr = Personen.Marcel
			else if (x >= 444 && x < 494 && y >=  95 && y < 165)
				PNr = Personen.Reginald
			else if (x >= 650 && x < 700 && y >= 120 && y < 190)
				PNr = Personen.Eric
			else if (x >= 850 && x < 900 && y >= 110 && y < 180)
				PNr = Personen.Harry
			else if (x >= 936 && x < 986 && y >= 128 && y < 198)
				PNr = Personen.Joop
			else if (x >= 624 && x < 674 && y >= 290 && y < 360)
				PNr = Personen.Janella

		}
		else
		{
			if (y >= 0 && y < 100)
			{
				if (x >= 320 && x < 412)
					Nr = Paginas.Home
				else if (x >= 420 && x < 512)
					Nr = Paginas.DeBand
				else if (x >= 520 && x < 612)
					Nr = Paginas.Video
				else if (x >= 620 && x < 712)
					Nr = Paginas.Agenda
				else if (x >= 720 && x < 812)
					Nr = Paginas.Kontakt
				else if (x >= 820 && x < 912)
					Nr = Paginas.Leden
			}
		}
		if (Nr != Was)
		{
			if (Was)
				Was.MuisOver(false)
			if (Nr)
				Nr.MuisOver(true)
		}
		if (PNr != PWas)
		{
			if (PWas)
				PWas.MuisOver(false)
			if (PNr)
				PNr.MuisOver(true)
		}
	}
	catch(e)
	{
		document.onmousemove = null // stop capturing
		alert("20 : " + e.message)
	}
}
//-------------------------------------------------------------//
//-------------------- SPRITES --------------------------------//
//-------------------------------------------------------------//
function sp_Sprites(obj)
{
	try
	{
		this.N = 3
		this.M = 3
		this.Sprite = new Array(this.M)
		var i
		var S0

		this.x = 0
		this.y = 0
		this.w = 0
		this.h = 4
		this.mx = 0
		this.my = 0
		this.mvx = 0
		this.mvy = 0
		this.Nummer = -1
		this.glass = false

		for (j = 0; j < this.M; j++)
		{
			this.Sprite[j] = new Array(this.N)
			for (i = 0; i < this.N; i++)
				this.Sprite[j][i] = new sp_Sprite(j, i, this)
		}
		this.Update = sp_UpSprites
		this.Muisover = sp_Muisover
		this.Vries = sp_Vries
	}
	catch(e)
	{
		alert("sp_ " + e.message)
	}
}
//-------------------------------------------------------------//
function sp_Sprite(j, i, pParent)
{
	try
	{
		if (document.getElementById)
			this.obj = document.getElementById("sprite_" + j + "_" + i)
		else if (document.all)
			this.obj = document.all["sprite_" + j + "_" + i]

		this.Nummer = i
		this.Parent = pParent
		if (i == 0)
			this.Vorige = this.Parent
		else
			this.Vorige = this.Parent.Sprite[j][i - 1]

		if (i == 2)
			this.Volgende = this.Parent

		if (i > 0)
			this.Vorige.Volgende = this
		this.x = this.Vorige.x // + this.Vorige.w
		this.y = this.Parent.y
		this.vx = 0
		this.vy = 0
		this.ax = 0
		this.ay = 0
		this.dx = 0
		this.dy = 0
		this.dvx = 0
		this.dvy = 0
		this.C = 0.02
		this.F = 0.04
		this.V = 5
		this.B = 0.7
		this.Gepakt = false
		this.obj.style.left = this.x
		this.obj.style.top = this.y
		this.Update = sp_UpSprite
		this.IsInit = false
		this.x0 = 0
		this.y0 = 0
	}
	catch(e)
	{
		alert("sps_ " + e.message)
	}
}
//-------------------------------------------------------------//
function sp_UpSprites()
{
	try
	{
		if (Paginas.Huidige.Naam == "DeBand")
		{
			for (j = 0; j < Sprites.M; j++)
				for (i = 0; i < Sprites.N; i++)
					Sprites.Sprite[j][i].Update()
			setTimeout("sp_UpSprites()",40)
		}
	}
	catch(e)
	{
		alert("sp_up " + e.message)
	}
}
//-------------------------------------------------------------//
function sp_UpSprite()
{
	try
	{
		if (!this.Gepakt)
		{
			this.ax = this.C * (this.Vorige.x + this.Volgende.x - 2 * this.x) - this.F * this.vx
			this.ay = this.C * (this.Vorige.y + this.Volgende.y - 2 * this.y) - this.F * this.vy
			this.vx += this.ax
			this.vy += this.ay
			this.x += this.vx
			this.y += this.vy
			if (!this.Parent.glass && (this.x < -600 || this.x > 1000))
			{
				glass.stop()
				glass.run()
				this.Parent.glass = true
			}
			if (!this.Parent.glass && this.y < -400)
			{
				au.stop()
				au.run()
				this.Parent.glass = true
			}
		}

		this.obj.style.left = this.x
		this.obj.style.top = this.y
	}
	catch(e)
	{
		alert("sps_up " + e.message)
	}
}
//-------------------------------------------------------------//
function sp_Vries(Aan)
{
	var i, j;
	if (Aan)
	{
		for (i = 0; i < this.N; i++)
		for (j = 0; j < this.M; j++)
		{
			this.Sprite[j][i].x = -5000
			this.Sprite[j][i].y = -5000
			this.Sprite[j][i].Gepakt = true;
		}
	}
	else
	{
		for (i = 0; i < this.N; i++)
		for (j = 0; j < this.M; j++)
		{
			this.Sprite[j][i].x = 0
			this.Sprite[j][i].y = 0
			this.Sprite[j][i].vx = 0
			this.Sprite[j][i].vy = 0
			this.Sprite[j][i].ax = 0
			this.Sprite[j][i].ay = 0
			this.Sprite[j][i].Gepakt = false;
		}
	}
}
//-------------------------------------------------------------//
function sp_Muisover(j, i)
{
	var dit = Sprites.Sprite[j][i]

	tik.stop()
	tik.run()
	Sprites.glass = false
	dit.vx = dit.V * (MuisPos.x - MuisPos.xv) - dit.B * dit.vx
	dit.vy = 2 * dit.V * (MuisPos.y - MuisPos.yv) - dit.B * dit.vy
}
//-------------------------------------------------------------//
//-------------------- FOTO'S BESTELLEN -----------------------//
//-------------------------------------------------------------//
function bestel(obj)
{
	try
	{
		window.status="bestel:" + obj.value
		document.fofo.S1.value=document.fofo.S1.value+'/'+obj.value
		obj.className="hide"
	}
	catch(e)
	{
		alert("21 : " + e.message)
	}
}
//-------------------------------------------------------------//
function send()
{
	try
	{
		var str=document.fofo.S1.value
		if (str.length>0)
		{
			location.href="mailto:frank@gridm.nl?subject=bestelling%20CLB_060708&body="+str
		}
		else
			alert("Je hebt nog geen foto's gekozen!")
	}
	catch(e)
	{
		alert("22 : " + e.message)
	}
}
//-------------------------------------------------------------//
//-------------- KOEKJES --------------------------------------//
//-------------------------------------------------------------//
function get_cookie(Name)
{
	var search = Name + "="
	var returnvalue = "";
	if (document.cookie.length > 0)
	{
		offset = document.cookie.indexOf(search)

		if (offset != -1)
		{ 
			offset += search.length
			end = document.cookie.indexOf(";", offset);
			if (end == -1)
				end = document.cookie.length;
			returnvalue=unescape(document.cookie.substring(offset, end))
		}
	}
	return returnvalue;
}
//-------------------------------------------------------------//
function set_cookie(Name, Value)
{
	try
	{
		var today = new Date(),
			expires_date = new Date(today.getTime() + (365 * 24 * 60 * 60000));

		document.cookie = Name + "=" +escape( Value ) +
			";expires=" + expires_date.toGMTString() + 
			";path=/" 
	}
	catch(e)
	{
		alert("koekje " + e.message)
	}
}
//-------------------------------------------------------------//
