function submit_pricescharts(form){
  // the ticker box requires more than 2 chars
  if ( charCount(form.pandccompanyname.value) < 2  || form.pandccompanyname.value == 'Enter company name:')  {
     alert("Please enter two or more characters when searching under Prices and Charts.");
     return false;
  }
  else {
     return true;
  }
}

function charCount(str)
{
  validcharcount = 0;
  for (i = 0; i < str.length; i++)  {
    if (str.charAt(i) != " ")  {
	   validcharcount++;
    }
  }
  return validcharcount;
}

function toggleDisplays(el1, display1) {
  var myelement = document.getElementById(el1);
  myelement.style.display = display1;
}

function submit_researchCompany(form){
  if ( form.company.selectedIndex == 0 )  {
     alert("Please select a company.");
     return false;
  }
  else {
     return true;
  }
}

function submit_researchSector(form) {
  if ( form.sector.selectedIndex == 0 )  {
     alert("Please select a sector.");
     return false;
  }
  else {
     return true;
  }
}


