function px_js_version(){	return "11.12.1";	}	var bw=new bw_check(),d=document,wd=window;//20080124 our goesc routine comes a long twice under ffvar mygoeschasrun=0;/*	Deze variabele intextarea wordt door ZenoPX op	true gezet wanneer een user een textarea binnentreedt.		Dit is nodig om in een textarea met Shift + Enter een 	form te kunnen submit()-en.*/var intextarea = false;function calendar () {	if(arguments.length>1) {		period=arguments[1];period+='';		year=period.substring(0,4);		month=period.substring(4,6);		if(month.substring(4,5)==0) {			month+='';			if (month!=10) {				month=month.replace('0','');				}			month--;			}		var b=new Date(year,month,1);		}	else {		var b=new Date();		month=b.getMonth()		year=b.getFullYear()		}	var aap=new Date(),thisday=aap.getDate(),thismonth=aap.getMonth(),thisyear=aap.getFullYear(),aap=null;	var day=b.getDate(),diw=b.getDay(),leap=b.isLeap(),fdom=b.getfdom(),veld=arguments[0];	var dim=new Array(31,(leap?29:28),31,30,31,30,31,31,30,31,30,31);	var months=new Array('Januari','Februari','Maart','April','Mei','Juni','Juli','Augustus','September','Oktober','November','December');	var dayss=new Array('zo','ma','di','wo','do','vr','za');//	var months=new Array('January','February','March','April','May','June','July','August','Septembre','October','November','December');//	var dayss=new Array('su','mo','tu','we','th','fr','sa');	var fdiw=1;	var fdomi=fdom-1;	if(fdomi==-1)fdomi=6;	syear=year;smonth=month;	var amonth=month;	var ayear=year;	if(amonth==0){amonth=12;ayear=year-1;}	if(amonth<10)amonth="0"+amonth;	var bmonth=month+2;	var byear=year;	if(bmonth==13){bmonth=1;year++;byear=year;year--;}	if(bmonth<10)bmonth="0"+bmonth;			var div=document.getElementById(veld);	if (div==null) {				w('<img src="first.gif" id="'+veld+'img" width="0" height="0" border="0" /><div class="cal" id="'+veld+'">');		w('<table border="0" class="calendar" cellpadding="0" cellspacing="0"><tr>');		w('<td align="center" id="'+veld+'left" class="h1">'+a+'</td>');		w('<td id="'+veld+'month" align="center" colspan="6" class="h1">'+months[month]+' '+year+'</td>');		w('<td align="center" id="'+veld+'right" class="h1">'+ab+'</td><tr><td class="h2">wk</td>');			for (var x=fdiw;x<7;x++) {			w('<td class="h2" align="center">'+dayss[x]+'</td>');			}		for (var x=0;x<fdiw;x++) {			w('<td class="h2" align="center">'+dayss[x]+'</td>');			}					w('</tr>');		var nextcounter=1,prevdim=dim[month-1],weekcounter=0,lastweek=0;				if(typeof prevdim=='undefined') {			if (month==0) {				prevdim=dim[11];				}			}				for (x=0;x<6;x++) {			w('<tr>');			for (y=0;y<7;y++) {				if ((weekcounter>=lastweek)) {					w('<td id="'+veld+'wk'+x+'" class="h2" align="center">wk'+x+'</td>');					lastweek++;					}				w('<td id="'+veld+'dag'+x+''+y+'" align="center">dag'+x+''+y+'</td>');				}			w('</tr>');			weekcounter++;			}		w('<tr><td colspan="99" align="center"><a href="javascript:void(0)" onclick="javascript:hi(\''+veld+'\')">close</a></td></tr>');		w('</table>');				w('</div>');		}	var a='<a href="javascript:calendar(\''+veld+'\','+ayear+''+amonth+')">&lt;</a>';	var ab='<a href="javascript:calendar(\''+veld+'\','+byear+''+bmonth+')">&gt;</a>';	var m=document.getElementById(veld+'month');	m.innerHTML=months[month]+' '+year;	var left=document.getElementById(veld+'left');	var right=document.getElementById(veld+'right');	left.innerHTML=a;	right.innerHTML=ab;	var nextcounter=1,prevdim=dim[month-1],weekcounter=0,lastweek=0,other=false;	if(typeof prevdim=='undefined') {		if (month==0) {			prevdim=dim[11];			}		}	for (x=0;x<6;x++) {		for (y=0;y<7;y++) {			if (x==0) {				if (y<fdomi) { //prev month					dag=(prevdim-fdomi)+nextcounter;					nextcounter++;					other=true;					smonth=month-1;					if(smonth==-1) {						smonth=11;						syear=year-1;						}					}				else {					smonth=month;					syear=year;					dag=(y-fdomi)+1;					other=false;					}				}			else {				dag++;				if (dag>dim[month]) {					dag=1;					other=true;					smonth=month+1;					if(smonth==12) {						smonth=0;						syear=year+1;						}					}				}			var td=document.getElementById(veld+'dag'+x+''+y);			dag<10?sdag="0"+dag:sdag=dag;			smonth2=smonth+1;			smonth2<10?smonth2="0"+smonth2:smonth2=smonth2;			other?clas="class='othermonth'":clas="class='month'";			var link='<a href="javascript:void(0)" '+clas+' onclick="javascript:setval(\''+veld+'\',\''+sdag+'-'+smonth2+'-'+syear+'\')">'+sdag+'</a>';			td.innerHTML=link;			other?td.className='othermonth':td.className='month';			if((sdag==15)&&(smonth=='05')){td.className='h1';}			if((smonth==thismonth)&&(dag==thisday)&&(syear==thisyear)){td.className='h1';}			}		var wk=b.getISOwk(syear,smonth+1,dag);		var wktd=document.getElementById(veld+'wk'+x);		wktd.innerHTML=wk;		}	}function sh(which) {	var div=document.getElementById(which);	var img=document.getElementById(which+'img');	left=getImageLeft(img);Top=getImageTop(img);	div.style.top=Top;	div.style.left=left;	div.style.visibility='visible';	}function hi(which) {	var div=document.getElementById(which);	div.style.visibility='hidden';	}function setval(el,val) {	document.forms[0].elements[el].value=val;	hi(el);	}function px_form_disable(f){	for(var i=0;i<f.elements.length;i++){		var e=f.elements[i];		if(e.type!="hidden" && e.disabled==0){ e.blur(); e.disabled=1;}		}	}function px_form_submit(theform,theshowmessage){	if(theshowmessage){		var mydiv=document.getElementById('submitbar');		mydiv.style.top=200;		}	if(theform.enter.disabled){		return false;		};	theform.enter.disabled=1;	theform.submit(); 	return true;	}function px_form_apply(f){	f.form_apply.value=1;	px_form_submit(f,0);	return true;	}function px_form_autosubmit(thefieldname){//	alert('px_form_autosubmit '+thefieldname);	if(window.document.forms[0].auto_submit_by.value==""){//		alert('px_form_autosubmit (inside if statement)'+thefieldname);		window.document.forms[0].auto_submit_by.value=thefieldname;//		window.prompt("autosubmitby="+window.document.forms[0].auto_submit_by.value,"yes");		px_form_submit(window.document.forms[0],0);		}	}function pxformdokeyfieldfk(thefield,theevent){	if(!theevent){		theevent=window.event;		if(!theevent){//			alert('no event object '+thefield.name);			return true;			}		}	if(theevent.keyCode==13){//		alert('we got a cr, initiating blur of field '+thefield.name);//		20100513 allow default handling//		theevent.cancelBubble=true;		thefield.blur();		//20110913				return false;		}//	return false;//	20100515	return true;	}function px_form_dokey(e){ //	alert('1:e='+e);	if (!e) e=window.event; if(!e){		alert('no event');		return true;		}//	alert('2:e.keyCode='+e.keyCode);	var num=e.keyCode+96;	if (e.keyCode==13) {		if ((intextarea&&e.shiftKey)||(!intextarea)) {			px_form_submit(document.forms[0],1);			return false;			}		return true;		}	if(e['keyCode']==3){ 		if (!bw.ns) { 			if (!bw.ie&&!bw.win) { //// if bw.safari ??? ////				e['keyCode']=0; e.cancelBubble=true; 				}			}		px_form_submit(e.srcElement.form,1);		return false;		}//	alert('3:e.keyCode='+e['keyCode']);	if(e['keyCode']==27){		if (!bw.ns) { 			if (!bw.ie&&!bw.win) {				e['keyCode']=0; e.cancelBubble=true; 				}			}		goesc();//		20080124 this does not look like a good solution//		window.setTimeout('goesc()',1);//		20080124 we have a situation with escape commands coming in twice with ff		return false;		} 	if (e['ctrlKey']) {		for (var x = 0; x < KeyListenAr.length; x++) {			if (toAscii(KeyListenAr[x][0]) == num) {				e['keyCode']=0; e.cancelBubble=true;				if (KeyListenAr[x][1] == 0) {					d.location.href=KeyListenAr[x][2];					}				else {					window.open (KeyListenAr[x][2], "newWin");					}				}			}		}	// up and down for batchupdates	var safari=0;	var netscape=0;	var explorer=0;	var key=0;		if(navigator.appVersion.indexOf('Safari') != -1){ safari = 1; }	else if(navigator.appName.indexOf('Netscape') != -1){ netscape = 1; }	else{ explorer = 1; }	var fldname;	if(netscape){ fldname = e.target.name; key=e.which; }	else{ fldname = e.srcElement.name; key=e.keyCode; }	if(fldname.length>6){		var prefix = fldname.substr(0,1);		var rownum = fldname.substr(1,5)*1;		var fldnm = fldname.substr(6,fldname.length-6);		var batchfld = (prefix=="p") ? 1 : 0;				if(batchfld){			var down=0;			var up=0;			var rownumnew=0;			if (safari){				down = (key==63233) ? 1 : 0; if(!down){ down = (key==93) ? 1 : 0; }				up = (key==63232) ? 1 : 0; if(!up){ up = (key==91) ? 1 : 0; }				}			else{				down = (key==93) ? 1 : 0;				up = (key==91) ? 1 : 0;				}			// alert("down: " + down + " up: " + up);						if(up || down){				if (down) { rownumnew=rownum+1; }				if (up && rownum>0) { rownumnew=rownum-1; }				if(rownumnew != rownum){					// alert("old: " + rownum + " new: " + rownumnew)					rownumnew = ((rownumnew < 10) ? "0" : "") + rownumnew;					rownumnew = ((rownumnew < 100) ? "0" : "") + rownumnew;					rownumnew = ((rownumnew < 1000) ? "0" : "") + rownumnew;					rownumnew = ((rownumnew < 10000) ? "0" : "") + rownumnew;					var nextfld=prefix + rownumnew + fldnm;					if(document.forms[0].elements[nextfld]){						document.forms[0].elements[nextfld].focus();						document.forms[0].elements[nextfld].select();						}					}				return false;				}			}		}	return true;	}function pxinsertatcursor(thefield,thevalue){	//20101030 does not work properly for FF (cursor always jumps to end of text after the insert)	//IE support	if(document.selection){		thefield.focus();		sel = document.selection.createRange();		sel.text = thevalue;		return;		}	//mozzilla-netscape support	if (thefield.selectionStart || (thefield.selectionStart=='0') ){		var myposstart = thefield.selectionStart;		var myposend = thefield.selectionEnd;		thefield.value = thefield.value.substring(0, myposstart)		+ thevalue		+ thefield.value.substring(myposend, thefield.value.length);//		alert('thefield.selectionStart='+thefield.selectionStart+' thefield.selectionEnd='+thefield.selectionEnd);		thefield.selectionStart=myposstart+1;		thefield.selectionEnd=myposstart+1;		return;		}	thefield.value += thevalue;	}function pxformdokey_esconly(theevent){	//for use with 'pxfielddokey(thefield,theevent,thefldidprev,thefldidnext)'	if (!theevent) theevent=window.event;	if(!theevent){		alert('no event');		return true;		}//	alert('event');	if(theevent.keyCode==27){		if (!bw.ns) { 			if (!bw.ie&&!bw.win) {				theevent['keyCode']=0; theevent.cancelBubble=true; 				}			}		goesc();		return false;		} 	return true;	}function pxfielddokey(thefield,theevent,thefldidprev,thefldidnext){//	alert('pxfielddokey theevent.keyCode='+theevent.keyCode);	if(!theevent){		theevent=window.event;		if(!theevent){			alert('no event object '+thefield.name);			return true;			}		}	if(theevent.keyCode==27){		goesc();		theevent.cancelBubble=true; 		return false;		} 	var myweshouldgotonextorprevfield=0;	if(intextarea){		if(theevent.keyCode==9){			pxinsertatcursor(thefield,'\t');			return false;			}		}	else{//		20110519 not yet, problem with popup fields//		if( (theevent.keyCode==38) || (theevent.keyCode==40) ){//			myweshouldgotonextorprevfield=1;//			}		}	//macosx has a specific 'enter' key under code '3'	if( (theevent.keyCode==13) || (theevent.keyCode==3) ){		if( theevent.ctrlKey||(thefldidnext=="") ){			//control (or being the last field) submits the form			px_form_submit(document.forms[0],1);			theevent.cancelBubble=true; 			return false;			}		if(intextarea){//			20101122			if(!theevent.altKey){				return true;				}			}		myweshouldgotonextorprevfield=1;		}			if(theevent.keyCode==9){		myweshouldgotonextorprevfield=1;		}	if(myweshouldgotonextorprevfield){		var myfld;				if(theevent.keyCode==38){			myfld=document.getElementById(thefldidprev);			}		else if(theevent.keyCode==40){			myfld=document.getElementById(thefldidnext);			}		else if(theevent.shiftKey){//			alert('issue a back-tab to '+thefldidprev);			myfld=document.getElementById(thefldidprev);			}		else{//			alert('issue a tab to '+thefldidnext);			myfld=document.getElementById(thefldidnext);			}		if(!myfld){			alert('no myfld');			}//		theevent.keyCode=9;		myfld.focus();		if(!intextarea){			myfld.select();			}		theevent.cancelBubble=true; 		return false;		}	return true;	}function pxtabsformsubmit(thefield,thetabindexvalue){	var myelement;		myelement=document.getElementById(thefield);	if(!myelement){		alert('no element pxtabsformsubmit:'+thefield);		return;		}	myelement.value=thetabindexvalue;	px_form_autosubmit(thefield);	}function pxradiobuttonsvalueget(theelementid) {	myradiobuttons=document.getElementsByName(theelementid);	if(!myradiobuttons){		alert('no myradiobuttons pxradiobuttonsvalueget:'+theelementid);		return;		}	var myradiobuttonscount=myradiobuttons.length;	if(myradiobuttonscount==undefined){		if(myradiobuttons.checked){			return myradiobuttons.value;			}		else{			return "";			}		}	for(var i=0;i<myradiobuttonscount;i++){		if(myradiobuttons[i].checked){			return myradiobuttons[i].value;			}		}	return "";	}function pxradiobuttonsvalueset(theelementid,thevalue,thesubmitalso){	myradiobuttons=document.getElementsByName(theelementid);	if(!myradiobuttons){		alert('no myradiobuttons pxradiobuttonsvalueset:'+theelementid);		return;		}	var myradiobuttonscount=myradiobuttons.length;	if(myradiobuttonscount==undefined){		myradiobuttons.checked=(myradiobuttons.value==thevalue.toString());		return;		}	for(var i=0;i<myradiobuttonscount;i++){		myradiobuttons[i].checked=false;		if(myradiobuttons[i].value==thevalue.toString()) {			myradiobuttons[i].checked=true;			}		}	if(thesubmitalso){		px_form_submit(window.document.forms[0],1);		}	}function pxelementvalueset(theelementid,thevalue){	var myelement;		myelement=document.getElementById(theelementid);	if(!myelement){		alert('no element pxelementvalueset:'+theelementid);		return;		}//	alert('***pxelementvalueset:'+theelementid+' value:'+thevalue+' myelement.value:'+myelement.value);	myelement.value=thevalue;//	alert('myelement.value:'+myelement.value);	}function pxelementvalueshow(theelementid){	var myelement;		myelement=document.getElementById(theelementid);	if(!myelement){		alert('no element pxelementvalueshow:'+theelementid);		return;		}	alert('pxelementvalueshow:'+theelementid+' value:'+myelement.value);	}//we want the showing of the helpdiv under a toggle
//a click shows the help
//when moving the mouse over another field we
//show the content of the other field
//another click hides the help

