		//	=========================================================================
		//	default.js 
		//	version 	: 1.0.0.1
		//	Author	: AH.
		//	=========================================================================

		//set a value in form field, and create it it if it doesn't exists
		
if (!(typeof document.setFormFieldInFrame == "function")){
		function setFormFieldInFrame(frame, formid, type, varname, value){
			var command = "frame.document.getElementById('" + formid + "')." + varname;
			var result;

			command = command .replace('\n',"\\\n");
			command = command .replace('\r',"\\\r");
			result = eval(command);


			if ((result==undefined))
			{
				var newElem = document.createElement("INPUT");
				newElem.setAttribute("type",type);
				newElem.setAttribute("name",varname);
				newElem.setAttribute("id",varname);
				newElem.setAttribute("value",value);
				
				frame.document.getElementById(formid).appendChild(newElem);
			}
			else{
				command = "frame.document.getElementById('" + formid + "')." + varname + ".value = '" + value + "'";
				command = command .replace('\n',"\\\n");
				command = command .replace('\r',"\\\r");
				eval(command);
			}
		}
}
else alert("Error on including JS-Function 'setFormFieldInFrame'. Function already exists an may not be defined twice!");
	
	
if (!(typeof document.setFormField == "function")){
		//set a value in form field, and create it it if it doesn't exists
		function setFormField(formid, type, varname, value){
			var command = "document.getElementById('" + formid + "')." + varname;
			var result 

			command = command .replace('\n',"\\\n");
			command = command .replace('\r',"\\\r");
			result = eval(command);

			if ((result==undefined))
			{
				var newElem = document.createElement("INPUT");
				newElem.setAttribute("type",type);
				newElem.setAttribute("name",varname);
				newElem.setAttribute("id",varname);
				newElem.setAttribute("value", value);
				document.getElementById(formid).appendChild(newElem);
			}
			else{
				command = "document.getElementById('" + formid + "')." + varname + ".value = '" + value + "'";
				command = command .replace('\n',"\\\n");
				command = command .replace('\r',"\\\r");
				eval(command);
			}
		}
}
else alert("Error on including JS-Function 'setFormField'. Function already exists an may not be defined twice!");
		
if (!(typeof document.createFormField == "function")){
		//set a value in form field, and create it it if it doesn't exists
		function createFormField(formid, type, varname, value){
			var newElem = document.createElement("INPUT");
			newElem.setAttribute("type",type);
			newElem.setAttribute("name",varname);
			newElem.setAttribute("id",varname);
			newElem.setAttribute("value", value);
			document.getElementById(formid).appendChild(newElem);
		}
}
else alert("Error on including JS-Function 'setFormField'. Function already exists an may not be defined twice!");


		var post_active = 0;

if (!(typeof document.resetPostActive == "function")){			
		function resetPostActive(){
			post_active = 0;
		}
}
else alert("Error on including JS-Function 'resetPostActive'. Function already exists an may not be defined twice!");
	
	
if (!(typeof document.postModule == "function")){	
		//function to post information
		function postModule(postbackmoduleid, handlemoduleid){
		  	if (post_active == 0){
				document.getElementById("form1").method = "post";
				document.getElementById("form1").target = "iApplicationInterface";
				setFormField("form1", "hidden", "domid", handlemoduleid);
				setFormField("form1", "hidden", "pbmid", postbackmoduleid);
				setFormField("form1", "hidden", "pbtid", "");
				setFormField("form1", "hidden", "dopb", "yes");
				setFormField("form1", "hidden", "dataonly", "yes");

			    document.getElementById("form1").submit();
				
				showBusy();
			}

		    post_active = post_active + 1;
			
			if (post_active >= 4){
			  	alert("Een ogenblik geduld a.u.b. De gegevens worden verwerkt.")
			}
		}
}
else alert("Error on including JS-Function 'postModule'. Function already exists an may not be defined twice!");

if (!(typeof document.postModuleAdvanced == "function")){		
		function postModuleAdvanced(postbackmoduleid, handlemoduleid, postbackpagetree, dopostback, handleparameters){
		  	if (post_active == 0){
			    document.getElementById("form1").method = "post";
			    document.getElementById("form1").target = "iApplicationInterface";
			    setFormField("form1", "hidden", "domid", handlemoduleid);
		    	setFormField("form1", "hidden", "pbmid", postbackmoduleid);
		    	setFormField("form1", "hidden", "pbtid", postbackpagetree);
		    	setFormField("form1", "hidden", "pbprm", handleparameters);
		    	setFormField("form1", "hidden", "dopb", dopostback);
			    setFormField("form1", "hidden", "dataonly", "yes");
			    document.getElementById("form1").submit();
				
				showBusy();

			}

		    post_active = post_active + 1;
			
			if (post_active >= 4){
			  	alert("Een ogenblik geduld a.u.b. De gegevens worden verwerkt.")
			}
		}
}
else alert("Error on including JS-Function 'postModuleAdvanced'. Function already exists an may not be defined twice!");


if (!(typeof document.postNow == "function")){
	//function to post information
	function postNow(my){
		var tag = "container_";
		
		while(my.parentNode.nodeName.toLowerCase() != 'div' && my.parentNode.id.substr(0, tag.length) != tag){
			my = my.parentNode;
		}
		parentId = my.parentNode.id;
		setFormField("form1", "hidden", "containerId", parentId);
		
		moduleId = parentId.split("_")[1];
		postModule(moduleId, moduleId);
	}
}
else alert("Error on including JS-Function 'postNow'. Function already exists an may not be defined twice!");

if (!(typeof document.SetDivOpacity == "function")){	
	function SetDivOpacity (div, opacity){
		opacityDiv = document.getElementById(div);
		opacityDiv .style.filter = "alpha(opacity:" + opacity + ")";
		opacityDiv .style.opacity = 0.01*opacity;
		opacityDiv .style.MozOpacity = 0.01*opacity;
	}
}
else alert("Error on including JS-Function 'SetDivOpacity'. Function already exists an may not be defined twice!");

if (!(typeof document.showBusy == "function")){	
	function showBusy(){
		document.getElementById('mainOverlay').style.display = 'block';
	}
}
else alert("Error on including JS-Function 'showBusy'. Function already exists an may not be defined twice!");

if (!(typeof document.createApplicationInterface == "function")){	
	function createApplicationInterface(){

		var ApplicationInterface;
		if(typeof(IE) == 'undefined') {
			ApplicationInterface= document.createElement('iframe');
		} else {
			var iElement = String.fromCharCode(60)+"iframe name='iApplicationInterface'"+String.fromCharCode(62);
			ApplicationInterface= document.createElement(iElement);
		}
		ApplicationInterface.id = 'iApplicationInterface';
		ApplicationInterface.name = 'iApplicationInterface';
		ApplicationInterface.width = 1000;
		ApplicationInterface.height = 500;
		ApplicationInterface.marginHeight = 0;
		ApplicationInterface.marginWidth = 0;				
		document.getElementById("iApplicationInterfaceDiv").appendChild(ApplicationInterface);
	}
}
else alert("Error on including JS-Function 'createApplicationInterface'. Function already exists an may not be defined twice!");

if (!(typeof document.externalLinks == "function")){
	function externalLinks() {
		if (!document.getElementsByTagName) return;
		var anchors = document.getElementsByTagName("a");
		for (var i=0; i<anchors.length; i++) {
			var anchor = anchors[i];
			if (anchor.getAttribute("href") && anchor.getAttribute("rel") == "external") anchor.target = "_blank";
		}	
	}
}
else alert("Error on including JS-Function 'externalLinks'. Function already exists an may not be defined twice!");
