var MAX_INTERVAL_JAAR = 1;
     
function onDocumentLoad()
        {
            LoadLatestSearchParams();
        
        
            checkStopJaar();
        }
        
        <!-- bolt:Extract tag="INCLUDE4" -->


function checkStartJaar()
{
    if (document.type.startJaar.selectedIndex > 
        document.type.stopJaar.selectedIndex)
    {
        if (document.type.startJaar.selectedIndex == 26)
        {
            document.type.stopJaar.selectedIndex = 
            26;
        }
        else {
            document.type.stopJaar.selectedIndex =
            document.type.startJaar.selectedIndex + 1;
        }
    }
    checkIntervalJaar(MAX_INTERVAL_JAAR);
}


function checkStopJaar()
{
   if (document.type.stopJaar.selectedIndex < 
        document.type.startJaar.selectedIndex)
    {
        // first index = min Jaar.
        if (document.type.stopJaar.selectedIndex == 0) 
        {
            document.type.startJaar.selectedIndex = 0;
        }
        else 
        {
            document.type.startJaar.selectedIndex =
            document.type.stopJaar.selectedIndex - 1;
        }
    }
    checkIntervalJaar(MAX_INTERVAL_JAAR);
}



function checkIntervalJaar()
{
    var selStartIdx = document.type.startJaar.selectedIndex;
    var selStartJaar = document.type.startJaar[selStartIdx].value;

    var selStopIdx = document.type.stopJaar.selectedIndex;
    var selStopJaar = document.type.stopJaar[selStopIdx].value;

    var hadToLimit = false;
    while((selStopJaar - selStartJaar) > MAX_INTERVAL_JAAR)
    {
        selStopIdx--;
        document.type.stopJaar.selectedIndex = selStopIdx;
        var selStopJaar = document.type.stopJaar[selStopIdx].value;
        hadToLimit = true;
    }
    
    if (hadToLimit && !isFirstPJaarview)
    {
        alert('Te groot bereik.');
    }
    isFirstPJaarview = false;
}

