<!--
function setEditable(){
  var x = document.geneForm.classOrGene.selectedIndex;
  var choice = document.geneForm.classOrGene.options[x].value;
  var y = document.geneForm.chooseOrganism.selectedIndex;
  var organism = document.geneForm.chooseOrganism.options[y].value;

  if((organism == "All") || (choice == "class")) {
    document.geneForm.geneName.disabled = true;
    document.geneForm.upfile.disabled = true;
  }
  else {
    document.geneForm.geneName.disabled = false;
    document.geneForm.upfile.disabled = false;
  }
}

//------------------------

function check(){	
  var x = document.geneForm.geneName.value;
  var y = document.geneForm.upfile.value;
  var result = document.geneForm.chooseOrganism.selectedIndex;
  var org = document.geneForm.chooseOrganism.options[result].value;
  var msg = "The form was not submit for the following reason(s)\n\n";  
  var c = document.geneForm.classOrGene.selectedIndex;
  var month = document.geneForm.month.selectedIndex;
  var year = document.geneForm.year.selectedIndex;
  var genes = 1;  
  var errorNum = 1;

  if ((isBlanks(x)) && (isBlanks(y))){

    if(c == 0){
      msg += errorNum +". You want to search by gene but\n     you have not supplied any genes\n"; 
      errorNum++;  
      if (org == "All"){
	msg += errorNum +". You must specify an organism\n     if you search by gene\n";  
	errorNum++;
      }
      if ((month == 0) && (year != 0)){
	msg += errorNum +". You entered a month\n     but no year\n";  
	errorNum++;

      }
      if ((month != 0) && (year == 0)){
	msg += errorNum +". You entered a year\n     but no month\n";  
	errorNum++;
	
      }
      alert(msg);
      return false;
    }
  }
  if (!(isBlanks(x)) && !(isBlanks(y))){
    msg += errorNum +". You can not submit genes from\n      both a file and the text box\n";  
    errorNum++;
    if (org == "All"){
      msg += errorNum +". You must specify an organism\n     if you search by gene\n";  
      errorNum++;
    }
    if ((month == 0) && (year != 0)){
      msg += errorNum +". You entered a month\n     but no year\n";  
      errorNum++;
      
    }
    if ((month != 0) && (year == 0)){
      msg += errorNum +". You entered a year\n     but no month\n";  
      errorNum++;
      
    }
    alert(msg);
    return false;
  }
  return true;
}


//---------------------------

function isBlanks(s){
  for (var i = 0; i < s.length; i++){
    var c = s.charAt(i);
    if((c != ' ')&&
       (c != '\n')&&
       (c != '\t'))
      return false;
  }
  return true;
}

//--------------------------
-->