var mypxglobalfldnameshowonmouseover=0;

function pxfldnameshowhidetoggle(){
	if(mypxglobalfldnameshowonmouseover==1){
		mypxglobalfldnameshowonmouseover=0;

		var mydiv=document.getElementById('helpfldname');
		mydiv.style.visibility='hidden';
		mydiv.style.width=0;
		mydiv.style.height=0;
		}
	else{
		mypxglobalfldnameshowonmouseover=1;
		}

//	alert('mypxglobalfldnameshowonmouseover='+mypxglobalfldnameshowonmouseover);
	}

//we get the helpinfo using xmlhttprequest
var mypxglobalfldnamemouseoverxmlhttprequest;

function pxmouseoverfldname(theurl,theelementid){
	if(!mypxglobalfldnameshowonmouseover){
//		alert('skip');
		return;
		}

	mypxglobalfldnamemouseoverxmlhttprequest=pxxmlhttprequestcreate();

	//lets try sync
	mypxglobalfldnamemouseoverxmlhttprequest.open('GET',theurl,0);
//	mypxglobalfldnamemouseoverxmlhttprequest.onreadystatechange=pxmouseoverfldnamecallback;
	mypxglobalfldnamemouseoverxmlhttprequest.send(null);

	//bail out if not properly executed
	if(mypxglobalfldnamemouseoverxmlhttprequest.readyState!=4) return;
	if(mypxglobalfldnamemouseoverxmlhttprequest.status!=200) return;

	var myelement=document.getElementById(theelementid);

	var mydiv=document.getElementById('helpfldname');
		mydiv.style.width=380;
//		mydiv.style.height=500;
		mydiv.style.height='auto';
	
		var myoffsetleft=pxelementoffsetleft(myelement);
		mydiv.style.left=myoffsetleft+160;

	var myoffsettop=pxelementoffsettop(myelement);
	
	mydiv.style.top=myoffsettop+25;

	mydiv.innerHTML=mypxglobalfldnamemouseoverxmlhttprequest.responseText;

//	alert('mydiv.scrollHeight='+mydiv.scrollHeight+' mydiv.height='+mydiv.height);
//	mydiv.style.height=mydiv.scrollHeight;

	var mydivbottom=pxelementoffsettop(mydiv)+mydiv.scrollHeight;

//	alert('mydivbottom='+mydivbottom);
//	alert('document.body.scrollTop='+document.body.scrollTop);
//	alert('window.scrollTop='+window.scrollTop);

//	var mydocumentheight=document.body.clientHeight-document.body.scrollTop;
	var mydocumentheight=document.body.clientHeight+document.body.scrollTop;
	if(mydivbottom>mydocumentheight){
//		alert('need resize');
		var mytop=myoffsettop+25-(mydivbottom-mydocumentheight);
		if(mytop<0) mytop=0;
		mydiv.style.top=mytop;
		}

//	var mydoc=mydiv.document;	
//	alert('mydoc='+mydoc);
//	alert('mydiv.style.height='+mydiv.style.height);

	mydiv.style.visibility='visible';
	}

