function addRow(num) {
    var row = document.getElementById('searchrow' + num);
    row.style.display = '';
    var andor = document.getElementById('andor' + (num-1));
    andor.style.display = '';
    var controls = document.getElementById('controls'+(num-1));
     controls.style.display = 'none';
}

function hideRow(num) {

    var row = document.getElementById('searchrow' + num);
    row.style.display = 'none';
    var sel = document.getElementById('select'+num);
    sel.selectedIndex = 0;
    var controls = document.getElementById('controls'+(num-1));
    controls.style.display = '';
    // hide the and-or
    var andor = document.getElementById('andor' + (num-1));
    andor.selectedIndex = 0; 
    andor.style.display = 'none';
    sp_pulldown(num);
    /* call sp_pulldown(rownum, 0 (where 0 is selectedIndex of first pulldown)) to reset */
}
