function OddEvenRow( form ){
    
    var table = document.getElementById(form);
    var allTRs = table.getElementsByTagName("tr");

    var index = new Array();
    var x=0
        
    for (i=0; i <= allTRs.length ; i++) {
        if( allTRs[i] ){
            
            if( allTRs[i].style.display == ''){
                index[x] = allTRs[i] 
                x++
            }
        }
    }  
    
    var oddRow = '';
    for (x=0; x <= index.length ; x++) {
        if( index[x] ){

            if( x % 2 == 1){ 
                oddRow = " oddRow";
            }else{
                oddRow = '';
            }
            
            index[x].className = oddRow

        }
    }
    
}

function AdditionalOptions( option ){
    
    var includeChildren = document.getElementById('includeChildren')
    
    if( option.value == 'yes'){
        includeChildren.style.display = ''  
    }else{
        includeChildren.style.display = 'none'
    }
    
    OddEvenRow('lifeForm')
    
}

function ShowJointApplication( joint ){

    var row = 1;
    while ( document.getElementById('JointApplicantsDetails'+row) ) {
                
        var jointApplicant = document.getElementById('JointApplicantsDetails'+row)
        
        if( joint.value == 'Single'){
            jointApplicant.style.display = "none";
        }else{
           jointApplicant.style.display = ""; 
        }
        
        row++;  

    }
    
    OddEvenRow('lifeForm')
  
}
