function showPopUp(sImg){var oImg=new Image();var bLoaded;oImg.src=sImg+'?'+randomnumber();oImg.onload=function evt(){if(oImg.complete){bLoaded=true}else{if(oImg.readyState=='complete'){bLoaded=true};};if(bLoaded){if(document.getElementById('divPopup')){hidePopup()};var iWidth=oImg.width;var iHeight=oImg.height;var oDiv=document.createElement('DIV');oDiv.id='divPopup';oDiv.style.position='absolute';var aScreenResolution=new retScreenResolution();oDiv.style.left=(aScreenResolution[0]/2)-(iWidth/2)-retBodyLeft()+'px';oDiv.style.top=(aScreenResolution[1]/2)-(iHeight/2)+'px';oDiv.style.width=iWidth+'px';oDiv.style.zIndex=10;document.body.appendChild(oDiv);if(document.getElementById('divPopup')){var oClose=document.createElement('DIV');oClose.id='divClose';oDiv.appendChild(oClose);oClose.innerHTML='<a id=\"popuplink\" href="javascript:;" onclick="hidePopup()" title="Klik hier om te sluiten">Sluiten</a>';var oImage=document.createElement('IMG');oDiv.appendChild(oImage);if(oImage.addEventListener){oImage.addEventListener('click',hidePopup,false);}else if(oImage.attachEvent){oImage.attachEvent('onclick',hidePopup);};oImage.alt='Klik hier om de afbeelding te sluiten';oImage.src=sImg;};};};};function popup(text){var bLoaded;if(document.getElementById('divPopup')){hidePopup()};var oDiv=document.createElement('DIV');oDiv.id='divPopup';oDiv.style.position='absolute';var aScreenResolution=new retScreenResolution();oDiv.style.zIndex=10;document.body.appendChild(oDiv);if(document.getElementById('divPopup')){var oClose=document.createElement('DIV');oClose.id='divClose';oDiv.appendChild(oClose);oClose.innerHTML='<a id=\"popuplink\" href="javascript:;" onclick="hidePopup()" title="Klik hier om te sluiten">Sluiten</a>';var oBox=document.createElement('DIV');oDiv.appendChild(oBox);oBox.innerHTML=text;oBox.style.padding='40px';oBox.style.textAlign='center';if(oDiv.addEventListener){oDiv.addEventListener('click',hidePopup,false);}else if(oDiv.attachEvent){oDiv.attachEvent('onclick',hidePopup);};var iWidth=oBox.offsetWidth+100;var iHeight=oBox.offsetHeight+100;oDiv.style.left=(aScreenResolution[0]/2)-(iWidth/2)-retBodyLeft()+'px';oDiv.style.top=(aScreenResolution[1]/2)-(iHeight/2)+'px';oDiv.style.width=iWidth+'px';var IpopTop=(document.body.clientHeight-oDiv.offsetHeight)/2;var IpopLeft=(document.body.clientWidth-oDiv.offsetWidth)/2;oDiv.style.left=IpopLeft+document.body.scrollLeft;oDiv.style.top=IpopTop+document.body.scrollTop;};};function retScreenResolution(){var frameWidth=0;var frameHeight=0;if(self.innerWidth){frameWidth=self.innerWidth;frameHeight=self.innerHeight;}else if(document.documentElement&&document.documentElement.clientWidth){frameWidth=document.documentElement.clientWidth;frameHeight=document.documentElement.clientHeight;}else if(document.body){frameWidth=document.body.clientWidth;frameHeight=document.body.clientHeight;};var aFrame=new Array(frameWidth,frameHeight);return aFrame;};function retBodyLeft(){var bodyLeft=0;if(self.innerWidth){bodyLeft=(self.innerWidth-document.body.offsetWidth)/2;}else if(document.documentElement&&document.documentElement.clientWidth){bodyLeft=document.body.offsetLeft;}else if(document.body){bodyLeft=document.body.offsetLeft;};return bodyLeft;};function hidePopup(){var oDiv=document.getElementById('divPopup');if(oDiv){document.body.removeChild(oDiv);};};function movePopup(){var aScreenResolution=retScreenResolution();if(document.getElementById('divPopup')){document.getElementById('divPopup').style.left=(aScreenResolution[0]/2)-(document.getElementById('divPopup').offsetWidth/2)-retBodyLeft()+'px';document.getElementById('divPopup').style.top=(aScreenResolution[1]/2)-(document.getElementById('divPopup').offsetHeight/2)+'px';document.getElementById('divClose').style.left=((document.getElementById('divPopup').offsetLeft+document.getElementById('divPopup').offsetWidth)-document.getElementById('divClose').offsetWidth)-10+'px';document.getElementById('divClose').style.top=document.getElementById('divPopup').offsetTop+5+'px';};};function randomnumber(){return Math.round((99977562-10016486)*Math.random()+1)+22423;};

