
var __md={d:{socialSite:'profile.punt.nl',defaultProtocol:'https:',generateSocialHostString:function()
{return this.defaultProtocol+'//'+this.socialSite;},_:function(id)
{if(false)
{this.defaultProtocol='http:';}
if(id.substring(0,1)=='#')
{return document.getElementById(id.substring(1));}
else if(id.substring(0,1)=='.')
{return this._c(id.substring(1));}
else if(id.substring(0,1)=='$')
{return this._t(id.substring(1));}
return this._('#'+id);},_t:function(name)
{return document.getElementsByTagName(name);},_c:function(classname)
{var elems=document.getElementsByTagName('*'),i;var outelems=[];for(i in elems)
{if((" "+elems[i].className+" ").indexOf(" "+matchClass+" ")>-1)
{outelems[outelems.length]=elems[i];}}},c:function(name)
{return document.createElement(name);},ae:function(element,ev,func)
{if(window.addEventListener){element.addEventListener(ev,func,false);}else{element.attachEvent('on'+ev,func);}},parse:function(str,c)
{var tp='';for(var i in c)
{tp=typeof c[i];if((tp=='string')||(tp=='number'))
{eval("str = str.replace(/{"+i+"}/g,c[i]);");}}
return str;},attachEvent:function(element,ev,func)
{if(window.addEventListener){element.addEventListener(ev,func,false);}else{element.attachEvent('on'+ev,func);}},getPageOffsetLeft:function(el){var x;x=el.offsetLeft;if(el.offsetParent!=null)x+=this.getPageOffsetLeft(el.offsetParent);return x;},getPageOffsetTop:function(el){var y;y=el.offsetTop;if(el.offsetParent!=null)y+=this.getPageOffsetTop(el.offsetParent);return y;},getPosition:function(element)
{return{x:this.getPageOffsetLeft(element),y:this.getPageOffsetTop(element)};},cookie:function(c_name)
{var i,x,y,ARRcookies=document.cookie.split(";");for(i=0;i<ARRcookies.length;i++)
{x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);x=x.replace(/^\s+|\s+$/g,"");if(x==c_name)
{return unescape(y);}}},setCookie:function(c_name,value,expiredays,path)
{if(typeof path=='undefined')
{path='/';}
var exdate=new Date();exdate.setDate(exdate.getDate()+expiredays);document.cookie=c_name+"="+escape(value)+
((expiredays==null)?"":";expires="+exdate.toGMTString())+";domain="+document.domain+";path="+path;}}};if(typeof __md.nl=='undefined')
{__md.nl={};}
if(typeof __md.nl.punt=='undefined')
{__md.nl.punt={init:function(config)
{if(typeof config=='undefined')
{config={};}
for(var u in this)
{if(typeof this[u]=='object')
{if(typeof this[u].init=='function')
{this[u].init(config);}}}}};}

if(!this.JSON2){JSON2=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';};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,rep);if(v){partial.push(quote(k)+(gap?': ':':')+v);}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value,rep);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);});}
text=text.replace(/\\\\\\\\/g,'\\\\');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');}};}();if(!this.JSON)
{JSON=JSON2;}}

