<!--
// break out of frames
if (window != top) {top.location.href = self.location.href; }

///////////////////////////////////////////////////////////////////////
// Standard Dreamweaver behaviors 
///////////////////////////////////////////////////////////////////////
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

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_goToURL() { //v3.0
    var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
    for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

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_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_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];}
}

///////////////////////////////////////////////////////////////////////
// Webware Systems behaviors (www.webwaresystems.nl)
///////////////////////////////////////////////////////////////////////
function wsAttachEvent(p_oObject, p_sEventType, p_sFunction) { //v0.1
    // This function will attach a given event to a given object in
    // a cross-browser way
    var l_oDoc = document, l_sEventType = p_sEventType.toLowerCase(), l_sReturn;
    if (l_oDoc.getElementById && l_oDoc.createElement) {
	// some advanced event registration model
	if (p_oObject.addEventListener) { // W3C model
	    p_oObject.addEventListener(l_sEventType,eval(p_sFunction),false);
	    return true;
	}
	else if (p_oObject.attachEvent){ // IE model
	    l_sReturn = p_oObject.attachEvent("on" + l_sEventType, eval(p_sFunction));
	    return l_sReturn;
	}
    }
    else { // traditional event registration model
	var l_sObjectEvent = eval(p_oObject + ".on" + l_sEventType);
	if (l_oDoc.layers) { 
	    // initialise event capturing in Netscape 4.x
	    p_oObject.captureEvents(eval("Event." + p_sEventType));
	}
	var l_sEventHandler = (l_sObjectEvent) ? l_sObjectEvent : function () {};
	l_sObjectEvent = function () {l_sEventHandler();eval(p_sFunction + "()");};
	return true;
    }
}

function wsToggleClass() {
    var l_aArgs = arguments, l_sObject = l_aArgs[0], l_aClasses = l_aArgs[1].split("|");
    var l_oObject = MM_findObj(l_sObject); if (!l_sObject) {return;}
    var l_sClass = l_oObject.className;
    l_oObject.className = (l_sClass == l_aClasses[0]) ? l_aClasses[1] : l_aClasses[0];
}

function wsSelect(p_oTag) {
    // (un)check radiobuttons and checkboxes triggered by a mouse click on a table row
    if (document.all) {
	event.cancelBubble = true;
    }
    if (p_oTag.tagName.toUpperCase() == "TR") { // otherwise the click in the checkbox itself is overruled again
	var l_aTags = p_oTag.getElementsByTagName("input");
	if (l_aTags.length > 0) {
	    for (l_iIndex = 0; l_iIndex < l_aTags.length; l_iIndex++) {
		if (l_aTags[l_iIndex].type.toLowerCase() == "radio") {
		    l_aTags[l_iIndex].checked = true;
		}
		else if (l_aTags[l_iIndex].type.toLowerCase() == "checkbox") {
		    l_aTags[l_iIndex].checked = !l_aTags[l_iIndex].checked;
		}
	    }
	}
    }
}

function wsGetCheckboxByName(p_sForm, p_sCheckbox) {
    // 
    var l_oForm = MM_findObj(p_sForm), l_oCheckbox;
    if (l_oForm) {
	var l_aElements = l_oForm.getElementsByTagName("input"), l_iIndex, l_oElement;
	if (l_aElements.length > 0) {
	    for (l_iIndex = 0; l_iIndex < l_aElements.length; l_iIndex++) {
		l_oElement = l_aElements[l_iIndex];
		if (l_oElement.type.toLowerCase() == "checkbox" && l_oElement.name == p_sCheckbox) {
		    l_oCheckbox = l_oElement;
		    break;
		}
	    }
	}
    }
    return l_oCheckbox;
}

function wsJumpURL(p_oSelect) {
    if (p_oSelect.options[p_oSelect.selectedIndex].value != "") {
	self.location.href = p_oSelect.options[p_oSelect.selectedIndex].value;
    }
    return true;
}

