function clearAll (object,num)
{
//***********************************************************************
//*
//* Function  clearAll--clears the elements (text,textarea,select) of a form
//*
//* Language:  JavaScript1.1
//*
//* Inputs:
//*   object   form object
//*   num      flag deciding which elements to clear
//* Returns:
//*   none
//*
//* Limitations:
//*   resets only text, textarea and select elements 
//*   (sets select elements to be blank by setting the selectIndex to -1)
//*
//* Author:
//*  Dr. Jim Weaver
//*  Hydrologist
//*  Regulatory Support Branch
//*  Ecosystems Research Division
//*  National Exposure Research Laboratory
//*  United States Environmental Protection Agency
//*  960 College Station Road
//*  Athens, Georgia 30605
//*  weaver.jim@epa.gov
//* 
//*
//* Reference:
//*  Flanagan, D., 1997, JavaScript: The Definitive Guide, 2ed, O'Reilly and Associates
//*
//* Created: 7-15-2000
//*
//* Required functions: none
//*
//* Required scripts: none
//*
//***********************************************************************

if (num == "all") {
  for (i=0;i<object.elements.length;i++)
   {
     var e=object.elements[i];
     if (e.type=='text') {e.value=' ';}
     if (e.type=='textarea') {e.value=' ';}
     if (e.type=='select-one') {e.selectedIndex = 0;}
   }
                    }

if (num == "results") {
  for (i=38;i<object.elements.length;i++)
   {
     var e=object.elements[i];
     if (e.type=='text') {e.value=' ';}
     if (e.type=='textarea') {e.value=' ';}
     if (e.type=='select-one') {e.selectedIndex = 0;}
   }
                      }


  }
