/*
 * application
 * Copyright(c) 2006, Synetic BV.
 */


var PR={aLabels:{},aLanguages:{},iApplicationInstanceId:new Date().getTime(),oApplicationNamespace:null,notifyContainer:null,ready:false,getLabel:function(sLabel,bSingular,aValues)
{if(PR.isEmpty(this.aLabels[sLabel.toLowerCase()]))
{$.get(LINK_ROOT+"/variable/getLabel",{label:sLabel,plural:(!PR.isEmpty(bSingular)?bSingular:false)});}
else
{if(!PR.isEmpty(bSingular)&&bSingular==false&&!PR.isEmpty(this.aLabels[sLabel.toLowerCase()].plural))
{sLabel=this.aLabels[sLabel.toLowerCase()].plural;}
else if(!PR.isEmpty(this.aLabels[sLabel.toLowerCase()].singular))
{sLabel=this.aLabels[sLabel.toLowerCase()].singular;}}
if(!PR.isEmpty(aValues))
{for(key in aValues)
{sLabel=sLabel.replace('['+key+']',aValues[key]);}}
return sLabel;},fetchLabelsFromServer:function(aParams)
{$.get(LINK_ROOT+"/variable/getLabels",function(aLabels)
{this.aLabels=aLabels;if(!PR.isEmpty(aParams)&&!PR.isEmpty(aParams.success))
{aParams.success();}}.bind(this));},run:function(oApplicationNamespace)
{this.oApplicationNamespace=oApplicationNamespace;$.ajaxSetup({beforeSend:function(oXMLHttpRequest)
{oXMLHttpRequest.setRequestHeader('X-Request-Type','Ajax');}});if(!PR.isEmpty(this.oApplicationNamespace)&&!PR.isEmpty(this.oApplicationNamespace.run))
{this.oApplicationNamespace.run.call(this.oApplicationNamespace);}
else
{this.ready=true;}},onReady:function(fn)
{if(this.ready==false)
{PR.onReady.defer(100,this,[fn]);}
else
{fn();}},debug:function()
{if(typeof(console)!='undefined'&&typeof(console.log)!='undefined')
{console.log(arguments[0]);}
else if(typeof(parent.console)!='undefined'&&typeof(parent.console.log)!='undefined')
{parent.console.log.apply(parent.console,arguments);}
else
{if(typeof Ext!='undefined'&&typeof Ext.DomHelper!='undefined')
{PR.notify('debug',Array.prototype.slice.call(arguments).toString());}
else
{window.alert(Array.prototype.slice.call(arguments).toString());}}
return;},notify:function(sTitle,sText,sClass,iSecondsPause)
{if(this.notifyContainer==null)
{this.notifyContainer=Ext.DomHelper.append(document.body,{id:'pr_notify'},true);}
var m=Ext.DomHelper.append(this.notifyContainer,{html:'<div class="outer '+(typeof sClass!='undefined'?sClass:'')+'">'+'<div class="inner">'+'<h3>'+sTitle+'</h3>'+'<div class="text">'+sText+'</div>'+'</div>'+'</div>'},true);m.slideIn('t').pause((!Ext.isEmpty(iSecondsPause)?iSecondsPause:4)).ghost("t",{remove:true});},isObjectEmpty:function(obj)
{for(var o in obj)
{return false;}
return true;},isEmpty:function(mVariable)
{try
{if(typeof mVariable=='undefined'||mVariable===null||mVariable===""||(typeof(mVariable)=='object'&&PR.isObjectEmpty(mVariable))||(typeof mVariable!='function'&&typeof mVariable.length!='undefined'&&mVariable.length==0))
{return true;}
else
{return false;}}
catch(e)
{return false;}},callFunctionByName:function(sFunctionName,aArgs)
{var aNamespaces=sFunctionName.split(".");var sFunction=aNamespaces.pop();var oContext=window;for(var i=0;i<aNamespaces.length;i++)
{oContext=oContext[aNamespaces[i]];}
if(!PR.isEmpty(oContext[sFunction]))
{return oContext[sFunction].apply(oContext,!PR.isEmpty(aArgs)?aArgs:[]);}
return null;}};Function.prototype.bind=function()
{var fn=this,args=Array.prototype.slice.call(arguments),object=args.shift();return function()
{return fn.apply(object,args.concat(Array.prototype.slice.call(arguments)));};};

PR.oPageTracker=null;PR.sGoogleTrackingUA=null;PR.HEADER_WITH_MENU=1;PR.HEADER_WITHOUT_MENU=2;PR.bBackGroundIsAnimating=false;PR.aBackgroundPositions=[{left:0,top:0},{left:500,top:500},{left:2500,top:1000}];PR.iCurrentBackGroundPosition=0;PR.bIsStartupLoad=true;PR.iAttempts=120;PR.useHashNavigation=false;PR.oHtml={};PR.navigateToUrl=function(sUrl,bIsRetry)
{if((sUrl==''||new PR.Url(window.location.href.replace(LINK_ROOT,'')).setHash('')==sUrl)&&PR.bIsStartupLoad==true)
{PR.bIsStartupLoad=false;return false;}
if(sUrl=='')
{sUrl=window.location.toString().replace(LINK_ROOT,'');}
if(sUrl=='')
{sUrl='/';}
PR.oHtml='';var iAttemptsRemaining=PR.iAttempts;sUrl=LINK_ROOT+sUrl;PR.ready=false;function setContent()
{if(PR.isEmpty(PR.oHtml)&&iAttemptsRemaining>0)
{iAttemptsRemaining--;setTimeout(setContent,250);return;}
PR.Website.removeClasses();if(PR.oHtml.header_type==PR.HEADER_WITHOUT_MENU)
{$('#header').hide();$('#header-nomenu').show();}
else
{$('#header').show();$('#header-nomenu').hide();}
$('#body-content').html(PR.oHtml.html);if(typeof PR.oHtml.title!='undefined')
{document.title=PR.oHtml.title;}
if(!PR.isEmpty(PR.oPageTracker))
{PR.oPageTracker._trackPageview(!PR.isEmpty(PR.oHtml.tracking_url)?PR.oHtml.tracking_url.replace(LINK_ROOT,''):sUrl.toString().replace(LINK_ROOT,''));}
PR.Form.InputTip.addTips();PR.Website.sIFR();$("#body-content a[rel^='prettyPhoto']").prettyPhoto();$('#body-content .tooltip[title!=""]').tooltip();PR.oHtml={};PR.ready=true;}
$.ajax({url:sUrl,success:function(aData)
{PR.oHtml=aData;},error:function(oXMLHttpRequest,sTextStatus,sErrorThrown)
{},beforeSend:function(oXMLHttpRequest)
{oXMLHttpRequest.setRequestHeader('X-Request-Type','Ajax');oXMLHttpRequest.setRequestHeader('X-Display-Header','false');},dataType:'json'});if(PR.bBackGroundIsAnimating!=true)
{var iCorrection=$(window).height()-
$('#header').height()-parseInt($('#header').css('padding-top'))-
$('#footer').height()-parseInt($('#footer').css('padding-top'));$('#body-content').html('<div style="height: '+(iCorrection)+'px;">&nbsp;</div>');PR.bBackGroundIsAnimating=true;if(PR.bIsStartupLoad!=true)
{var iCurrentBackGroundPosition=PR.iCurrentBackGroundPosition;while(iCurrentBackGroundPosition==PR.iCurrentBackGroundPosition)
{iCurrentBackGroundPosition=parseInt(Math.random()*PR.aBackgroundPositions.length);}
PR.iCurrentBackGroundPosition=iCurrentBackGroundPosition;var aPosition=PR.aBackgroundPositions[iCurrentBackGroundPosition];var iMaxLeft=$("#background .inner img").width()-$(window).width();var iMaxTop=$("#background .inner img").height()-$(window).height();if(aPosition.left>iMaxLeft)aPosition.left=iMaxLeft;if(aPosition.top>iMaxTop)aPosition.top=iMaxTop;$("#background .inner img").animate({left:aPosition.left*-1,top:aPosition.top*-1},1500,"easeInOutQuad",function()
{PR.bBackGroundIsAnimating=false;setContent();});}
else
{PR.bBackGroundIsAnimating=false;PR.bIsStartupLoad=false;setContent();}}
else
{setContent();}}
PR.navigateTo=function(oLink)
{if(oLink.href)
{$.historyLoad(oLink.href.toString().replace(LINK_ROOT,''));}
else
{$.historyLoad(oLink.replace(LINK_ROOT,''));}
return false;}