function wsPageQuery(p_sQuery) {
    if (p_sQuery.length > 1) {
	this.p_sQuery = p_sQuery.substring(1, p_sQuery.length);}
    else {
	this.p_sQuery = null;}
    this.keyValuePairs = new Array();
    if (this.p_sQuery) {
	for(var i=0; i < this.p_sQuery.split("&").length; i++) {
	    this.keyValuePairs[i] = this.p_sQuery.split("&")[i];
	}
    }
    this.getKeyValuePairs = function() {
	return this.keyValuePairs;}
	this.getValue = function(s) {
	    for(var j=0; j < this.keyValuePairs.length; j++) {
		if(this.keyValuePairs[j].split("=")[0] == s)
		    return this.keyValuePairs[j].split("=")[1];
	    }
	    return false;
	}
	this.getParameters = function() {
	    var l_aArray = new Array(this.getLength());
	    for(var j=0; j < this.keyValuePairs.length; j++) {
		l_aArray[j] = this.keyValuePairs[j].split("=")[0];
	    }
	    return l_aArray;
	}
	this.getLength = function() { return this.keyValuePairs.length; } 
	}

function wsQueryString(p_sKey){
    var l_oPage = new wsPageQuery(window.location.search);
    var l_sValue = l_oPage.getValue(p_sKey);
    if (!l_sValue) {
	return false;
    }
    return unescape(l_sValue); 
}

function wsSelectCat() {
    // select the passed categoryID in the numCatID listbox 
    var l_sCat = wsQueryString('cat');
    var l_oCat = MM_findObj('numCatID');
    if (l_oCat && l_oCat.type.indexOf('select') > -1) {
	for (var l_iIndex = 0; l_iIndex < l_oCat.options.length; l_iIndex++) {
	    if (l_oCat.options[l_iIndex].value == l_sCat) {
		l_oCat.options[l_iIndex].selected = true;
	    }
	}
    }
}    

function wsPickImageNoVars() {
    var l_aArgs = arguments;
    var l_sField = l_aArgs[0];
    var l_sSiteRoot = l_aArgs[1];
    var l_bThumbs = l_aArgs[2];
    var l_sUploadDir = l_aArgs[3];
    var l_oField = MM_findObj(l_sField);
    if (l_oField) {
	var l_aImgLoc = l_oField.value.split("/");
	var l_sImg = l_aImgLoc[l_aImgLoc.length-1];
	var l_sUrl = l_sSiteRoot + "wsadmin/dlgUploadImageNoVars.asp?field=" + l_sField + "&img=" + l_sImg + "&imgdir=" + l_sUploadDir;
	var l_iIndex = l_oField.value.lastIndexOf("/");
	if (l_iIndex > 0) {
	    l_sUrl += "&showdir=" + l_oField.value.substring(0,l_iIndex+1);
	}
	else if (l_sUploadDir != null) {
	    l_sUrl += "&showdir=" + l_sUploadDir
		}
	if (l_bThumbs) {
	    l_sUrl += "&thumbs=y";
	}
	if (l_aArgs.length > 3 && l_aArgs[4]) {
	    if (l_aArgs.length > 4 && l_aArgs[5]) {
		l_sUrl += "&imgwidth=" + l_aArgs[4];
		l_sUrl += "&imgheight=" + l_aArgs[5];
	    }
	    else {
		l_sUrl += "&imgsize=" + l_aArgs[4];
	    }
	}
// 	alert(l_sUrl);
	var ImagePickDialog = window.open(l_sUrl, 'pickImage', 'resizable=yes,width=540,height=150');
	if (ImagePickDialog.opener == null) { 
	    ImagePickDialog.opener = self;
	}  			
    }
}

function wsSetImage(p_sImage, p_sField) {
//     alert(p_sImage + " -> " + p_sField);
    var l_oField = MM_findObj(p_sField);
    if (l_oField) {
	l_oField.value = p_sImage;	    
    }
}

function wsPopupPicture(v1,v2){//v0.1
// Copyright 2005, Marja Ribbers-de Vroed, Webware Systems (www.webwaresystems.nl)
var v3=new Image();v3.src=v1;if (!v3.complete){var v4="wsPopupPicture('"+v1+"'";if (v2){v4+=",'"+v2+"'";}v4+=")";setTimeout(v4,50);return;}wsLaunchPopup(v3,v2);}