function initkb(field){	d.forms[0].temp.value=field;	}function initkb2(el){	var ar1 = new Array('q','w','e','r','t','y','u','i','o','p');	var ar2 = new Array('a','s','d','f','g','h','j','k','l',';');	var ar3 = new Array('z','x','c','v','b','n','m',',','.','/');		var sar1 = new Array('Q','W','E','R','T','Y','U','I','O','P');	var sar2 = new Array('A','S','D','F','G','H','J','K','L',':');	var sar3 = new Array('Z','X','C','V','B','N','M','<','>','?');		if (shift) {		ar = new Array(sar1,sar2,sar3);		}	else {		ar = new Array(ar1,ar2,ar3);		}	d.forms[0].temp.value = el;		if (bw.safari) {		var tbodyElem = d.getElementById("mytbody");		var trElem, tdElem, txtNode;		for (var j = 0; j < ar.length; j++) {			trElem = tbodyElem.insertRow(tbodyElem.rows.length);			for (var x = 0; x < ar[j].length; x++) {				func='add(\''+ar[j][x]+'\')';				addfield (trElem,ar[j][x],func);				}			}					trElem = tbodyElem.insertRow(tbodyElem.rows.length);			addfield (trElem,'Shift','setShift()');			addfield (trElem, 'Spatie balk', 'add(" ")');			addfield (trElem, '<-', 'back()');			addfield (trElem, 'Shift', 'setShift()');		}		else if (bw.ie) {		for (var i = 0; i < 2; i++) {					if (shift) {				ar = new Array(sar1,sar2,sar3);				}			else {				ar = new Array(ar1,ar2,ar3);				}						div = d.getElementById('numberpad');			var table = d.createElement("table");			table.setAttribute("id","blaat");			div.appendChild(table);					for (var x = 0; x < ar.length; x++) {				var tr = d.createElement("tr");				for (var y = 0; y < ar[x].length; y++) {					var func='add(\''+ar[x][y]+'\')';					addfieldie(tr,ar[x][y],func);					}				table.appendChild(tr);				}					var tr = d.createElement("tr");					addfieldie(tr,'Spatie balk','add(" ")');					addfieldie(tr,'<-','back()');					table.appendChild(tr);					if (i==0) {				shift=true;				}			else {				shift=false;				}			}		}	else {		alert('else:\nver: '+ver+'\napp: ' + app);		}	}	function add(number){	var blaat=d.forms[0].elements[d.forms[0].temp.value];	blaat.value+=number;	if(shift) setShift();	}function back(){	var blaat=d.forms[0].elements[d.forms[0].temp.value];	blaat.value=blaat.value.substr(0,blaat.value.length-1);	}function setShift(){	clearkb2();	shift?shift=false:shift=true;	initkb2(d.forms[0].temp.value);	}function clearkb2() {	var mytbody=d.getElementById("mytbody");	while (mytbody.rows.length > 0) {		mytbody.deleteRow(0);		}	}function button(text,url){	var btn_text=text;	while (text.indexOf(' ') != -1) {		text = text.replace(' ','_');		}	w('<table class="button"><tbody id="button' + text + '"></tbody></table>');	var tbody = d.getElementById('button' + text);	var thefunc='tdElem.className="button";d.location.href="'+url+'"';	if(bw.safari){		var tr = tbody.insertRow(tbody.rows.length);		addfield(tr,text,thefunc);		}	else if(bw.ie) {		var tr = d.createElement('tr');		addfieldie(tr,text,thefunc);					}	}function schoon(){	var blaat=d.forms[0].elements[d.forms[0].temp.value];	blaat.value="";	}function addfield(where,value,func){		tdElem=where.insertCell(where.cells.length);		shift&&value=='Shift'?tdElem.className="numberpaddown":tdElem.className="numberpad";		tdElem.appendChild(d.createTextNode(value));		tdElem.onmouseover=function() { shift?this.className='numberpaddown':this.className='numberpadover'; }		tdElem.onmousedown=function() { this.className='numberpaddown'; }		tdElem.onmouseup=function() { shift?this.className='numberpaddown':this.className='numberpadover'; }		tdElem.onmouseout=function() { shift?this.className='numberpaddown':this.className='numberpad'; }		var func=new Function(func);		tdElem.onclick=function() { func(); }		tdElem.colSpan=2;	}function addfieldie(where,value,func){	var td=d.createElement("td");	td.appendChild(d.createTextNode(value));	td.className='numberpad';	td.onmouseover=function() { this.className='numberpadover'; }	td.onmousedown=function() { this.className='numberpaddown'; }	td.onmouseup=function() { this.className='numberpad'; }	td.onmouseout=function() { this.className='numberpad'; }	var func=new Function(func);	td.onclick=function() { func(); }	td.colSpan=1;	where.appendChild(td);	}var shift=false; // var used by initkb2 to check if shift has been pressedfunction menuSELECT(data){// name,command,key,newwin	var pieces = data.split('|||'),chunks = new Array();	for (var x=0;x<pieces.length;x++) {		chunks[x]=pieces[x].split('///');		}	var mnuStart='<select style="width: 100px" onChange="doOpen(\''+data+'\', selectedIndex);selectedIndex=0">';	var mnuEnd='</select>';	w(mnuStart);	for (x=0;x<pieces.length;x++) {		var item='<option value="' + chunks[x][1] + '">' + chunks[x][0] + '</option>';		w(item);		}	w(mnuEnd);	}function doOpen(data,selindex){	var pieces=data.split('|||');	var chunks=new Array();	for (var x=0;x<pieces.length;x++) {		chunks[x]=pieces[x].split('///');		}	if(selindex>=1) {		if(chunks[selindex][3]==1) {			window.open(chunks[selindex][1]);			}		else {			window.d.location=chunks[selindex][1];			} 		} 	}var KeyListenAr = new Array();var mnuIds = new Array();var mnuObjs = new Array();var imgloc = 'http://www.zenosoftware.nl/plaatjesmenu/';var imgdown = imgloc+'down.gif';var imgmenu = imgloc+'menu.gif';var imgruler = imgloc+'ruler.gif';var imgiam = imgloc+'iam.gif';var timer = 2000; // msvar timenow = 0;		function mnu (lerp, id) {	chunks = lerp.split ('|||');	var pieces = new Array();	this.mnuItems = new Array();	for (var x = 0; x < chunks.length; x++) {		pieces[x] = chunks[x].split ('///');		this.mnuItems[x] = new menuItem(pieces[x][0],pieces[x][1],pieces[x][2],pieces[x][3]);		KeyListenAr[KeyListenAr.length] = new Array(pieces[x][2].toLowerCase(),pieces[x][3],pieces[x][1]);		}	this.name = pieces[0][0];	this.id = id;	this.opened = false;	this.mytbody = d.getElementById(id + pieces[0][0]);	var thismenu=this;	this.writemenu();	this.mytbody.onclick=function() { thismenu.rewrite(this); }	}mnu.prototype.rewrite=function (mytbody) {	for (var x = 0; x < mnuIds.length; x++) {		while (d.getElementById(mnuIds[x]).rows.length > 0) {			d.getElementById(mnuIds[x]).deleteRow(0);			}		}	this.opened?this.opened=false:this.opened=true;	this.writemenu();	for (var j = 0; j < mnuIds.length; j++) {		if ((mnuObjs[j].id != this.id) && (!this.opened)) {			mnuObjs[j].writemenu();			}		}		counter++;	}	function clear() {	var open=false;	for (var x=0;x<mnuObjs.length;x++) {		if (!open) {			mnuObjs[x].opened?open=true:open=false;			}		}	var mydate = new Date();	var now = mydate.getTime();	var diff = now-timenow;	if (diff >= timer) {		for (var x=0; x<mnuObjs.length; x++) {			mnuObjs[x].opened=false; 			}		mnuObjs[0].opened=true;		mnuObjs[0].rewrite();		}	else {		var open=false;		for (var x=0;x<mnuObjs.length;x++) {			if (!open) {				mnuObjs[x].opened?open=true:open=false;				}			}		if (open) {			timeout = window.setTimeout ("clear()", timer/4);			}		}	}function settimenow () {	var mydate = new Date();	timenow = mydate.getTime();	}mnu.prototype.writemenu=function() {	var myrow = this.mytbody.insertRow (this.mytbody.rows.length);		var emptytd = myrow.insertCell (myrow.cells.length);	var contenttd = myrow.insertCell (myrow.cells.length);	emptytd.width='25';	contenttd.width='135';	emptytd.setAttribute('valign','top');	var img = d.createElement('img');	img.src = imgmenu;	emptytd.appendChild(img);	emptytd.className='mnuhoofdstart';	var thismenu=this;	contenttd.appendChild(d.createTextNode(this.name));	contenttd.className='mnuhoofdstart';	emptytd.onclick=function() { this.rewrite(); }	if (this.opened) {		this.mytbody.onmouseover=function() { settimenow(); } 		settimenow();		timeout = window.setTimeout ("clear()", timer/4);		emptytd.className='mnuhoofd';		contenttd.className='mnuhoofd';		img.src=imgdown;		addrow(this.mytbody,d.createElement('br'),'');		addruler(this.mytbody);		if (this.mnuItems[0].command != '') {			var a = d.createElement('a');			a.setAttribute('href',this.mnuItems[0].command);			a.className = 'hrefmenu';			if (this.mnuItems[0].newwin != 0) {				a.setAttribute ("target", "_blank");				}			a.appendChild(d.createTextNode('intro'));			addrow (this.mytbody, a, d.createTextNode(this.mnuItems[0].key));			addruler (this.mytbody);			}		for (var x = 1; x < this.mnuItems.length; x++) {			if (this.mnuItems[x].name != '') {				var a = d.createElement('a');				a.setAttribute('href',this.mnuItems[x].command);				a.className = 'hrefmenu';				if (this.mnuItems[0].newwin != 0) {					a.setAttribute ("target", "_blank");					}				a.appendChild(d.createTextNode(this.mnuItems[x].name));				addrow (this.mytbody, a, d.createTextNode(this.mnuItems[x].key));				addruler(this.mytbody);				}			else {				addrow(this.mytbody,d.createTextNode('\u00a0'),''); // \u00a0 stands for &nbsp; , add it so td won't be empty				addruler (this.mytbody);				}			}		addiam (this.mytbody);		}	}function addiam (where) {	addrow (where, d.createElement('br'),'');	var iam = d.createElement('img');	iam.src=imgiam;	addrow (where,iam,'');	addrow (where, d.createElement('br'),'');	}function addrow (where, content, empty) {	var myrow = where.insertRow(where.rows.length);	var emptytd = myrow.insertCell(myrow.cells.length);	var contenttd = myrow.insertCell(myrow.cells.length);	emptytd.className='mnuhoofd';	emptytd.setAttribute("align","center");	contenttd.className='mnuhoofd';	contenttd.appendChild(content);	if (empty != "") {		emptytd.appendChild(empty);		}	}function addruler (where) {	var ruler = d.createElement('img');	ruler.src=imgruler; 	ruler.setAttribute('height','2px');	ruler.setAttribute('width','85%');	addrow (where, ruler,'');	}			function menuItem (name,command,key,newwin) {	this.name = name;	this.newwin = newwin;	this.key = key;	this.command = command;		}function menu (lerp, id) {	if (bw.ie) {		menuSELECT (lerp);		}	else {		var chunks = new Array();		chunks = lerp.split('///');		w('<table class="hoofd"><tr><td><table cellpadding="0" cellspacing="0" align="right" class="menu"><tbody id="'+ id + chunks[0] +'"></tbody></table></td></tr></table><br>');		mnuIds[mnuIds.length] = id + chunks[0];		mnuObjs[mnuObjs.length] = new mnu(lerp, id);		}	}function pxgetelementsbyclass(thetag,theclass){ 
	var myelements=new Array();
	var mytags=document.getElementsByTagName(thetag);
	var myclass=" "+theclass+" ";

	var myelementscount=0;
	
	for(i=0;i<mytags.length;i++){ 
		var mytest=" " +mytags[i].className + " ";
		if(mytest.indexOf(myclass)==-1){
			continue;
			}

		myelements[myelementscount]=mytags[i];
		myelementscount++;
		} 

	return myelements;
	} 
 
