// javascript for swish search pages - dh2 2003-05-08

function all_or_notall(sel){
  var count = 0;
  
  for (var i = 0; i < document.full_search.journalList.length; i++){
    if (document.full_search.journalList.options[i].selected == true){ 
      count++;
    }
  }
  
  if (count > 0){
    document.full_search.journalselect[0].checked = false;
    document.full_search.journalselect[1].checked = true;
  }else if (count == 0){
    document.full_search.journalselect[1].checked = false;
    document.full_search.journalselect[0].checked = true;
  } 
}
function full_or_not(sel){
  var count = 0;
  if (sel == 0){
    if (document.full_search.scopeList[0].checked == true){
      for (var i = 1; i < 5; i++){
	document.full_search.scopeList[i].checked = false ;
      }
     }
  }else {
    for (var i = 1; i < 5; i++){
      if (document.full_search.scopeList[i].checked == true){
	count++;
      }
    }
    if (count > 0){
      document.full_search.scopeList[0].checked = false;
    }else {
      document.full_search.scopeList[0].checked = true;
    }   
  }
  
}
