




function showMore(){
    
    if (document.getElementById("bioLong").style.display == "none"){
        document.getElementById("bioLong").style.position = "relative"
        document.getElementById("bioLong").style.display = "block"
        document.getElementById("bioShort").style.display = "none"
    }
    
}

function zoek(){
	document.getElementById("search").submit();
}

function showArtistInfo(file, actId){
	document.getElementById("artistInfo").src = file + "?actId=" + actId;
}

function catOver(num, itype){
	document.getElementById("cat_bg_" + num).style.backgroundImage = "url(imgs/bg_home_cat_" + itype + "_over.jpg)";
	document.getElementById("cat_borderFix_" + num).src = "imgs/home_cat_borderfix_over.gif";
}

function catOut(num, itype){
	document.getElementById("cat_bg_" + num).style.backgroundImage = "url(imgs/bg_home_cat_" + itype + ".jpg)";
	document.getElementById("cat_borderFix_" + num).src = "imgs/home_cat_borderfix.gif";
}

function spinReel(direction){

	// globals spinOffset, numPhoto
			
	if (direction==1){
		if (spinOffset == numPhoto-3){
			return false;
		}
		spinReelDir(direction)	
	}
	
	if (direction==-1){
		if (spinOffset == 0){
			return false;
		}
		spinReelDir(direction)	
	}
	
	if (spinOffset == numPhoto-3){
		document.getElementById("idIconRight").src = "imgs/icon_marker_off.jpg"
	} else {
		document.getElementById("idIconRight").src = "imgs/icon_marker.jpg"
	}

	if (spinOffset == 0){
		document.getElementById("idIconLeft").src = "imgs/icon_marker_left_off.jpg"
	} else {
		document.getElementById("idIconLeft").src = "imgs/icon_marker_left.jpg"
	}
		
}

function spinReelDir(direction){
	obj = document.getElementById("idImageReel")
	obj.scrollLeft += 101 * direction;
	spinOffset = spinOffset + direction;
}


// hoofdnavigatie click; show bullet

var oldBulCatId = "";

function selectBulCat(id){
	if (oldBulCatId != ""){
		document.getElementById("liNav_" + oldBulCatId).style.backgroundImage = "url('imgs/bul01.gif')";
		document.getElementById("liNav_" + oldBulCatId).style.backgroundRepeat = "no-repeat";
		document.getElementById("liNav_" + oldBulCatId).style.backgroundPosition = "2px 3px";
	}
	
	if (id != ""){
		
//		document.getElementById("liNav_" + id).style.listStyleImage = "none";
		document.getElementById("liNav_" + id).style.backgroundImage = "url('imgs/bulcat.gif')";
		document.getElementById("liNav_" + id).style.backgroundRepeat = "no-repeat";
		document.getElementById("liNav_" + id).style.backgroundPosition = "0px 4px";
		

		
//		document.getElementById("bulcat_" + id).style.display = "block";
	}
	
	oldBulCatId = id;
}

function isEmail (src) {
     var emailReg = /^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*\.(\w{2}|(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum))$/;
     var regex = new RegExp(emailReg);
     return regex.test(src);
}

function checkForm (){
    var error = false;
    var strError = "";
    
    
    if (document.getElementById("contactpersoon").value == ""){
        strError += "U dient de <b>contactpersoon</b> op te geven alvorens dit formulier te verzenden<br />";
    }

    
    if (!isEmail(document.getElementById("email").value) && document.getElementById("telefoon").value == ""){
        
        strError += "U dient een <b>telefoonnummer</b> <i>OF</i> een <b>geldig e-mail adres</b> op te geven alvorens dit formulier te verzenden<br />";
        
    } else if (!isEmail(document.getElementById("email").value) && document.getElementById("email").value != ""){
        
        strError += "U heeft een ongeldig e-mailadres opgegeven";
        
    }
    
    if (strError == ""){
       
       document.getElementById("boekingsform").submit();

        
    } else {
        document.getElementById("divError").className = "bgform";
        document.getElementById("divError").innerHTML = "<div class='form_inside'>"+strError+"</div>";
        return false;
    }
    
}

     function picker(){
     
            var ndExample1 = document.getElementById('datechooserex1');
            ndExample1.DateChooser = new DateChooser();

            // Check if the browser has fully loaded the DateChooser object, and supports it.
            if (!ndExample1.DateChooser.display)
            {
                
                return false;
            }

            ndExample1.DateChooser.setCloseTime(200);
            ndExample1.DateChooser.setXOffset(10);
            ndExample1.DateChooser.setYOffset(-10);
            ndExample1.DateChooser.setUpdateFunction(FunctionEx1);
            document.getElementById('datelinkex1').onclick = ndExample1.DateChooser.display;
    
    }

        function FunctionEx1(objDate)
        {
            // objDate is a plain old Date object, with the getPHPDate() property added on.
            document.getElementById('datum').value = objDate.getPHPDate('d-m-Y');
            return true;
        }


// flash audio JS 