function pxmenu2011click(theelementid,theelementdivid){
//	alert('pxmenu2011click theelementid='+theelementid+' theelementdivid='+theelementdivid);

	var myelement=document.getElementById(theelementid);
	var mydiv=document.getElementById(theelementdivid);

	//width, height
		{
		mydiv.style.width=380;
		mydiv.style.height='auto';
		}
	
	//offsetleft
		{
		var myoffsetleft=pxelementoffsetleft(myelement);
		mydiv.style.left=myoffsetleft;
		}

	//offsettop
		{
		var myoffsettop=pxelementoffsettop(myelement);
		mydiv.style.top=myoffsettop+25;
		}

	//hide others
		{
		var mydivs=pxgetelementsbyclass('div','pxdivmenu');

//		alert('pxmenu2011click mydivs.length='+mydivs.length);

		for(i=0;i<mydivs.length;i++){ 
			mydivs[i].style.visibility='hidden';
			} 
		}

	mydiv.style.visibility='visible';
	}

function pxmenuclick(theid){
	var mydds=document.getElementsByTagName('DD')
	for(i=0;i<mydds.length;i++){
		mydds[i].style.display='none';
		}

	var myelement=document.getElementById(theid);
	if(myelement){
		myelement.style.display='block';
		}
	}

function pxiframesizemax(theid){
	var mydoc=document.getElementById(theid);
	
	if(!mydoc){
		alert('error no document.getElementById(theid) of '+theid);
		return;
		}

	var myheight=mydoc.contentWindow.document.body.scrollHeight;
	mydoc.height=myheight;
	}

function pxelementoffset(theelement,theattribute){
	var myoffset=0;
	while(theelement){
		myoffset+=theelement[theattribute];
		theelement=theelement.offsetParent;
		}
	return myoffset;
	}

function pxelementoffsettop(theelement){
	return pxelementoffset(theelement,"offsetTop");
	}

function pxelementoffsetleft(theelement){
	return pxelementoffset(theelement,"offsetLeft");
	}

//20110401 viewport

function pxdocumentviewportwidth(){
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	if(typeof window.innerWidth != 'undefined'){
		return window.innerWidth;
		}
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	if(typeof document.documentElement != 'undefined'){
		if(typeof document.documentElement.clientWidth!='undefined'){
			if(document.documentElement.clientWidth!=0){
				return document.documentElement.clientWidth;
				}
			}
		}
	 
	// older versions of IE
	return document.getElementsByTagName('body')[0].clientWidth;
	}

function pxdocumentviewportheight(){
//	alert('window.innerHeight='+window.innerHeight);

	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerHeight and window.innerHeight
	if(typeof window.innerHeight != 'undefined'){
//		alert('window.innerHeight='+window.innerHeight);
		return window.innerHeight;
		}
	 
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	
	if(typeof document.documentElement != 'undefined'){
		if(typeof document.documentElement.clientHeight!='undefined'){
			if(document.documentElement.clientHeight!=0){
				return document.documentElement.clientHeight;
				}
			}
		}
	 
	// older versions of IE
	return document.getElementsByTagName('body')[0].clientHeight;
	}

//20110401 pxdocumentbodyscroll

function pxdocumentbodyscrollleft(){
	if(typeof(window.pageXOffset)=='number'){
		//Netscape compliant
		return window.pageXOffset;
		}

	if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ){
		//DOM compliant
		return document.body.scrollLeft;
		}

	if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ){
		//IE6 standards compliant mode
		return document.documentElement.scrollLeft;
		}

	return 0;
	}