__md.nl.punt.socialFrames={frames:[],defaultConfig:{socialbar_on:true,socialbar_height:30,socialbar_pos:'top',protocol:'http',zIndex:255555,socialbar_style:'position:fixed;z-index:55555;{socialbar_pos}:0px;left:0px;right:0px;height:{socialbar_height}px;background-color:black;',idContainer_style:'position:fixed;z-index:55557;{socialbar_pos}:30px;right:30px;height:300px;width:300px;display:none;',hider_style:'position:fixed;top:0px;left:0px,right:0px;bottom:0px;background-image:url(/Layout/Mijndomein/blank.gif);z-index:55556;',socialSite:'profile.punt.nl',},attachEventListener:function(){__md.d.attachEvent(window,'message',function(e){return __md.nl.punt.socialFrames.handleMessage(e);});__md.d.attachEvent(this.body,"click",function(){__md.nl.punt.socialFrames.clickedBody()});},clickedBody:function()
{if(typeof this.idContainer!='undefined')
{if(this.idContainer.style.display=='block')
{this.idContainer.style.display='none';}}},startAccountFrame:function(data)
{if(typeof this.accountFrame!='undefined')
{this.accountFrameContainer=document.createElement('div');this.accountFrame=document.createElement('iframe');}},handleMessage:function(e)
{if(e.origin==this.c.protocol+'//'+this.c.socialSite)
{var messageData=JSON.parse(e.data);var hid=messageData.target;if(messageData.evt.type=='sessionStateChanged')
{this.handleSessionEvent(messageData,e);}
if(typeof this.frames[hid]!='undefined')
{this.frames[hid].handleMessage(messageData,e);}}
else
{}},handleSessionEvent:function(messageData,e)
{for(var i in this.frames)
{messageData.target=this.frames[i].id;this.frames[i].sendMessage(messageData);}},init:function(config)
{this.c={};this.body=__md.d._('$body')[0];this.attachEventListener();for(var u in config)
{this.c[u]=config[u];}
for(var i in this.defaultConfig)
{if(typeof this.c[i]!='undefined')
{continue;}
this.c[i]=this.defaultConfig[i];}
this.c.protocol=location.protocol;if(this.c.socialbar_on)
{this.addSocialBar();}},attachSessionToDiv:function(divid,info)
{var dv=__md.d._(divid);this.addFrame(dv,divid+'_socialbutton','/__puntid/frame/socialbutton',{formcallback:info.callback,framedata:info,style:'width:100%;height:35px;border:0px;'});},showIdSelectorAtLocation:function(pos)
{if(typeof this.idSelectorContainer=='undefined')
{}
this.showIdSelector(pos);},showIdSelector:function(pos)
{this.idSelectorContainer.style.display="block";this.idSelectorContainer.style.top=pos.y+'px';this.idSelectorContainer.style.left=pos.x+'px';},getLocalSession:function()
{},removeFrame:function(container,identifier)
{this.frames[identifier].remove();},addFrame:function(container,identifier,url,config)
{if(typeof this.frames[identifier]!='undefined')
{this.frames[identifier].remove();}
this.frames[identifier]=new md_punt_nl_socialframe(container,identifier,url,config);},findPlaceholders:function()
{},addSocialBar:function()
{if(typeof this.socialbar=='undefined')
{this.socialbar=document.createElement('div');this.socialbar.setAttribute('style',this.parseStringWithConfig(this.c.socialbar_style));if(this.c.socialbar_pos=='top')
{document.getElementsByTagName('html').item(0).style.marginTop=this.c.socialbar_height+'px';}
else if(this.c.socialbar_pos=='bottom')
{this.body.style.marginBottom=this.c.socialbar_height+'px';}
this.body.appendChild(this.socialbar);this.addFrame(this.socialbar,'socialbar','/__puntid/frame/topbar',{});}},addIdContainer:function(frameid,from)
{if(typeof this.idContainer=='undefined')
{this.idContainer=document.createElement('div');this.idContainer.setAttribute('style',this.parseStringWithConfig(this.c.idContainer_style));this.body.appendChild(this.idContainer);this.addFrame(this.idContainer,'idcontainer','/__puntid/frame/idcontainer',{orientation:this.c.socialbar_pos});}
if(frameid=='socialbar')
{if(this.c.socialbar_pos=='top')
{this.idContainer.style.top=this.c.socialbar_height+'px';}
else if(this.c.socialbar_pos=='bottom')
{this.idContainer.style.bottom=this.c.socialbar_height+'px';}
this.idContainer.style.left='auto';this.idContainer.style.position='fixed';}
else
{var pos=__md.d.getPosition(this.frames[from].container);this.idContainer.style.left=(pos.x)+'px';this.idContainer.style.top=(pos.y+35)+'px';this.idContainer.style.position='absolute';}
this.idContainer.style.display='block';this.idContainerShown=true;},attachIdContainer:function(from)
{var f=this.frames[from];if(typeof f!='undefined')
{this.addIdContainer(f.id,from);}},attachNotificationContainer:function(from)
{var f=this.frames[from];if(f.id=='socialbar')
{}},parseStringWithConfig:function(str)
{return __md.d.parse(str,this.c);},setLocalSessionId:function(identifier)
{__md.d.setCookie('pnt_lcl_sessid',identifier,1);},localSessionDataForUrl:function()
{var lclses=__md.d.cookie('pnt_lcl_sessid');return{pntLclSess:lclses};}};function md_punt_nl_socialframe(container,identifier,url,properties)
{var tmp={id:identifier,container:container,url:url,loaded:false,defaultConfig:{type:'comment',getParams:{},style:'width:100%;height:100%;border:0px;',protocol:'http',framedata:{}},handleMessage:function(msgdata,evt)
{if(msgdata.evt.type=='loaded')
{this.loaded=true;}
else if(msgdata.evt.type=='closeme')
{this.container.style.display='none';}
else if(msgdata.evt.type=='ping')
{this.sendMessage({evt:{type:'pong',frameinfo:this.c.framedata}});}
else if(msgdata.evt.type=='request')
{var func='handleMessage_'+msgdata.evt.todo;if(typeof this[func]=='function')
{this[func](msgdata);}}},handleMessage_callbackToFormHandler:function(msgdata)
{try
{this.c.formcallback(msgdata);}
catch(e)
{}},handleMessage_attachIdContainer:function()
{__md.nl.punt.socialFrames.attachIdContainer(this.id);},handleMessage_attachNotificationContainer:function()
{__md.nl.punt.socialFrames.attachNotificationContainer(this.id);},sendMessage:function(obj)
{this.frame.contentWindow.postMessage(JSON.stringify(obj),'*');},remove:function()
{this.container.removeChild(this.frame);},init:function(container,identifier,url,config)
{this.c={};for(var i in config)
{this.c[i]=config[i];}
for(var u in this.defaultConfig)
{if(typeof this.c[u]=='undefined')
{this.c[u]=this.defaultConfig[u];}}
this.c.protocol=location.protocol;this.frame=__md.d.c('iframe');this.frame.setAttribute('style',this.c.style)
this.frame.setAttribute('id','SFR_'+this.id);this.frame.setAttribute('frameBorder','0');this.frame.setAttribute('allowTransparency','true');this.frame.src=this.generateUrl();container.appendChild(this.frame);this.container.style.display='block';},generateUrl:function()
{var query=[];var c=__md.nl.punt.socialFrames.c;var lsfu=__md.nl.punt.socialFrames.localSessionDataForUrl();query[query.length]="frid="+encodeURIComponent(this.id);return c.protocol+'//'+c.socialSite+this.url+'/'+document.domain.replace(/\./g,"_")+''+'?'+query.join('&');}};tmp.init(container,identifier,url,properties)
return tmp;}
