﻿var tfb={};tfb.allowedLabels=["tw-follow-me","tw-follow-us","tw-follow","tw-my-twitter"];tfb.defaultTop=78;tfb.defaultColor="#35ccff";tfb.isInArray=function(str,ar){if(ar.length<1)return;for(var i=0;i<ar.length;i++){if(ar[i]==str){return true;break;}}
return false;}
tfb.showbadge=function(){if(!window.XMLHttpRequest){return;}
if(document.getElementById('twitterFollowBadge')){document.body.removeChild(document.getElementById('twitterFollowBadge'));}
if(tfb.top<0||tfb.top>1000||isNaN(tfb.top)){tfb.top=tfb.defaultTop;}
if(!tfb.isInArray(tfb.label,tfb.allowedLabels)){tfb.label=tfb.allowedLabels[0];}
var validColorPattern=/^#([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/;if(!validColorPattern.test(tfb.color)||(tfb.color.length!=4&&tfb.color.length!=7)){tfb.color=tfb.defaultColor;};if(tfb.side!='l'){tfb.side='r';}
tfb.tabStyleCode='position:fixed;'+'top:'+tfb.top+'px;'+'width:30px;'+'height:119px;'+'z-index:8765;'+'cursor:pointer;'+'background:'+tfb.color+' url(http://www.volupia.nl/js/'+tfb.label+'.png);'+'background-repeat:no-repeat;';tfb.aboutStyleCode='position:fixed;'+'top:'+(parseInt(tfb.top)+107)+'px;'+'width:10px;'+'height:11px;'+'z-index:9876;'+'cursor:pointer;'+'background:url(http://www.volupia.nl/js/icon-about.png);'+'background-repeat:no-repeat;';if(tfb.side=='l'){tfb.tabStyleCode+='left:0; background-position:right top;';tfb.aboutStyleCode+='left:0;';}else{tfb.tabStyleCode+='right:0; background-position:left top;';tfb.aboutStyleCode+='right:0;';}
tfbMainDiv=document.createElement('div');tfbMainDiv.setAttribute('id','twitterFollowBadge');document.body.appendChild(tfbMainDiv);tfbMainDiv.innerHTML='<div id="tfbTab" style="'+tfb.tabStyleCode+'"></div><div id="tfbAbout" style="'+tfb.aboutStyleCode+'"></div>'+'<style>#tfbAbout{visibility:hidden;} #twitterFollowBadge:hover #tfbAbout{visibility:visible;}</style>';document.getElementById('tfbTab').onclick=function(){window.open('http://twitter.com/#!/'+tfb.account);}
document.getElementById('tfbAbout').onclick=function(){window.open('http://www.volupia.nl/twitter/');}}

var ffb={};ffb.allowedLabels=["fb-follow-me","fb-follow-us","fb-follow","fb-my-facebook","fb-add-as-friend","fb-become-a-fan"];ffb.defaultTop=78;ffb.defaultColor="#999";ffb.isInArray=function(str,ar){if(ar.length<1)return;for(var i=0;i<ar.length;i++){if(ar[i]==str){return true;break;}}
return false;}
ffb.showbadge=function(){if(!window.XMLHttpRequest){return;}
if(document.getElementById('facebookFollowBadge')){document.body.removeChild(document.getElementById('facebookFollowBadge'));}
if(ffb.top<0||ffb.top>1000||isNaN(ffb.top)){ffb.top=ffb.defaultTop;}
if(!ffb.isInArray(ffb.label,ffb.allowedLabels)){ffb.label=ffb.allowedLabels[0];}
var validColorPattern=/^#([a-f]|[A-F]|[0-9]){3}(([a-f]|[A-F]|[0-9]){3})?$/;if(!validColorPattern.test(ffb.color)||(ffb.color.length!=4&&ffb.color.length!=7)){ffb.color=ffb.defaultColor;};if(ffb.side!='l'){ffb.side='r';}
ffb.tabStyleCode='position:fixed;'+'top:'+ffb.top+'px;'+'width:30px;'+'height:119px;'+'z-index:8765;'+'cursor:pointer;'+'background:'+ffb.color+' url(http://www.volupia.nl/js/'+ffb.label+'.png);'+'background-repeat:no-repeat;';ffb.aboutStyleCode='position:absolute;'+'top:'+(parseInt(ffb.top)+107)+'px;'+'width:10px;'+'height:11px;'+'z-index:9876;'+'cursor:pointer;'+'background:url(http://www.volupia.nl/js/icon-about.png);'+'background-repeat:no-repeat;';if(ffb.side=='l'){ffb.tabStyleCode+='left:0; background-position:right top;';ffb.aboutStyleCode+='left:0;';}else{ffb.tabStyleCode+='right:0; background-position:left top;';ffb.aboutStyleCode+='right:0;';}
ffbMainDiv=document.createElement('div');ffbMainDiv.setAttribute('id','facebookFollowBadge');document.body.appendChild(ffbMainDiv);ffbMainDiv.innerHTML='<div id="ffbTab" style="'+ffb.tabStyleCode+'"></div><div id="ffbAbout" style="'+ffb.aboutStyleCode+'"></div>'+'<style>#ffbAbout{visibility:hidden;} #facebookFollowBadge:hover #ffbAbout{visibility:visible;}</style>';document.getElementById('ffbTab').onclick=function(){window.open('http://www.facebook.com/'+ffb.account);}
document.getElementById('ffbAbout').onclick=function(){window.open('http://www.volupia.nl/facebook/');}}
