var DHTML = (document.getElementById || document.all || document.layers);

var timer2Running = false;
var timer2ID = null ;
var timer2Node = null;

function wissel(vol,nieuw){
	vol = new getObj(vol)
	nieuw = new getObj(nieuw)
	vol.style.display = 'block'
	nieuw.style.display = 'none'
}

function toonverberg(item){
	item = new getObj(item)
	if(item.style.display == 'block'){
		item.style.display = 'none'
    } else {
		item.style.display = 'block'
	}
}

function launchHyperlinkWin(hyperlink) {
	Y = 0; 
	X = screen.width*4/10;
	width = screen.width - X;
	height = screen.height;
	str = "width=" + width + ",height=" + height + ",left=" + X + ",top=" + Y;

	popup = window.open(hyperlink, "Hyperlink", 'toolbar=1,location=1,directories=1,status=1,menubar=1,scrollbars=1,resizable=1 ,' + str + '');
}

function launchImageWin2(imagesrc, omschrijving , width, height) {
	Y = screen.height/2 - height/2;
	X = screen.width/2 - width/2;
	str = "width=" + width + ",height=" + height + ",left=" + X + ",top=" + Y;
	imagealt = "Concordia Music Night " + " - " + omschrijving + "";

	popup = window.open("", "Image", 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1 ,' + str + '');
	popup.document.writeln("<html><head><title>" + imagealt +"</title></head>");
	popup.document.writeln("<body><img src=" + imagesrc + " width='100%' border='0'></body>");
	popup.document.close();
	popup.focus();
}

function pad2(number) {
	return (number < 10) ? '0' + number : number;
}

function display_agenda_item2(vervaldatum,datum,activiteit,orkest)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info =  "<tr>" +
				"    <td>" + datum + "</td>" +
				"    <td>" + activiteit  + "</td>" +
				"</tr>" ;

		window.document.write(info);
	}
}

function display_agenda_item3(vervaldatum,datum,activiteit,locatie)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info =  "<tr class=agenda2>" +
				"    <th></th>" +
				"    <td>" + datum + "</td>" +
				"    <td style=\"text-align:right\">" +  locatie + "</td>" +
				"</tr><tr class=agenda3>" + 
				"    <th></th>" +
				"    <td colspan=2>" + activiteit  + "</td>" +
				"</tr>" ;

		window.document.write(info);
	}
}

function display_agenda_item4(vervaldatum,datum,activiteit,toelichting,locatie,lijn)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info =  "<tr>" +
				"    <td>" + datum + "</td>" +
				"    <td><b>" + activiteit  + "</b></td>" +
				"</tr>"
				
		if (toelichting != "") {
				info = info + 
				"<tr>" +
				"    <td></td>" + 
				"    <td>"+ toelichting + "</td>" +
				"</tr>";
		}
		if (locatie != "") {
				info = info + 
				"<tr>" +
				"    <td></td>" + 
				"    <td><br>Locatie: " + locatie + "</td>" +
				"</tr>";
		}
		if (lijn == 0)
			info = info + "<tr><td colspan=2><br></td></tr>" ;
		if (lijn == 1)
			info = info + "<tr><td colspan=2><hr></td></tr>" ;
		if (lijn == 2)
			info = info + "<tr><td></td><td><hr></td></tr>" ;

		window.document.write(info);
	}
}
function display_agenda_item(vervaldatum,datum,activiteit,orkest)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info =  "<tr>" +
				"    <td>" + datum + "</td>" +
				"    <td>" + activiteit  + "</td>" +
				"    <td>" + orkest  + "</td>" +
				"</tr>" ;

		window.document.write(info);
	}
}

function display_agenda_header1(vervaldatum,header)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info = "<h3>" + header + "</h3>";
	} 

	window.document.write(info);
}		
function display_agenda_header2(vervaldatum,header)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info = "<h4>" + header + "</h4>" + "<table><col width=\"80\"><col width=\"430\">";
	} else { 
		info = "<table><col width=\"80\"><col width=\"430\">";
	}

	window.document.write(info);
}
function display_agenda_header(vervaldatum,header)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info = "<h3>" + header + "</h3>" + "<table><col width=\"120\"><col width=\"270\"><col width=\"120\">";
	} else { 
		info = "<table><col width=\"120\"><col width=\"270\"><col width=\"120\">";
	}

	window.document.write(info);
}
function display_agenda_header3(vervaldatum,header)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info = "<table><col width=\"20\"><col width=\"245\"><col width=\"245\">" + "<tr class=agenda1><th colspan=2>" + header + "</th><td></td></tr>" ;
	} else { 
		info = "<table><col width=\"20\"><col width=\"245\"><col width=\"245\">";
	}

	window.document.write(info);
}
function display_agenda_header4(vervaldatum,header)
{
	var date = new Date();
	var datumstr = date.getFullYear()+""+pad2(date.getMonth()+1)+""+pad2(date.getDate());
	var info = "" ;

	if ((vervaldatum == "") || (vervaldatum >= datumstr)) {
		info = "<h3>" + header + "</h3>" + "<table><col width=\"200\"><col width=\"310\"><tr><td colspan=2><hr></td>";
	} else { 
		info = "<table><col width=\"200\"><col width=\"310\">";
	}

	window.document.write(info);
}