// Checks if movie is completely loaded.
// Returns true if yes, false if no.
function movieIsLoaded (theMovie) {
  // First make sure the movie's defined.
  if (typeof(theMovie) != "undefined") {
    // If it is, check how much of it is loaded.
    return theMovie.PercentLoaded() == 100;
  } else {
    // If the movie isn't defined, it's not loaded.
    return false;
  }
}


function thisMovie(movieName) {
  // IE and Netscape refer to the movie object differently.
  // This function returns the appropriate syntax depending on the browser.
  if (navigator.appName.indexOf ("Microsoft") !=-1) {
    return window[movieName]
  }	else {
    return document[movieName]
  }
}




function stopAllMP3(caller){
	
	var doc = document.getElementsByTagName('object');
	
	if (doc.length == 0){
		var doc = document.getElementsByTagName('embed');
	}
	
	// loop every flash movie except the one where the user clicked on play (:
	for (var i = 0; i < doc.length; i++){
		if (doc[i].id != caller && doc[i].id.substring(0,8) == "flashMP3" ){
			doc[i].SetVariable("stopTheMusic", "true"); 
		}
	}
}



var lastIdNav = "algemeen";
var lastNum = "1";




function plus15min() {
	
	curr_time = document.getElementById("belmenu_tijdsvoorkeur").value;
	
	curr = curr_time.split(":");
	curr[1] = parseInt(curr[1]) + 15;
	if (curr[1] > 59) {
		curr[1] = curr[1] -60;
		curr[0] = parseInt(curr[0]) +1;
		if (curr[0] > 23) {
			curr[0] - 24;
		}
	}
	
	var totTime;
	totTime = curr[0]*60 + curr[1];
	
	
	// alleen tussen 9:00 en 17:30
	if ((totTime > 1050 && totTime < 1065)){
		
		curr[0] = "17";
		curr[1] = "30";
		
	} else if (!(totTime >= 540 && totTime <= 1050)){
		curr[0] = "9";
		curr[1] = "00";
	}
	
	// minuten niet bv "19:5" maar 19:05"
	if ((curr[1]+'').length == 1){
		curr[1] = '0' + curr[1];
	}
	
	document.getElementById("belmenu_tijdsvoorkeur").value = curr[0]+":"+curr[1];
	
}


function belmeSubmit(pageURL) {
	
	// check of het telefoonnummer is ingevoerd
	if (document.getElementById("belmenu_telefoon0").value == "" && document.getElementById("belmenu_telefoon1").value == "" ){
		alert("U dient een telefoonnummer op te geven alvorens wij u kunnen terugbellen.")
		return false;
	}
	if (document.getElementById("belmenu_naam").value == ""){
		alert("U dient een naam op te geven alvorens wij u kunnen terugbellen.")
		return false;
	}
	bel_tijd = document.getElementById("belmenu_tijdsvoorkeur").value
	bel_tijd = bel_tijd.split(":");
	if (bel_tijd.length != 2) {
		alert("Geen geldig tijd formaat. Het formaat is H:min.")
		document.getElementById("belmenu_tijdsvoorkeur").value = "9:00";
		return false;
	}
	if (bel_tijd[1] > 59) {
		alert("Geen geldig tijd formaat. Het formaat is H:min.")
		document.getElementById("belmenu_tijdsvoorkeur").value = "9:00";
		return false;
	}
	if (bel_tijd[0] < 9 || bel_tijd[0] > 17) {
		alert("U dient een tijd op te geven tussen 9:00 en 17:30 uur.")
		document.getElementById("belmenu_tijdsvoorkeur").value = "9:00";
		return false;
	}
	if (bel_tijd[0] == 17 && bel_tijd[1] > 30) {
		alert("U dient een tijd op te geven tussen 9:00 en 17:30 uur.")
		document.getElementById("belmenu_tijdsvoorkeur").value = "9:00";
		return false;
	}
	return true;
}


/**
 * SWFObject v1.4: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
 *
 * SWFObject is (c) 2006 Geoff Stearns and is released under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 *
 * **SWFObject is the SWF embed script formarly known as FlashObject. The name was changed for
 *   legal reasons.
 */