if(typeof Ext=='undefined')
{var Ext={apply:function(o,c,defaults)
{if(defaults){Ext.apply(o,defaults);}
if(o&&c&&typeof c=='object'){for(var p in c){o[p]=c[p];}}
return o;},applyIf:function(o,c)
{if(o&&c){for(var p in c){if(typeof o[p]=="undefined"){o[p]=c[p];}}}
return o;},extend:function()
{var io=function(o){for(var m in o){this[m]=o[m];}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=='object'){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor:function(){sp.apply(this,arguments);};}
var F=function(){},sbp,spp=sp.prototype;F.prototype=spp;sbp=sb.prototype=new F();sbp.constructor=sb;sb.superclass=spp;if(spp.constructor==oc){spp.constructor=sp;}
sb.override=function(o){Ext.override(sb,o);};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};return sb;};}(),override:function(origclass,overrides){if(overrides){var p=origclass.prototype;for(var method in overrides){p[method]=overrides[method];}
if(Ext.isIE&&overrides.toString!=origclass.toString){p.toString=overrides.toString;}}},util:{}};Ext.util.Observable=function()
{if(this.listeners)
{this.on(this.listeners);delete this.listeners;}};Ext.util.Observable.prototype={fireEvent:function()
{var ce=this.events[arguments[0].toLowerCase()];if(typeof ce=="object")
{return ce.fire.apply(ce,Array.prototype.slice.call(arguments,1));}
else
{return true;}},filterOptRe:/^(?:scope|delay|buffer|single)$/,addListener:function(eventName,fn,scope,o)
{if(typeof eventName=="object")
{o=eventName;for(var e in o)
{if(this.filterOptRe.test(e))
{continue;}
if(typeof o[e]=="function")
{this.addListener(e,o[e],o.scope,o);}
else
{this.addListener(e,o[e].fn,o[e].scope,o[e]);}}
return;}
o=(!o||typeof o=="boolean")?{}:o;eventName=eventName.toLowerCase();var ce=this.events[eventName]||true;if(typeof ce=="boolean")
{ce=new Ext.util.Event(this,eventName);this.events[eventName]=ce;}
ce.addListener(fn,scope,o);},removeListener:function(eventName,fn,scope)
{var ce=this.events[eventName.toLowerCase()];if(typeof ce=="object")
{ce.removeListener(fn,scope);}},purgeListeners:function()
{for(var evt in this.events)
{if(typeof this.events[evt]=="object")
{this.events[evt].clearListeners();}}},relayEvents:function(o,events)
{var createHandler=function(ename)
{return function()
{return this.fireEvent.apply(this,Ext.combine(ename,Array.prototype.slice.call(arguments,0)));};};for(var i=0,len=events.length;i<len;i++)
{var ename=events[i];if(!this.events[ename])
{this.events[ename]=true;};o.on(ename,createHandler(ename),this);}},addEvents:function(o)
{if(!this.events)
{this.events={};}
Ext.applyIf(this.events,o);},hasListener:function(eventName)
{var e=this.events[eventName];return typeof e=="object"&&e.listeners.length>0;}};Ext.util.Observable.prototype.on=Ext.util.Observable.prototype.addListener;Ext.util.Observable.prototype.un=Ext.util.Observable.prototype.removeListener;Ext.util.Observable.capture=function(o,fn,scope)
{o.fireEvent=o.fireEvent.createInterceptor(fn,scope);};Ext.util.Observable.releaseCapture=function(o)
{o.fireEvent=Ext.util.Observable.prototype.fireEvent;};(function()
{var createBuffered=function(h,o,scope)
{var task=new Ext.util.DelayedTask();return function()
{task.delay(o.buffer,h,scope,Array.prototype.slice.call(arguments,0));};};var createSingle=function(h,e,fn,scope)
{return function()
{e.removeListener(fn,scope);return h.apply(scope,arguments);};};var createDelayed=function(h,o,scope)
{return function()
{var args=Array.prototype.slice.call(arguments,0);setTimeout(function()
{h.apply(scope,args);},o.delay||10);};};Ext.util.Event=function(obj,name)
{this.name=name;this.obj=obj;this.listeners=[];};Ext.util.Event.prototype={addListener:function(fn,scope,options)
{var o=options||{};scope=scope||this.obj;if(!this.isListening(fn,scope))
{var l={fn:fn,scope:scope,options:o};var h=fn;if(o.delay)
{h=createDelayed(h,o,scope);}
if(o.single)
{h=createSingle(h,this,fn,scope);}
if(o.buffer)
{h=createBuffered(h,o,scope);}
l.fireFn=h;if(!this.firing)
{this.listeners.push(l);}
else
{this.listeners=this.listeners.slice(0);this.listeners.push(l);}}},findListener:function(fn,scope)
{scope=scope||this.obj;var ls=this.listeners;for(var i=0,len=ls.length;i<len;i++)
{var l=ls[i];if(l.fn==fn&&l.scope==scope)
{return i;}}
return-1;},isListening:function(fn,scope)
{return this.findListener(fn,scope)!=-1;},removeListener:function(fn,scope)
{var index;if((index=this.findListener(fn,scope))!=-1)
{if(!this.firing)
{this.listeners.splice(index,1);}
else
{this.listeners=this.listeners.slice(0);this.listeners.splice(index,1);}
return true;}
return false;},clearListeners:function()
{this.listeners=[];},fire:function()
{var ls=this.listeners,scope,len=ls.length;if(len>0)
{this.firing=true;var args=Array.prototype.slice.call(arguments,0);for(var i=0;i<len;i++)
{var l=ls[i];if(l.fireFn.apply(l.scope||this.obj||window,arguments)===false)
{this.firing=false;return false;}}
this.firing=false;}
return true;}};})();}

