﻿var currentBodyDiv=0;var totalItems=0;function initfade(a){totalItems=999;for(i=0;i<totalItems;i++){if(i>0){var b=document.getElementById('divBodyPart'+i);if(isEmpty(b)){totalItems=i}else{bytefx.alpha(b,0)}}}if(totalItems>1){disable(document.getElementById('btnVorige'));enable(document.getElementById('btnVolgende'),'next')}}function disable(a){if(a.style.color!='#333333'){bytefx.$event(a,"onclick",function(e){void(0)});a.style.color='#333333';a.style.cursor='arrow'}}function enable(a,b){if(a.style.color!='#eeeeee'){if(b=='next'){bytefx.$event(a,"onclick",function(e){nextText()})}else if(b=='previous'){bytefx.$event(a,"onclick",function(e){prevText()})}a.style.color='#eeeeee';a.style.cursor='pointer'}}function prevText(){if(currentBodyDiv>0){fadeOut(currentBodyDiv-1)}}function nextText(){if(currentBodyDiv<(totalItems-1)){fadeOut(currentBodyDiv+1)}}function fadeOut(a){var b=document.getElementById('divBodyPart'+currentBodyDiv);bytefx.fade(b,100,0,10,function(){fadeIn(a)})}function fadeIn(a){currentBodyDiv=a;if(a>0){enable(document.getElementById('btnVorige'),'previous')}else{disable(document.getElementById('btnVorige'))}if(a<(totalItems-1)){enable(document.getElementById('btnVolgende'),'next')}else{disable(document.getElementById('btnVolgende'))}obj=document.getElementById('divBodyPart'+a);bytefx.fade(obj,0,100,10)}function isEmpty(T){try{return(T===null||T===undefined||T===""||T===NaN)}catch(ex){return true}}