function display_agenda_footer()
{
	info =  "</table><br><br><br>" ;

	window.document.write(info);
}

function display_fotoboek_item(foto,titel,zichtbaar)
{
	var info = "" ;
	
	if (fotoboek_hoofdstuk <= 3 ) {
		info =  "<a href=\"content/fotos/" + fotoboek_folder + "/" + foto + ".jpg\"" +
				"rel=\"lightbox[" + fotoboek_folder + "]\"" + 
				"title=\"" + titel +"\">" ;
				
		if (zichtbaar == 1)
		{
			fotoboek_foto++ ;
			if (((fotoboek_hoofdstuk <= 2 ) && (fotoboek_foto <= 6)) || ((fotoboek_hoofdstuk > 2 ) && (fotoboek_foto <= 3))) {
				info = info + "<img src=\"content/fotos/" + fotoboek_folder + "/thumbnails/" + foto + ".png\">";
			}
		}
		info = info + "</a>";

		window.document.write(info);
	} else {
		if ((zichtbaar == 1) && (fotoboek_foto == 0)) 
		{
			info =  "<h5>" + 
					"<a href=\"content/fotos/" + fotoboek_folder + "/" + foto + ".jpg\"" +
					"rel=\"lightbox[" + fotoboek_folder + "]\"" + 
					"title=\"" + titel +"\">" + fotoboek_header + "</h5>" +
					"</a>";
			fotoboek_foto++ ;
		} else {
			info =  "<a href=\"content/fotos/" + fotoboek_folder + "/" + foto + ".jpg\"" +
					"rel=\"lightbox[" + fotoboek_folder + "]\"" + 
					"title=\"" + titel +"\">" + 
					"</a>";
		}
		window.document.write(info);
	}
}

function display_fotoboek_header(folder,header)
{
	var info = "" ;

	fotoboek_hoofdstuk++ ;
	fotoboek_folder = folder ;
	fotoboek_header = header ;
	fotoboek_foto = 0 ;
	info = "" ;
	
	if (fotoboek_hoofdstuk == 4) {
		info = "<h3>fotos<hr></h3>" ;
	}
	if (fotoboek_hoofdstuk <= 3 ) {
		info = "<h3>" + header + "<hr></h3>" + "<div class=\"gallery\">";
	}

	window.document.write(info);
}

function display_fotoboek_footer()
{
	if (fotoboek_hoofdstuk <= 3 ) {
		info =  "</div><br>" ;
		window.document.write(info);
	}
}

function getObj(name)
{
  if (document.getElementById)
  {
  	this.obj = document.getElementById(name);
	this.style = document.getElementById(name).style;
  }
  else if (document.all)
  {
	this.obj = document.all[name];
	this.style = document.all[name].style;
  }
  else if (document.layers)
  {
   	this.obj = document.layers[name];
   	this.style = document.layers[name];
  }
}

function hideMenu(node)
{
	node.style.background="none";
	timerNode = node

	if (!timer2Running) timer2ID = setTimeout("hideMenu2()",200);
	timer2Running = true;
}
function hideMenu2()
{
	if(timer2Running) clearTimeout(timer2ID);
	timer2Running = false;
	
	for (i=0; i<timerNode.childNodes.length; i++) {
		if (timerNode.childNodes[i].tagName == 'DIV') 
		{
			timerNode.childNodes[i].style.visibility="hidden";
		}
	}
}
function showMenu(node)
{
	if(timer2Running) hideMenu2();
	
	for (i=0; i<node.childNodes.length; i++) {
		if (node.childNodes[i].tagName == 'DIV') 
		{
			node.childNodes[i].style.visibility="visible";
		}
	node.style.background="#A7CC5C";
	}
}

function hideMenuOrgineel(node)
{
	for (i=0; i<node.childNodes.length; i++) {
		if (node.childNodes[i].tagName == 'DIV') 
		{
			node.childNodes[i].style.visibility="hidden";
		}
	node.style.background="none";
	}
}

function showMenuOrgineel(node)
{

	for (i=0; i<node.childNodes.length; i++) {
		if (node.childNodes[i].tagName == 'DIV') 
		{
			node.childNodes[i].style.visibility="visible";
		}
	node.style.background="#A7CC5C";
	}
}