function pxdocumentbodyscrolltop(){
	if(typeof(window.pageYOffset)=='number'){
		//Netscape compliant
		return window.pageYOffset;
		}

	if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ){
	    //DOM compliant
		return document.body.scrollTop;
		}

	if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
		//IE6 standards compliant mode
		return document.documentElement.scrollTop;
		}

	return 0;
	}

//20110401 mousex, mousey, pxmouseinelement

function pxmousex(theevent){
	var myevent=theevent?theevent:window.event;
	if(!myevent){
		alert('error function pxmousex no myevent');
		return null;
		}

	if(myevent.pageX){
		return myevent.pageX;
		}
	
	if(myevent.clientX){
	   return myevent.clientX + (document.documentElement.scrollLeft? document.documentElement.scrollLeft:document.body.scrollLeft);
	   }

	return null;
	}

function pxmousey(theevent){
	var myevent=theevent?theevent:window.event;
	if(!myevent){
//		alert('error function pxmousey no myevent');
		return null;
		}

	if(myevent.pageY){
		return myevent.pageY;
		}

	if(myevent.clientY){
	   	return myevent.clientY + (document.documentElement.scrollTop? document.documentElement.scrollTop:document.body.scrollTop);
	   	}

	return null;
	}

function pxmouseinelement(theevent,theelement){
	if(!theelement){
		alert('error function pxmouseinelement no theelement')
		return;
		}
	
	//horizontal
		{
		var mymousex=pxmousex(theevent);
		//alert('mymousex='+mymousex);

		if(mymousex<pxelementoffsetleft(theelement)){
			return 0;
			}

		if(mymousex> (pxelementoffsetleft(theelement)+theelement.offsetWidth) ){
			return 0;
			}
		}
		
	//vertical
		{
		var mymousey=pxmousey(theevent);

		if(mymousey<pxelementoffsettop(theelement)){
			return 0;
			}

		if(mymousey> (pxelementoffsettop(theelement)+theelement.offsetHeight) ){
			return 0;
			}
		}
		
	return 1;
	}

///////////////////////

function pxxmlhttprequestcreate(){
	if(window.ActiveXObject){
		return new ActiveXObject("Microsoft.XMLHTTP");
		}
	return new XMLHttpRequest();
	}

//20090723 used by pxformupdatebatch_calc_totals
function px_totals_for_field(thefldtotal,theflds){
	var myfldtotal=document.getElementById(thefldtotal);
	if(!myfldtotal){
		alert('error px_totals_for_field no thefldtotal '+thefldtotal)
		return;
		}
	
	myfldtotal.value=0;

	var myflds=theflds.split(',')
	for(var i=0;i<myflds.length;i++){
		var myid=myflds[i];
		var myfld=document.getElementById(myid);
		
		if(!myfld){
			alert('error no element '+myid);
			}

		if(!parseFloat(myfld.value)){
			continue;
			}
		
		myfldtotal.value=parseFloat(myfldtotal.value)+parseFloat(myfld.value);
		}

	if(myfldtotal.value=='0'){
		myfldtotal.value='';
		}

//	alert('total '+thefldtotal+' is '+myfldtotal.value);
	}

//////////////////////////////////////////////////////////////////////
//to encode a textarea content for display in a 'div', see textarea handling
//in pxfld.cp
function pxencodetextareatext(thetext){
	var mytext=new String;
	for(i=0;i<thetext.length;i++){
		var c=thetext.substr(i,1);

//		alert('i='+i+' c='+c);

		if(c=='<'){
			mytext=mytext+'&lt;';
			continue;
			}

		if(c=='>'){
			mytext=mytext+'&gt;';
			continue;
			}

		if(c=='\n'){
			mytext=mytext+'<br>';
			continue;
			}

		if(c=='\r'){
			mytext=mytext+'<br>';
			continue;
			}

		mytext=mytext+c;
		}
//	alert('mytext='+mytext);
	return mytext;
	}

//////////////////////////////////////////////////////////////////////
//adjust the height of a textarea pxfldtxt.cp
function px_form_textarea_adjust_rows(thetextareaelement){
	var mythetextareaid=thetextareaelement.id;

	var mythetextareatext=new String;
	var mythetextareatext=thetextareaelement.value;

	var mydivid=mythetextareaid+'_pxdivtextarea';
	var myelementdiv=document.getElementById(mydivid);
	if(!myelementdiv){
		alert('error no element by id '+mydivid);
		return;
		}

	myelementdiv.innerHTML='hello world';
	var myheightline=parseInt(myelementdiv.clientHeight);
	var myheightmin=2*myheightline;

	mythetextareatext=pxencodetextareatext(mythetextareatext);
	myelementdiv.innerHTML=mythetextareatext;

	var myheight=parseInt(myelementdiv.clientHeight);

//	myheight+=myheightline;
	myheight+=1.1*myheightline;

	if(myheight<myheightmin){
		myheight=myheightmin;
		}

	thetextareaelement.style.height=myheight;
	}

////////////////////////////////////////////////////////////////////////////
//initializing the textarea's, we recognize these by looking for the hidden
//div associated with them
function px_form_textarea_adjust_all(){
	var mydivs=document.getElementsByTagName("div");
	for (var i=0;i<mydivs.length;i++){ 
		var mydiv=mydivs[i];
		var mydivid=mydiv.id;
		var mydividtail=mydivid.substr(mydivid.length-14,14);
//		alert('i='+i+' mydivid='+mydivid+' mydividtail='+mydividtail);
		if(mydividtail!='_pxdivtextarea') continue;

		var mytextareaid=mydivid.substr(0,mydivid.length-14);
//		alert('i='+i+' mytextareaid='+mytextareaid);

		px_form_textarea_adjust_rows(document.getElementById(mytextareaid));
		}
	}
