<!--
function setBgcolor(id,color){
    if (id){
        if (document.getElementById(id)){
            var element=document.getElementById(id);
            element.style.backgroundColor=color;
        }
    }
}

function s1how(id,section){
    // id is element, section is or login sections or request)detail section
    var elements=document.getElementById(section);
    // firefox has 11 elements. ie has 5. howcome??
    // set style of elements to none
    for (i=0;i<elements.childNodes.length;i++){
        if (elements.childNodes[i].style){
            elements.childNodes[i].style.display='NONE';
        }
    }
    var section=document.getElementById(id);
    section.style.display="block";// set selected section to show
    //// now highligth chosen section. first remove any special styles
    var mainElement=document.getElementById('sel'+id).parentNode;
    if (mainElement){
        ;
        for (i=0;i<mainElement.childNodes.length;i++){
            if (mainElement.childNodes[i].style){
                mainElement.childNodes[i].style.backgroundColor='';// remove background color
                mainElement.childNodes[i].style.color='';// remove foregroundground color
            }// end if
            document.getElementById('sel'+id).style.backgroundColor='#3333de';// set background color of selected option
            document.getElementById('sel'+id).style.color='#fff';// set foregroundground color of selected option
        }// end for	
    }// end if mainElement
}
	
function showRequest(id){// if request was selected. show request detail
    var reqElement=actions.document.getElementById('id');
    if (reqElement){
        //setBgcolor(id,'');// reset background color of selected item
        reqElement.value=id;
        actions.document.getElementById('perform_task').value='request';
        actions.document.status.submit();
			
    }else{
        alert('Oproepen van request '+id+' is niet mogelijk');
    }
}
function startRapport(type){
    if (document.getElementById('rapportperiode')){
        value1=document.getElementById('beginjaar').value+'|'
        value1=value1+document.getElementById('beginperiode').value+'|'
        value1=value1+document.getElementById('eindjaar').value+'|'
        value1=value1+document.getElementById('eindperiode').value+'|'
        value1=value1+document.getElementById('periode').value
        variable1='beginjaar|beginperiode|eindjaar|eindperiode|periode'
        actions.document.getElementById('values1').value=value1		
        actions.document.getElementById('variable1').value=variable1		
        actions.document.getElementById('taak_det').value=type;
        actions.document.getElementById('perform_task').value='rapport';
        actions.document.status.submit();
    }
}
function changeRapportPeriode(periode){
    if (document.getElementById('rapportperiode')){
        var html=""
        var selected=""
        if (periode=='maand'){
            per=12
        }
        if (periode=='kwartaal'){
            per=4
        }
		
        var nu=document.getElementById('beginperiode1').value

        for (i=1;i<=per;i++){
            if (i==nu){
                selected='selected'
            }else{
                selected=''
            }
            if (i<10){
                html=html+'<OPTION value=0'+i+' '+selected+'>0'+i+'</option>'
            }
            else{
                html=html+'<OPTION value='+i+' '+selected+'>'+i+'</option>'
            }
        }
		
        document.getElementById('beginperiode1').innerHTML='<SELECT id="beginperiode" name="beginperiode">'+html+'</SELECT>'

        html=''
	
        var nu=document.getElementById('eindperiode1').value
        for (i=1;i<=per;i++){
            if (i==nu){
                selected='selected'
            }else{
                selected=''
            }
            if (i<10){
                html=html+'<OPTION value="0'+i+'" '+selected+'>0'+i+'</option>'
            }
            else{
                html=html+'<OPTION value='+i+' '+selected+'>'+i+'</option>'
            }
            document.getElementById('eindperiode1').innerHTML='<SELECT id="eindperiode" name="eindperiode">'+html+'</SELECT>'
        }
    }
}

function back(){// function to go back to login summarry page
    document.getElementById('results_logon').style.display='block';
    document.getElementById('helpbutton').style.display='inline';
    document.getElementById('results_request').style.display='none';
    document.getElementById('status_back').style.display='none';
}
function getClosedRequest(id){
    actions.document.getElementById('perform_task').value='getCloseRequest';
    actions.document.getElementById('id').value=id;
    actions.document.status.submit();
}
function doAction(action,option,id){
    actions.document.getElementById('id').value=id;
    actions.document.getElementById('taak_det').value=option;
    actions.document.getElementById('perform_task').value=action;
    actions.document.status.submit();
}
function setCheck(section){
    section=document.getElementById(section);
    if (section){
        for (j=0;j<section.length;j++){
            //alert(section.length);
            element=section[j];
            if (element.type=='checkbox'){
                var waarde=element.value;
                if (element.checked==true){
                    element.checked=false;
                    document.getElementById('ctrRow'+waarde).style.backgroundColor='';
                }else{
                    element.checked=true;
                    document.getElementById('ctrRow'+waarde).style.backgroundColor='#d8ffd7';
                }
            }
        }
    }
}// end function

function clrCheck(section){
    section=document.getElementById(section);
    if (section){
        for (j=0;j<section.length;j++){
            element=section[j];
            if (element.type=='checkbox'){
                var waarde=element.value;
                element.checked=false;
                document.getElementById('ctrRow'+waarde).style.backgroundColor='';
            }
        }
    }
}// end function

function setSingleCheck(id){
    var element=document.getElementById(id);
    if (element){
        var waarde=element.value;
        if (element.checked==true){
            document.getElementById('ctrRow'+waarde).style.backgroundColor='#d8ffd7';
        }else{
            document.getElementById('ctrRow'+waarde).style.backgroundColor='';
        }
    }
}
function chkCheck(section){
    section=document.getElementById(section);
    if (section){
        formSub=false;
        for (j=0;j<section.length;j++){
            //alert(section.length);
            element=section[j];
            if (element.type=='checkbox'){
                if (element.checked==true){
                    formSub=true;
                }// check checked
            }// check type
        }// for
        if (formSub){
            document.getElementById('downType').value='';
            section.submit();
        }
    }
}
	
function resize(section,section1){
    resizeResult(54);
    var x=document.getElementById('bodystart').scrollHeight;
    element=document.getElementById(section);
    if (element){
        element.style.height=x-94;
        if (document.getElementById('Contracts').style.display!='none'){
            document.getElementById(section1).style.display='none';
            document.getElementById(section1).style.display='block';
        }
    }
		
    element=document.getElementById('bodylok');
    if (element){
        element.style.height=x-92;
        if (document.getElementById('Places').style.display!='none'){
            document.getElementById('Places').style.display='none';
            document.getElementById('Places').style.display='block';
        }
    }
	
}
  //-->	
