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 oPopup=document.createElement('DIV');oPopup.id='divPopup';oPopup.style.position='absolute';var aScreenResolution=new retScreenResolution();oPopup.style.left=Math.round((aScreenResolution[0]/2)-(iWidth/2))+'px';oPopup.style.top=Math.round((aScreenResolution[1]/2)-(iHeight/2))+'px';oPopup.style.width=iWidth+'px';oPopup.style.zIndex=10;document.body.appendChild(oPopup);if(document.getElementById('divPopup')){var oClose=document.createElement('DIV');oClose.id='divClose';oPopup.appendChild(oClose);oClose.innerHTML='<a id=\"popuplink\" href="javascript:;" onclick="hidePopup()" title="Klik hier om te sluiten">Sluiten</a>';var oImage=document.createElement('IMG');oPopup.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 oPopup=document.createElement('DIV');oPopup.id='divPopup';oPopup.style.position='absolute';var aScreenResolution=new retScreenResolution();oPopup.style.zIndex=10;document.body.appendChild(oPopup);if(document.getElementById('divPopup')){var oClose=document.createElement('DIV');oClose.id='divClose';oPopup.appendChild(oClose);oClose.innerHTML='<a id=\"popuplink\" href="javascript:;" onclick="hidePopup()" title="Klik hier om te sluiten">Sluiten</a>';var oBox=document.createElement('DIV');oPopup.appendChild(oBox);oBox.innerHTML=text;oBox.style.marginTop='30px';oBox.style.whiteSpace='nowrap';oBox.style.textAlign='center';if(oPopup.addEventListener){oPopup.addEventListener('click',hidePopup,false);}else if(oPopup.attachEvent){oPopup.attachEvent('onclick',hidePopup);};oPopup.style.left=Math.round(aScreenResolution[0]/2)-200+'px';oPopup.style.top=Math.round(aScreenResolution[1]/2)+'px';oPopup.style.verticalAlign='middle';oPopup.style.height='100px';oPopup.style.width='400px';oPopup.style.textAlign='center';var IpopTop=Math.round((document.body.clientHeight-oPopup.offsetHeight)/2);var IpopLeft=Math.round((document.body.clientWidth-oPopup.offsetWidth)/2);};};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 Math.round(bodyLeft);};function hidePopup(){var oPopup=document.getElementById('divPopup');if(oPopup){document.body.removeChild(oPopup);};};function movePopup(){var aScreenResolution=retScreenResolution();if(document.getElementById('divPopup')){document.getElementById('divPopup').style.left=Math.round((aScreenResolution[0]/2)-(document.getElementById('divPopup').offsetWidth/2))+'px';document.getElementById('divPopup').style.top=Math.round((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;};

