<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
//-->

function CheckForm(){
if (document.getElementById("WachtwoordB").value == "" ){
document.getElementById("Error").style.display = "block"
document.getElementById("Error2").style.display = "block"
} else {
location.href = "L2_BevestigenRegistreren.htm" 
}
}

function ExpandItem(Item, ExpandButtonId){
ItemState = document.getElementById(Item).style.display; 

if (ExpandButtonId == null){
    ExpandButtonId = Item+"Link";
}


if (ItemState == "none"){
    document.getElementById(ExpandButtonId).className = "SquareLinkClose";
    document.getElementById(Item).style.display = "block";
} else {
    document.getElementById(ExpandButtonId).className = "SquareLinkOpen";
    document.getElementById(Item).style.display = "none";
    }
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; 
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

/* inserting special characters */
function InsertSymbol(charCode){
	try {
		
		var field = document.getElementById(document.getElementById('FocusHidden').value);
		field.focus();

		if (document.selection) {
			sel = document.selection.createRange();
			sel.text = charCode;
		} 
		else {//mozilla
			if (field.selectionStart || field.selectionStart == '0') {
    			var startPos = field.selectionStart;
    			var endPos = field.selectionEnd;
    			field.value = field.value.substring(0, startPos) + charCode + field.value.substring(endPos, field.value.length);
  			}
  			else{
    			field.value += charCode;
  			}
		}
	} catch (ex){
		//do nothing
	}
}

/* trim */
function Trim(temp) {
	return temp.replace(/^\s*([\s\S]*\S+)\s*$|^\s*$/,'$1');
}

function PrintPrintable() {
	print();
}

/* prevent copy/paste in textbox, onkeydown */
function PreventPaste() {
	if (window.event.ctrlKey) {
		if (window.event.keyCode == 86) {
			window.event.returnValue = false;
		}
	}
}

/* MODAL POPUP FUNCTIONS*/

 


//function for showing popups for editing the objects 
function ShowPopupModal(strUrl, strFeatures) {
	var arr = null;
	arr = showModalDialog(strUrl, "", strFeatures);
	return arr;
}

function ShowPopupModalRedirect(strUrl, strFeatures) {
	
	//disable button
	var buttonlink = document.getElementById('TopNavigation_NextStopHyperLink');
	if (buttonlink != null){
		buttonlink.onclick = '';
	}
	
	var arr = null;
	arr = showModalDialog(strUrl, window, strFeatures);
	if(arr != undefined) {
		location.href = arr;
	}
}

var popupWindow = null;
function ShowPopup(strFieldName, strPageName, intWidth, intHeight){
	popupWindow = window.open(strPageName, "", "width=" + intWidth +"px,height="+intHeight+"px" );
}

var ModalDialogWindow;
var ModalDialogInterval;
var ModalDialog = new Object;
ModalDialog.value = '';
ModalDialog.eventhandler = '';

function OpenModalDialogWindow(strFieldName, url) {
            var openerWindow = this;
            var windowname = "HTMLContent";
            var dialogURL = url;

            ModalDialogRemoveWatch();
            ModalDialogWindow = window.open(dialogURL, windowname, windowFeatures);
            ModalDialogWindow.focus(); 
}
                    

function ModalDialogMaintainFocus()       {
	try {
		if (ModalDialogWindow.closed)
		{
			window.clearInterval(ModalDialogInterval);
			return;
		}
			ModalDialogWindow.focus(); 
	}
	catch (everything) {   }
}



function ModalDialogRemoveWatch()
{
	ModalDialog.eventhandler = '';
}