PR.Url=function(sUrl)
{if(typeof sUrl=='undefined')
{sUrl=window.location.href.toString();}
var sHash=/#.*/.test(sUrl)?sUrl.match(/#.*/)[0].toString():"";sUrl=sUrl.replace(/#.*/,'');var aHistogram={"'":'%27','(':'%28',')':'%29','*':'%2A','~':'%7E','!':'%21','%20':'+'};function getQueryStringSign()
{if(sUrl.indexOf('?')!=-1)
{return'&';}
return'?';}
this.removeParam=function(sParam)
{var oRegex=new RegExp('[&?]{1}'+sParam+'=[^&]*','g');sUrl=sUrl.replace(oRegex,'');if(/[?]/.test(sUrl)==false&&/[&]/.test(sUrl)!=false)
{sUrl=sUrl.replace(/[&]/,'?');}
return this;}
this.removeParams=function()
{var oRegex=new RegExp("(.*)\\?");var results=oRegex.exec(sUrl);sUrl=results[1];return this;}
this.addParam=function(sParam,sValue,bRemoveFirst)
{if(typeof bRemoveFirst=='undefined'||bRemoveFirst==true)
{this.removeParam(sParam);}
sUrl+=getQueryStringSign()+sParam+'='+sValue;return this;}
this.addParams=function(aParams,bRemoveFirst)
{for(key in aParams)
{this.addParam(key,aParams[key],bRemoveFirst);}
return this;}
this.getParam=function(sName)
{var oRegex=new RegExp("[\\?&]"+sName.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]")+"=([^&#]*)");var results=oRegex.exec(sUrl);return results==null?"":results[1];}
this.setLink=function(sLink)
{sUrl=sLink;}
this.encode=function()
{sUrl=encodeURIComponent(sUrl);return this;}
this.decode=function()
{var unicodeStr='',hexEscStr='';for(unicodeStr in aHistogram)
{sUrl=sUrl.replace(aHistogram[unicodeStr],unicodeStr);}
sUrl=decodeURIComponent(sUrl);return this;}
this.hasHash=function()
{return!PR.isEmpty(sHash);}
this.getHash=function()
{return sHash.replace(/#/,'');}
this.setHash=function(sNewHash)
{sHash=(sNewHash!=''?'#':'')+sNewHash;return this;}
this.queryString=function(bUrlEncodeQueryString)
{var oRegex=new RegExp("\\?(.*)");var results=oRegex.exec(sUrl);if(typeof bUrlEncodeQueryString=='undefined'||bUrlEncodeQueryString==false)
{return results[1];}
else
{return encodeURIComponent(results[1]);}}
this.toString=function()
{return!PR.isEmpty(sHash)?sUrl+sHash:sUrl;}};

PR.SwfObject={aSwfObjects:{},register:function(sDomId,aParameters)
{this.aSwfObjects[sDomId]=aParameters;},embed:function(sDomId,aParameters)
{if(PR.isEmpty(aParameters)&&!PR.isEmpty(this.aSwfObjects[sDomId]))
{aParameters=this.aSwfObjects[sDomId];}
else
{this.register(sDomId,aParameters);}
if(PR.isEmpty(aParameters.minimal_version))aParameters.minimal_version={};if(PR.isEmpty(aParameters.expressinstall))aParameters.expressinstall={};if(PR.isEmpty(aParameters.flashvars))aParameters.flashvars={};if(PR.isEmpty(aParameters.params))aParameters.params={};if(PR.isEmpty(aParameters.attributes))aParameters.attributes={};swfobject.embedSWF(aParameters.src,sDomId,aParameters.width,aParameters.height,aParameters.minimal_version,aParameters.expressinstall,aParameters.flashvars,aParameters.params,aParameters.attributes);},copy:function(sOriginalMovieId,sDomId)
{if(!PR.isEmpty(this.aSwfObjects[sOriginalMovieId]))
{this.embed(sDomId,this.aSwfObjects[sOriginalMovieId]);}},get:function(sDomId)
{return this.aSwfObjects[sDomId];},getEmbedCode:function(sDomId)
{var aParameters=this.get(sDomId);var sFlashVars='';for(key in aParameters.flashvars)
{sFlashVars+='&'+key+'='+aParameters.flashvars[key].replace(/\?/g,'%3F').replace(/&/g,'%26').replace(/=/g,'%3D');}
var sHtml="<embed ";sHtml+=" src='"+aParameters.src+"'";sHtml+=" height='"+aParameters.height+"'";sHtml+=" width='"+aParameters.width+"'";sHtml+=" allowscriptaccess='"+(!PR.isEmpty(aParameters.params.allowscriptaccess)?aParameters.params.allowscriptaccess:'always')+"'";sHtml+=" allowfullscreen='"+(!PR.isEmpty(aParameters.params.allowfullscreen)?aParameters.params.allowfullscreen:'true')+"'";if(!PR.isEmpty(aParameters.params.wmode));{sHtml+=" wmode='"+aParameters.params.wmode+"'";}
sHtml+=" flashvars='"+sFlashVars.substr(1,sFlashVars.length-1)+"'";sHtml+="/>";return sHtml;}};

PR.Synchronization=function(sSyncUrl,aEvents,aOptions)
{if(PR.isEmpty(aOptions))
{aOptions={};}
aOptions=$.extend({interval:5},aOptions);function parseResponse(aUpdateEvents)
{var oScope;for(var i=0;i<aUpdateEvents.length;i++)
{if(typeof aEvents[aUpdateEvents[i].event]!='undefined')
{oScope=typeof aEvents[aUpdateEvents[i].event].scope!='undefined'?aEvents[aUpdateEvents[i].event].scope:this;aEvents[aUpdateEvents[i].event].fn.call(oScope,aUpdateEvents[i].data);}}}
this.synchronize=function(mData)
{$.ajax({url:sSyncUrl,dataType:'json',success:parseResponse,complete:function()
{setTimeout(function(){this.synchronize();}.bind(this),aOptions.interval*1000)}.bind(this),beforeSend:function(oXMLHttpRequest)
{oXMLHttpRequest.setRequestHeader('X-Request-Type','Ajax');oXMLHttpRequest.setRequestHeader('X-Response-Format','JSON');}});}
this.run=function()
{this.synchronize();}};

PR.Form={sFormDisableMode:'submit-shim-loader',aForms:[],register:function(sFormId,fOnComplete,fOnFailure,bDisableForm)
{if(typeof bDisableForm=='undefined')bDisableForm=true;this.aForms[sFormId]={id:sFormId,el:$('#'+sFormId),complete:fOnComplete,failure:fOnFailure,disableForm:bDisableForm};},setOption:function(sFormId,sOption,mValue)
{this.aForms[sFormId][sOption]=mValue;},ajaxify:function(sFormId)
{this.aForms[sFormId].el.submit(function(oEvent)
{this.submitForm(sFormId);});},submitForm:function(sFormId)
{var sUrl=!PR.isEmpty(this.aForms[sFormId].el.attr('action'))?this.aForms[sFormId].el.attr('action'):window.location.toString();if(this.aForms[sFormId].disableForm==true)
{PR.Form.disableForm(sFormId);}
$.ajax({type:"POST",url:sUrl,dataType:'json',data:this.aForms[sFormId].el.serialize(),success:function(aResponse)
{if(PR.Form.aForms[sFormId].disableForm==true)
{PR.Form.enableForm(sFormId);}
if(aResponse.success==true)
{var bReset=true;if(typeof PR.Form.aForms[sFormId].complete!='undefined')
{bReset=PR.Form.aForms[sFormId].complete(aResponse);}
if(bReset!=false)
{PR.Form.resetForm(sFormId);}}
else
{PR.Form.resetCaptcha(sFormId);if(!PR.isEmpty(aResponse.errors))
{$("#"+sFormId).validate().showErrors(aResponse.errors);}
if(typeof PR.Form.aForms[sFormId].failure!='undefined')
{PR.Form.aForms[sFormId].failure(aResponse);}}},error:function(oXMLHttpRequest,sTextStatus,sErrorThrown)
{if(typeof bDisableForm!='undefined')
{PR.Form.enableForm(sFormId);}}});return false;},disableForm:function(sFormId)
{var aFormCoordinates=$('#'+sFormId).position();var iFormWidth=$('#'+sFormId).width();var iFormHeight=$('#'+sFormId).height();if(/submit/.test(this.sFormDisableMode))
{$('#'+sFormId+' input[type=submit]').each(function(oItem,iIndex,aArray){oItem.disabled=true;});}
if(/shim/.test(this.sFormDisableMode))
{if(typeof this.aForms[sFormId].oShim=='undefined')
{this.aForms[sFormId].oShim=$("<div>").addClass('form-shim').css({'position':'absolute','left':aFormCoordinates.left,'top':aFormCoordinates.top,'width':iFormWidth,'height':iFormHeight});}
$(document.body).append(this.aForms[sFormId].oShim);}
if(/loader/.test(this.sFormDisableMode))
{if(typeof this.aForms[sFormId].oLoader=='undefined')
{this.aForms[sFormId].oLoader={oOuter:$("<div>").addClass('form-loader-outer').css({'position':'absolute','left':'-10000px','top':'-10000px'}),oInner:$("<div>").addClass('form-loader-inner').html('<img src="'+LINK_ROOT+'/images/spinner.gif" /> Bezig met verwerken')};$(document.body).append(this.aForms[sFormId].oShim);this.aForms[sFormId].oLoader.oOuter.appendTo(this.aForms[sFormId].oLoader.oInner);}
$('#'+sFormId).append(this.aForms[sFormId].oLoader.oOuter);var iLoaderWidth=this.aForms[sFormId].oLoader.oOuter.width();var iLoaderHeight=this.aForms[sFormId].oLoader.oOuter.height();var x=aFormCoordinates.left+((iFormWidth-iLoaderHeight)/2);var y=aFormCoordinates.top+((iFormHeight-iLoaderHeight)/2);this.aForms[sFormId].oLoader.oOuter.css('left',x);this.aForms[sFormId].oLoader.oOuter.css('top',y);}},enableForm:function(sFormId)
{if(/submit/.test(this.sFormDisableMode))
{$('#'+sFormId+' input[type=submit]').each(function(oItem,iIndex,aArray){oItem.disabled=false;});}
if(/shim/.test(this.sFormDisableMode))
{this.aForms[sFormId].oShim.remove();}
if(/loader/.test(this.sFormDisableMode))
{this.aForms[sFormId].oLoader.oOuter.css('left','-10000');this.aForms[sFormId].oLoader.oOuter.css('top','-10000');}},setFormDisableMode:function(sFormDisableMode)
{this.sFormDisableMode=sFormDisableMode;},resetForm:function(sFormId,bResetHiddenFields,aIgnoreFields)
{$('#'+sFormId+' select, #'+sFormId+' input, #'+sFormId+' textarea').each(function(index,item)
{if((typeof bResetHiddenFields=='undefined'||bResetHiddenFields!=false||item.type!='hidden')&&(typeof aIgnoreFields=='undefined'||aIgnoreFields==false||aIgnoreFields.indexOf(item.name)<0)&&$(item.name))
{switch(item.type)
{case"select-one":case"select-multiple":for(var selectrow=0;selectrow<item.options.length;selectrow++)
{item.options[selectrow].selected=item.options[selectrow].defaultSelected;}
break;case"checkbox":case"radio":item.checked=item.defaultChecked;break;default:item.value=item.defaultValue;break;}}});PR.Form.resetCaptcha(sFormId);},resetCaptcha:function(sFormId)
{var aCaptcha=$('#'+sFormId+' input[name^=captcha]');if(aCaptcha.length>0)
{aCaptcha.each(function(iIndex,oCaptchaEl)
{$('#'+sFormId+'_captcha_for_'+$(oCaptchaEl).attr('name')).attr('src',$('#'+sFormId+'_captcha_for_'+$(oCaptchaEl).attr('name')).attr('src')+'&1');});}}};

PR.Form.File_Progress=function(aOptions)
{var oSWFUpload;var aFileQueue={};var iTotalSize=0;var bHasFileToUpload=false;var sDisplayEl='#display_'+aOptions.elementId;var sQueueEl='#file_queue_'+aOptions.elementId;var sFileDataEl='#filedata_'+aOptions.elementId;var sProgressEl='#file_progress_'+aOptions.elementId;var sFormEl='#'+aOptions.formId;function reset()
{$(sDisplayEl).val("");$(sFileDataEl).val("");if(!PR.isEmpty(aFileQueue))
{for(sFileId in aFileQueue)
{oSWFUpload.cancelUpload(sFileId);};}
iTotalSize=0;bHasFileToUpload=false;aFileQueue={};}
function fileDialogStart()
{if(aOptions.queueSize==1)
{reset();}}
function fileQueueError(file,errorCode,message)
{try
{switch(errorCode)
{case SWFUpload.QUEUE_ERROR.QUEUE_LIMIT_EXCEEDED:alert("Er staan te veel bestanden in de wachtrij.\n"+(message===0?"Je hebt de limiet voor het aantal bestand bereikt.":"Je mag "+(message>1?"tot "+message+" bestanden selecteren.":"een bestand selecteren.")));return;case SWFUpload.QUEUE_ERROR.FILE_EXCEEDS_SIZE_LIMIT:alert("Het geselecteerde bestand is te groot.");this.debug("Error Code: File too big, File name: "+file.name+", File size: "+file.size+", Message: "+message);return;case SWFUpload.QUEUE_ERROR.ZERO_BYTE_FILE:alert("Het geselecteerde bestand is leeg, selecteer een ander bestand.");this.debug("Error Code: Zero byte file, File name: "+file.name+", File size: "+file.size+", Message: "+message);return;case SWFUpload.QUEUE_ERROR.INVALID_FILETYPE:alert("Het geselecteerde bestand heeft niet het goede formaat.");this.debug("Error Code: Invalid File Type, File name: "+file.name+", File size: "+file.size+", Message: "+message);return;default:alert("Er is een fout onstaan tijdens het versturen van het bestand, probeer het later nogmaals.");this.debug("Error Code: "+errorCode+", File name: "+file.name+", File size: "+file.size+", Message: "+message);return;}}
catch(e){}}
function fileRemoveFromQueue(oEvent)
{var sId=$($(this).parent().get(0)).attr('id').replace(/file_/,'');oSWFUpload.cancelUpload(sId);$($(this).parent().get(0)).remove();iTotalSize=iTotalSize-aFileQueue[sId].size;delete aFileQueue[sId];if(PR.isEmpty(aFileQueue))
{reset();}}
function fileQueued(file)
{if(aOptions.queueSize==0)
{alert("U heeft de limiet voor het aantal bestand bereikt, u moet eerst een bestand verwijderen indien u een andere wilt uploden.");return false;}
bHasFileToUpload=true;aFileQueue[file.id]=file;iTotalSize+=file.size;if(aOptions.queueSize==1)
{$(sDisplayEl).val(file.name);}
else if(aOptions.queueSize>1)
{$(sDisplayEl).val(PR.getLabel('1 of meerdere bestanden klaargezet'));$(sQueueEl).append($('<div>').attr('id',"file_"+file.id).html(file.name).prepend($('<img>').attr('src',LINK_ROOT+'/images/delete.png').click(fileRemoveFromQueue)));}}
function fileDialogComplete(numFilesSelected,numFilesQueued)
{}
function startUpload(sFileId)
{if(aOptions.queueSize>1)
{$('#file_'+sFileId+' img:first').unbind('click',fileRemoveFromQueue).attr('src',LINK_ROOT+'/images/spinner.gif');}
oSWFUpload.startUpload(sFileId);}
function uploadProgress(file,bytesLoaded,bytesTotal)
{aFileQueue[file.id].bytesLoaded=bytesLoaded;var iTotalbytesLoaded=0;for(sFileId in aFileQueue)
{iTotalbytesLoaded+=typeof aFileQueue[sFileId].bytesLoaded!='undefined'?aFileQueue[sFileId].bytesLoaded:0;};var percent=Math.ceil((iTotalbytesLoaded/iTotalSize)*100);if($(sProgressEl).css('display')=='none')
{$(sProgressEl).css('display','block');}
$(sProgressEl+' div').css('width',percent+'%');$(sProgressEl+' div').html(percent+'%');}
function uploadSuccess(file,serverData)
{aFileQueue[file.id].tempname=serverData;}
function uploadComplete(file)
{if(aOptions.queueSize>1)
{$('#file_'+file.id+' img:first').attr('src',LINK_ROOT+'/images/accept.png');}}
function queueComplete(file)
{bHasFileToUpload=false;PR.Form.File_Progress.prototype.iUploadsInProgress--;var aFiles=[];for(sFileId in aFileQueue)
{aFiles.push([aFileQueue[sFileId].tempname,aFileQueue[sFileId].name]);}
$(sFileDataEl).val($.toJSON(aFiles));if(PR.Form.File_Progress.prototype.iUploadsInProgress==0)
{$(sFormEl).submit();}}
function uploadError(file,errorCode,message)
{}
$(function()
{var aSwfOptions={upload_url:LINK_ROOT+'/actions/act_upload.php',file_post_name:"resume_file",flash_url:LINK_ROOT+"/libs/SWFUpload/Flash/swfupload.swf",file_size_limit:aOptions.iMaxFileSize,file_types:"*.*",file_types_description:"All Files",file_upload_limit:"0",file_queue_limit:aOptions.queueSize,file_dialog_start_handler:fileDialogStart,file_queued_handler:fileQueued,file_queue_error_handler:fileQueueError,file_dialog_complete_handler:fileDialogComplete,upload_progress_handler:uploadProgress,upload_error_handler:uploadError,upload_success_handler:uploadSuccess,upload_complete_handler:uploadComplete,queue_complete_handler:queueComplete,button_image_url:LINK_ROOT+aOptions.button.img,button_placeholder_id:"spanButtonPlaceholder"+aOptions.elementId,button_width:aOptions.button.width,button_height:aOptions.button.height};if(!PR.isEmpty(aOptions.aSwfOptions))
{aSwfOptions=$.extend(aSwfOptions,aOptions.aSwfOptions);}
oSWFUpload=new SWFUpload(aSwfOptions);$(sFormEl).submit(function(event)
{try
{if(bHasFileToUpload==true)
{PR.Form.File_Progress.prototype.iUploadsInProgress++;for(sFileId in aFileQueue)
{startUpload(sFileId);};return false;}}
catch(e)
{}
return true;});});};PR.Form.File_Progress.prototype.iUploadsInProgress=0;

PR.Form.Rating={aElements:{},register:function(sElementId,oElement)
{PR.Form.Rating.aElements[sElementId]=oElement;},get:function(sElementId)
{PR.Form.Rating.aElements[sElementId];},rating:function(sElementId,sFormId,iComponentId,iComponentItemId,aOptions)
{var sTooltipText='';this.submit=function(sValue,oLink)
{$.get(LINK_ROOT+"/rating/add",{component_id:iComponentId,component_item_id:iComponentItemId,value:sValue},function(aData)
{if(!PR.isEmpty(aOptions.showTooltips)&&aOptions.showTooltips==true)
{sTooltipText=aData.html;$("#"+sFormId+'_'+sElementId+"-title").html(aData.html);}
$("#"+sFormId+'_'+sElementId+"-container .star").rating('disable');},'json');}
this.setOption=function(sOption,sValue)
{aOptions[sOption]=sValue;}
this.getOption=function(sOption)
{return aOptions[sOption];}
var aRatingOptions={};if(!PR.isEmpty(aOptions.required)&&aOptions.required==true)
{aRatingOptions.required=true;}
if(!PR.isEmpty(aOptions.submitOnClick)&&aOptions.submitOnClick==true)
{aRatingOptions.callback=this.submit;}
if(!PR.isEmpty(aOptions.showTooltips)&&aOptions.showTooltips==true)
{aRatingOptions.focus=function(value,link){var tip=$("#"+sFormId+'_'+sElementId+"-title");if(sTooltipText=='')sTooltipText=tip.html();tip.html(link.title||value);}
aRatingOptions.blur=function(value,link){var tip=$("#"+sFormId+'_'+sElementId+"-title");tip.html(sTooltipText||"");}}
$("#"+sFormId+'_'+sElementId+"-container .star").rating(aRatingOptions);PR.Form.Rating.register(sFormId,this);}};

PR.Form.InputTip={tipActiveClass:'input-tip',addTips:function()
{$('input[type=text][title!=""], textarea[title!=""]').each(function(iIndex,oItem)
{this.addTip($(oItem));}.bind(this));},addTip:function(oInputField)
{this.setTip(oInputField);this.addTipEvents(oInputField);},setTip:function(oInputField)
{if(oInputField.val()=='')
{oInputField.val(oInputField.attr('title'));}
if(oInputField.val()==oInputField.attr('title'))
{oInputField.addClass(this.tipActiveClass);}},addTipEvents:function(oInputField)
{$(oInputField.parents('form').get(0)).submit(function()
{if(oInputField.val()==oInputField.attr('title'))
{oInputField.val('');}});oInputField.focus(function()
{if(oInputField.val()==oInputField.attr('title'))
{oInputField.val('');}
oInputField.removeClass(this.tipActiveClass);}.bind(this));oInputField.blur(function()
{if(oInputField.val()=='')
{oInputField.val(oInputField.attr('title'));oInputField.addClass(this.tipActiveClass);}}.bind(this));}};

PR.AjaxPager={aPagers:{},create:function(sListName,iNumberOfPages,iCurrentPage,sUrl)
{if(PR.isEmpty(this.aPagers[sListName]))
{this.aPagers[sListName]=new PR.AjaxPager.Pager(sListName,iNumberOfPages,iCurrentPage,sUrl);}
return this.aPagers[sListName];},get:function(sListName)
{if(!PR.isEmpty(this.aPagers[sListName]))
{return this.aPagers[sListName];}
return false;},Pager:function(sListName,iNumberOfPages,iCurrentPage,sUrl)
{this.sListName=sListName;this.iNumberOfPages=iNumberOfPages;this.iCurrentPage=iCurrentPage;this.sUrl=!PR.isEmpty(sUrl)?sUrl:window.location.href;var oUrl=new PR.Url(this.sUrl);var bIsPaging=false;this.addEvents({'beforepage':true,'page':true});this.load=function(iPage,fOnComplete,bForceLoad)
{if(bIsPaging==true)
{return false;}
bIsPaging=true;var bResult=this.fireEvent('beforepage');if(bResult===false)
{return;}
if((parseInt(iPage)<=this.iNumberOfPages&&parseInt(iPage)>0&&parseInt(iPage)!=this.iCurrentPage)||(typeof(bForceLoad)!='undefined'&&bForceLoad==true))
{if(PR.useHashNavigation&&oUrl.hasHash())
{oUrl.setLink(LINK_ROOT+oUrl.getHash());}
$.get(oUrl.addParam('bIsAjaxPagerRequest',1).addParam('sListId',sListName).addParam(sListName+'_p',iPage),function(sData)
{this.iCurrentPage=parseInt(iPage);$('#'+this.sListName).html(sData);if(typeof fOnComplete!='undefined')
{fOnComplete(parseInt(iPage),sData);}
bIsPaging=false;this.fireEvent('page');}.bind(this));}
return false;}}};Ext.extend(PR.AjaxPager.Pager,Ext.util.Observable);

var hasFlash=function(){var a=6;if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1){document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');if(window.hasFlash!=null)return window.hasFlash}if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin){var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;return parseInt(b.substr(b.indexOf(".")-2,2),10)>=a}return false}();String.prototype.normalize=function(){return this.replace(/\s+/g," ")};if(Array.prototype.push==null){Array.prototype.push=function(){var i=0,a=this.length,b=arguments.length;while(i<b){this[a++]=arguments[i++]}return this.length}}if(!Function.prototype.apply){Function.prototype.apply=function(a,b){var c=[];var d,e;if(!a)a=window;if(!b)b=[];for(var i=0;i<b.length;i++){c[i]="b["+i+"]"}e="a.__applyTemp__("+c.join(",")+");";a.__applyTemp__=this;d=eval(e);a.__applyTemp__=null;return d}}function named(a){return new named.Arguments(a)}named.Arguments=function(a){this.oArgs=a};named.Arguments.prototype.constructor=named.Arguments;named.extract=function(a,b){var c,d;var i=a.length;while(i--){d=a[i];if(d!=null&&d.constructor!=null&&d.constructor==named.Arguments){c=a[i].oArgs;break}}if(c==null)return;for(e in c)if(b[e]!=null)b[e](c[e]);return};var parseSelector=function(){var a=/^([^#.>`]*)(#|\.|\>|\`)(.+)$/;function r(s,t){var u=s.split(/\s*\,\s*/);var v=[];for(var i=0;i<u.length;i++)v=v.concat(b(u[i],t));return v}function b(c,d,e){c=c.normalize().replace(" ","`");var f=c.match(a);var g,h,i,j,k,n;var l=[];if(f==null)f=[c,c];if(f[1]=="")f[1]="*";if(e==null)e="`";if(d==null)d=document;switch(f[2]){case"#":k=f[3].match(a);if(k==null)k=[null,f[3]];g=document.getElementById(k[1]);if(g==null||(f[1]!="*"&&!o(g,f[1])))return l;if(k.length==2){l.push(g);return l}return b(k[3],g,k[2]);case".":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;k=f[3].match(a);if(k!=null){if(g.className==null||g.className.match("(\\s|^)"+k[1]+"(\\s|$)")==null)continue;j=b(k[3],g,k[2]);l=l.concat(j)}else if(g.className!=null&&g.className.match("(\\s|^)"+f[3]+"(\\s|$)")!=null)l.push(g)}return l;case">":if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;j=b(f[3],g,">");l=l.concat(j)}return l;case"`":h=m(d,f[1]);for(i=0,n=h.length;i<n;i++){g=h[i];j=b(f[3],g,"`");l=l.concat(j)}return l;default:if(e!=">")h=m(d,f[1]);else h=d.childNodes;for(i=0,n=h.length;i<n;i++){g=h[i];if(g.nodeType!=1)continue;if(!o(g,f[1]))continue;l.push(g)}return l}}function m(d,o){if(o=="*"&&d.all!=null)return d.all;return d.getElementsByTagName(o)}function o(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:","")==q.toLowerCase()}return r}();var sIFR=function(){var a="http://www.w3.org/1999/xhtml";var b=false;var c=false;var d;var ah=[];var al=document;var ak=al.documentElement;var am=window;var au=al.addEventListener;var av=am.addEventListener;var f=function(){var g=navigator.userAgent.toLowerCase();var f={a:g.indexOf("applewebkit")>-1,b:g.indexOf("safari")>-1,c:navigator.product!=null&&navigator.product.toLowerCase().indexOf("konqueror")>-1,d:g.indexOf("opera")>-1,e:al.contentType!=null&&al.contentType.indexOf("xml")>-1,f:true,g:true,h:null,i:null,j:null,k:null};f.l=f.a||f.c;f.m=!f.a&&navigator.product!=null&&navigator.product.toLowerCase()=="gecko";if(f.m&&g.match(/.*gecko\/(\d{8}).*/))f.j=new Number(g.match(/.*gecko\/(\d{8}).*/)[1]);f.n=g.indexOf("msie")>-1&&!f.d&&!f.l&&!f.m;f.o=f.n&&g.match(/.*mac.*/)!=null;if(f.d&&g.match(/.*opera(\s|\/)(\d+\.\d+)/))f.i=new Number(g.match(/.*opera(\s|\/)(\d+\.\d+)/)[2]);if(f.n||(f.d&&f.i<7.6))f.g=false;if(f.a&&g.match(/.*applewebkit\/(\d+).*/))f.k=new Number(g.match(/.*applewebkit\/(\d+).*/)[1]);if(am.hasFlash&&(!f.n||f.o)){var aj=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;f.h=parseInt(aj.substr(aj.indexOf(".")-2,2),10)}if(g.match(/.*(windows|mac).*/)==null||f.o||f.c||(f.d&&(f.i<7.6))||(f.b&&f.h<7)||(!f.b&&f.a&&f.k<312)||(f.m&&f.j<20020523))f.f=false;if(!f.o&&!f.m&&al.createElementNS)try{al.createElementNS(a,"i").innerHTML=""}catch(e){f.e=true}f.p=f.c||(f.a&&f.k<312);return f}();function at(){return{bIsWebKit:f.a,bIsSafari:f.b,bIsKonq:f.c,bIsOpera:f.d,bIsXML:f.e,bHasTransparencySupport:f.f,bUseDOM:f.g,nFlashVersion:f.h,nOperaVersion:f.i,nGeckoBuildDate:f.j,nWebKitVersion:f.k,bIsKHTML:f.l,bIsGecko:f.m,bIsIE:f.n,bIsIEMac:f.o,bUseInnerHTMLHack:f.p}}if(am.hasFlash==false||!al.getElementsByTagName||!al.getElementById||(f.e&&(f.p||f.n)))return{UA:at()};function af(e){if((!k.bAutoInit&&(am.event||e)!=null)||!l(e))return;b=true;for(var i=0,h=ah.length;i<h;i++)j.apply(null,ah[i]);ah=[]}var k=af;function l(e){if(c==false||k.bIsDisabled==true||((f.e&&f.m||f.l)&&e==null&&b==false)||al.getElementsByTagName("body").length==0)return false;return true}function m(n){if(f.n)return n.replace(new RegExp("%\d{0}","g"),"%25");return n.replace(new RegExp("%(?!\d)","g"),"%25")}function as(p,q){return q=="*"?true:p.nodeName.toLowerCase().replace("html:","")==q.toLowerCase()}function o(p,q,r,s,t){var u="";var v=p.firstChild;var w,x,y,z;if(s==null)s=0;if(t==null)t="";while(v){if(v.nodeType==3){z=v.nodeValue.replace("<","&lt;");switch(r){case"lower":u+=z.toLowerCase();break;case"upper":u+=z.toUpperCase();break;default:u+=z}}else if(v.nodeType==1){if(as(v,"a")&&!v.getAttribute("href")==false){if(v.getAttribute("target"))t+="&sifr_url_"+s+"_target="+v.getAttribute("target");t+="&sifr_url_"+s+"="+m(v.getAttribute("href")).replace(/&/g,"%26");u+='<a href="asfunction:_root.launchURL,'+s+'">';s++}else if(as(v,"br"))u+="<br/>";if(v.hasChildNodes()){y=o(v,null,r,s,t);u+=y.u;s=y.s;t=y.t}if(as(v,"a"))u+="</a>"}w=v;v=v.nextSibling;if(q!=null){x=w.parentNode.removeChild(w);q.appendChild(x)}}return{"u":u,"s":s,"t":t}}function A(B){if(al.createElementNS&&f.g)return al.createElementNS(a,B);return al.createElement(B)}function C(D,E,z){var p=A("param");p.setAttribute("name",E);p.setAttribute("value",z);D.appendChild(p)}function F(p,G){var H=p.className;if(H==null)H=G;else H=H.normalize()+(H==""?"":" ")+G;p.className=H}function aq(ar){var a=ak;if(k.bHideBrowserText==false)a=al.getElementsByTagName("body")[0];if((k.bHideBrowserText==false||ar)&&a)if(a.className==null||a.className.match(/\bsIFR\-hasFlash\b/)==null)F(a,"sIFR-hasFlash")}function j(I,J,K,L,M,N,O,P,Q,R,S,r,T){if(!l())return ah.push(arguments);aq();named.extract(arguments,{sSelector:function(ap){I=ap},sFlashSrc:function(ap){J=ap},sColor:function(ap){K=ap},sLinkColor:function(ap){L=ap},sHoverColor:function(ap){M=ap},sBgColor:function(ap){N=ap},nPaddingTop:function(ap){O=ap},nPaddingRight:function(ap){P=ap},nPaddingBottom:function(ap){Q=ap},nPaddingLeft:function(ap){R=ap},sFlashVars:function(ap){S=ap},sCase:function(ap){r=ap},sWmode:function(ap){T=ap}});var U=parseSelector(I);if(U.length==0)return false;if(S!=null)S="&"+S.normalize();else S="";if(K!=null)S+="&textcolor="+K;if(M!=null)S+="&hovercolor="+M;if(M!=null||L!=null)S+="&linkcolor="+(L||K);if(O==null)O=0;if(P==null)P=0;if(Q==null)Q=0;if(R==null)R=0;if(N==null)N="#FFFFFF";if(T=="transparent")if(!f.f)T="opaque";else N="transparent";if(T==null)T="";var p,V,W,X,Y,Z,aa,ab,ac;var ad=null;for(var i=0,h=U.length;i<h;i++){p=U[i];if(p.className!=null&&p.className.match(/\bsIFR\-replaced\b/)!=null)continue;V=p.offsetWidth-R-P;W=p.offsetHeight-O-Q;aa=A("span");aa.className="sIFR-alternate";ac=o(p,aa,r);Z="txt="+m(ac.u).replace(/\+/g,"%2B").replace(/&/g,"%26").replace(/\"/g,"%22").normalize()+S+"&w="+V+"&h="+W+ac.t;F(p,"sIFR-replaced");if(ad==null||!f.g){if(!f.g){if(!f.n)p.innerHTML=['<embed class="sIFR-flash" type="application/x-shockwave-flash" src="',J,'" quality="best" wmode="',T,'" bgcolor="',N,'" flashvars="',Z,'" width="',V,'" height="',W,'" sifr="true"></embed>'].join("");else p.innerHTML=['<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" sifr="true" width="',V,'" height="',W,'" class="sIFR-flash"><param name="movie" value="',J,'"></param><param name="flashvars" value="',Z,'"></param><param name="quality" value="best"></param><param name="wmode" value="',T,'"></param><param name="bgcolor" value="',N,'"></param> </object>'].join('')}else{if(f.d){ab=A("object");ab.setAttribute("data",J);C(ab,"quality","best");C(ab,"wmode",T);C(ab,"bgcolor",N)}else{ab=A("embed");ab.setAttribute("src",J);ab.setAttribute("quality","best");ab.setAttribute("flashvars",Z);ab.setAttribute("wmode",T);ab.setAttribute("bgcolor",N)}ab.setAttribute("sifr","true");ab.setAttribute("type","application/x-shockwave-flash");ab.className="sIFR-flash";if(!f.l||!f.e)ad=ab.cloneNode(true)}}else ab=ad.cloneNode(true);if(f.g){if(f.d)C(ab,"flashvars",Z);else ab.setAttribute("flashvars",Z);ab.setAttribute("width",V);ab.setAttribute("height",W);ab.style.width=V+"px";ab.style.height=W+"px";p.appendChild(ab)}p.appendChild(aa);if(f.p)p.innerHTML+=""}if(f.n&&k.bFixFragIdBug)setTimeout(function(){al.title=d},0)}function ai(){d=al.title}function ae(){if(k.bIsDisabled==true)return;c=true;if(k.bHideBrowserText)aq(true);if(am.attachEvent)am.attachEvent("onload",af);else if(!f.c&&(al.addEventListener||am.addEventListener)){if(f.a&&f.k>=132&&am.addEventListener)am.addEventListener("load",function(){setTimeout("sIFR({})",1)},false);else{if(al.addEventListener)al.addEventListener("load",af,false);if(am.addEventListener)am.addEventListener("load",af,false)}}else if(typeof am.onload=="function"){var ag=am.onload;am.onload=function(){ag();af()}}else am.onload=af;if(!f.n||am.location.hash=="")k.bFixFragIdBug=false;else ai()}k.UA=at();k.bAutoInit=true;k.bFixFragIdBug=true;k.replaceElement=j;k.updateDocumentTitle=ai;k.appendToClassName=F;k.setup=ae;k.debug=function(){aq(true)};k.debug.replaceNow=function(){ae();k()};k.bIsDisabled=false;k.bHideBrowserText=true;return k}();PR.Website={bCarrouselAnimationActive:false,setActiveMother:function(sMotherKey,sType)
{if(PR.Website.bCarrouselAnimationActive==false&&$('.carrousel #mother_'+sMotherKey).length==0)
{PR.Website.bCarrouselAnimationActive=true;$.get(LINK_ROOT+"/Moeders/homepage/"+sMotherKey,{homepage:1,type:sType},function(sHtml)
{$('.carrousel .main-menu .active').removeClass('active');$('.carrousel #carrousel_menu_'+sMotherKey).addClass('active');$('.carrousel .slide').replaceWith(sHtml);PR.Form.InputTip.addTips();PR.Website.sIFR('.carrousel ');PR.Website.bCarrouselAnimationActive=false;});}},removeClasses:function()
{$(document.body).removeClass('green_light green_sea blue_light blue_dark blue_deep purple_light purple_dark complication pregnant born_name_not_known born_winner');},setClass:function(aClasses)
{this.removeClasses();$(document.body).addClass(aClasses.color+' '+aClasses.status);},validateName:function(oInputField,fOnValid)
{$.get(LINK_ROOT+"/Bestaande-namen/validateName",{babyname:oInputField.val()},function(sIsValid)
{if(sIsValid=='true'&&oInputField.attr('title')!=oInputField.val())
{oInputField.removeClass('invalid');if(typeof(fOnValid)!='undefined')
{fOnValid();}}
else
{oInputField.addClass('invalid');}});},validateCode:function(oInputField,fOnvalid)
{if(oInputField.val().length==6)
{$.get(LINK_ROOT+"/Wincodes/validateCode",{actioncode:oInputField.val()},function(oResponse)
{if(oResponse.valid==1&&oInputField.attr('title')!=oInputField.val())
{oInputField.removeClass('invalid');window.location=LINK_ROOT+'/Wincodes/controleercode/?code='+oResponse.tbl_actioncodes_name;if(typeof(fOnValid)!='undefined')
{fOnValid();}}
else
{PR.Website.invalideCodeTip('De ingevoerde code is onjuist');oInputField.addClass('invalid');}},'json');}
else
{PR.Website.invalideCodeTip('De ingevoerde code is onjuist');oInputField.addClass('invalid');}},invalideCodeTip:function(err)
{if($('#invalidcode').length==0){$('#actie-check').append("<div id='invalidcode' style='display: none;'></div>");}
$('#invalidcode').html(err);$('#invalidcode').show('drop',{},1000,function(){setTimeout(function(){$('#invalidcode').hide('drop');},3000);});},SubmitNameForm:function(iMotherId)
{this.validateName($('#name_'+iMotherId+' input[name=babyname]'),function()
{$('#name_'+iMotherId).submit();})},SubmitCodeForm:function()
{this.validateCode($('#actie-check-form-code'),function(){PR.debug('code is valid');});},voteForName:function(sNameKey,sMotherKey)
{$.get(LINK_ROOT+"/Namen/"+sNameKey+"/stem",{},function(aData)
{var html=aData.message;html+='<div class="blijf-op-de-hoogte-wrapper"><a href="'+LINK_ROOT+'/profiel/aanmelden/" ><div class="blijf-op-de-hoogte"></div></a></div>';$('#'+sMotherKey+'-stem-verwerkt').html(html).show('drop',{},1000,function(){setTimeout(function(){$('#'+sMotherKey+'-stem-verwerkt').hide('drop');},10000);});},'json');},showEmbed:function(sVideoKey)
{return"<div class='embed_explanation'>"+$('#embed_video_block').html()+'<textarea onfocus="this.select()">'+PR.SwfObject.getEmbedCode(sVideoKey)+'</textarea></div> ';},showLink:function()
{var oUrl=new PR.Url();if(oUrl.hasHash()&&oUrl.getHash().length>1)
{oUrl=new PR.Url(LINK_ROOT+oUrl.getHash());}
return"<div class='embed_explanation embed_link_explanation'>"+$('#link_video_block').html()+'<textarea onfocus="this.select()">'+oUrl+'</textarea></div> ';},checkSubscriptionAvailability:function()
{$.get(LINK_ROOT+"/Inschrijvingen/beschikbaar",{},function(aData)
{if($('#num_available_subscriptions').length>0)
{$('#num_available_subscriptions').html(aData);setTimeout(PR.Website.checkSubscriptionAvailability,2500);}});},run:function()
{PR.Website.sIFR();PR.Form.InputTip.addTips();$("a[rel^='prettyPhoto']").prettyPhoto();$('.tooltip[title!=""]').tooltip();$('#background .inner').width($(document.body).width());$('#background .inner').height($(window).height());$(window).resize(function()
{$('#background .inner').width($(document.body).width());$('#background .inner').height($(window).height());});$('#background .inner').append('<img src="'+LINK_ROOT+'/images/design/dolfinarium.jpg" />');PR.useHashNavigation=true;var isIE6=!$.support.opacity&&!window.XMLHttpRequest;if(isIE6){DD_belatedPNG.fix('.block-mother, .block-mother-tabs a, .block-mother-blog, .block-mother-blog-image, .block-mother-blog-button, .events-trans, .action-button, .events-image-top, .illustration .shime, .block-mother-righttext .date, .block-mother-text, .events-text ');}
$.historyInit(PR.navigateToUrl);},checkSms:function(){if($('#tbl_profile_sms').attr('checked')){$('#tbl_profile_mobile_row').show();$("#tbl_profile_mobile").rules("add",{required:true,messages:{required:'Mobiel nummer is verplicht'}});}else{$('#tbl_profile_mobile_row').hide();$("#tbl_profile_mobile").rules("remove","required");}},sIFR:function(sSelectorPrefix)
{if(typeof sSelectorPrefix=='undefined')
{sSelectorPrefix='';}
if(typeof sIFR=="function"&&!sIFR.UA.bIsIEMac&&(!sIFR.UA.bIsWebKit||sIFR.UA.nWebKitVersion>=100)){sIFR.setup();};if(typeof sIFR=="function"){sIFR.replaceElement(named({sSelector:sSelectorPrefix+".nav-btn .inner span, .btn-pink .inner span, .btn-green .inner span, .btn-blue .inner span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sLinkColor:"#ffffff",sHoverColor:"#ffffff",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".main-menu span, .content-title-container h1",css:['.sIFR-root { cursor: pointer;}'],sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#ffffff",sLinkColor:"#ffffff",sHoverColor:"#ffffff",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".home .sidebar .sifr p",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#9973b2",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".btn-sidebar .inner span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sLinkColor:"#ffffff",sHoverColor:"#ffffff",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+"#nav li span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sLinkColor:"#2790d0",sHoverColor:"#2790d0",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".green_light .form span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#4FCD79",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".green_sea .form span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#35c1a5",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".blue_light .form span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#4FBACD",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".blue_dark .form span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#00aedb",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".purple_light .form span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#9973b2",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".purple_dark .form span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#7A73B2",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".blue_deep .form span",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#4370c5",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".green_light h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#4FCD79",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".green_sea h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#35c1a5",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".blue_light h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#4FBACD",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".blue_dark h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#00aedb",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".purple_light h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#9973B2",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".purple_dark h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#7A73B2",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".blue_deep h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#4370c5",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".pink h3.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#EA91BC",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".events-trans h2",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#ffffff",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".block-mother-blog h2",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#2790D0",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+"h2.importersifr",sFlashSrc:LINK_ROOT+"/flash/finkheavy.swf",sWmode:"transparent",sColor:"#66cce8",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".css-title h1",sFlashVars:"textalign=center",sFlashSrc:LINK_ROOT+"/flash/finkheavy.swf",sWmode:"transparent",sColor:"#ffffff;",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+".css-content h2",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#66cce8;",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+"h2.sifr",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#ffffff;",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+"h1.sifr",sFlashSrc:LINK_ROOT+"/flash/finkheavy.swf",sWmode:"transparent",sColor:"#ffffff;",nPaddingTop:0,nPaddingBottom:0}));sIFR.replaceElement(named({sSelector:sSelectorPrefix+"h2.sifr2",sFlashSrc:LINK_ROOT+"/flash/variable-black.swf",sWmode:"transparent",sColor:"#D759A9;",nPaddingTop:0,nPaddingBottom:0}));}}};

PR.Chat_Session={aChatSessions:{},registerSession:function(iChatSessionId,oSession)
{this.aChatSessions[iChatSessionId]=oSession;},getSession:function(iChatSessionId)
{return PR.Chat_Session.aChatSessions[iChatSessionId];},kickChatUser:function(iChatUserId)
{var bTest=window.confirm(PR.getLabel('Weet je zeker dat je deze gebruiker niet meer in de chat wilt toelaten?'));if(bTest)
{$.get(LINK_ROOT+"/Chat-Sessies/kick",{tbl_chat_user_id:iChatUserId},function(sResponse)
{window.alert(sResponse);});}}};PR.Chat_Session.Session=function(iChatSessionId,sChatSessionKey)
{var oSync;this.setUsers=function(sUsers)
{$('#chat_session_'+sChatSessionKey+' .chat_users').html(sUsers);}
this.setMessages=function(sMessages)
{$('#chat_session_'+sChatSessionKey+' .chat_log').append(sMessages);$('#chat_session_'+sChatSessionKey+' .chat_log').attr({scrollTop:$('#chat_session_'+sChatSessionKey+' .chat_log').attr("scrollHeight")});$('#chat_session_'+sChatSessionKey+' .chat_log .tooltip[title!=""]').tooltip();}
PR.Chat_Session.registerSession(iChatSessionId,this);oSync=new PR.Synchronization(LINK_ROOT+'/Chat-Sessies/'+sChatSessionKey+'/synchronize',{'users':{fn:this.setUsers,scope:this},'log_update':{fn:this.setMessages,scope:this}},{interval:3});oSync.run();};
