//JSCRIPT //trigger voor code coloring in Dreamweaver

function meel_mij(element, domein, naam) {
		element.href = "mailto:" + naam + "@" + domein;
		return true;
}


// Nodig om de opgegeven naam van een nieuwe foto-collectie te controleren op vreemde tekens
function validateFotoNaam() { 
		var objValue = document.getElementById("nieuwenaam");
		var charpos = objValue.value.search("[^A-Za-z0-9\ ]"); 
		if(objValue.value.length > 0 && charpos >= 0) { 
				strError = objValue.value+": Je mag alleen letters, cijfers en spaties gebruiken voor de naam!"; 
				alert(strError); 
				return false;				 
		}
		else {
				return true;
		}
}

// Functie om tr's te openen en sluiten bij activiteiten en dispuutseten
function toggle_visibility(id) {
		var e = document.getElementById(id);
		if(e.style.display == 'none')
				if(navigator.userAgent.indexOf("Firefox")!=-1){
						var versionindex=navigator.userAgent.indexOf("Firefox")+8
						if (parseInt(navigator.userAgent.charAt(versionindex))>=1)
								e.style.display = 'table-row';
						}
				else {
						e.style.display = 'block';
				}
		else
				e.style.display = 'none';
}


// Functie voor navigatie op de ledenpagina
function go() {
		var prefix = "http://www.dispuutantigone.com/intern/";
		box = document.forms["example"].filter;
		destination = box.options[box.selectedIndex].value;
		if (destination != null) {
			if(navigator.userAgent.indexOf("Firefox")!=-1){
					if (destination) location.href = destination;
			}
			else {
					if (destination) location.href = prefix + destination;
			}
		}
}

function foto_go() {
		var prefix = "http://www.dispuutantigone.com/intern/";
		box = document.getElementById("foto_goto");
		destination = box.options[box.selectedIndex].value;
		var collectie = destination.split("---");
		var locatie = "foto/album/" + collectie[0] + "/collectie/" + collectie[1];
		if (destination != "Ga naar...") {
				if(navigator.userAgent.indexOf("Firefox")!=-1){
						if (destination) location.href = locatie;
				}
				else {
						if (destination) location.href = prefix + locatie;
				}	
		}
}


function profiel_go() {
		var prefix = "http://www.dispuutantigone.com/intern/";
		box = document.getElementById("profiel_goto");
		destination = box.options[box.selectedIndex].value;
		var locatie = "profiel/lid/" + destination;
		if (destination != "Bekijk profiel van...") {
				if(navigator.userAgent.indexOf("Firefox")!=-1){
						if (destination) location.href = locatie;
				}
				else {
						if (destination) location.href = prefix + locatie;
				}
		}
}

function bericht_pagina_go() {
		var prefix = "http://www.dispuutantigone.com/intern/";
		box = document.getElementById("bericht_pagina_goto");
		destination = box.options[box.selectedIndex].value;
		var locatie = "berichten/pagina/" + destination;
		if (destination != "Ga naar...") {
				if(navigator.userAgent.indexOf("Firefox")!=-1){
						if (destination) location.href = locatie;
				}
				else {
						if (destination) location.href = prefix + locatie;
				}
		}
}


function commissie_go() {
		var prefix = "http://www.dispuutantigone.com/intern/";
		box = document.getElementById("commissie_goto");
		destination = box.options[box.selectedIndex].value;
		var locatie = "commissie/commissie/" + destination;
		if (destination != "Ga naar...") {
				if(navigator.userAgent.indexOf("Firefox")!=-1){
						if (destination) location.href = locatie;
				}
				else {
						if (destination) location.href = prefix + locatie;
				}
		}
}

function bestuur_go() {
		var prefix = "http://www.dispuutantigone.com/intern/";
		box = document.getElementById("bestuur_goto");
		destination = box.options[box.selectedIndex].value;
		var locatie = "bestuur/bestuur/" + destination;
		if (destination != "Ga naar...") {
				if(navigator.userAgent.indexOf("Firefox")!=-1){
						if (destination) location.href = locatie;
				}
				else {
						if (destination) location.href = prefix + locatie;
				}
		}
}

function ontvanger_go() {
		var prefix = "http://www.dispuutantigone.com/intern/";
		box = document.getElementById("ontvanger_select_goto");
		destination = box.options[box.selectedIndex].value;
		var locatie = "personal-mail/ontvanger/" + destination;
		if (destination != "Verstuur bericht aan...") {
				if(navigator.userAgent.indexOf("Firefox")!=-1){
						if (destination) location.href = locatie;
				}
				else {
						if (destination) location.href = prefix + locatie;
				}
		}
}



function openMail(id) {
		if(navigator.userAgent.indexOf("Firefox")!=-1){
				window.open('./pagina/personal-message.php?berichtid='+ id, 'Bericht_id_' + id, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=300');				
		}
		else {
				window.open('http://www.dispuutantigone.com/intern/pagina/personal-message.php?berichtid='+ id, 'Bericht_id_' + id, 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=500,height=300');						
		}			
}

//ENDJSCRIPT