function wsLaunchPopup(v1,v2){
if (!v2){v2=v1.src.substring(v1.src.lastIndexOf("/")+1,v1.src.length);}var v3=window.open("","newWindow","width="+v1.width+",height="+v1.height+",scrollbars=no");if (v3){v3.document.open();v3.document.write('<html><title>'+v2+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()" onClick="self.close()">');v3.document.write('<img src=\"'+v1.src+'\" width='+v1.width+' height='+v1.height+' alt=\"'+v2+'\">');v3.document.write('</body></html>');v3.document.close();v3.focus();}return v3;}

function wsEnableFields(p_sForm) { //v1.0, Marja Ribbers-de Vroed, Webware Systems
    // 
    var l_oForm = MM_findObj(p_sForm), l_iIndex, l_oControl;
    for (l_iIndex = 0; l_iIndex < l_oForm.length; l_iIndex++) {
	l_oControl = l_oForm[l_iIndex];
	if (l_oControl.name[0] != "x" && l_oControl.type.toLowerCase() != "hidden") {
	    if (l_oControl.type.toLowerCase() == "radio") {
		if (l_oControl.length) {
		    for (var l_iIndex2 = 0; l_iIndex2 < l_oControl.length; l_iIndex2++) {
			l_oControl[l_iIndex2].disabled = false;
		    }		
		}
		else {
		    l_oControl.disabled = false;
		}
	    }
	    else {
		l_oControl.disabled = false;
	    }
	}
    }
}

function wsToggleCheckboxes() { //v1.0, Marja Ribbers-de Vroed, Webware Systems
    var i, sF = arguments[0], bT = arguments[1], bC = arguments[2], oF = MM_findObj(sF);
    for (i = 0; i < oF.length; i++) {
	if (oF[i].type == "checkbox") {if (bT) {oF[i].checked = !oF[i].checked;} else {oF[i].checked = bC;}}
    } 
}

function wsMirrorNamedCheckboxes() { // v1.0, Marja Ribbers-de Vroed, Webware Systems
    var i, oC = arguments[0], sF = arguments[1], sC = arguments[2], bC, oF = MM_findObj(sF);
    bC = oC.checked;
    for (i = 0; i < oF.length; i++) {
	if (oF[i].type == "checkbox" && oF[i].name == sC) {
	    oF[i].checked = bC;
	}
    } 
}

function wsPadDigits(n, totalDigits) { 
    n = n.toString(); 
    var pd = ''; 
    if (totalDigits > n.length) { 
	for (i=0; i < (totalDigits-n.length); i++) { 
	    pd += '0'; 
	} 
    } 
    return pd + n.toString(); 
}

function wsSubmitForm(){//v2.0
// Copyright 2002-2004, Webware Systems (www.webwaresystems.nl/dreamweaver/)
var v1=arguments,v2=MM_findObj(v1[0]),v3=(v1.length>1)?v1[1]:"",v4=(v1.length>2)?v1[2]:"";if (v2){if (v3!=""){v2.action=v3;}if (v4!=""){v2.target=v4;}v2.submit();document.MM_returnValue=false;}}

function wsTrimSpaces(sString) {
   // removes leading, trailing and 'within' spaces from the passed string
   var sReturn = sString;
   var sChar = sReturn.substring(0, 1);
   while (sChar == " ") { // Check for spaces at the beginning of the string
      sReturn = sReturn.substring(1, sReturn.length);
      sChar = sReturn.substring(0, 1);
   }
   sChar = sReturn.substring(sReturn.length-1, sReturn.length);
   while (sChar == " ") { // Check for spaces at the end of the string
      sReturn = sReturn.substring(0, sReturn.length-1);
      sChar = sReturn.substring(sReturn.length-1, sReturn.length);
   }
   while (sReturn.indexOf(" ") != -1) { // Look for spaces within the string
      sReturn = sReturn.substring(0, sReturn.indexOf(" ")) + sReturn.substring(sReturn.indexOf(" ")+1, sReturn.length);
   }
   return sReturn;
}

function flvFPW1(){//v1.45a
// Copyright 2002-2004, Marja Ribbers-de Vroed, Webware Systems (www.webwaresystems.nl/dreamweaver/)
var v1=arguments,v2=v1[2].split(","),v3=(v1.length>3)?v1[3]:false,v4=(v1.length>4)?parseInt(v1[4]):0,v5=(v1.length>5)?parseInt(v1[5]):0,v6,v7=0,v8,v9,v10,v11,v12,v13,v14,v15,v16,v17;v11=new Array("width,left,"+v4,"height,top,"+v5);for (i=0;i<v11.length;i++){v12=v11[i].split(",");v17=parseInt(v12[2]);if (v17>1||v1[2].indexOf("%")>-1){v13=eval("screen."+v12[0]);for (v6=0;v6<v2.length;v6++){v10=v2[v6].split("=");if (v10[0]==v12[0]){v14=parseInt(v10[1]);if (v10[1].indexOf("%")>-1){v14=(v14/100)*v13;v2[v6]=v12[0]+"="+v14;}}if (v10[0]==v12[1]){v16=parseInt(v10[1]);v15=v6;}}if (v17==2){v16=(v13-v14)/2;v15=v2.length;}else if (v17==3){v16=v13-v14-v16;}v2[v15]=v12[1]+"="+v16;}}document.MM_returnValue=false;v8=v2.join(",");v9=window.open(v1[0],v1[1],v8);if (v9&&v3){v9.focus();}if (v9) {return v9;}else{alert("Het openen van een nieuw window is niet gelukt.\nWaarschijnlijk blokkeert een 'popup blocker'-programma dit nieuwe window.\n\nProbeer het eventueel nog eens met de 'Ctrl'-toets ingedrukt.");}}

function flvFTFO1(){// v1.0
// Copyright 2003, Marja Ribbers-de Vroed, Webware Systems (www.webwaresystems.nl/dreamweaver/)
    if (!document.layers){var v1=arguments,v2=MM_findObj(v1[0]),v3,v4,v5,v6,v7,v8,v9;if (v2){for (v3=1;v3<v1.length;v3++){v6=v1[v3].split(",");v7=v6[0];v8=v6[1];for (v4=0;v4<v2.length;v4++){v5=v2[v4];if (v5.id==v7||v5.name==v7){if (v8=="t"){v5.disabled=!v5.disabled;}else {v9=(v8=="e")?false:true;v5.disabled=v9;}}}}}}}

function wsReplaceSpecialChars(p_sString) {
    // 
    var l_sSpecialChars = "Æ,Á,Â,À,Å,Ã,Ä,Ç,Ð,É,Ê,È,Ë,Í,Î,Ì,Ï,Ñ,Ó,Ô,Ò,Ø,Õ,Ö,Ú,Û,Ù,Ü,Ý,á,â,æ,à,å,ã,ä,ç,é,ê,è,ð,ë,í,î,ì,ï,ñ,ó,ô,ò,ø,õ,ö,ß,þ,ú,û,ù,ü,ý,ÿ,©,¶,£,®,¹,²,³"
    var l_sReplaceChars =  "A,A,A,A,A,A,A,C,D,E,E,E,E,I,I,I,I,N,O,O,O,O,O,O,U,U,U,U,Y,a,a,a,a,a,a,a,c,e,e,e,e,e,i,i,i,i,n,o,o,o,o,o,o,s,b,u,u,u,u,y,y,,,,,1,2,3"

    var l_aSpecialChars = l_sSpecialChars.split(",");
    var l_aReplaceChars = l_sReplaceChars.split(",");
    var l_sString = p_sString;
    var l_sChar, l_sReplace;
    for (var l_iIndex = 0; l_iIndex < l_aSpecialChars.length; l_iIndex++) {
	l_sChar = l_aSpecialChars[l_iIndex];
	l_sReplace = l_aReplaceChars[l_iIndex];
	l_sString = l_sString.replace(l_sChar,l_sReplace);
    }
    return l_sString;
}

function wsCleanUserName(p_sUsername) {
    // 
    var l_sUsername = wsReplaceSpecialChars(p_sUsername);
    l_sUsername = l_sUsername.replace("'","");
    l_sUsername = l_sUsername.replace('"','');
    return l_sUsername;
}

function wsNumericEntryOnly(p_oControl) {
    // only numbers with decimals allowed
    if (p_oControl) {
	var l_sPattern = "[^0-9,]";
	var l_sValue = p_oControl.value;
	var l_oRegExp = new RegExp(l_sPattern, "g");
	var l_sValue = p_oControl.value;
	var l_aMatch = l_sValue.match(l_oRegExp);
	if (l_aMatch) {
	    l_sValue = l_sValue.replace(l_oRegExp, "");
	    p_oControl.value = l_sValue;
	}
    }
}

function wsNumbersEntryOnly(p_oControl) {
    // only whole numbers (without decimals) allowed
    if (p_oControl) {
	var l_sPattern = "[^0-9]";
	var l_oRegExp = new RegExp(l_sPattern, "g");
	var l_sValue = p_oControl.value;
	var l_aMatch = l_sValue.match(l_oRegExp);
	if (l_aMatch) {
	    l_sValue = l_sValue.replace(l_oRegExp, "");
	    p_oControl.value = l_sValue;
	}
    }
}

function wsNumbersAlphabetEntryOnly(p_oControl) {
    // only numbers and alphabetic characters allowed
    if (p_oControl) {
	var l_sPattern = "[^0-9a-zA-Z\s]";
	var l_oRegExp = new RegExp(l_sPattern, "g");
	var l_sValue = p_oControl.value;
	var l_aMatch = l_sValue.match(l_oRegExp);
	if (l_aMatch) {
	    l_sValue = l_sValue.replace(l_oRegExp, "");
	    p_oControl.value = l_sValue;
	}
    }
}

function wsZeroWhenEmpty(p_oControl) {
    // 
    if (p_oControl && p_oControl.value == '') { p_oControl.value = '0'; }
}

function wsCheckTimeFormat(p_oT) {
    //
    if (p_oT && p_oT.value != '') {
	var l_sT = p_oT.value;
	var l_vH = "08", l_iH, l_vM = "00", l_iM;
	if (l_sT.length <= 5) {
	    var l_aTime = l_sT.split(":");
	    if (l_aTime.length > 0) {
		l_vH = l_aTime[0];
		l_iH = parseInt(l_vH);
		if (isNaN(l_iH)) { l_vH = "08"; }
		else { if (l_iH < 0 || l_iH > 24) { l_vH = "08"; } }
		l_vM = l_aTime[1];
		l_iM = parseInt(l_vM);
		if (isNaN(l_iM)) { l_vM = "00"; }
		else { if (l_iM < 0 || l_iM > 59) { l_vM = "00"; } }
	    }
	    p_oT.value = wsPadDigits(l_vH, 2) + ":" + wsPadDigits(l_vM, 2);
	}
	else { p_oT.value = ''; }
    }
}

function wsSetFormGridFilterFields(p_sForm) {
    var l_iIndex, l_sForm, l_sName;
    for (l_iIndex = 0; l_iIndex < document.forms.length; l_iIndex++) {
	l_sForm = document.forms[l_iIndex].name;
	l_sName = l_sForm + '_dateFields';
 	var l_oField = document.forms[l_iIndex].lstField, l_oBoolean = document.forms[l_iIndex].lstBoolean, l_oTextField = document.forms[l_iIndex].txtField, l_oDateFields = MM_findObj(l_sName), l_oDateField = document.forms[l_iIndex].dateField, l_oCompareDate = document.forms[l_iIndex].lstCompareDate, l_oCompareNum = document.forms[l_iIndex].lstCompareNum, l_oCompareText = document.forms[l_iIndex].lstCompareText, l_oCompareBoolean = document.forms[l_iIndex].lstCompareBoolean, l_oFilterField = document.forms[l_iIndex].filter_field, l_oFilterCompare = document.forms[l_iIndex].filter_cmp, l_oFilterCriteria = document.forms[l_iIndex].filter_criteria;
	if (l_oField && l_oCompareDate && l_oCompareText && l_oCompareNum && l_oCompareBoolean && l_oDateFields && l_oDateField && l_oTextField && l_oBoolean) {
	    var l_oFieldValue = l_oField[l_oField.selectedIndex].value;
	    // initialise
	    l_oCompareDate.style.display = 'none';
	    l_oCompareDate.disabled = true;
	    l_oCompareText.style.display = 'none';
	    l_oCompareText.disabled = true;
	    l_oCompareNum.style.display = 'none';
	    l_oCompareNum.disabled = true;
	    l_oCompareBoolean.style.display = 'none';
	    l_oCompareBoolean.disabled = true;
 	    l_oDateFields.style.display = 'none';
	    l_oDateField.style.display = 'none';
	    l_oTextField.style.display = 'none';
	    l_oTextField.disabled = true;
	    l_oBoolean.style.display = 'none';
	    l_oBoolean.disabled = true;
	    // re-display correct controls
	    if (l_oFieldValue.indexOf('date') > -1) {
		l_oTextField.value = '';
 		l_oDateFields.style.display = 'inline';
		l_oDateField.style.display = '';
		l_oCompareDate.style.display = 'inline';
		l_oCompareDate.disabled = false;
		//
		l_oFilterField.value = l_oFieldValue;
		l_oFilterCompare.value = l_oCompareDate[l_oCompareDate.selectedIndex].value;
		if (l_oFilterCompare.value !='EMPTY' && l_oFilterCompare.value != 'NONEMPTY') {
		    l_oFilterCriteria.value = l_oDateField.value;
		}
		else {
		    l_oFilterCriteria.value = '';
		}
	    }
	    if (l_oFieldValue.indexOf('date') < 0 && l_oFieldValue.indexOf('bool') < 0) {
		l_oDateField.value = '';
		l_oTextField.style.display = '';
		l_oTextField.disabled = false;
		if (l_oFieldValue.indexOf('txt') > -1) {
		    l_oCompareText.style.display = '';
		    l_oCompareText.disabled = false;
		    l_oFilterCompare.value = l_oCompareText[l_oCompareText.selectedIndex].value;
		}
		else {
		    l_oCompareNum.style.display = '';
		    l_oCompareNum.disabled = false;
		    l_oFilterCompare.value = l_oCompareNum[l_oCompareNum.selectedIndex].value;
		}
		l_oFilterField.value = l_oFieldValue;
		if (l_oFilterCompare.value != 'EMPTY' && l_oFilterCompare.value != 'NONEMPTY') {
		    l_oFilterCriteria.value = l_oTextField.value;
		}
		else {
		    l_oFilterCriteria.value = '';
		}
	    }
	    if (l_oFieldValue.indexOf('bool') > -1) {
		l_oBoolean.style.display = '';
		l_oBoolean.disabled = false;
		l_oCompareBoolean.style.display = '';
		l_oCompareBoolean.disabled = false;
		//
		l_oFilterField.value = l_oFieldValue;
		l_oFilterCompare.value = l_oCompareBoolean[l_oCompareBoolean.selectedIndex].value;
		l_oFilterCriteria.value = l_oBoolean[l_oBoolean.selectedIndex].value;
	    }
	    else {
	    }
	}
    }
}

function wsSetMailType(p_sHiddenField, p_sValue) {
    var l_oField = MM_findObj(p_sHiddenField);
    if (l_oField) {
	l_oField.value = p_sValue;
    }
}

function wsSendMailOffline(p_sSender, p_sRecipients) {
    MM_goToURL('parent','mailto:' + p_sSender + '?bcc=' + p_sRecipients);
    history.go(-2);
}

function wsCheckSendMail(p_iCatID, p_sURL) {
    var l_oRecipients = MM_findObj('hiddenRecipients');
    var l_oBlocks = MM_findObj("hiddenBlocksDir");
    var l_oMailType = MM_findObj("hiddenMailType");
    var l_sMailType = (l_oMailType && l_oMailType.value != "") ? l_oMailType.value : "online";
    var l_sBlocksDir = (l_oBlocks && l_oBlocks.value != "") ? l_oBlocks.value : "/";
    if (l_oRecipients && l_oRecipients.value != "") {
	// one or more Users have been selected to receive mail
	var l_sURL = p_sURL + "&cat=" + p_iCatID + "&id=" + l_oRecipients.value + "&mailtype=" + l_sMailType;
	MM_goToURL('parent',l_sURL);
//	flvFPW1(l_sURL,'sendMail','width=600,height=550,scrollbars=yes,resizable=yes',1);return document.MM_returnValue;
    }
}

function wsListSelectAll(p_sListID) {
    var l_oList = MM_findObj(p_sListID);
    if (l_oList) {
	for (var i=0; i<l_oList.length; i++) {
	    l_oList[i].selected = true;
	}
    }
}

function wsListMoveAll(p_sSourceID, p_sTargetID) {
    wsListSelectAll(p_sSourceID);
    wsListMoveItem(p_sSourceID, p_sTargetID);
}

function wsListMoveItemUp(p_sSourceID) {
    // 
    var l_oSource = MM_findObj(p_sSourceID);
    if (l_oSource) {
	var l_iSelected = l_oSource.selectedIndex;
	if (l_iSelected == -1 || l_iSelected == 0) {
	    // no selection or the top most one is selected
	    // nothing to do here
	    return;
	}
	var l_sText = l_oSource.options[l_iSelected-1].text;
	var l_sValue = l_oSource.options[l_iSelected-1].value;
	l_oSource.options[l_iSelected-1].text = l_oSource.options[l_iSelected].text;
	l_oSource.options[l_iSelected-1].value = l_oSource.options[l_iSelected].value;
	l_oSource.options[l_iSelected].text = l_sText;
	l_oSource.options[l_iSelected].value = l_sValue;
	l_oSource.selectedIndex = l_iSelected-1;
    }    
}

function wsListMoveItemDown(p_sSourceID) {
    // 
    var l_oSource = MM_findObj(p_sSourceID);
    if (l_oSource) {
	var l_iSelected = l_oSource.selectedIndex;
	if (l_iSelected == -1 || l_iSelected == l_oSource.options.length-1) {
	    // no selection or the lower most one is selected
	    // nothing to do here
	    return;
	}
	var l_sText = l_oSource.options[l_iSelected+1].text;
	var l_sValue = l_oSource.options[l_iSelected+1].value;
	l_oSource.options[l_iSelected+1].text = l_oSource.options[l_iSelected].text;
	l_oSource.options[l_iSelected+1].value = l_oSource.options[l_iSelected].value;
	l_oSource.options[l_iSelected].text = l_sText;
	l_oSource.options[l_iSelected].value = l_sValue;
	l_oSource.selectedIndex = l_iSelected+1;
    }    
}

function wsListMoveItem(p_sSourceID, p_sTargetID, p_bSortSource, p_bSortTarget) {
    var l_oSource = MM_findObj(p_sSourceID);
    var l_oTarget = MM_findObj(p_sTargetID);
    if (l_oSource && l_oTarget) {
	var l_aFrom = new Array();
	var l_aTo = new Array();
	var l_aLookup = new Array();
	var i;
	for (i = 0; i < l_oTarget.options.length; i++) {
	    l_aLookup[l_oTarget.options[i].text] = l_oTarget.options[i].value;
	    l_aTo[i] = l_oTarget.options[i].text;
	}
	var l_iFrom = 0;
	var l_iTo = l_aTo.length;
	for(i = 0; i < l_oSource.options.length; i++) {
	    l_aLookup[l_oSource.options[i].text] = l_oSource.options[i].value;
	    if (l_oSource.options[i].selected && l_oSource.options[i].value != "") {
		l_aTo[l_iTo] = l_oSource.options[i].text;
		l_iTo++;
	    }
	    else {
		l_aFrom[l_iFrom] = l_oSource.options[i].text;
		l_iFrom++;
	    }
	}
	if (p_bSortSource) {
	    l_aFrom.sort();
	}
	if (p_bSortTarget) {
	    l_aTo.sort();
	}
	l_oSource.length = 0;
	l_oTarget.length = 0;
	var c;
	for(c = 0; c < l_aFrom.length; c++) {
	    var l_oOption = new Option();
	    l_oOption.value = l_aLookup[l_aFrom[c]];
	    l_oOption.text = l_aFrom[c];
	    l_oSource[c] = l_oOption;
	}
	for(c = 0; c < l_aTo.length; c++) {
	    var l_oOption = new Option();
	    l_oOption.value = l_aLookup[l_aTo[c]];
	    l_oOption.text = l_aTo[c];
	    l_oTarget[c] = l_oOption;
	}
    }
}

///////////////////////////////////////////////////////////////////////
// miscellaneous 3rd party functions
///////////////////////////////////////////////////////////////////////
function openPictureWindow_Fever(imageType,imageName,imageWidth,imageHeight,alt,posLeft,posTop) {  // v4.01
	newWindow = window.open("","newWindow","width="+imageWidth+",height="+imageHeight+",scrollbars=no,left="+posLeft+",top="+posTop);
	newWindow.document.open();
	newWindow.document.write('<html><title>'+alt+'</title><body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginheight="0" marginwidth="0" onBlur="self.close()">'); 
	if (imageType == "swf"){
	newWindow.document.write('<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('<param name=movie value=\"'+imageName+'\"><param name=quality value=high>');
	newWindow.document.write('<embed src=\"'+imageName+'\" quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"'+imageWidth+'\" height=\"'+imageHeight+'\">');
	newWindow.document.write('</embed></object>');	}else{
	newWindow.document.write('<img src=\"'+imageName+'\" alt=\"'+alt+'\">'); 	}
	newWindow.document.write('</body></html>');
	newWindow.document.close();
	newWindow.focus();
}

///////////////////////////////////////////////////////////////////////
// Yaromat behaviors (www.yaromat.com)
///////////////////////////////////////////////////////////////////////
function YY_checkform() { //v4.66
//copyright (c)1998,2002 Yaromat.com
  var args = YY_checkform.arguments; var myDot=true; var myV=''; var myErr='';var addErr=false;var myReq;
  for (var i=1; i<args.length;i=i+4){
    if (args[i+1].charAt(0)=='#'){myReq=true; args[i+1]=args[i+1].substring(1);}else{myReq=false}
//    alert(args[i]);
    if (!args[0] || args[0] == '') {
	var myObj = MM_findObj(args[i].replace(/\[\d+\]/ig,""));
    }
    else {
	var l_sF = 'document.' + args[0] + '.' + args[i].replace(/\[\d+\]/ig,"");
	var myObj = eval(l_sF);
    }
    myV=myObj.value;
    if (myObj.type=='text'||myObj.type=='password'||myObj.type=='hidden'){
      if (myReq&&myObj.value.length==0){addErr=true}
      if ((myV.length>0)&&(args[i+2]==1)){ //fromto
        var myMa=args[i+1].split('_');if(isNaN(myV)||myV<myMa[0]/1||myV > myMa[1]/1){addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==2)){
          var rx=new RegExp("^[\\w\.=-]+@[\\w\\.-]+\\.[a-z]{2,4}$");if(!rx.test(myV))addErr=true;
      } else if ((myV.length>0)&&(args[i+2]==3)){ // date
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);
        if(myAt){
          var myD=(myAt[myMa[1]])?myAt[myMa[1]]:1; var myM=myAt[myMa[2]]-1; var myY=myAt[myMa[3]];
          var myDate=new Date(myY,myM,myD);
          if(myDate.getFullYear()!=myY||myDate.getDate()!=myD||myDate.getMonth()!=myM){addErr=true};
        }else{addErr=true}
      } else if ((myV.length>0)&&(args[i+2]==4)){ // time
        var myMa=args[i+1].split("#"); var myAt=myV.match(myMa[0]);if(!myAt){addErr=true}
      } else if (myV.length>0&&args[i+2]==5){ // check this 2
            var myObj1 = MM_findObj(args[i+1].replace(/\[\d+\]/ig,""));
            if(myObj1.length)myObj1=myObj1[args[i+1].replace(/(.*\[)|(\].*)/ig,"")];
            if(!myObj1.checked){addErr=true}
      } else if (myV.length>0&&args[i+2]==6){ // the same
            var myObj1 = MM_findObj(args[i+1]);
            if(myV!=myObj1.value){addErr=true}
      }
    } else
    if (!myObj.type&&myObj.length>0&&myObj[0].type=='radio'){
          var myTest = args[i].match(/(.*)\[(\d+)\].*/i);
          var myObj1=(myObj.length>1)?myObj[myTest[2]]:myObj;
      if (args[i+2]==1&&myObj1&&myObj1.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
      if (args[i+2]==2){
        var myDot=false;
        for(var j=0;j<myObj.length;j++){myDot=myDot||myObj[j].checked}
        if(!myDot){myErr+='* ' +args[i+3]+'\n'}
      }
    } else if (myObj.type=='checkbox'){
      if(args[i+2]==1&&myObj.checked==false){addErr=true}
      if(args[i+2]==2&&myObj.checked&&MM_findObj(args[i+1]).value.length/1==0){addErr=true}
    } else if (myObj.type=='select-one'||myObj.type=='select-multiple'){
      if(args[i+2]==1&&myObj.selectedIndex/1==0){addErr=true}
    }else if (myObj.type=='textarea'){
      if(myV.length<args[i+1]){addErr=true}
    }
    if (addErr){myErr+='* '+args[i+3]+'\n'; addErr=false}
  }
  // MRdV
  if (document.wsErrors && document.wsErrors != "") {
      myErr += document.wsErrors;
  }
  //  if (myErr!=''){alert('The required information is incomplete or contains errors:\t\t\t\t\t\n\n'+myErr)}
  if (myErr!=''){alert('De benodigde informatie is incompleet of bevat fouten:\t\t\t\t\t\n\n' + myErr)}
  document.MM_returnValue = (myErr=='');
}
//-->
