
var jquery_validate_errorimage="<img src='http://www.makeitwork.be/_skeleton/_makeitwork/lib-pics/icon-oknot12x12.gif' alt='OK' width='12' height='12' align='absmiddle'>&nbsp;";function changeTitle(title)
{document.title=title;}
function getFileExtension(filename)
{return(/[.]/.exec(filename.toLowerCase()))?/[^.]+$/.exec(filename.toLowerCase()):undefined;}
function in_array(needle,haystack)
{for(var values in haystack)
{if(haystack[values]==needle)
{return true;break;}}
return false;}
function Left(str,n)
{if(n<=0)return"";else if(n>String(str).length)return str;else return String(str).substring(0,n);}
function Right(str,n)
{if(n<=0)return"";else if(n>String(str).length)return str;else
{var iLen=String(str).length;return String(str).substring(iLen,iLen-n);}}
function replace(str,from,to)
{var idx=str.indexOf(from);while(idx>-1){str=str.replace(from,to);idx=str.indexOf(from);}
return str;}
PositionX=10;PositionY=10;defaultWidth=600;defaultHeight=400;var AutoClose=true;function popImage(imageURL,imageTitle)
{var imgWin=window.open('','_blank','scrollbars=no,resizable=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);if(!imgWin){return true;}
imgWin.document.write('<html><head><title>'+imageTitle+'<\/title><script type="text\/javascript">\n'+'function resizeWinTo() {\n'+'if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }'+'var oH = document.images[0].height, oW = document.images[0].width;\n'+'if( !oH || window.doneAlready ) { return; }\n'+'window.doneAlready = true;\n'+'var x = window; x.resizeTo( oW + 200, oH + 200 );\n'+'var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+'if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }\n'+'else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+'else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+'if( window.opera && !document.childNodes ) { myW += 16; }\n'+'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );\n'+'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }\n'+'}\n'+'<\/script>'+'<\/head><body onload="resizeWinTo();"'+(AutoClose?' onblur="self.close();"':'')+'>'+
(document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;display:table;">'))+'<img src="'+imageURL+'" alt="Loading image ..." title="" onload="resizeWinTo();">'+
(document.layers?'<\/layer>':'<\/div>')+'<\/body><\/html>');imgWin.document.close();if(imgWin.focus)imgWin.focus();return false;}
function ShowPicture(fotonaam,fhoogte,fbreedte,src,naam)
{naam=fotonaam;len=naam.length;naam=replace(replace(Left(naam,naam.length-4),"-"," "),"_"," ");margin=180;reshoogte=screen.height;resbreedte=screen.width;if(fhoogte>(reshoogte-margin))
{hoogte=reshoogte-margin;breedte=(fbreedte/fhoogte)*hoogte;}
else{hoogte=fhoogte;breedte=fbreedte;}
strUrl="windowNavigator.php?fotonaam="+fotonaam+"&src="+src+"&breedte="+breedte
+"&hoogte="+hoogte+"&naam="+naam;foto=window.open(strUrl,'','menubar=no,toolbar=no');foto.resizeTo(breedte+15,hoogte+margin-50);}
function open_me(url,w,h,name)
{w=w+17;h=h+17;window.open(url,name,'location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=0,status=0,width='+w+',height='+h+',screenX='+(screen.width-w)/2+',screenY='+(screen.height-h)/2+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2);}
function open_me_scroll(url,w,h,name)
{w=w+17;h=h+17;window.open(url,name,'location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=1,status=0,width='+w+',height='+h+',screenX='+(screen.width-w)/2+',screenY='+(screen.height-h)/2+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2);}
function open_me2(url,w,h)
{w=w+17;h=h+17;window.open(url,'popwin2','location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=0,status=0,width='+w+',height='+h+',screenX='+(screen.width-w)/2+',screenY='+(screen.height-h)/2+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2);}
function open_me_scroll2(url,w,h)
{w=w+17;h=h+17;window.open(url,'popwin2','location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=1,status=0,width='+w+',height='+h+',screenX='+(screen.width-w)/2+',screenY='+(screen.height-h)/2+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2);}
function open_me3(url,w,h)
{w=w+17;h=h+17;window.open(url,'popwin3','location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=0,status=0,width='+w+',height='+h+',screenX='+(screen.width-w)/2+',screenY='+(screen.height-h)/2+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2);}
function open_me_scroll3(url,w,h)
{w=w+17;h=h+17;window.open(url,'popwin3','location=0,resizable=0,status=0,titlebar=0,directories=0,toolbar=0,menubar=0,scrollbars=1,status=0,width='+w+',height='+h+',screenX='+(screen.width-w)/2+',screenY='+(screen.height-h)/2+',top='+(screen.height-h)/2+',left='+(screen.width-w)/2);}
function textCounter(field,countfield,maxlimit)
{if(field.value.length>maxlimit)
field.value=field.value.substring(0,maxlimit);else
countfield.value=maxlimit-field.value.length;}
function y2k(number)
{return(number<1000)?number+1900:number;}
function calculate(day,month,year)
{var today=new Date();var thisYear=y2k(today.getYear());var thisMonth=today.getMonth()+1;var thisDay=today.getDate();var yearsold=thisYear-year,monthsold=0,daysold=0,string='';if(thisMonth>=month)monthsold=thisMonth-month;else{yearsold--;monthsold=thisMonth+12-month;}
if(thisDay>=day)daysold=thisDay-day;else{if(monthsold>0)monthsold--;else{yearsold--;monthsold+=11;}
daysold=thisDay+31-day;}
if(yearsold>0)
string=yearsold+' jaar';else
{if(monthsold>0){string+=monthsold+' maand ';}
if(daysold>0){string+=' en '+daysold+' dag';if(daysold>1)string+='en';}}
document.write(string);}
var today=new Date();function mysqlTimeStampToDate(timestamp)
{var regex=/^([0-9]{2,4})-([0-1][0-9])-([0-3][0-9])?$/;var parts=timestamp.replace(regex,"$1 $2 $3").split(' ');return new Date(parts[0],parts[1]-1,parts[2],0,0,0);}
function datediff(date1,date2)
{var y1=date1.getYear(),m1=date1.getMonth(),d1=date1.getDate();var y2=date2.getYear(),m2=date2.getMonth(),d2=date2.getDate();if(y1<1000)y1+=1900;if(y2<1000)y2+=1900;return Math.abs(y1-y2);}
function minage(date,age)
{if(parseInt(datediff(mysqlTimeStampToDate(date),today))>=parseInt(age)){return null;}
else return"te jong ! (leeftijd is "+datediff(mysqlTimeStampToDate(date),today)+" en moet minstens "+age+" jaar zijn)";}
function maxage(date,age)
{if(parseInt(datediff(mysqlTimeStampToDate(date),today))<=parseInt(age)){return null;}
else return"te oud ! (leeftijd is "+datediff(mysqlTimeStampToDate(date),today)+" en mag maximaal "+age+" jaar zijn)";}
function toggleDiv(id,flagit)
{if(flagit=="1")
{if(document.layers)document.layers[id].display=""
else if(document.all)document.all[id].style.display=""
else if(document.getElementById)document.getElementById(id).style.display=""}
else
if(flagit=="0")
{if(document.layers)document.layers[id].display="none"
else if(document.all)document.all[id].style.display="none"
else if(document.getElementById)document.getElementById(id).style.display="none"}}
function toggleVis(obj)
{var el=document.getElementById(obj);if(el.style.display!='none')el.style.display='none';else el.style.display='';}
function expand(thistag,tag)
{styleObj=document.getElementById(thistag).style;if(styleObj.display=='none')
{styleObj.display='';tag.innerHTML="<img src='/_makeitwork/lib-pics/icon-sq-min.gif' align=absmiddle border=0>";}
else{styleObj.display='none';tag.innerHTML="<img src='/_makeitwork/lib-pics/icon-sq-plus.gif' align=absmiddle border=0>";}}
function RTEsubmitForm(fieldname)
{if(fieldname=='all')
{alert('Update *all* RTE fields');updateRTEs();}
else
{alert('Update RTE field '+fieldname);updateRTE(fieldname);}
return true;}
function AreYouSure(messagetext)
{if(confirm(messagetext)==1)return true;else return false;}
function DeleteWithConfirmation(deletepage_url,field_name,field_value,messagetext)
{if(confirm(messagetext)==1){location.href=eval('\"'+deletepage_url+'?'+field_name+'='+field_value+'\"');}}
function DeleteWithConfirmationQuick(deletepage_url,messagetext)
{if(confirm(messagetext)==1){location.href=eval('\"'+deletepage_url+'\"');}}
function ltrim(str)
{return str.replace(/^\s+/,'');}
function rtrim(str)
{return str.replace(/\s+$/,'');}
function alltrim(str)
{return str.replace(/^\s+|\s+$/g,'');}
function filterDubbeleSpaties(str)
{return str.replace(/\s\s+/,' ');}
function filterLidwoorden(sText)
{var reBadWords=/^ |^LES |^DE |^THE |^HET |^EEN /gi;return filterDubbeleSpaties(alltrim(sText.replace(reBadWords,function(sMatch){return sMatch.replace(/./g,"");})));}
function checkVar(what)
{return Boolean(typeof what!='undefined'&&what)}
function Set_Cookie(name,value,expires,path,domain,secure)
{var today=new Date();today.setTime(today.getTime());if(expires)expires=expires*1000*60*60*24;var expires_date=new Date(today.getTime()+(expires));document.cookie=name+"="+escape(value)+
((expires)?";expires="+expires_date.toGMTString():"")+
((path)?";path="+path:"")+
((domain)?";domain="+domain:"")+
((secure)?";secure":"");}
function Get_Cookie(check_name)
{var a_all_cookies=document.cookie.split(';');var a_temp_cookie='';var cookie_name='';var cookie_value='';var b_cookie_found=false;for(i=0;i<a_all_cookies.length;i++)
{a_temp_cookie=a_all_cookies[i].split('=');cookie_name=a_temp_cookie[0].replace(/^\s+|\s+$/g,'');if(cookie_name==check_name)
{b_cookie_found=true;if(a_temp_cookie.length>1)cookie_value=unescape(a_temp_cookie[1].replace(/^\s+|\s+$/g,''));return cookie_value;break;}
a_temp_cookie=null;cookie_name='';}
if(!b_cookie_found)return null;}
var myWidth=0,myHeight=0;if(typeof(window.innerWidth)=='number')
{myWidth=window.innerWidth;myHeight=window.innerHeight;}
else if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight))
{myWidth=document.documentElement.clientWidth;myHeight=document.documentElement.clientHeight;}
else if(document.body&&(document.body.clientWidth||document.body.clientHeight))
{myWidth=document.body.clientWidth;myHeight=document.body.clientHeight;}
else
{myWidth=screen.availWidth;myHeight=screen.availHeight;}
function ch1(x){var yy=2;var z=0;var xx="";for(var y=0;y<x.length;y++){z=x.charCodeAt(y);xx+=String.fromCharCode(z-yy);}return xx;}function msb(x){location.href=ch1(x);}
function checkEnter(e)
{var characterCode
if(e&&e.which)
{e=e
characterCode=e.which}
else
{e=event
characterCode=e.keyCode}
if(characterCode==13)
{document.forms[0].submit()
return false}
else return true}
function IsEmpty(aTextField)
{if((aTextField.value.length==0)||(aTextField.value==null))return true;else return false;}
function MM_findObj(n,d){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_validateForm(){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;for(i=0;i<(args.length-2);i+=3){test=args[i+2];val=MM_findObj(args[i]);if(val){nm=val.name;if((val=val.value)!=""){if(test.indexOf('isEmail')!=-1){p=val.indexOf('@');if(p<1||p==(val.length-1))errors+='- "'+nm+'" moet een geldig e-mail adres zijn.\n';}else if(test!='R'){num=parseFloat(val);if(isNaN(val))errors+='- "'+nm+'" moet een nummer zijn.\n';if(test.indexOf('inRange')!=-1){p=test.indexOf(':');min=test.substring(8,p);max=test.substring(p+1);if(num<min||max<num)errors+='- "'+nm+'" moet een nummer tussen '+min+' en '+max+' zijn.\n';}}}else if(test.charAt(0)=='R')errors+='- "'+nm+'" is een verplicht veld.\n';}}if(errors)alert('Corrigeer de volgende fouten:\n\n'+errors+'\n\n');document.MM_returnValue=(errors=='');}
function MM_preloadImages(){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(){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(){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];}}
function MM_reloadPage(init){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();}
function MM_jumpMenu(targ,selObj,restore)
{eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore)selObj.selectedIndex=0;}
function timedReturn(rpage,sec)
{document.write("<p><img src='/_makeitwork/lib-pics/icon-info16x16.gif' alt='rotate' align='absmiddle' width='16' height='16'>This page will automatically close in "+(sec/1000)+" seconds...</p>");document.write("<p><button onclick=window.open('"+rpage+"','_self');><img src='/_makeitwork/lib-pics/progressbar-loading-roundgrey1.gif' alt='rotate' align='absmiddle' width='12' height='12'>Close Now</button></p>");var t=setTimeout("window.open('"+rpage+"', '_self');",secs);}
function timedClose(secs)
{document.write("<p><img src='/_makeitwork/lib-pics/icon-info16x16.gif' alt='rotate' align='absmiddle' width='16' height='16'>This page will automatically close in "+(secs/1000)+" seconds...</p>");document.write("<p><button onclick=window.close();><img src='/_makeitwork/lib-pics/progressbar-loading-roundgrey1.gif' alt='rotate' align='absmiddle' width='12' height='12'>Close Now</button></p>");var t=setTimeout("window.close();",secs);}