function tabs (data) {	/***** CONF **********/	var iframeprops = 'scrolling="yes" frameborder="0"';	var aprops = '';	var tdprops = 'class="h1"';	/**** END CONF *******/	var pieces=data.split("|||");	var chunks=new Array(),tabs=new Array();	for (var x=0;x<pieces.length;x++) {		chunks[x]=pieces[x].split(";");		}	for (var x=0;x<chunks.length;x++) {		tabs[x]=new tab(chunks[x][0],chunks[x][1],chunks[x][2]);		}	w("<table border=\"0\" width=\"100%\"><tr>");	for (var x=0;x<pieces.length;x++) {		w("<td "+tdprops+">");		w("<a href=\"javascript:changeframe('"+tabs[x].command+"')\" "+aprops+">"+tabs[x].title+"</a>");		w("</td>");		if(tabs[x].selected==1){src=tabs[x].command;}		}	w("</tr></table>");	w("<iframe id=\"zenopx\" src=\""+src+"\" width=\"100%\" height=\"300\" "+iframeprops+"></iframe>");	}	function tab (title,selected,command) {	this.title=title;	this.selected=selected;	this.command=command;		}	function changeframe (where) {	if (bw.ie) {		d.all.zenopx.src=where;		}	else {		zenopx=d.getElementById('zenopx');		zenopx.src=where;		}	}function tabsform(field,data,offset) {	var pieces=data.split('|||');	var tblprops='width="100%" class="pxtablemenu"';//	var tdsprops='class="m1"';//	var tdsprops='class="h2"';	var tdsprops='class="m1"';	var tdprops='class="m2"';	var aprops='';	w('<input type="hidden" id="'+field+'" name="'+field+'" value="'+offset+'">');	w('<table '+tblprops+'><tr>');	for (var x=0;x<pieces.length;x++) {		if (x==offset) {			w('<td '+tdsprops+' style="padding:3px;">'+pieces[x]+'</td>');					}		else {			w('<td '+tdprops+'><a href="javascript:tabsformsubmit(\''+field+'\','+x+')" '+aprops+' class="m2">'+pieces[x]+'</a></td>');//			w('<td><div '+tdprops+'><a href="javascript:tabsformsubmit(\''+field+'\','+x+')" '+aprops+' class="m2">'+pieces[x]+'</a></div></td>');//			w('<td '+tdprops+'><a href="javascript:void(0)" onclick="tabsformsubmit(\''+field+'\','+x+')" '+aprops+'>'+pieces[x]+'</a></td>');			}		}	w('</tr></table>');	}	function tabsformsubmit(field,id) {	var obj;		if (bw.win && bw.ie) {		obj=d.all(field);		}	else{		obj=d.getElementById(field);		}	obj.value=id;	px_form_autosubmit(field);	}function pxthumbnailmouseover(theurl,theelementid,theimagewidth,theimageheight,themargin){
	//hide ourselves, we are getting data first
	var mydiv=document.getElementById('pxthumbnaildiv');
		{
		if(!mydiv){
			alert('error pxthumbnailmouseover no mydiv')
			return;
			}
	
		mydiv.style.visible='hidden';
	
		mydiv.style.width='auto';
		mydiv.style.height='auto';
		}

	//get the viewport
	var mydocumentwidth=pxdocumentviewportwidth();
	var mydocumentheight=pxdocumentviewportheight();
//	alert('mydocumentwidth='+mydocumentwidth+' mydocumentheight='+mydocumentheight);

	var myelement=document.getElementById(theelementid);
	if(!myelement){
		alert('error pxthumbnailmouseover no myelement')
		return;
		}

	var myphiinverted=1/1.61803399;//golden ratio

	//left
		var myleft=pxelementoffsetleft(myelement)+(myelement.offsetWidth/2);
	
		var myrightside=0;{
			if((myleft-pxdocumentbodyscrollleft())<(mydocumentwidth/2)){
				myrightside=1;
				}
			}
	
		if(myrightside){
			myleft=pxelementoffsetleft(myelement) + (myphiinverted*myelement.offsetWidth);
			}
		else{
			myleft=pxelementoffsetleft(myelement) + ((1-myphiinverted)*myelement.offsetWidth);
			}

		var myfracthorz=0;{
			var myavailwidth=0;
		
			if(myrightside){
				myavailwidth=mydocumentwidth-myleft+pxdocumentbodyscrollleft();
				}
			else{
				myavailwidth=myleft-pxdocumentbodyscrollleft();
				}
		
			myavailwidth=myavailwidth-(2*themargin);
	
			myfracthorz=myavailwidth/theimagewidth;
			}

	//top
		var mytop=pxelementoffsettop(myelement)+(myelement.offsetHeight/2);
	
		var mybottomside=0;{
			if((mytop-pxdocumentbodyscrolltop())<(mydocumentheight/2)){
				mybottomside=1;
				}
			}
	
		if(mybottomside){
			mytop=pxelementoffsettop(myelement) + (myphiinverted*myelement.offsetHeight);
			}
		else{
			mytop=pxelementoffsettop(myelement) + ((1-myphiinverted)*myelement.offsetHeight);
			}

		var myfractvert=0;{
			var myavailheight=0;
	
			if(mybottomside){
				myavailheight=mydocumentheight-mytop+pxdocumentbodyscrolltop();
				}
			else{
				myavailheight=mytop-pxdocumentbodyscrolltop();
				}
	
			myavailheight=myavailheight-(2*themargin);
	
			myfractvert=myavailheight/theimageheight;
			}

	//determine the width and height of the image
	var myimagewidth=0;
	var myimageheight=0;
		{
		if((myfracthorz>=1)&&(myfractvert>=1)){
			myimagewidth=theimagewidth;
			myimageheight=theimageheight;
			}
		else{
			if(myfracthorz<myfractvert){
				myimagewidth=theimagewidth*myfracthorz;
				myimageheight=theimageheight*myfracthorz;
				}
			else{
				myimagewidth=theimagewidth*myfractvert;
				myimageheight=theimageheight*myfractvert;
				}
			}
	
		myimagewidth=Math.round(myimagewidth);
		myimageheight=Math.round(myimageheight);
		}

	var myimagewidthtxt=myimagewidth+'px';
	var myimageheighttxt=myimageheight+'px';

	if(myrightside){
		mydiv.style.left=myleft;
		}
	else{
		mydiv.style.left=myleft-(myimagewidth+(2*themargin));
		}

	if(mybottomside){
		mydiv.style.top=mytop;
		}
	else{
		mydiv.style.top=mytop-(myimageheight+(2*themargin));
		}

	mydiv.style.width=(myimagewidth+(2*themargin));
	mydiv.style.height=(myimageheight+(2*themargin));

	var myurlsplit=theurl.split(".");
	var myurl='';
	for(i=0;i<myurlsplit.length;i++){
		if(i==(myurlsplit.length-1)){
			myurl=myurl+'.'+myimagewidth+'.'+myimageheight;
			}
		if(i){
			myurl=myurl+'.';
			}
		myurl=myurl+myurlsplit[i];
//		alert('myurlsplit.length='+myurlsplit.length+' myurl='+myurl);
		}

	var myhtml='<img id="pxthumbnaildivimg" style="width:'+myimagewidthtxt+';height:'+myimageheighttxt+';margin:'+themargin+'px;" src="'+myurl+'" onload="pxthumbnailmouseoveronload(\''+theelementid+'\')">';
//	alert(myhtml);

	mydiv.innerHTML=myhtml;
	}

function pxthumbnailmouseoveronload(theelementid){
	var myelement=document.getElementById(theelementid);
	if(!myelement){
		alert('error pxthumbnailmouseoveronload no myelement')
		return;
		}

	var mydiv=document.getElementById('pxthumbnaildiv');
	if(!mydiv){
		alert('error pxthumbnailmouseoveronload no mydiv')
		return;
		}

	mydiv.style.visibility='visible';

	Nifty("div.pxthumbnaildiv","transparent");
	}

function pxthumbnailhide(){
	var mydiv=document.getElementById('pxthumbnaildiv');
	if(!mydiv){
		alert('error function pxthumbnailmouseout no mydiv')
		return;
		}

	mydiv.style.visibility='hidden';
	}