if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, useExpressInstall, quality, xiRedirectUrl, redirectUrl, detectKey){
	if (!document.createElement || !document.getElementById) { return; }
	this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
	this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
	this.params = new Object();
	this.variables = new Object();
	this.attributes = new Array();
	if(swf) { this.setAttribute('swf', swf); }
	if(id) { this.setAttribute('id', id); }
	if(w) { this.setAttribute('width', w); }
	if(h) { this.setAttribute('height', h); }
	if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
	this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion(this.getAttribute('version'), useExpressInstall);
	if(c) { this.addParam('bgcolor', c); }
	var q = quality ? quality : 'high';
	this.addParam('quality', q);
	this.setAttribute('useExpressInstall', useExpressInstall);
	this.setAttribute('doExpressInstall', false);
	var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
	this.setAttribute('xiRedirectUrl', xir);
	this.setAttribute('redirectUrl', '');
	if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
}
deconcept.SWFObject.prototype = {
	setAttribute: function(name, value){
		this.attributes[name] = value;
	},
	getAttribute: function(name){
		return this.attributes[name];
	},
	addParam: function(name, value){
		this.params[name] = value;
	},
	getParams: function(){
		return this.params;
	},
	addVariable: function(name, value){
		this.variables[name] = value;
	},
	getVariable: function(name){
		return this.variables[name];
	},
	getVariables: function(){
		return this.variables;
	},
	getVariablePairs: function(){
		var variablePairs = new Array();
		var key;
		var variables = this.getVariables();
		for(key in variables){
			variablePairs.push(key +"="+ variables[key]);
		}
		return variablePairs;
	},
	getSWFHTML: function() {
		var swfNode = "";
		if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
			if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "PlugIn");
			swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
			swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
			var params = this.getParams();
			 for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
			var pairs = this.getVariablePairs().join("&");
			 if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
			swfNode += '/>';
		} else { // PC IE
			if (this.getAttribute("doExpressInstall")) this.addVariable("MMplayerType", "ActiveX");
			swfNode = '<object id="'+ this.getAttribute('id') +'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'">';
			swfNode += '<param name="movie" value="'+ this.getAttribute('swf') +'" />';
			var params = this.getParams();
			for(var key in params) {
			 swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
			}
			var pairs = this.getVariablePairs().join("&");
			if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
			swfNode += "</object>";
		}
		return swfNode;
	},
	write: function(elementId){
		if(this.getAttribute('useExpressInstall')) {
			// check to see if we need to do an express install
			var expressInstallReqVer = new deconcept.PlayerVersion([6,0,65]);
			if (this.installedVer.versionIsValid(expressInstallReqVer) && !this.installedVer.versionIsValid(this.getAttribute('version'))) {
				this.setAttribute('doExpressInstall', true);
				this.addVariable("MMredirectURL", escape(this.getAttribute('xiRedirectUrl')));
				document.title = document.title.slice(0, 47) + " - Flash Player Installation";
				this.addVariable("MMdoctitle", document.title);
			}
		}
		if(this.skipDetect || this.getAttribute('doExpressInstall') || this.installedVer.versionIsValid(this.getAttribute('version'))){
			var n = (typeof elementId == 'string') ? document.getElementById(elementId) : elementId;
			n.innerHTML = this.getSWFHTML();
			return true;
		}else{
			if(this.getAttribute('redirectUrl') != "") {
				document.location.replace(this.getAttribute('redirectUrl'));
			}
		}
		return false;
	}
}

/* ---- detection functions ---- */
deconcept.SWFObjectUtil.getPlayerVersion = function(reqVer, xiInstall){
	var PlayerVersion = new deconcept.PlayerVersion([0,0,0]);
	if(navigator.plugins && navigator.mimeTypes.length){
		var x = navigator.plugins["Shockwave Flash"];
		if(x && x.description) {
			PlayerVersion = new deconcept.PlayerVersion(x.description.replace(/([a-z]|[A-Z]|\s)+/, "").replace(/(\s+r|\s+b[0-9]+)/, ".").split("."));
		}
	}else{
		try{
			var axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
			for (var i=3; axo!=null; i++) {
				axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+i);
				PlayerVersion = new deconcept.PlayerVersion([i,0,0]);
			}
		}catch(e){}
		if (reqVer && PlayerVersion.major > reqVer.major) return PlayerVersion; // version is ok, skip minor detection
		// this only does the minor rev lookup if the user's major version 
		// is not 6 or we are checking for a specific minor or revision number
		// see http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
		if (!reqVer || ((reqVer.minor != 0 || reqVer.rev != 0) && PlayerVersion.major == reqVer.major) || PlayerVersion.major != 6 || xiInstall) {
			try{
				PlayerVersion = new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));
			}catch(e){}
		}
	}
	return PlayerVersion;
}
deconcept.PlayerVersion = function(arrVersion){
	this.major = parseInt(arrVersion[0]) != null ? parseInt(arrVersion[0]) : 0;
	this.minor = parseInt(arrVersion[1]) || 0;
	this.rev = parseInt(arrVersion[2]) || 0;
}
deconcept.PlayerVersion.prototype.versionIsValid = function(fv){
	if(this.major < fv.major) return false;
	if(this.major > fv.major) return true;
	if(this.minor < fv.minor) return false;
	if(this.minor > fv.minor) return true;
	if(this.rev < fv.rev) return false;
	return true;
}
/* ---- get value of query string param ---- */
deconcept.util = {
	getRequestParameter: function(param){
		var q = document.location.search || document.location.hash;
		if(q){
			var startIndex = q.indexOf(param +"=");
			var endIndex = (q.indexOf("&", startIndex) > -1) ? q.indexOf("&", startIndex) : q.length;
			if (q.length > 1 && startIndex > -1) {
				return q.substring(q.indexOf("=", startIndex)+1, endIndex);
			}
		}
		return "";
	}
}

/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}

/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;
var FlashObject = deconcept.SWFObject; // for legacy support
var SWFObject = deconcept.SWFObject;

