
	function mouseClick () {
		
//		if (event.button == 2) 
//			alert ('De inhoud en broncode van deze website zijn auteursrechtelijk beschermd.');
		
	}
	
	document.onmousedown = mouseClick;
	
	// ==========================================

	var onLoadObjectStack = new Array ();
	var onLoadFunctionStack = new Array ();
	

	function OnLoadObject (oObject) {
		
		onLoadObjectStack.push (oObject);
		
	}
	
	
	function OnLoadFunction (sFunctieNaam) {
		
		onLoadFunctionStack.push (sFunctieNaam);
		
	}


	function initStack () {
		
		for (var i = 0; i < onLoadObjectStack.length; i++)
			onLoadObjectStack[i].init ();
		
		for (var i = 0; i < onLoadFunctionStack.length; i++)
			eval (onLoadFunctionStack[i]);
		
	}
	
	
	window.onload = function () {
		
		initStack ();
		
//		initDP ();
		
	}
	
	
	function openWindow (sID, sURL, iBreedte, iHoogte, bScroll) {
		if (!iBreedte) iBreedte = 400;
		if (!iHoogte) iHoogte = 400;
		
		var winWindow = window.open (sURL, sID, 'width=' + iBreedte + ',height=' + iHoogte + ',resizable=yes,status=no,scrollbars=yes');
		
		if (window.focus) winWindow.focus();
	}
	

