add_onready=(function()
{var load_events=[],load_timer,script,done,exec,old_onload,init=function()
{done=true;clearInterval(load_timer);while(exec=load_events.shift())exec();if(script)script.onreadystatechange='';};return function(func)
{if(done)return func();if(!load_events[0]){if(document.addEventListener)document.addEventListener("DOMContentLoaded",init,false);if(/WebKit/i.test(navigator.userAgent))
load_timer=setInterval(function(){if(/loaded|complete/.test(document.readyState))init();},10);old_onload=window.onload;window.onload=function(){init();if(old_onload)old_onload();};}
load_events.push(func);}})();if(!this.JSON){JSON=function(){function f(n){return n<10?'0'+n:n;}
Date.prototype.toJSON=function(key){return this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z';};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(key){return this.valueOf();};var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapeable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(string){escapeable.lastIndex=0;return escapeable.test(string)?'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
return'\\u'+('0000'+(+(a.charCodeAt(0))).toString(16)).slice(-4);})+'"':'"'+string+'"';}
function str(key,holder){var i,k,v,length,mind=gap,partial,value=holder[key];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(key);}
if(typeof rep==='function'){value=rep.call(holder,key,value);}
switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null';}
gap+=indent;partial=[];if(typeof value.length==='number'&&!(value.propertyIsEnumerable('length'))){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null';}
v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v;}
if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}
v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v;}}
return{stringify:function(value,replacer,space){var i;gap='';indent='';if(typeof space==='number'){for(i=0;i<space;i+=1){indent+=' ';}}else if(typeof space==='string'){indent=space;}
rep=replacer;if(replacer&&typeof replacer!=='function'&&(typeof replacer!=='object'||typeof replacer.length!=='number')){throw new Error('JSON.stringify');}
return str('',{'':value});},parse:function(text,reviver){var j;function walk(holder,key){var k,v,value=holder[key];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v;}else{delete value[k];}}}}
return reviver.call(holder,key,value);}
cx.lastIndex=0;if(cx.test(text)){text=text.replace(cx,function(a){return'\\u'+('0000'+(+(a.charCodeAt(0))).toString(16)).slice(-4);});}
if(/^[\],:{}\s]*$/.
test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').
replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').
replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+text+')');return typeof reviver==='function'?walk({'':j},''):j;}
throw new SyntaxError('JSON.parse');}};}();}
function dump(a){alert(JSON.stringify(a));}
String.prototype.left=function(c){return this.slice(0,c);}
String.prototype.right=function(c){return this.slice(this.length-c);}
String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,'');}
String.prototype.isempty=function(){return(!this||this.trim().length==0);}
String.prototype.add_class=function(name){return this.replace(/$/g,' '+name);}
String.prototype.remove_class=function(name){return this.replace(new RegExp('\s*'+name+'\s*','g'),'').trim();}
String.prototype.repeat=function(c)
{switch(c)
{case 0:return'';break;case 1:return this;break;default:return(this+this).repeat(Math.floor(c/2))+this.repeat(c%2);}}
function each(a,func)
{if(utils.is_array(a))for(var i=0;i<a.length;i++)func(i,a[i]);else if(utils.is_object(a))for(i in a)func(i,a[i]);else func(0,a);}
function equal_one(a,b)
{if(typeof(a)!=typeof(b))return false;if(utils.is_object(a)){for(var i in a)if(!equal_one(a[i],b[i]))return false;}
else
{if(utils.is_array(a)){for(var i=0;i<a.length;i++)if(!equal_one(a[i],b[i]))return false;}
else return a==b;}
return true;}
function equal(a,b)
{return(equal_one(a,b)==true)&&(equal_one(b,a)==true);}
function walk_tree(root,childprop,func,param)
{if(!root)return;func(root,param);each(root[childprop],function(i,a){walk_tree(a,childprop,func,param);});}
function namespace(ns)
{var a=ns.split(".");var b=window;for(i=0;i<a.length;i++)
{if(!b[a[i]])b[a[i]]=new Object();b=b[a[i]];}}
function $()
{var a=new Array();for(var i=0;i<arguments.length;i++){var b=arguments[i];if(typeof b=='string')
b=document.getElementById(b);if(arguments.length==1)
return b;a.push(b);}
return a;}
var vector2={create:function(x,y)
{var t={};t.x=x||0;t.y=y||0;t.add=function(v){t.x+=v.x;t.y+=v.y;return t;}
return t;},topleft:function(e)
{var v=vector2.create(e.offsetLeft,e.offsetTop);if(e.offsetParent)if(e.offsetParent.style.position!='absolute')
v.add(vector2.topleft(e.offsetParent));return v;},size:function(e){return vector2.create(e.offsetWidth,e.offsetHeight);}};var delay={init:function(p){return delay.init({},p);},create:function(t,p)
{utils.merge(t,p);utils.merge(t,{handle:null,start:function(cb,time){t.stop();t.handle=setTimeout(function(){t.handle=null;(cb||t.cb)();},time||t.time);},stop:function(){if(t.handle==null)return;clearTimeout(t.handle);t.handle=null;}});return t;}};var utils={seq_array:function(length,start,inc){var a=[];start=start||0;inc=inc||0;for(i=0;i<length;i++)a[i]=start+inc*i;return a;},uid_count:0,uid:function(){return'uid'+utils.uid_count++;},merge:function(a,b){for(var i in b)a[i]=b[i];return a;},objxor:function(a,b){for(var i in b)a[i]=undefined;return a;},objand:function(a,b){var c={};for(var i in a)if(!b[i])a[i]=undefined;return a;},max:function(a,b){return(b>a)?b:a;},min:function(a,b){return(b<a)?b:a;},redirect:function(a){window.location.href=a;},reload:function(){window.location.reload();},reload_clear_uri:function()
{var r=utils.split_url(window.location.href);utils.redirect(r.url);},inject:function(a,b){a.innerHTML=b.html;return eval(b.script);},is_string:function(a){return typeof(a)=='string';},is_object:function(a){return(a instanceof Array)?false:((a!==0)&&(typeof(a)=='object'));},is_array:function(a){return a instanceof Array;},is_indexed:function(a){if(!a)return false;return(a instanceof Array||typeof(a)=='object');},is_active:function(a){return a.disabled==false&&utils.is_displayed(a);},objcmp:function(a,b)
{if(typeof(a)!=typeof(b))return false;if(!utils.is_indexed(a))return a==b;for(var i in a)if(!b[i])return false;for(var i in b)
{if(!a[i])return false;if(!utils.objcmp(a[i],b[i]))return false;}
return true;},get_event:function(e){return(e==undefined)?window.event:e;},get_key:function(e){return(e.charCode)?e.charCode:e.which;},get_target:function(e)
{var targ;if(e.target)targ=e.target;if(e.srcElement)targ=e.srcElement;if(targ.nodeType==3)targ=targ.parentNode;return targ;},prevent:function(e){if(e.preventDefault)e.preventDefault();else e.returnValue=false;},stop_prop:function(e){if(e.stopPropagation)e.stopPropagation;else e.cancelBubble=true;},event:function(a)
{var t=this;t.listeners=[];t.clear=function(){t.listeners=[];};t.trigger=function(param){var i;for(i=0;i<t.listeners.length;i++)t.listeners[i](param);}
t.add=function(func){t.listeners.push(func);}
if(a)t.add(a);},add_handler:function(obj,event,func)
{if(obj.addEventListener)obj.addEventListener(event,func,false);else if(obj.attachEvent)obj.attachEvent('on'+event,func);},add_handler_radio:function(radio,name,proc)
{for(i=0;i<radio.length;i++)
utils.add_handler(radio[i],name,proc);},display:function(e,yes){e.style.display=(yes==true)?'block':'none';},display_toggle:function(e){utils.display(e,utils.get_style(e,'display')=='none');},display_blur:function(yes){utils.display($('blur'),yes);},enable:function(e,yes){if(!e)return;if(!utils.is_array(e)){e.disabled=(yes==false);return;}each(e,function(i,a){utils.enable(a,yes);});},get_style:function(e,prop)
{if(window.getComputedStyle)return document.defaultView.getComputedStyle(e,null).getPropertyValue(prop);if(e.currentStyle)return e.currentStyle[prop];},is_displayed:function(e)
{while(e!=document.body&&e!=undefined)
{if(utils.get_style(e,'visibility')=='hidden'||utils.get_style(e,'display')=='none')return false;e=e.parentNode;}
return e==document.body;},has_elems:function(e)
{for(var c=e.firstChild;c;c=c.nextSibling)if(c.nodeType==1)return true;return false;},first_elem:function(e){e=e.firstChild;return(!e||e.nodeType==1)?e:utils.next_elem(e);},next_elem:function(e){for(e=e.nextSibling;e&&e.nodeType!=1;e=e.nextSibling);return e;},is_desc:function(e,p)
{for(;e!=undefined;e=e.parentNode)if(e==p)return true;return false;},clear_elem:function(e){while(e.firstChild)e.removeChild(e.firstChild);},clear_self:function(e){if(e.parentNode)e.parentNode.removeChild(e);},new_elem:function(tag,attr,text,children)
{var elem=document.createElement(tag);if(attr)each(attr,function(i,a){elem[i]=a;});if(text)elem.appendChild(document.createTextNode(text));if(children)each(children,function(i,a){elem.appendChild(a);});return elem;},new_text:function(text){return document.createTextNode(text);},add_elems:function(e,a){for(var i=0;i<a.length;i++)e.appendChild(a[i]);},add_before:function(e,a){var p=e.parentNode;if(!p)return;each(a,function(i,a){p.insertBefore(a,e);});},add_after:function(e,a){var p=e.parentNode;if(!p)return;each(a,function(i,a){p.insertBefore(a,e.nextSibling);});},add_body:function(e){document.body.appendChild(e);},sub_body:function(e){document.body.removeChild(e);},get_selectvalue:function(e){return e.options[e.selectedIndex].value;},set_selectvalue:function(e,v){for(i=0;i<e.options.length;i++){if(e.options[i].value==v){e.selectedIndex=i;return;}};},parse:function(e)
{var a=e.getElementsByTagName('script');for(var i=0;i<a.length;i++)eval(a[i].innerHTML);},set_topleft:function(e,v){e.style.left=v.x+"px";e.style.top=v.y+"px";},set_size:function(e,v){e.style.width=v.x+'px';e.style.height=v.y+'px';},xml:{new_doc:function(root)
{var doc;try
{doc=new ActiveXObject("Microsoft.XMLDOM");elem=doc.createElement(root);doc.appendChild(elem);}
catch(e){doc=document.implementation.createDocument("",root,null);}
return doc;},parse:function(text)
{var doc;try
{doc=new ActiveXObject("Microsoft.XMLDOM");doc.async="false";doc.loadXML(text);}
catch(e)
{parser=new DOMParser();doc=parser.parseFromString(text,"text/xml");}
return doc;},load_xml:function(url,param)
{var xmlhttp=utils.new_xmlhttp(url,param,false);xmlhttp.send(param);return xmlhttp.responseXML;},to_string:function(doc)
{if(doc.xml)return doc.xml;var s=new XMLSerializer();return s.serializeToString(doc);},new_elem:function(doc,name,text,attr)
{var i,e=doc.createElement(name);if(text)e.appendChild(doc.createTextNode(text));if(attr)each(attr,function(i,a){var b=doc.createAttribute(i);b.nodeValue=a;e.setAttributeNode(b);});return e;}},new_xmlhttp:function(url,param,async)
{var xmlhttp;try{xmlhttp=new XMLHttpRequest();}
catch(e)
{try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}
catch(e)
{try{xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}
catch(E){xmlhttp=false;}}}
if(!xmlhttp)throw"xmlhttp creation failed";if(async==undefined)async=true;xmlhttp.open('post',url,async);xmlhttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlhttp.setRequestHeader("Content-length",(param)?param.length:0);return xmlhttp;},get_json_param:function(obj){return"json="+encodeURIComponent(JSON.stringify(obj));},obj2qstr:function(obj)
{var a=new Array();each(obj,function(i,p){if(p)a.push([i,encodeURIComponent(p)].join('='));});return a.join('&');},qstr2obj:function(qstr)
{var obj={},a=qstr.split('&');each(a,function(i,p){var b=p.split('=');if(b[1])obj[b[0]]=decodeURIComponent(b[1]);});return obj;},join_url:function(url,server,client)
{var j=url;var a=utils.obj2qstr(server);var b=utils.obj2qstr(client);if(a.length>0)j+='?'+a;if(b.length>0)j+='#'+b;return j;},join_obj:function(obj,c,p,a)
{p=p||'';a=a||{};c=c||'.';each(obj,function(i,b)
{if(utils.is_object(b))utils.join_obj(b,c,p+i+c,a);else a[p+i]=b;});return a;},split_obj:function(obj,c)
{var d={};c=c||'.';each(obj,function(i,b)
{var j,e=d;var a=i.split(c);for(j=0;j<a.length-1;j++)
{if(!e[a[j]])e[a[j]]={};e=e[a[j]];}
e[a[j]]=b;});return d;},split_url:function(url)
{var r={},c;a=url.split('#');if(a.length>1)r.client=utils.qstr2obj(a[1]);a=a[0].split('?');if(a.length>1)r.server=utils.qstr2obj(a[1]);r.url=a[0];return r;},request_xml:function(url,param,success,failure)
{if(utils.is_object(param))param=utils.get_json_param(param);var xmlhttp=utils.new_xmlhttp(url,param,(success||failure)!=undefined);xmlhttp.onreadystatechange=function()
{if(xmlhttp.readyState!=4)return;if(xmlhttp.status==200){if(success)success(xmlhttp.responseXML,xmlhttp.responseText);}
else{if(failure)failure();}}
xmlhttp.send(param);return xmlhttp;},request_html:function(url,param,e)
{utils.request_xml(url,param,function(xml,text){utils.clear_elem(e);e.innerHTML=text;utils.parse(e);});},date:{today:new Date(),millisecs_day:1000*60*60*24,month_name:['januari','februari','maart','april','mei','juni','juli','augustus','september','oktober','november','december'],day_name:['maandag','dinsdag','woensdag','donderdag','vrijdag','zaterdag','zondag'],time_utc:function(d){return d.getTime()-this.reset_time(d).getTime();},from_utc:function(ts){var d=new Date();d.setTime(ts);return d;},weekday:function(date){return(date.getDay()+6)%7;},diff_day:function(date1,date2){return(date2.getTime()/this.millisecs_day)-(date1.getTime()/this.millisecs_day);},diff_week:function(date1,date2){return Math.floor(this.diff_day(date1,date2)/7);},copy:function(date){var new_copy=new Date();new_copy.setTime(date.getTime());return new_copy;},reset_time:function(date){var new_copy=this.copy(date);new_copy.setHours(0,0,0,0);return new_copy;},reset_date:function(date){return new Date(0,1,1,date.getHours(),date.getMinutes());},month_days:function(month,year){var d=new Date(year,month+1,0);return d.getDate();},add_days:function(date,days){var d=Date();date.setTime(date.getTime()+(days*this.millisecs_day));return date;},week:function(date)
{var first=new Date(date.getFullYear(),0,1);day=this.weekday(first);first=this.add_days(first,(day>3)?(7-day):-day);return this.diff_week(first,date)+1;},to_iso_time:function(date){return('00'+date.getHours()).right(2)+':'+('00'+(date.getMinutes())).right(2)+':'+('00'+date.getSeconds()).right(2);},to_iso_date:function(date){return('0000'+date.getFullYear()).right(4)+'-'+('00'+(date.getMonth()+1)).right(2)+'-'+('0000'+date.getDate()).right(2);},from_iso_date:function(s){if(!utils.is_string(s))return null;var a=s.split("-");return new Date(parseInt(a[0]),parseInt(a[1])-1,parseInt(a[2]));},to_short_date:function(date){return('00'+date.getDate()).right(2)+'-'+('00'+(date.getMonth()+1)).right(2)+'-'+('0000'+date.getFullYear()).right(4);}}}
window.onready=new utils.event();if(document.addEventListener)document.addEventListener("DOMContentLoaded",function(){window.onready.trigger();},false);else document.onreadystatechange=function(){if(document.readyState=="interactive")window.onready.trigger();};function overlay_to_body()
{var i,a;a=document.body.getElementsByTagName('div');var e=/overlay/;for(i=0;i<a.length;i++)
{if(e.test(a[i].className)==true)
document.body.appendChild(a[i]);}}
namespace('controls');controls.target={init:function(t,a)
{utils.merge(t,a);utils.merge(t,{request:function(p)
{var b={};utils.merge(b,{source:t.source,cb:t.cb});utils.merge(b,p);b.source(function(data)
{if(!data){utils.display(t.elem,false);return;}
var js=utils.inject(t.elem,data);if(b.cb)b.cb(js);});},clear:function(){utils.clear_elem(t.elem);}});return t;}};var api={handle_response:function(text,callback)
{var v=null;if(text)
{var p=JSON.parse(text);if(p.exception){alert(p.exception);throw p.exception;}
if(p.login)funzo.member.show_form_login_subscribe();if(p.alert)alert(p.alert);if(p.redirect)utils.redirect(p.redirect);if(p.reload==true)utils.reload();v=p.value;}
else{alert('Something went terribly, terribly wrong...');}
if(callback)callback(v);return v;},get_xmlhttp_param:function(func,param)
{var r='f='+func;if(param)
{if(param.length==1)param=param[0];r+='&a='+escape(JSON.stringify(param));}
return r;},call:function(func,param,callback)
{var c2;if(callback){c2=function(xml,text){api.handle_response(text,callback);}}
var xmlhttp=utils.request_xml(api.url,api.get_xmlhttp_param(func,param),c2,c2);if(!callback){return api.handle_response(xmlhttp.responseText);}}};var jorien={add_message:function(args){return api.call('jorien.add_message',args);},contact:function(args){return api.call('jorien.contact',args);},order:function(args){return api.call('jorien.order',args);}};namespace('effects');effects.fade={init:function(t,a)
{utils.merge(t,{auto_start:true,secs_step:0.1});utils.merge(t,a);utils.merge(t,{start:function(opac_begin,opac_end,secs){t.opac_begin=opac_begin;t.opac_end=opac_end,t.secs=secs;t.opac=opac_begin;t.handle=setInterval(function(){t.update();},secs_step*1000);},stop:function(){if(t.handle)clearInterval(t.handle);t.handle=null;},update:function()
{var d=(t.secs_step/t.secs)*(t.opac_end-t.opac_begin);if((t.opac-t.opac_end)*((t.opac+d)-t.opac_end)<=0){t.opac=t.opac_end;t.stop();}
else t.opac+=d;t.set_opacity(t.opac);},set_opacity:function(opac){var s=t.elem.style;s.opacity=opac;s.MozOpacity=opac;s.KhtmlOpacity=opac;s.filter="alpha(opacity="+(opac*100)+")";}});if(auto_start==true)t.start(t.opac_begin,t.opac_end,t.secs);return t;}};namespace('controls');controls.compbox={init:function(t,a)
{utils.merge(t,a);utils.merge(t,{on_close:new utils.event()});return t;}};var form={report:function(valid,remark){return{'valid':valid,'remark':remark};},value:function(a)
{var t=this;utils.merge(t,{'valid':true,'remark':null,'source':undefined,'validator':undefined,'value':undefined});utils.merge(t,a);if(t.source){t.source.set_value(t.value);t.source.set_remark(t.remark);}
t.is_active=function(){return(t.source)?t.source.is_active():true;}
t.update=function(){if(t.source)t.value=t.source.get_value();}
t.update_source=function(){if(t.source){t.source.set_value(t.value);t.source.set_remark(t.remark);}}
t.get_object=function(a){return(a.only_active==true&&!t.is_active())?undefined:t.value;}
t.set_object=function(a){t.value=a;}
t.merge_report=function(a){t.valid=a.valid;t.remark=a.remark;}
t.get_report=function(a)
{if(a.only_active==true&&!t.is_active())return;if(t.validator)
{var r=t.validator(t.get_object(a));if(r)return r;}
return form.report(true);}},group:function(a)
{var t=this;utils.merge(t,{'valid':true,'remark':null,'source':undefined,'validator':undefined,'children':{}});utils.merge(t,a);if(t.source){t.source.set_remark(t.remark);}
t.is_active=function(){return(t.source)?t.source.is_active():true;}
t.merge_report=function(a){t.valid=a.valid;t.remark=a.remark;for(var i in a.children)if(t.children[i])t.children[i].merge_report(a.children[i]);}
t.update=function(){for(var i in t.children)t.children[i].update();}
t.update_source=function(){if(t.source)t.source.set_remark(t.remark);for(var i in t.children)t.children[i].update_source();}
t.set_object=function(a){for(var i in t.children){if(a[i])t.children[i].set_object(a[i]);}}
t.get_report=function(a)
{if(a.only_active==true&&!t.is_active())return;var valid=true;var children=new Object();for(var i in t.children)
{var r=t.children[i].get_report(a);if(!r)continue;children[i]=r;valid&=children[i].valid;}
var report;if(t.validator)report=t.validator(t.get_object(a));if(!report)report=form.report(true);report.valid&=valid;report.children=children;return report;}
t.get_object=function(a)
{if(a.only_active==true&&!t.is_active())return;var obj=new Object();for(var i in t.children){obj[i]=t.children[i].get_object(a);}
return obj;}},root:function(a)
{var t=this;utils.merge(t,{'group':undefined});utils.merge(t,a);t.oncancel=new utils.event();t.cancel=function(){t.oncancel.trigger();}
t.validate=function()
{t.update();var r=t.get_report();t.group.merge_report(r);t.group.update_source();return r.valid;}
t.merge_report=function(r){t.group.merge_report(r);t.group.update_source();}
t.update=function(){return t.group.update();}
t.get_report=function(a){return t.group.get_report(utils.merge({only_active:true},a));}
t.get_object=function(a){return t.group.get_object(utils.merge({only_active:true},a));}
t.set_object=function(a){return t.group.set_object(a);}
t.update_source=function(){t.group.update_source();}},source:{readonly:function(a)
{var t=this;t.input=a.input;t.remark=a.remark;t.is_active=function(a){if(t.input){return(t.input.disabled==false&&utils.is_displayed(t.input));}else return true;}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}}
t.get_value=function(){return t.value;};t.set_value=function(v){if(t.input){t.value=v;if(v)v=v.replace('\n','<br/>');t.input.innerHTML=v||'';}}},input:function(a)
{var t=this;t.input=a.input;t.remark=a.remark;t.is_active=function(a){if(t.input){return(t.input.disabled==false&&utils.is_displayed(t.input));}else return true;}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}}
t.get_value=function(){if(t.input)return t.input.value.trim();};t.set_value=function(v){if(t.input)t.input.value=v||'';}},check:function(a)
{var t=this;t.checkbox=a.checkbox;t.remark=a.remark;t.is_active=function(a){if(t.checkbox){return(t.checkbox.disabled==false&&utils.is_displayed(t.checkbox));}}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}}
t.get_value=function(){if(t.checkbox)return t.checkbox.checked;}
t.set_value=function(v){if(t.checkbox)t.checkbox.checked=v||undefined;}},select:function(a)
{var t=this;t.select=a.select;t.remark=a.remark;t.is_active=function(a){if(t.select){return(t.select.disabled==false&&utils.is_displayed(t.select));}}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}}
t.get_value=function(){if(t.select)return utils.get_selectvalue(t.select);}
t.set_value=function(v){if(t.select)utils.set_selectvalue(t.select,v||undefined);}},date:function(a)
{var t=this;t.input=a.input;t.remark=a.remark;t.date=controls.date.init(a.input);t.is_active=function(a){if(t.input){return(t.input.disabled==false&&utils.is_displayed(t.input));}}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}};t.get_value=function(){if(t.date)return(t.date.date)?t.date.date/1000:null;};t.set_value=function(v){if(t.date)t.date.set_date((v)?v*1000:null);};},time:function(a)
{var t=this;t.input=a.input;t.remark=a.remark;t.time=controls.time.init(a.input);t.is_active=function(a){if(t.input){return(t.input.disabled==false&&utils.is_displayed(t.input));}}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}};t.get_value=function(){if(t.time)return(t.time.time)?t.time.time/1000:null;};t.set_value=function(v){if(t.time)t.time.set_time((v)?v*1000:null);};},weekdays:function(a)
{var t=this;t.remark=a.remark;t.checks=new Array();for(var i=0;i<7;i++)t.checks[i]=$(a.id+'_'+i);t.is_active=function(a){if(t.checks[0]){return(t.checks[0].disabled==false&&utils.is_displayed(t.checks[0]));}}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}};t.get_value=function(){var a=new Array();for(var i=0;i<7;i++)if(t.checks[i].checked==true)a.push(i);return a;}
t.set_value=function(v)
{for(var i=0;i<7;i++)t.checks[i].checked=false;if(!v)return;for(var i=0;i<v.length;i++)t.checks[v[i]%7].checked=true;}},custom:function(a)
{var t=this;t.js=a.input;t.remark=a.remark;t.is_active=function(a){if(t.js){return t.js.is_active();}}
t.set_remark=function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}}
t.get_value=function(){if(t.js)return t.js.get_current();}
t.set_value=function(v){if(t.js)t.js.set_current(v);}},checktree:function(p)
{var t=controls.tagtree.create(p);utils.merge(t,{is_active:function(a){return true;},set_remark:function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}},get_value:function(){return t.get_checked_ids();},set_value:function(v){if(t.item_root)t.set_checked(v);else t.pending=v;}});t.source(function(xml){t.assign_xml(xml);if(t.pending){t.set_checked(t.pending);t.pending=undefined;}});return t;},upload:function(t)
{utils.merge(t,{is_active:function(a){return true;},set_remark:function(a){if(t.remark){t.remark.innerHTML=a||'';utils.display(t.remark,a!=undefined);}},get_value:function(){return(t.input.value)?{value:t.input.value,filename:t.input.filename}:null;},set_value:function(v){utils.merge(t.input,{filename:null,value:null});if(!v)return;if(!v.filename)return;t.input.set_complete(v);}});return t;}}}
namespace('controls');controls.get_numbers=function(a,b)
{var i,j,m,n;var c=new Array();m=b.length-a.length;for(i=0;i<m;i++)a.unshift('');for(i=1;i<=b.length;i++)
{j=a.length-i;n=b.length-i;a[j]=a[j].replace(/[^\d]/g,'');m=a[j].length-b[n];if(n>0&&m>0&&a[j-1]=='')
{a[j-1]=a[j].slice(0,m);a[j]=a[j].slice(m);}
c[n]=a[j].replace(/^0*/g,'');c[n]=(c[n]=='')?0:parseInt(c[n]);}
return c;};controls.geolocation={create:function(a){return controls.geolocation.init({},a);},init:function(t,a)
{utils.merge(t,a);utils.merge(t,{on_geo:new utils.event(),locate:function(a)
{var geocoder=new GClientGeocoder();geocoder.getLatLng(a,function(p)
{if(!p){alert(a+" niet gevonden");return;}
t.on_geo.trigger({latitude:p.lat(),longitude:p.lng()});});}});utils.add_handler(t.btn,'click',function(e){t.locate(t.text.value);});return t;}};controls.url={create:function(a){return controls.url.init({},a);},init:function(t,a)
{utils.merge(t,a);utils.merge(t,{prefixes:[[/^(h?t?t?p?s):\/?\/?/,'https://'],[/^(ft?p?):\/?\/?/,'ftp://'],[/^(h?t?t?p?):?\/?\/?/,'http://']],update:function()
{with(t.elem)
{if(value.isempty())return;var value=t.elem.value;value=value.toLowerCase();value=value.replace(/[^0-9a-zA-Z$-_.+!*'(),]/,'');for(i in t.prefixes)
{if(t.prefixes[i][0].test(value))
{value=value.replace(t.prefixes[i][0],t.prefixes[i][1]);break;}}}}});utils.add_handler(t.elem,'blur',function(){t.update();});return t;}};controls.radiolist={init:function(t,a)
{utils.merge(t,a);utils.merge(t,{current:null,onclick:new utils.event(function(){t.sync_current();}),onchange:new utils.event(),sync_current:function(){t.set_current(t.get_selected_radio());},sync_radios:function(){t.set_selected_radio(t.get_current());},get_selected_radio:function(){for(var i=0;i<t.options.length;i++)if(t.options[i].checked==true)return t.options[i].value;return null;},set_selected_radio:function(r){each(t.options,function(i,a){a.checked=(r==a.value);});},get_current:function(){return t.current;},set_current:function(s){if(s!=t.current){t.current=s;t.onchange.trigger();}},is_active:function(s){for(var i=0;i<t.options.length;i++)if(utils.is_active(t.options[i]))return true;return false;}});t.sync_current();each(t.options,function(i,a){utils.add_handler(a,'click',function(){t.onclick.trigger();})});return t;}};controls.time={create:function(p){return controls.time.init({},p);},init:function(t,p)
{utils.merge(t,p);utils.merge(t,{focus:false,format:null,iso:null,user:'',time:null,is_active:function(){return(t.input.disabled==false&&utils.is_displayed(t.input));},get_current:function(){return t.iso;},set_current:function(value){t.user=value||'';t.update_current(value);t.update();},update_current:function(value)
{if(/\d/.test(value)==false){t.iso=null;t.format=null;return;}
var c=controls.get_numbers(value.split(':'),new Array(2,2));var hours=c[0];var minutes=c[1];hours=(hours=='')?0:parseInt(hours);minutes=(minutes=='')?0:parseInt(minutes);hours=(hours+Math.floor(minutes/60))%24;minutes=minutes%60;var date=new Date(0,1,1,hours,minutes);t.iso=utils.date.to_iso_time(date);t.format=('00'+date.getHours()).right(2)+':'+('00'+date.getMinutes()).right(2);},update:function()
{t.input.className=t.input.className.remove_class('empty');if(t.focus==true){t.input.value=t.user;return;}
if(t.format){t.input.value=t.format;return;}
t.input.className=t.input.className.add_class('empty');t.input.value='00:00';}});utils.add_handler(t.input,'blur',function(e){t.focus=false;t.update_current(t.user);t.update();});utils.add_handler(t.input,'focus',function(e){t.focus=true;t.update();});utils.add_handler(t.input,'keyup',function(e){t.user=t.input.value;});utils.add_handler(t.input,'keypress',function(e)
{var code=utils.get_key(e);if(code==0||code==8)return;if(/\d|:/.test(String.fromCharCode(code))==false)utils.prevent(e);});t.update();return t;}};controls.date={create:function(p){return controls.date.init({},p);},init:function(t,p)
{utils.merge(t,p);utils.merge(t,{focus:false,current:null,iso:null,format:'',user:'',time:null,is_active:function(){return(t.input.disabled==false&&utils.is_displayed(t.input));},get_current:function(){return(t.current)?utils.date.to_iso_date(t.current):null;},set_current:function(value)
{t.current=(value)?utils.date.from_iso_date(value):null;t.user=(t.current)?utils.date.to_short_date(t.current):null;t.update();},update_current:function(value)
{t.user=value;if(/\d/.test(value)==false){t.current=null;return;}
var c=controls.get_numbers(value.split('-'),new Array(2,2,4));var day=c[0];var month=c[1];var year=c[2];day=(day=='')?1:parseInt(day);month=(month=='')?1:parseInt(month);year=(year=='')?0:parseInt(year);t.current=new Date(year,month-1,day);},update:function()
{t.input.className=t.input.className.remove_class('empty');if(t.focus==true){t.input.value=t.user;return;}
if(t.current){t.input.value=utils.date.to_short_date(t.current);return;}
t.input.className=t.input.className.add_class('empty');t.input.value='dd-mm-yyyy';}});utils.add_handler(t.input,'blur',function(e){t.focus=false;t.update_current(t.input.value);t.update();});utils.add_handler(t.input,'focus',function(e){t.focus=true;t.update();});utils.add_handler(t.input,'keypress',function(e)
{var code=utils.get_key(e);if(code==0||code==8)return;if(/\d|-/.test(String.fromCharCode(code))==false)utils.prevent(e);});t.update();return t;}};controls.navigator={create:function(a)
{var t=utils.new_elem('div',{'className':'navigator'});controls.navigator.init(t,a);return t;},init:function(t,a)
{t.__nav=new Object();t.__nav.parent=t;t=t.__nav;utils.merge(t,a);t.onselect=new utils.event();t.get_pages=function()
{t.lastknown=(t.limit)?t.limit:Math.max(t.current+1,t.lastknown);var i,a=new Array();for(i=0;i<Math.min(2,t.lastknown);i++)a.push(i);for(i=Math.max(i,t.current-5);i<Math.min(t.current+5,t.lastknown);i++)a.push(i);for(i=Math.max(i,t.lastknown-2);i<t.lastknown;i++)a.push(i);return a;}
t.add_page=function(text,c,i)
{var c2="page "+c;var div=utils.new_elem('div',{'className':c2.trim()},text);if(i!=t.current&&i!=null)
{div.page=i;utils.add_handler(div,'click',function(e){var div=utils.get_target(e);t.onselect.trigger(div.page);});}
t.parent.appendChild(div);}
t.create_pages=function(current,limit,lastknown)
{t.current=current||0;t.limit=limit;t.lastknown=lastknown||0;utils.clear_elem(t.parent);if(t.limit!=null&&t.limit<2)return;var a=t.get_pages();t.add_page("< vorige",(t.current==0)?"disabled":"",(t.current==0)?null:t.current-1);var i=0,h=0;for(var j=0;j<a.length;j++)
{i=a[j];if((i-h)>1)t.add_page("...","jump");var c=(i==t.current)?"current":"";t.add_page(i+1,c,i);h=i;}
if(!t.limit)
{t.add_page(i+2,"",i+1);t.add_page("...","jump");}
var disable=(t.limit!=null&&t.current>=(t.limit-1));t.add_page("volgende >",(disable)?"disabled":"",(disable)?null:t.current+1);}
t.create_pages(t.current,t.limit,t.lastknown);return t;}};controls.autocomplete={create:function(a){return controls.autocomplete.init({},a);},init:function(t,a)
{utils.merge(t,{input:null,usertext:'',lastvalue:null,current:null,pending:null,source:null,handle_delay:null,delay_time:500,focus:false,autoselect:true,dropdown:null,current_changed:new utils.event(),new_item:null,get_current:function(){return t.current;},get_parent:function(){return t.input;},get_value:function(){return t.input.value.toLowerCase().trim()},add_onchange:function(a){utils.add_handler(t.input,'keyup',a);},add_onfocus:function(a){utils.add_handler(t.input,'focus',a);},add_onblur:function(a){utils.add_handler(t.input,'blur',a);},is_active:function(){return(t.input.disabled==false&&utils.is_displayed(t.input));}});utils.merge(t,a);utils.merge(t,{has_changed:function(){return t.usertext!=t.lastvalue;},start_delay:function(){if(t.has_changed()){t.stop_delay();t.handle_delay=setTimeout(t.on_request,t.delay_time);}},select_delayed:function(a)
{t.pending=null;if(a&&t.autoselect==true)
{if(t.dropdown.is_visible==true)t.pending=a
else t.set_current(a);}},set_current:function(a){t.current=a;t.pending=null;t.update_value();t.current_changed.trigger(t.current);},update_value:function(){t.input.value=(t.focus==false&&t.current)?t.current.name:t.usertext;},stop_delay:function(){if(t.handle_delay==null)return;clearTimeout(t.handle_delay);t.handle_delay=null;},on_request:function(){t.handle_delay=null;t.lastvalue=t.get_value();t.source(t.lastvalue,function(r){t.request_complete(r);});},create_mousedown:function(i){return function(e){t.pending=i;}},request_complete:function(a)
{t.dropdown.clear();t.select_delayed(a[0]);for(var i=0;i<a.length;i++)
{var item=t.new_item(a[i]);utils.add_handler(item,'mousedown',t.create_mousedown(a[i]));t.dropdown.client.appendChild(item);}
t.dropdown.update_visibility(t);}});t.add_onchange(function(e){t.usertext=t.input.value;t.start_delay();});t.add_onfocus(function(e){t.focus=true;t.dropdown.set_visible(true,t.get_parent());t.start_delay();t.update_value();});t.add_onblur(function(e){t.focus=false;t.dropdown.set_visible(false);if(t.pending)t.set_current(t.pending);t.update_value();});return t;}};var effect={loading:{create:function(a){return effect.loading.init({},a);},init:function(t,a)
{utils.merge(t,{css:'loading',text:'Bezig met laden...'});utils.merge(t,a);utils.merge(t,{div:utils.new_elem('div',{className:t.css},t.text),show:function(yes){utils.display(t.div,yes);}});utils.add_elems(t.parent,[t.div]);return t;}},update_load:{create:function(a){return effect.update_load.init({},a);},init:function(t,a)
{utils.merge(t,{css:'update_load'});utils.merge(t,a);utils.merge(t,{div:utils.new_elem('div',{className:t.css},t.text),show:function(yes)
{if(yes==true)
{utils.set_topleft(t.div,vector2.topleft(t.parent));utils.set_size(t.div,vector2.size(t.parent));}
utils.display(t.div,yes);}});utils.add_body(t.div);return t;}}};controls.loader={create:function(a){return controls.loader.init(new Object(),a);},init:function(t,a)
{utils.merge(t,a);utils.merge(t,{onready:new utils.event(),fxload:new effect.update_load.create({parent:t.parent}),update:function(b)
{t.fxload.show(true);t.content.source(utils.merge(t.content,b||{}),function(data)
{t.fxload.show(false);if(!data)return;t.content=utils.inject(t.parent,data);t.onready.trigger(t);});}});return t;}};controls.wizard={create:function(a){return controls.wizard.init(new Object(),a);},init:function(t,a)
{utils.merge(t,{pages:[],current:0});utils.merge(t,a);utils.merge(t,{update_page:function(){each(t.pages,function(i,a){utils.display(a,i==t.current);});},set:function(i){t.current=i;t.update_page();},move:function(i){t.current+=(t.pages.length+i);t.current%=t.pages.length;t.update_page();}});t.update_page();return t;}};controls.upload={status:{create:function(a){return controls.upload.status.init({},a);},init:function(t,a)
{utils.merge(t,a);utils.merge(t,{set_uploading:function(file){utils.display(t.animation,true);utils.display(t.cancelbtn,false);t.statustext.innerHTML='bezig met versturen: '+file;},set_complete:function(file){utils.display(t.animation,false);utils.display(t.cancelbtn,true);t.statustext.innerHTML=file;}});t.animation=utils.new_elem('div',{className:'animation'});t.statustext=utils.new_elem('div',{className:'statustext'});t.cancelbtn=utils.new_elem('input',{className:'cancel',type:'button',value:'wijzigen'});t.elem=utils.new_elem('div',{className:'uploadstatus'},null,[t.animation,t.statustext,t.cancelbtn]);return t;}},create:function(a){return controls.upload.init({},a);},init:function(t,a)
{var s_edit=1,s_uploading=2,s_complete=3;utils.merge(t,a);utils.merge(t,{status:s_edit,start_upload:function()
{if(t.status!=s_edit)return;t.move_input();t.form.submit();t.statusctrl.set_uploading(t.file.value.replace(/.*\\/g,''));t.status=s_uploading;},set_error:function(a)
{alert(a);},upload_complete:function(a)
{if(a.error)
{t.set_error(a.error);t.cancel_upload();}
if(!a.result)return;if(t.status!=s_uploading)return;if(a.result.filename!=t.file.value.replace(/.*\\/g,''))return;t.set_complete(a.result);},set_complete:function(a)
{utils.merge(t,a);t.hiddenvalue.value=t.value;t.hiddenfilename.value=t.filename;t.move_input();t.statusctrl.set_complete(t.filename);t.status=s_complete;},cancel_upload:function(){if(t.status==s_edit)return;t.restore_input();t.status=s_edit;t.hiddenvalue.value='';},move_input:function(){utils.add_elems(t.form,[t.file]);t.show_status(true);},restore_input:function(){utils.add_after(t.statusctrl.elem,[t.file]);t.show_status(false);},show_status:function(yes){utils.display(t.statusctrl.elem,yes);}});var target=utils.uid();t.statusctrl=controls.upload.status.create();t.callback=utils.new_elem('input',{type:'hidden',name:'callback',value:t.thisname+'.upload_complete'});t.form=utils.new_elem('form',{action:t.url,method:'post',enctype:'multipart/form-data',encoding:'multipart/form-data',target:t.iframe.name},null,[t.callback]);utils.display(t.statusctrl.elem,false);utils.display(t.form,false);utils.display(t.iframe,false);utils.add_before(t.file,[t.statusctrl.elem]);utils.add_body(t.form);utils.add_handler(t.statusctrl.cancelbtn,'click',function(e){t.cancel_upload();});utils.add_handler(t.file,'change',function(e){t.start_upload();});return t;}};var item={new_city:function(a)
{var d,e=utils.new_elem('div',{'className':'dropdown_item'});e.appendChild(utils.new_elem('h2',{},a.name));if(a.municipality){e.appendChild(d=utils.new_elem('div',{'className':'sub_title'}));d.innerHTML='<b>Gemeente</b>: '+a.municipality;}
if(a.province){e.appendChild(d=utils.new_elem('div',{'className':'sub_title'}));d.innerHTML='<b>Provincie</b>: '+a.province;}
return e;},new_area:function(a)
{var d,e=utils.new_elem('div',{'className':'dropdown_item'});e.appendChild(utils.new_elem('h2',{},a.name));if(a.municipality_name){e.appendChild(d=utils.new_elem('div',{'className':'sub_title'}));d.innerHTML='<b>Gemeente</b>: '+a.municipality_name;}
if(a.province_name){e.appendChild(d=utils.new_elem('div',{'className':'sub_title'}));d.innerHTML='<b>Provincie</b>: '+a.province_name;}
return e;},new_address:function(a)
{var d,e=utils.new_elem('div',{'className':'dropdown_item'});e.appendChild(utils.new_elem('h2',{},a.name));e.appendChild(d=utils.new_elem('div',{'className':'sub_title'}));d.innerHTML=format.notnull(a.street)+' '+format.notnull(a.number)+' '+format.notnull(a.addition);e.appendChild(d=utils.new_elem('div',{'className':'sub_title'}));d.innerHTML=format.postalcode(a.postal_code)+' '+format.notnull(a.city);return e;}}
controls.dropdown={create:function(p){return controls.dropdown.init({},p);},init:function(t,p)
{utils.merge(t,{is_visible:false,parent:null,css:null,clear:function(){utils.clear_elem(t.client);},is_empty:function(){return utils.has_elems(t.client)==false;},update_visibility:function(){t.show(t.is_visible==true&&t.is_empty()==false);},update_position:function()
{if(!t.parent)return;var v=vector2.topleft(t.parent);v.add(vector2.create(-70,t.parent.offsetHeight));if(v.x<5)v.x=5;set_topleft(t.div,v);},set_visible:function(yes,parent)
{t.parent=parent||t.parent;t.is_visible=yes;t.update_visibility();},show:function(yes){if(yes==true)t.update_position(t.parent);utils.display(t.div,yes);}});utils.merge(t,p);utils.add_handler(document.body,'click',function(e)
{if(t.visible==false)return;var targ=utils.get_target(e);if(utils.is_desc(targ,t.div)==false&&utils.is_desc(targ,t.parent)==false)
t.set_visible(false);});return t;}}
controls.popup3={create:function(p){return controls.popup3.init(new Object(),p);},init:function(t,p)
{t.css=p.css||'wide';utils.merge(t,{table:utils.new_elem('table',{className:'whitebox overlay popup '+t.css}),cancel:utils.new_elem('div',{'className':'popup2_cancel action'},'annuleren [x]'),content:utils.new_elem('div'),close:function(){utils.display(t.table,false);utils.display_blur(false);utils.sub_body(t.table);},show:function()
{window.scroll(0,0);utils.display_blur(true);utils.display(t.table,true);t.loader.update();},create_table:function()
{var r=[t.table.insertRow(0),t.table.insertRow(1),t.table.insertRow(2)];r[0].className='whitebox_top';r[1].className='whitebox_middle';r[2].className='whitebox_bottom';var d=[[r[0].insertCell(0),r[0].insertCell(1),r[0].insertCell(2)],[r[1].insertCell(0),r[1].insertCell(1),r[1].insertCell(2)],[r[2].insertCell(0),r[2].insertCell(1),r[2].insertCell(2)]];for(var i=0;i<3;i++)
{d[i][0].className='whitebox_left';d[i][1].className='whitebox_center';d[i][2].className='whitebox_right';}
return d[1][1];}});utils.add_handler(t.cancel,'click',function(e){t.close();});utils.add_body(t.table);var a=t.create_table();utils.add_elems(a,[t.cancel,t.content]);t.loader=controls.loader.create({content:{source:p.source},parent:t.content}),t.show();return t;}};controls.lock={init:function(t,p)
{utils.merge(t,p);utils.merge(t,{lock:function(yes){utils.enable(t.inputs,yes==false);}});return t;}};var DD_belatedPNG={ns:'DD_belatedPNG',imgSize:{},delay:10,nodesFixed:0,createVmlNameSpace:function(){if(document.namespaces&&!document.namespaces[this.ns]){document.namespaces.add(this.ns,'urn:schemas-microsoft-com:vml');}},createVmlStyleSheet:function(){var screenStyleSheet,printStyleSheet;screenStyleSheet=document.createElement('style');screenStyleSheet.setAttribute('media','screen');document.documentElement.firstChild.insertBefore(screenStyleSheet,document.documentElement.firstChild.firstChild);if(screenStyleSheet.styleSheet){screenStyleSheet=screenStyleSheet.styleSheet;screenStyleSheet.addRule(this.ns+'\\:*','{behavior:url(#default#VML)}');screenStyleSheet.addRule(this.ns+'\\:shape','position:absolute;');screenStyleSheet.addRule('img.'+this.ns+'_sizeFinder','behavior:none; border:none; position:absolute; z-index:-1; top:-10000px; visibility:hidden;');this.screenStyleSheet=screenStyleSheet;printStyleSheet=document.createElement('style');printStyleSheet.setAttribute('media','print');document.documentElement.firstChild.insertBefore(printStyleSheet,document.documentElement.firstChild.firstChild);printStyleSheet=printStyleSheet.styleSheet;printStyleSheet.addRule(this.ns+'\\:*','{display: none !important;}');printStyleSheet.addRule('img.'+this.ns+'_sizeFinder','{display: none !important;}');}},readPropertyChange:function(){var el,display,v;el=event.srcElement;if(!el.vmlInitiated){return;}
if(event.propertyName.search('background')!=-1||event.propertyName.search('border')!=-1){DD_belatedPNG.applyVML(el);}
if(event.propertyName=='style.display'){display=(el.currentStyle.display=='none')?'none':'block';for(v in el.vml){if(el.vml.hasOwnProperty(v)){el.vml[v].shape.style.display=display;}}}
if(event.propertyName.search('filter')!=-1){DD_belatedPNG.vmlOpacity(el);}},vmlOpacity:function(el){if(el.currentStyle.filter.search('lpha')!=-1){var trans=el.currentStyle.filter;trans=parseInt(trans.substring(trans.lastIndexOf('=')+1,trans.lastIndexOf(')')),10)/100;el.vml.color.shape.style.filter=el.currentStyle.filter;el.vml.image.fill.opacity=trans;}},handlePseudoHover:function(el){setTimeout(function(){DD_belatedPNG.applyVML(el);},1);},fix:function(selector){if(this.screenStyleSheet){var selectors,i;selectors=selector.split(',');for(i=0;i<selectors.length;i++){this.screenStyleSheet.addRule(selectors[i],'behavior:expression(DD_belatedPNG.fixPng(this))');}}},applyVML:function(el){el.runtimeStyle.cssText='';this.vmlFill(el);this.vmlOffsets(el);this.vmlOpacity(el);if(el.isImg){this.copyImageBorders(el);}},attachHandlers:function(el){var self,handlers,handler,moreForAs,a,h;self=this;handlers={resize:'vmlOffsets',move:'vmlOffsets'};if(el.nodeName=='A'){moreForAs={mouseleave:'handlePseudoHover',mouseenter:'handlePseudoHover',focus:'handlePseudoHover',blur:'handlePseudoHover'};for(a in moreForAs){if(moreForAs.hasOwnProperty(a)){handlers[a]=moreForAs[a];}}}
for(h in handlers){if(handlers.hasOwnProperty(h)){handler=function(){self[handlers[h]](el);};el.attachEvent('on'+h,handler);}}
el.attachEvent('onpropertychange',this.readPropertyChange);},giveLayout:function(el){el.style.zoom=1;if(el.currentStyle.position=='static'){el.style.position='relative';}},copyImageBorders:function(el){var styles,s;styles={'borderStyle':true,'borderWidth':true,'borderColor':true};for(s in styles){if(styles.hasOwnProperty(s)){el.vml.color.shape.style[s]=el.currentStyle[s];}}},vmlFill:function(el){if(!el.currentStyle){return;}else{var elStyle,noImg,lib,v,img,imgLoaded;elStyle=el.currentStyle;}
for(v in el.vml){if(el.vml.hasOwnProperty(v)){el.vml[v].shape.style.zIndex=elStyle.zIndex;}}
el.runtimeStyle.backgroundColor='';el.runtimeStyle.backgroundImage='';noImg=true;if(elStyle.backgroundImage!='none'||el.isImg){if(!el.isImg){el.vmlBg=elStyle.backgroundImage;el.vmlBg=el.vmlBg.substr(5,el.vmlBg.lastIndexOf('")')-5);}
else{el.vmlBg=el.src;}
lib=this;if(!lib.imgSize[el.vmlBg]){img=document.createElement('img');lib.imgSize[el.vmlBg]=img;img.className=lib.ns+'_sizeFinder';img.runtimeStyle.cssText='behavior:none; position:absolute; left:-10000px; top:-10000px; border:none; margin:0; padding:0;';imgLoaded=function(){this.width=this.offsetWidth;this.height=this.offsetHeight;lib.vmlOffsets(el);};img.attachEvent('onload',imgLoaded);img.src=el.vmlBg;img.removeAttribute('width');img.removeAttribute('height');document.body.insertBefore(img,document.body.firstChild);}
el.vml.image.fill.src=el.vmlBg;noImg=false;}
el.vml.image.fill.on=!noImg;el.vml.image.fill.color='none';el.vml.color.shape.style.backgroundColor=elStyle.backgroundColor;el.runtimeStyle.backgroundImage='none';el.runtimeStyle.backgroundColor='transparent';},vmlOffsets:function(el){var thisStyle,size,fudge,makeVisible,bg,bgR,dC,altC,b,c,v;thisStyle=el.currentStyle;size={'W':el.clientWidth+1,'H':el.clientHeight+1,'w':this.imgSize[el.vmlBg].width,'h':this.imgSize[el.vmlBg].height,'L':el.offsetLeft,'T':el.offsetTop,'bLW':el.clientLeft,'bTW':el.clientTop};fudge=(size.L+size.bLW==1)?1:0;makeVisible=function(vml,l,t,w,h,o){vml.coordsize=w+','+h;vml.coordorigin=o+','+o;vml.path='m0,0l'+w+',0l'+w+','+h+'l0,'+h+' xe';vml.style.width=w+'px';vml.style.height=h+'px';vml.style.left=l+'px';vml.style.top=t+'px';};makeVisible(el.vml.color.shape,(size.L+(el.isImg?0:size.bLW)),(size.T+(el.isImg?0:size.bTW)),(size.W-1),(size.H-1),0);makeVisible(el.vml.image.shape,(size.L+size.bLW),(size.T+size.bTW),(size.W),(size.H),1);bg={'X':0,'Y':0};if(el.isImg){bg.X=parseInt(thisStyle.paddingLeft,10)+1;bg.Y=parseInt(thisStyle.paddingTop,10)+1;}
else{for(b in bg){if(bg.hasOwnProperty(b)){this.figurePercentage(bg,size,b,thisStyle['backgroundPosition'+b]);}}}
el.vml.image.fill.position=(bg.X/size.W)+','+(bg.Y/size.H);bgR=thisStyle.backgroundRepeat;dC={'T':1,'R':size.W+fudge,'B':size.H,'L':1+fudge};altC={'X':{'b1':'L','b2':'R','d':'W'},'Y':{'b1':'T','b2':'B','d':'H'}};if(bgR!='repeat'||el.isImg){c={'T':(bg.Y),'R':(bg.X+size.w),'B':(bg.Y+size.h),'L':(bg.X)};if(bgR.search('repeat-')!=-1){v=bgR.split('repeat-')[1].toUpperCase();c[altC[v].b1]=1;c[altC[v].b2]=size[altC[v].d];}
if(c.B>size.H){c.B=size.H;}
el.vml.image.shape.style.clip='rect('+c.T+'px '+(c.R+fudge)+'px '+c.B+'px '+(c.L+fudge)+'px)';}
else{el.vml.image.shape.style.clip='rect('+dC.T+'px '+dC.R+'px '+dC.B+'px '+dC.L+'px)';}},figurePercentage:function(bg,size,axis,position){var horizontal,fraction;fraction=true;horizontal=(axis=='X');switch(position){case'left':case'top':bg[axis]=0;break;case'center':bg[axis]=0.5;break;case'right':case'bottom':bg[axis]=1;break;default:if(position.search('%')!=-1){bg[axis]=parseInt(position,10)/100;}
else{fraction=false;}}
bg[axis]=Math.ceil(fraction?((size[horizontal?'W':'H']*bg[axis])-(size[horizontal?'w':'h']*bg[axis])):parseInt(position,10));if(bg[axis]%2===0){bg[axis]++;}
return bg[axis];},fixPng:function(el){el.style.behavior='none';var lib,els,nodeStr,v,e;if(el.nodeName=='BODY'||el.nodeName=='TD'||el.nodeName=='TR'){return;}
el.isImg=false;if(el.nodeName=='IMG'){if(el.src.toLowerCase().search(/\.png$/)!=-1){el.isImg=true;el.style.visibility='hidden';}
else{return;}}
else if(el.currentStyle.backgroundImage.toLowerCase().search('.png')==-1){return;}
lib=DD_belatedPNG;el.vml={color:{},image:{}};els={shape:{},fill:{}};for(v in el.vml){if(el.vml.hasOwnProperty(v)){for(e in els){if(els.hasOwnProperty(e)){nodeStr=lib.ns+':'+e;el.vml[v][e]=document.createElement(nodeStr);}}
el.vml[v].shape.stroked=false;el.vml[v].shape.appendChild(el.vml[v].fill);el.parentNode.insertBefore(el.vml[v].shape,el);}}
el.vml.image.shape.fillcolor='none';el.vml.image.fill.type='tile';el.vml.color.fill.on=false;lib.attachHandlers(el);lib.giveLayout(el);lib.giveLayout(el.offsetParent);el.vmlInitiated=true;lib.applyVML(el);}};try{document.execCommand("BackgroundImageCache",false,true);}catch(r){}
DD_belatedPNG.createVmlNameSpace();DD_belatedPNG.createVmlStyleSheet();