var imgBackground=document.images[0];var elemBizcard=document.getElementById('bizcard');var elemDerksIT=document.getElementById('derks-it');var origWidth=2000;var origHeight=1500;var origLineHeight=56;var origFontSize=48;var origDITTop=270;var origDITLeft=70;var origDITWidth=610;var origDITHeight=150;var saveLineHeight='';if('undefined'==imgBackground.style)
imgBackground.style=imgBackground;if('undefined'==elemBizcard.style)
elemBizcard.style=elemBizcard;if('undefined'==elemDerksIT.style)
elemDerksIT.style=elemDerksIT;function fix_background()
{var onload=arguments.length>0?arguments[0]:false;var width='undefined'!=typeof(window.innerWidth)?window.innerWidth:('undefined'!=typeof(document.body)?document.body.clientWidth+20:document.documentElement.clientWidth);var height='undefined'!=typeof(window.innerHeight)?window.innerHeight:('undefined'!=typeof(window.body)?window.body.clientHeight:document.documentElement.clientHeight);if(width/imgBackground.width<height/imgBackground.height)
{imgBackground.style.height='100%';imgBackground.style.width='auto';}
else
{imgBackground.style.height='auto';imgBackground.style.width='100%';}
if(elemBizcard)
{elemBizcard.style.top=500*imgBackground.height/origHeight;elemBizcard.style.left=700*imgBackground.width/origWidth;elemBizcard.style.fontSize=(origFontSize*imgBackground.width/origWidth)+'px';elemBizcard.style.lineHeight=(origLineHeight*imgBackground.width/origWidth)+'px';if(onload)
elemBizcard.style.display='inline';}
if(elemDerksIT)
{elemDerksIT.style.top=origDITTop*imgBackground.height/origHeight;elemDerksIT.style.left=origDITLeft*imgBackground.width/origWidth;elemDerksIT.style.width=origDITWidth*imgBackground.height/origHeight;elemDerksIT.style.height=origDITHeight*imgBackground.width/origWidth;}}
fix_background();window.onresize=fix_background;window.onload=function(){fix_background(true);if('undefined'!=typeof(location.hash)){if('#cv'==location.hash){loadPage('cv.html');}else if('#algvw'==location.hash||'#voorwaarden'==location.hash){loadPage('algvw.html');}else if('#derks.it'==location.hash){loadPage('http://www.derks.it/');}}}
function loadPage(url)
{var elem=document.getElementById('pageloader');if(elem)
{var content=document.getElementById('loader-content');if(content)
content.innerHTML='<iframe src="'+url+'" width="99%" height="99%" border="1" scrolling="auto"></iframe>';elem.style.display='inherit';return false;}
return true;}
function closePage()
{var elem=document.getElementById('pageloader');if(elem)
{elem.style.display='none';return false;}
return true;}