/*
	function Melding () {
		
		this.url = sDialogboxURL + '&dialogboxType=1'
		
	}
	
	
	Melding.prototype.openDialog = function (sMelding) {
		
		var meldingWindow = window.showModalDialog(this.url + '&dialogboxmelding=' + sMelding, 'Dialogbox', 'dialogHeight: 200px; dialogWidth: 300px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No; Scroll: No');
		
	}
*/

	function Melding () {
		
		this.url = sDialogboxURL;
		this.msie = (browser == 'Internet Explorer');
		
	}
	
	
	Melding.prototype.openDialog = function (sMelding) {
		
		if (this.msie)
			this.openDialogMSIE (sMelding);
		else
			this.openDialogOther (sMelding);
		
	}
	
	
	Melding.prototype.openDialogMSIE = function (sMelding) {
		
		var sParamChar = '?';
		var pattern = /\?/;
		
		if (pattern.test (this.url))
			sParamChar = '&';
		
		var meldingWindow = window.showModalDialog (this.url + sParamChar + 'dialogboxmelding=' + encodeURIComponent (sMelding), 'Dialogbox', 'dialogHeight: 200px; dialogWidth: 300px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No; Scroll: No');
				
	}


	Melding.prototype.openDialogOther = function (sMelding) {
		
		alert (sMelding);
		
	}

	
	
	function Bevestiging () {
		this.url = sDialogboxURL + '&dialogboxType=2'
	}
	
	
	Bevestiging.prototype.openDialog = function (sMelding) {
		var bevestigingsWindow = window.showModalDialog(this.url + '&dialogboxMelding=' + sMelding, 'Dialogbox', 'dialogHeight: 200px; dialogWidth: 300px; dialogTop: px; dialogLeft: px; edge: Raised; center: Yes; help: No; resizable: No; status: No; Scroll: No');
		return bevestigingsWindow;
	}
	
	
	function isEmail(str) {
		var supported = 0;
		if (window.RegExp) {
			var tempStr = "a";
			var tempReg = new RegExp(tempStr);
			if (tempReg.test(tempStr)) supported = 1;
		}
		if (!supported) return (str.indexOf(".") > 2) && (str.indexOf("@") > 0);
		var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
		var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,6}|[0-9]{1,3})(\\]?)$");
		return (!r1.test(str) && r2.test(str));
	}
	
	
	function formFoutmelding (oElem, sMelding) {
		new Melding ().openDialog (sMelding);
		if (oElem)
			oElem.focus();
	}


	function Page (sPageId, sLang) {
		
		this.pageId = sPageId;
		this.lang = sLang;
		
		new OnLoadObject (this);
		
	}
	
	
	Page.prototype.init = function () {
		
		this.bodyElem = document.getElementById ('mainBody');
		
		if (!this.lang)
			this.lang = 'nl';
		
		this.arrayParameters = new Array ();
		// Plaats parameters uit GET in array.
		var arrayParametersTemp = window.location.href.split (/\&/);
		arrayParametersTemp[0] = arrayParametersTemp[0].split (/\?/)[1];
		
		var pattern = /=/;
		
		for (var i = 0; i < arrayParametersTemp.length; i++) {
			
			if (pattern.test(arrayParametersTemp)) {
			
				var arrayParemeter = arrayParametersTemp[i].split (/=/);
				
				this.arrayParameters.push (new Parameter (arrayParemeter[0], arrayParemeter[1]));
				
			}
			
		}
		
		if (oPage.getParameter ('debug') == '1')
			this.debug = true;
		else
			this.debug = false;
		
		if (this.getParameter ('print') == 'true') {
			
			this.bodyElem.className = 'printBody';
			
		}

		
	}
	
	
	Page.prototype.getAllParameters = function () {
		
		var sParameters = '';
		
		var arrayTemp = new Array ();
		
		for (var i = 0; i < this.arrayParameters.length; i++) {
			
			if (this.arrayParameters[i].valueLength > 0) {
				
				arrayTemp.push (this.arrayParameters[i]);
				
			}
			
		}
		
		for (var i = 0; i < arrayTemp.length; i++) {
			
			sParameters += arrayTemp[i].name + '=' + arrayTemp[i].value;
				
			if (i < arrayTemp.length - 1)
				sParameters += '&';
			
		}
		
		return sParameters;
		
	}
	
	
	Page.prototype.makeParameter = function (sName, sValue) {
		
		var bParFound = false;
		
		for (var i = 0; i < this.arrayParameters.length; i++) {
			
			if (this.arrayParameters[i].name == sName) {
				
				this.arrayParameters[i].value = sValue;
				bParFound = true;
				
			}
			
		}
		
		if (!bParFound) {
			this.arrayParameters.push (new Parameter (sName, sValue));
		}
		
	}
	
	
	Page.prototype.go = function (sPageId) {
		
		var sUrl = 'parser.aspx?PageID=' + sPageId;
		
		if (this.lang)
			sUrl += '&Lang=' + this.lang;
		
		location.href = sUrl;
		
	}
	
	
	Page.prototype.getParameter = function (sParamName) {
		
		for (var i = 0; i < this.arrayParameters.length; i++) {
			
			if (this.arrayParameters[i].name == sParamName)
				if (this.arrayParameters[i].value.length > 0)
					return decodeURIComponent (this.arrayParameters[i].value);
			
		}
		
	}
	
	
	Page.prototype.alert = function (sMessage) {
		
		var oAlert = new Melding ();
		
		oAlert.openDialog (sMessage);
		
	}
	
	
	Page.prototype.printThisPage = function () {
		
		window.print ();
		
	}

	
	
	function Parameter (sName, sValue) {
		
		this.name = String (sName);
		this.value = String (sValue);
		this.valueLength = this.value.length;
		
	}	
	
	
	function writeEmail (sDomain, sAlias) {
		
		var sUseDomain = 'mailblast.nl';
		
		if (sDomain)
			sUseDomain = sDomain;
		
		document.write ('<a href="mailto:' + sAlias + '\u0040' + sUseDomain + '">' + sAlias + '\u0040' + sUseDomain + '</a>');
		
	}

	
	function DialogBox (sId) {
		
		this.id = sId;
		
		OnLoadObject (this);
		
	}
	
	
	DialogBox.prototype.init = function () {
		
		var messageElem = document.getElementById (this.id);
		
		messageElem.innerHTML = oPage.getParameter ('dialogboxmelding');
		
	}
	
	
	function DeepInfo (sId) {
		
		this.open = false;
		
		this.id = sId;
		
		this.init ();
		
	};
	
	DeepInfo.prototype.init = function () {
		
		this.contentElem = document.getElementById ('contentElem_' + this.id);
		this.iconElem = document.getElementById ('iconElem_' + this.id);
		
	};
	
	DeepInfo.prototype.click = function () {
		
		if (this.open)
			this.doClose ();
		else
			this.doOpen ();
		
	};

	DeepInfo.prototype.doOpen = function () {
		
		this.contentElem.style.display = 'inline';
		this.iconElem.innerHTML = '[close]';
		
		this.open = true;
		
	};
	
	DeepInfo.prototype.doClose = function () {
		
		this.contentElem.style.display = 'none';
		this.iconElem.innerHTML = '»';
		
		this.open = false;
		
	};
	
	
	function DeepInfo2 (sId) {
		
		this.open = false;
		
		this.id = sId;
		
		this.init ();
		
	};
	
	DeepInfo2.prototype.init = function () {
		
		this.contentElem = document.getElementById ('contentElem_' + this.id);
		
	};
	
	DeepInfo2.prototype.click = function () {
		
		if (this.open)
			this.doClose ();
		else
			this.doOpen ();
		
	};

	DeepInfo2.prototype.doOpen = function () {
		
		this.contentElem.style.display = 'inline';
		
		this.open = true;
		
	};
	
	DeepInfo2.prototype.doClose = function () {
		
		this.contentElem.style.display = 'none';
		
		this.open = false;
		
	};

	
	function TestimonialSlider (testimonial, fadeSpeed, blendDuration) {
				
		this.testimonial = testimonial;
		this.fadeSpeed = fadeSpeed;
		this.blendDuration = blendDuration;
		
		this.buildTestamonial ();
		
		this.init ();
		
	};
	
		TestimonialSlider.prototype.buildTestamonial = function () {  

	/****************
	****** Div *******
	****************/		
		//Create the div element
		var testamonialDiv = document.createElement("div");
		testamonialDiv.id = "testamonialDiv";

	/****************
	***** Image *****
	****************/
		//Create the image element
		var testamonialImage = document.createElement("img");
		testamonialImage.style.width = "166px";
		testamonialImage.style.height = "129px";
		testamonialImage.id = "screendumpElem";
		//Append the image to the div
		testamonialDiv.appendChild(testamonialImage);

	/****************
	*** Paragraph ****
	****************/
		//Create the paragraph that contains the text of the testimonial
//		var testamonialContent = document.createElement("p");
//		testamonialContent.style.height = "150px";
	/*************************
	**Img in place of paragraph**
	**************************/
		var testamonialLogoCompany = document.createElement('img');
		testamonialLogoCompany.id = 'companyLogo';
		testamonialLogoCompany.style.width = '166px';
		testamonialLogoCompany.style.marginTop = '10px';
		testamonialLogoCompany.style.height = '72px';
		
	/****************
	*** Comment ****
	****************/
		//Create the span that contains the comment of the testimonial
//		var testamonialComment = document.createElement("span");
//		testamonialComment.style.fontStyle = "italic";
//		testamonialComment.id = "quoteElem";
		//Append the span wich contains the comment to the paragraph
//		testamonialContent.appendChild(document.createTextNode('"'));
//		testamonialContent.appendChild(testamonialComment);
//		testamonialContent.appendChild(document.createTextNode('"'));
//		testamonialContent.appendChild(document.createElement("br"));

	/****************
	***** Name ******
	****************/
		//Create the span that contains the name of the testimonial
//		var testamonialName = document.createElement("span");
//		testamonialName.id = "nameElem";
		//Append the span wich contains the name to the paragraph
//		testamonialContent.appendChild(testamonialName);

//		testamonialContent.appendChild(document.createElement("br"));

	/****************
	**** Function ****
	****************/
		//Create the span that contains the function of the testimonial
//		var testamonialFunction = document.createElement("span");
//		testamonialFunction.id = "functionElem";
		//Append the span wich contains the function to the paragraph
//		testamonialContent.appendChild(testamonialFunction);
//		testamonialContent.appendChild(document.createTextNode(' - '));

	/****************
	*** Company ****
	****************/
		//Create the span that contains the company of the testimonial
//		var testamonialCompany = document.createElement("span");
//		testamonialCompany.id = "companyElem";
		//Append the span wich contains the company to the paragraph
//		testamonialContent.appendChild(testamonialCompany);
		//Append the paragraph that contains al the text of the testimonial
//		testamonialDiv.appendChild(testamonialContent);
		testamonialDiv.appendChild(testamonialLogoCompany);
		
		var container = document.getElementById('testimonialContainer');
		container.appendChild(testamonialDiv);
	
		//document.getElementById("testamonialDiv").parentNode.style.height = "300px";	
//		document.getElementById("testamonialDiv").parentNode.style.marginBottom = "25px";	
//		document.getElementById("testamonialDiv").parentNode.style.paddingBottom = "20px";	
	}
	
	Function.prototype.bind = function(scope) {
		
		var reference = this;
		
		return function() {
			reference.apply(scope, arguments);
		}
	};
	
	
	TestimonialSlider.prototype.getCookie = function(name) {
	
		var arg = name + "=";
		var alen = arg.length;
		var clen = document.cookie.length;
		var i = 0;
		
		while (i < clen) {
			
			var j = i + alen;
			
			if ( document.cookie.substring(i, j) == arg ) {
				
				var endstr = document.cookie.indexOf (";", j);
				
				if ( endstr == -1 ) { 
				
				endstr = document.cookie.length; 
				
				}
				
				return unescape(document.cookie.substring(j, endstr));
				
			}
			
			i = document.cookie.indexOf(" ", i) + 1;
			
			if ( i == 0 ) {  
				break; 
			}
		}
	
		return null;
  };
	
	
	TestimonialSlider.prototype.init = function () {
		
		this.screendumpElem = document.getElementById ('screendumpElem');
		this.companyLogo = document.getElementById ('companyLogo');
//		this.quoteElem = document.getElementById ('quoteElem');
//		this.nameElem = document.getElementById ('nameElem');
//		this.functionElem = document.getElementById ('functionElem');
//		this.companyElem = document.getElementById ('companyElem');		
		this.count;
		this.firstLoad = false;
		
		if(this.getCookie("count")){
			
			this.count = this.getCookie("count");

		}
		else{
		
			this.count = 0;	
			
		}
	
		this.showTestimonial ();		
		
	};

	
	TestimonialSlider.prototype.showTestimonial = function () {

		var lenghtOfArray = this.testimonial.length
		var i = this.count
		var oldI = this.count;
		
		if( this.count == lenghtOfArray){
		
			i =0;	
			this.count = 0;
			
		}
		
		document.cookie = "count="+i	
		
		if (document.all && this.firstLoad){
		
			this.screendumpElem.style.filter="blendTrans(duration="+this.blendDuration+")";
			//this.screendumpElem.style.filter="blendTrans(duration=2)"
			this.screendumpElem.filters.blendTrans.Apply()   
			this.screendumpElem.src = this.testimonial[i].file
			this.screendumpElem.filters.blendTrans.Play()
			
			this.companyLogo.style.filter="blendTrans(duration="+this.blendDuration+")";
			this.companyLogo.filters.blendTrans.Apply()   
			this.companyLogo.src = this.testimonial[i].companyLogo;
			this.companyLogo.filters.blendTrans.Play()

			var testamonialDiv = document.getElementById("testamonialDiv");
			
			testamonialDiv.style.filter="blendTrans(duration="+this.blendDuration+")";
			testamonialDiv.filters.blendTrans.Apply();
			testamonialDiv.filters.blendTrans.Play();
			
		}
		
		this.screendumpElem.src = this.testimonial[i].file;
		this.companyLogo.src = this.testimonial[i].companyLogo;
//		this.quoteElem.innerHTML = this.testimonial[i].quote;
//		this.nameElem.innerHTML = this.testimonial[i].name;
//		this.functionElem.innerHTML = this.testimonial[i].functionName;
//		this.companyElem.innerHTML = this.testimonial[i].company;
		
		this.count++;
		this.firstLoad = true;
		setTimeout(this.showTestimonial.bind(this), this.fadeSpeed);
		
	};
	
	
	
	function Testimonial (sFile, sQuote, sName, sFunction, sCompany, sCompanyLogo) {
		
		this.file = sFile;
		this.quote = sQuote;
		this.name = sName;
		this.functionName = sFunction;
		this.company = sCompany;
		this.companyLogo = sCompanyLogo;
		
	};