function soil(soiltype,parameter)
{
//***********************************************************************
//*
//* Function  soil--look up table for soil properties
//*
//* Language:  JavaScript1.1
//*
//* Inputs:
//*   object   form object
//*
//* Returns:
//*   none
//*
//* Limitations:
//*   
//*   
//*
//* Author:
//*  Dr. Fred Tillman
//*  National Research Council Research Associate
//*  Regulatory Support Branch
//*  Ecosystems Research Division
//*  National Exposure Research Laboratory
//*  United States Environmental Protection Agency
//*  960 College Station Road
//*  Athens, Georgia 30605
//*  tillman.fred@epa.gov
//* 
//*
//* Reference:
//*  Flanagan, D., 1997, JavaScript: The Definitive Guide, 2ed, O'Reilly and Associates
//*
//* Created: 3-30-2004
//*
//* Required functions: none
//*
//* Required scripts: none
//*
//***********************************************************************
  
//* Soil-dependent parameters taken from Appendix G, Table G-4 of the OSWER Draft Guidance on Vapor Intrusion
//* n(porosity)[unitless]; thetaw(volumetric moisture content)[unitless]; thetav(volumetric gas content)[unitless]
//* thetawcap(capillary water content at air-entry pressure); capht(height of capillary zone)[m]
//* Qsoil(gas flow into building)[L/min];

   var n = 0; var thetaw = 0; var thetawl = 0; var thetawh = 0; var thetawcap = 0; var capht = 0; var Qsoil = 0; var sname = "";

      if (soiltype =='empty')    { n = '';    thetaw = '';    thetawcap = '';    capht = '';    Qsoil = '';}
 else if (soiltype =='example2') { n = 0.300; thetaw = 0.030; thetawl = 0.030; thetawh = 0.030; thetawcap = 0.270; capht = 0.100; Qsoil = 23.333;}
 else if (soiltype =='sand')     { sname = 'Sand';       n = 0.375; thetaw = 0.054; thetawl = 0.053; thetawh = 0.055; thetawcap = 0.253; capht = 0.170; Qsoil = 5;}
 else if (soiltype =='sandyloam'){ sname = 'Sandy Loam'; n = 0.387; thetaw = 0.103; thetawl = 0.039; thetawh = 0.170; thetawcap = 0.320; capht = 0.250; Qsoil = 5;}
 else if (soiltype =='loamysand'){ sname = 'Loamy Sand'; n = 0.39 ; thetaw = 0.076; thetawl = 0.049; thetawh = 0.100; thetawcap = 0.303; capht = 0.188; Qsoil = 5;}
 else if (soiltype =='loam') 	   { sname = 'Loam';       n = 0.399; thetaw = 0.148; thetawl = 0.061; thetawh = 0.240; thetawcap = 0.332; capht = 0.375; Qsoil = 5;}


if (parameter == 'n'){return n;}
if (parameter == 'thetaw'){return thetaw;}
if (parameter == 'thetawl'){return thetawl;}
if (parameter == 'thetawh'){return thetawh;}
if (parameter == 'thetawcap'){return thetawcap;}
if (parameter == 'capht'){return capht;}
if (parameter == 'Qsoil'){return Qsoil;}
if (parameter == 'sname'){return sname;}

}