function pxthumbnailmouseout(theevent){
	var mydiv=document.getElementById('pxthumbnaildiv');
	if(pxmouseinelement(theevent,mydiv)){
		return;
		}

	pxthumbnailhide();
	}function px_cookie_store_code_value(thetag,thevalue){	//called by pxresult	var exp=new Date();	exp.setTime(exp.getTime()+(30*24*60*60*1000));	window.document.cookie=thetag+"="+thevalue+";expires="+exp.toGMTString();//	var s="test! "+theitem;//	alert(theitem);//	alert(window.document.cookie);	}function px_cookie_store_code_value_session(thetag,thevalue){	//store a cookie for the session time	window.document.cookie=thetag+"="+thevalue+";";//	var s="test! "+theitem;//	alert(theitem);//	alert(window.document.cookie);	}//20080818 obsolete//function px_cookie_sus_cd_store(theitem){//	var exp=new Date();//	exp.setTime(exp.getTime()+(30*24*60*60*1000));//	window.document.cookie="suscd="+theitem+";expires="+exp.toGMTString();//	var s="test! "+theitem;//	alert(theitem);//	alert(window.document.cookie);//	}function px_store_cookie(doc,theitem){	var exp=new Date();	exp.setTime(exp.getTime()+(30*24*60*60*1000));//	doc.cookie="test="+theitem+";expires="+exp.toGMTString();	doc.cookie="test="+escape(theitem.value)+";expires="+exp.toGMTString();	}function px_restore_cookie(doc,item){	NameStart=doc.cookie.indexOf("=");	NameEnd=doc.cookie.indexOf(";");if(NameEnd<=0) NameEnd=doc.cookie.length;	item.value=unescape(doc.cookie.substring(NameStart + 1,NameEnd));	}function px_uc(item){	item.value=item.value.toUpperCase();	}//20111202function pxfieldtextonfocus(theitem){	theitem.select();	}function px_num_param(p){	var x; if(isNaN(p)){ x=0; } else{ x=p; }	return x;	}function px_round(x,d){	var decs=px_num_param(d); var y=x;	var base=Math.pow(10,decs); y=Math.round(y*base)/base;	return y;	}function px_date(item,u){	var usa = px_num_param(u);	if (item.value == ""){ return false; }	var txt = item.value; item.value = "";		txt = txt.replace(/\W/g," "); txt = txt.replace(/_/g," ");	while(txt.search("  ") >= 0){ txt = txt.replace(/  /g," "); }	while(txt.substr(0,1) == " "){ txt = txt.substr(1,txt.length); }	while(txt.substr(txt.length-1,1)==" "){ txt=txt.substr(0,txt.length-1);}	var nr_flds = 1;	if(txt.search(" ") >= 0){ var anArray=txt.match(/ /g);nr_flds= anArray.length +1; }		if (nr_flds>3){ return false; }	var dt = new Date(); dt.getTime(); var aNumber = new Number(txt);	if(nr_flds == 1 && aNumber>99){		if(aNumber<=9999){ txt = txt.substr(0,2) + " " + txt.substr(2,2); nr_flds+=1;}		else{ txt = txt.substr(0,2) + " " + txt.substr(2,2) + " " + txt.substr(4,4); nr_flds+=2;}		}	if(nr_flds == 1){		// bij numeriek en 2301 en 311203 etc. moet hier gesplitst worden		var curr_month = dt.getMonth() + 1;		if(usa){ txt = curr_month + " " + txt; } else{ txt += " " + curr_month; }		}	if(nr_flds <= 2){ var curr_year = dt.getFullYear(); txt += " " + curr_year; }	var dt = new Date();	anArray = txt.split(" "); 	if(isNaN(anArray[0]) || isNaN(anArray[1])){		var tmpdt = new Date(txt);		dt.setFullYear(tmpdt.getFullYear());		dt.setMonth(tmpdt.getMonth());		dt.setDate(tmpdt.getDate());		}	else{		var tmp_year = anArray[2]*1;		if(tmp_year >= 100 && tmp_year <= 999 ){ tmp_year += 1000; }		if(tmp_year <= 99 ){ tmp_year += 2000; }		dt.setFullYear(tmp_year);		dt.setDate(1);		dt.setMonth(anArray[1-usa] - 1);		dt.setDate(anArray[usa]);		}	if(isNaN(dt.valueOf())){ return false; }	var newvalue = "";	var day = dt.getDate(); day = ((day < 10) ? "0" : "") + day;	var month = dt.getMonth() + 1; month = ((month < 10) ? "0" : "") + month;	if(usa){ newvalue =  month  + "-" + day; } else{ newvalue = day  + "-" + month; }	item.value = newvalue + "-" + dt.getFullYear();	return true;	}function px_time(item){	if (item.value == ""){ return false; }	var txt = item.value; item.value = "";		txt = txt.replace(/\W/g," "); txt = txt.replace(/_/g," ");	while(txt.search("  ") >= 0){ txt = txt.replace(/  /g," "); }	while(txt.substr(0,1) == " "){ txt = txt.substr(1,txt.length); }	while(txt.substr(txt.length-1,1)==" "){ txt=txt.substr(0,txt.length-1);}	var nr_flds = 1; var anArray;	if(txt.search(" ") >= 0){ anArray=txt.match(/ /g); nr_flds= anArray.length +1; }		if (nr_flds>3){ return false; }	var aNumber = new Number(txt);	if(nr_flds == 1 && aNumber>24){		if(aNumber<=2400){ txt = txt.substr(0,2) + " " + txt.substr(2,2); nr_flds+=1; }		else{ return false; }		}	else{ txt = txt + " 00" }		anArray = txt.split(" "); 	if(isNaN(anArray[0]) || isNaN(anArray[1])){ return false; }	if(anArray[0] > 24){ return false; }	if(anArray[1] > 59){ return false; }		var hour = anArray[0]; hour = ((hour.length < 2) ? "0" : "") + hour;	var minute = anArray[1]; minute = ((minute.length < 2) ? "0" : "") + minute;	item.value = hour + ":" + minute;	return true;	}function px_number(item,d,n,z){	var decs=px_num_param(d),neg=px_num_param(n),zero=px_num_param(z);	if (item.value==""){ return false; }	var nr=item.value;item.value="";	nr = eval(nr.replace(/,/g,"."))	if(isNaN(nr)){ return false; }	if(!neg && (nr < 0)){ return false; } 	if(nr > 999999999 || nr < -999999999){ return false; } 	if(decs*1 >= 0){ nr = px_round(nr,decs); }	var txt = nr.toString(); var pos = txt.search(/\./);	if(decs > 0){		if(pos >= 0){			var mod = txt.substr(pos + 1,txt.length);				for(var i=0; i<(decs - mod.length); i++){ txt += "0"; }			}		else{ txt += ".00"; }		}	if(decs == -1){		if(pos >= 0){			var float_decs = txt.length - pos - 1;			if(float_decs > 8){ nr = px_round(nr,8); txt = nr.toString(); }			}		}	if(!nr && !zero){ return true; }	item.value = txt;	return true;	}function bw_check(){	this.ver=navigator.appVersion;	this.name=navigator.appName;//	alert('Browser name: ' + this.name + '\nBrowser version: ' + this.ver);	this.ns=false;	if (this.ver.indexOf('Macintosh') != -1) {this.mac=true}else{this.mac=false}	if (this.ver.indexOf('Windows') != -1) {this.win=true}else{this.win=false;}	if (this.name == 'Microsoft Internet Explorer') {this.ie=true} else {this.ie=false}	if (this.name == 'Netscape' && this.ver.indexOf('5.0') != -1 && this.ver.indexOf('Safari') == -1) {this.ns5=true;this.ns=true}else{this.ns5=false}	if (this.ver.indexOf('Safari') != -1) {this.safari=true}else{this.safari=false;}	}function key_listener(e) {alert('');	if (!e) e=window.event;	var num=e.keyCode+96;	if (e.keyCode==13) {		if (!bw.ns||(bw.win&&bw.ie)) {			e['keyCode']=0; e.cancelBubble=true; 			if (!intextarea) {				e.srcElement.blur();				}			}		if (intextarea&&e.shiftKey) {		alert('aapjes!');			px_form_submit(document.forms[0],1);			return false;			}		if (!intextarea) {			px_form_submit(document.forms[0],1);			return false;			}		return true;		}	if(e['keyCode']==3){ 		if (!bw.ns) { 			if (!bw.ie&&!bw.win) { //// if bw.safari ??? ////				e['keyCode']=0; e.cancelBubble=true; 				}			}		px_form_submit(e.srcElement.form,1);		return false;		}	if(e['keyCode']==27){		if (!bw.ns) { 			if (!bw.ie&&!bw.win) {				e['keyCode']=0; e.cancelBubble=true; 				}			}		window.setTimeout('goesc()',1);		return false;		} 	if (e['ctrlKey']) {	alert('');		for (var x = 0; x < KeyListenAr.length; x++) {			if (toAscii(KeyListenAr[x][0]) == num) {				e['keyCode']=0; e.cancelBubble=true;				if (KeyListenAr[x][1] == 0) {					d.location.href=KeyListenAr[x][2];					}				else {					window.open (KeyListenAr[x][2], "newWin");					}				}			}		}		return true;	}function toAscii (val)  {	var symbols = " !\"#$%&'()*+,-./0123456789:;<=>?@";	var loAZ = "abcdefghijklmnopqrstuvwxyz";	symbols+= loAZ.toUpperCase();	symbols+= "[\\]^_`";	symbols+= loAZ;	symbols+= "{|}~";	var loc = "";	loc = symbols.indexOf(val);	if (loc >-1) {		Ascii_Decimal = 32 + loc;		return (32 + loc);		}	return(0); 	}function w(text){	d.write(text);	}Date.prototype.getfdom=function() {	if(arguments.length==0) {		var month=this.getMonth();		var year=this.getFullYear();		}	else {		var month=arguments[0];		var year=arguments[1];		}	var dat=new Date(year,month,1);	return dat.getDay();	}	Date.prototype.isLeap=function() {	if(arguments.length==0) {		var year=this.getFullYear();		}	else {		var year=arguments[0];		}	if(year%400==0){return true}	if(year%100==0){return false}	if(year%4==0){return true}	return false;	}Date.prototype.getISOwk=function(Y,M,D) {	if(M>12)M=1;	if(M==0)M=12;	if(((Y%4==0)&&(Y%100!=0))||(Y%400===0)) {		Yleap=true;		}	else {		Yleap=false;		}	if((((Y-1)%4==0)&&((Y-1)%100!=0))||((Y-1)%400===0)) {		Yleap1=true;		}	else {		Yleap1=false;		}	mnth=new Array(0,31,59,90,120,151,181,212,243,273,304,334);	doyn=D+mnth[M-1];	if ((Yleap)&&(M>2)) {		doyn++;		}	var YY=(Y-1)%100,C=(Y-1)-YY,G=YY+Math.floor(YY/4),j1wd=1+(((((Math.floor(C/100))%4)*5)+G)%7);	H=doyn+(j1wd-1);	wd=1+((H-1)%7);	if ((doyn<=(8-j1wd))&&(j1wd>4)) {		yn=Y-1;		if ((j1wd==5)||((j1wd==6)&&(Yleap1))) {			wn=53;			}		else {			wn=52			}		}	else {		yn=Y;		}	if (yn==Y) {		if (Yleap) {			I=366;			}		else {			I=365;			}		if ((I-doyn)<(4-wd)) {			yn=Y+1;			wn=1;			}		}	if (yn==Y) {		J=doyn+(7-wd)+(j1wd-1);		wn=Math.floor(J/7);		if (j1wd>4) {			wn--;			}		}	if (wn<10) {		wn="0"+wn;		}	return wn;}function getImageLeft(img) {	offsetleft=0;	if(bw.safari||bw.ns) {		var obj=img;		offsetleft+=obj.offsetLeft;		while (obj.offsetParent!=null) {			offsetleft+=obj.offsetParent.offsetLeft;			obj=obj.offsetParent;			}		}	return offsetleft;	}function getImageTop(img) {	offsettop=0;	if(bw.safari||bw.ns) {		var obj=img;		offsettop+=obj.offsetTop;		while (obj.offsetParent!=null) {			offsettop+=obj.offsetParent.offsetTop;			obj=obj.offsetParent;			}		}	return offsettop;	}//window.onload = function() { //	d.onkeypress = px_form_dokey;//	}function goesc(){	//20080124 we have a problem with ff doing this twice	if(mygoeschasrun==1){		alert("mygoeschasrun==1");		return;		}	mygoeschasrun=1;	var url=d.form.form_esc.value;//	alert("goesc="+url);	d.location.href=url;	}function resizeElement(id,footerheight){	var myElement = d.getElementById(id); if(!myElement){ return true; }	var height=0, width=0;	if (d.all) {		var myTop = myElement.offsetTop;		if(myElement.clientTop > myTop){ myTop = myElement.clientTop; }		height = d.body.offsetHeight - myTop;		width = d.body.offsetWidth;		}	else {		height = wd.innerHeight - myElement.offsetTop;		width = wd.innerWidth;		}	myElement.style.height = height - footerheight;	myElement.style.width = width;	return true;	}/* Nifty Corners Cube - rounded corners with CSS and Javascript
Copyright 2006 Alessandro Fulciniti (a.fulciniti@html.it)

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
*/

var niftyOk=(document.getElementById && document.createElement && Array.prototype.push);
var niftyCss=false;

String.prototype.find=function(what){
return(this.indexOf(what)>=0 ? true : false);
}

var oldonload=window.onload;
if(typeof(NiftyLoad)!='function') NiftyLoad=function(){};
if(typeof(oldonload)=='function')
    window.onload=function(){oldonload();AddCss();NiftyLoad()};
else window.onload=function(){AddCss();NiftyLoad()};

function AddCss(){
niftyCss=true;

/*
var l=CreateEl("link");
l.setAttribute("type","text/css");
l.setAttribute("rel","stylesheet");
l.setAttribute("href","niftyCorners.css");
l.setAttribute("media","screen");
document.getElementsByTagName("head")[0].appendChild(l);
*/
}

function Nifty(selector,options){
if(niftyOk==false) return;
if(niftyCss==false) AddCss();
var i,v=selector.split(","),h=0;
if(options==null) options="";
if(options.find("fixed-height"))
    h=getElementsBySelector(v[0])[0].offsetHeight;
for(i=0;i<v.length;i++)
    Rounded(v[i],options);
if(options.find("height")) SameHeight(selector,h);
}

function Rounded(selector,options){
var i,top="",bottom="",v=new Array();
if(options!=""){
    options=options.replace("left","tl bl");
    options=options.replace("right","tr br");
    options=options.replace("top","tr tl");
    options=options.replace("bottom","br bl");
    options=options.replace("transparent","alias");
    if(options.find("tl")){
        top="both";
        if(!options.find("tr")) top="left";
        }
    else if(options.find("tr")) top="right";
    if(options.find("bl")){
        bottom="both";
        if(!options.find("br")) bottom="left";
        }
    else if(options.find("br")) bottom="right";
    }
if(top=="" && bottom=="" && !options.find("none")){top="both";bottom="both";}
v=getElementsBySelector(selector);
for(i=0;i<v.length;i++){
    FixIE(v[i]);
    if(top!="") AddTop(v[i],top,options);
    if(bottom!="") AddBottom(v[i],bottom,options);
    }
}

function AddTop(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Top");
if(options.find("small")){
    d.style.marginBottom=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginBottom=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginBottom=(p-5)+"px";
for(i=1;i<=lim;i++)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingTop="0";
el.insertBefore(d,el.firstChild);
}

function AddBottom(el,side,options){
var d=CreateEl("b"),lim=4,border="",p,i,btype="r",bk,color;
d.style.marginLeft="-"+getPadding(el,"Left")+"px";
d.style.marginRight="-"+getPadding(el,"Right")+"px";
if(options.find("alias") || (color=getBk(el))=="transparent"){
    color="transparent";bk="transparent"; border=getParentBk(el);btype="t";
    }
else{
    bk=getParentBk(el); border=Mix(color,bk);
    }
d.style.background=bk;
d.className="niftycorners";
p=getPadding(el,"Bottom");
if(options.find("small")){
    d.style.marginTop=(p-2)+"px";
    btype+="s"; lim=2;
    }
else if(options.find("big")){
    d.style.marginTop=(p-10)+"px";
    btype+="b"; lim=8;
    }
else d.style.marginTop=(p-5)+"px";
for(i=lim;i>0;i--)
    d.appendChild(CreateStrip(i,side,color,border,btype));
el.style.paddingBottom=0;
el.appendChild(d);
}

function CreateStrip(index,side,color,border,btype){
var x=CreateEl("b");
x.className=btype+index;
x.style.backgroundColor=color;
x.style.borderColor=border;
if(side=="left"){
    x.style.borderRightWidth="0";
    x.style.marginRight="0";
    }
else if(side=="right"){
    x.style.borderLeftWidth="0";
    x.style.marginLeft="0";
    }
return(x);
}

function CreateEl(x){
return(document.createElement(x));
}

function FixIE(el){
if(el.currentStyle!=null && el.currentStyle.hasLayout!=null && el.currentStyle.hasLayout==false)
    el.style.display="inline-block";
}

function SameHeight(selector,maxh){
var i,v=selector.split(","),t,j,els=[],gap;
for(i=0;i<v.length;i++){
    t=getElementsBySelector(v[i]);
    els=els.concat(t);
    }
for(i=0;i<els.length;i++){
    if(els[i].offsetHeight>maxh) maxh=els[i].offsetHeight;
    els[i].style.height="auto";
    }
for(i=0;i<els.length;i++){
    gap=maxh-els[i].offsetHeight;
    if(gap>0){
        t=CreateEl("b");t.className="niftyfill";t.style.height=gap+"px";
        nc=els[i].lastChild;
        if(nc.className=="niftycorners")
            els[i].insertBefore(t,nc);
        else els[i].appendChild(t);
        }
    }
}

function getElementsBySelector(selector){
var i,j,selid="",selclass="",tag=selector,tag2="",v2,k,f,a,s=[],objlist=[],c;
if(selector.find("#")){ //id selector like "tag#id"
    if(selector.find(" ")){  //descendant selector like "tag#id tag"
        s=selector.split(" ");
        var fs=s[0].split("#");
        if(fs.length==1) return(objlist);
        f=document.getElementById(fs[1]);
        if(f){
            v=f.getElementsByTagName(s[1]);
            for(i=0;i<v.length;i++) objlist.push(v[i]);
            }
        return(objlist);
        }
    else{
        s=selector.split("#");
        tag=s[0];
        selid=s[1];
        if(selid!=""){
            f=document.getElementById(selid);
            if(f) objlist.push(f);
            return(objlist);
            }
        }
    }
if(selector.find(".")){      //class selector like "tag.class"
    s=selector.split(".");
    tag=s[0];
    selclass=s[1];
    if(selclass.find(" ")){   //descendant selector like tag1.classname tag2
        s=selclass.split(" ");
        selclass=s[0];
        tag2=s[1];
        }
    }
var v=document.getElementsByTagName(tag);  // tag selector like "tag"
if(selclass==""){
    for(i=0;i<v.length;i++) objlist.push(v[i]);
    return(objlist);
    }
for(i=0;i<v.length;i++){
    c=v[i].className.split(" ");
    for(j=0;j<c.length;j++){
        if(c[j]==selclass){
            if(tag2=="") objlist.push(v[i]);
            else{
                v2=v[i].getElementsByTagName(tag2);
                for(k=0;k<v2.length;k++) objlist.push(v2[k]);
                }
            }
        }
    }
return(objlist);
}

function getParentBk(x){
var el=x.parentNode,c;
while(el.tagName.toUpperCase()!="HTML" && (c=getBk(el))=="transparent")
    el=el.parentNode;
if(c=="transparent") c="#FFFFFF";
return(c);
}

function getBk(x){
var c=getStyleProp(x,"backgroundColor");
if(c==null || c=="transparent" || c.find("rgba(0, 0, 0, 0)"))
    return("transparent");
if(c.find("rgb")) c=rgb2hex(c);
return(c);
}

function getPadding(x,side){
var p=getStyleProp(x,"padding"+side);
if(p==null || !p.find("px")) return(0);
return(parseInt(p));
}

function getStyleProp(x,prop){
if(x.currentStyle)
    return(x.currentStyle[prop]);
if(document.defaultView.getComputedStyle)
    return(document.defaultView.getComputedStyle(x,'')[prop]);
return(null);
}

function rgb2hex(value){
var hex="",v,h,i;
var regexp=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;
var h=regexp.exec(value);
for(i=1;i<4;i++){
    v=parseInt(h[i]).toString(16);
    if(v.length==1) hex+="0"+v;
    else hex+=v;
    }
return("#"+hex);
}

function Mix(c1,c2){
var i,step1,step2,x,y,r=new Array(3);
if(c1.length==4)step1=1;
else step1=2;
if(c2.length==4) step2=1;
else step2=2;
for(i=0;i<3;i++){
    x=parseInt(c1.substr(1+step1*i,step1),16);
    if(step1==1) x=16*x+x;
    y=parseInt(c2.substr(1+step2*i,step2),16);
    if(step2==1) y=16*y+y;
    r[i]=Math.floor((x*50+y*50)/100);
    r[i]=r[i].toString(16);
    if(r[i].length==1) r[i]="0"+r[i];
    }
return("#"+r[0]+r[1]+r[2]);
}
