
/* The following urls are used throughout the site, allowing them to be updated as required.
   I preserved the links used in the existing web page, even when it wasn't clear as to the
   differences -- for example, between sqlsearch2 and sqlsearch3. Changing the url's here
   will affect all occurrences in the web site.

   For the advanced search (in about.html), I used variable sqlusearch3.asp, and selected
   reasonable select names (planttype, flowercolour, etc). As this "Advanced Search" has a
   different interface than the current site, the asp page will need updating.

   See note below flagged with GERRY; I don't know what query to make to get a list
   of the Bearded Irises of a particular colour.

*/
   

var shoppinghref="http://www.romancart.com/cart.asp?storeid=38698";  /* Shopping Cart */
var choices="choices.asp";           /* main choices.asp page */
var sqlsearch2="about1.asp";    /* Plant based search */
var sqlsearch3="about1.asp";
var advancedsearch="about1.asp"; /* For Gardeners Guide advanced search */

/* For the following, the sv1 value is appended to the end of the plant search */
var choices="choices.asp?F1=dbo131226775.dplantlistq.subgroupdescription&sv1=";
var choicesGroup="choices.asp?F1=dbo131226775.dplantlistq.groupdescription&sv1=";
var choicesFull="choices.asp?F1=dbo131226775.dplantlistq.FullName&sv1=";
var choicesFlower="choices.asp?F1=dbo131226775.dplantlistq.flower&sv1=";
var choicesDesc="choices.asp?F1=dbo131226775.dplantlistq.informationDesc&sv1=";
var choicesColour="choices.asp?F1=dbo131226775.dplantlistq.colour&sv1=";
var choicesHistoric="choices.asp?F1=dbo131226775.dplantlistq.historic&sv1=";
var choicesSpecialOffer="choices.asp?F1=dbo131226775.dplantlistq.SpecialOffer&sv1=";
var choicesPlantType="choices.asp?F1=dbo131226775.dplantlistq.PlantType&sv1=";
/* Called upon a pages load to ensure the correct menu button is selected,
   and then set up the search menus
*/
function load(page)
{
    /* Show which page is active in the menu bar */
    var menu=document.getElementById(page);
    if (menu) {
	menu.setAttribute("class", "activecell");

	/* setAttribute doesn't work as it should in older IE versions, so use this workaround */
	if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion < "7.0") {
	    menu.style.setAttribute('cssText', 'background: rgb(184,188,153);', 0);
	}
    }


    
    loadMain(page);

    /* Only use when a sale is on to highlight the Special Offers button in red */
    /*
      setSale();
    */

}

/* Used when a sale is happening */
function setSale() {

    var special=document.getElementById("special");
    special.setAttribute("class","onsale");

    /* setAttribute doesn't work as it should in older IE versions, so use this workaround */
    if (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion < "7.0") {
	special.style.setAttribute('cssText', 'background: rgb(255,100,100);', 0);
    }

}


/* GERRY -- I don't know what the query is to get a list of Bearded Iris of
   a particular colour, for now it lists all Bearded Irises */

/* List the Bearded Iris of a particular colour */
function selectbearedediris(colour) {
    if (colour != '') {

	window.location.href=choicesColour+colour+'&F2=dbo131226775.dplantlistq.subgroupdescription&sv3=IrBear';
    }
}


/* Set up pages with dynamic content -- list of plant types in the search, etc */
function loadMain(page)
{
    var cart=document.getElementById('cart');
    var search=document.getElementById('search');
    var special=document.getElementById('special');
    var pubs=document.getElementById('pubs');

    if (cart) {
	cart.innerHTML="<a href='"+shoppinghref+"'>Shopping Cart</a>";
    }

    if (special) {
	special.onclick=choicesGroup+"Special&sv2=Offer";
	special.innerHTML="<a href='"+choicesSpecialOffer+"1&F2=&sv3='>Special<br/>Offers</a>";
    }

    if (pubs) {
	pubs.onclick=choicesGroup+"Publications";
	pubs.innerHTML="<a href='"+choicesGroup+"Publications'>Publications</a>";
    }



    search.innerHTML="\
<FORM NAME=\"search\" class=\"search\">\
Search by: <SELECT id=\"setSpeciality\" NAME=\"SelectSearch\" onChange=\"display(options[selectedIndex].value)\">\
  <OPTION VALUE=\"speciality\">Speciality&nbsp;</OPTION>\
  <OPTION VALUE=\"genus\" SELECTED>Genus&nbsp;</OPTION>\
  <OPTION VALUE=\"free\">Keyword&nbsp;</OPTION>\
  <OPTION VALUE=\"plant\">Plant Types&nbsp;</OPTION>\
  <OPTION VALUE=\"advanced\">Advanced&nbsp;</OPTION>\
</SELECT>&nbsp;\
\
<span id=\"speciality\" style=\"display:none\">\
<!-- <SELECT id=\"specialityOption\" NAME=\"speciality\" onChange=\"dosearch('speciality',options[selectedIndex].value)\"> -->\
<SELECT id=\"specialityOption\" NAME=\"speciality\">\
  <OPTION VALUE=\"agapanthus\" SELECTED>Agapanthus</OPTION>\
  <OPTION VALUE=\"auriculas\">Auriculas</OPTION>\
  <OPTION VALUE=\"geraniums\">Geraniums</OPTION>\
  <OPTION VALUE=\"grasses\">Grasses</OPTION>\
  <OPTION VALUE=\"hemerocallis\">Hemerocallis</OPTION>\
  <OPTION VALUE=\"irisbearded\">Iris - Bearded</OPTION>\
  <OPTION VALUE=\"irissibirica\">Iris - Sibirica</OPTION>\
  <OPTION VALUE=\"irissundry\">Iris - Sundry</OPTION>\
  <OPTION VALUE=\"pelargoniums\">Pelargoniums</OPTION>\
</SELECT>\
</span>\
\
<span id=\"genusA\" style=\"display:\">\
<SELECT id=\"genusAOption\" NAME=\"genusA\" onChange=\"setGenusOption(options[selectedIndex].value)\">\
  <OPTION VALUE=\"a\" SELECTED>A&nbsp;</OPTION>\
  <OPTION VALUE=\"b\">B&nbsp;</OPTION>\
  <OPTION VALUE=\"c\">C&nbsp;</OPTION>\
  <OPTION VALUE=\"d\">D&nbsp;</OPTION>\
  <OPTION VALUE=\"e\">E&nbsp;</OPTION>\
  <OPTION VALUE=\"f\">F&nbsp;</OPTION>\
  <OPTION VALUE=\"g\">G&nbsp;</OPTION>\
  <OPTION VALUE=\"h\">H&nbsp;</OPTION>\
  <OPTION VALUE=\"i\">I&nbsp;</OPTION>\
  <OPTION VALUE=\"j\">J&nbsp;</OPTION>\
  <OPTION VALUE=\"k\">K&nbsp;</OPTION>\
  <OPTION VALUE=\"l\">L&nbsp;</OPTION>\
  <OPTION VALUE=\"m\">M&nbsp;</OPTION>\
  <OPTION VALUE=\"n\">N&nbsp;</OPTION>\
  <OPTION VALUE=\"o\">O&nbsp;</OPTION>\
  <OPTION VALUE=\"p\">P&nbsp;</OPTION>\
  <OPTION VALUE=\"r\">R&nbsp;</OPTION>\
  <OPTION VALUE=\"s\">S&nbsp;</OPTION>\
  <OPTION VALUE=\"t\">T&nbsp;</OPTION>\
  <OPTION VALUE=\"u\">U&nbsp;</OPTION>\
  <OPTION VALUE=\"v\">V&nbsp;</OPTION>\
  <OPTION VALUE=\"w\">W&nbsp;</OPTION>\
  <OPTION VALUE=\"z\">Z&nbsp;</OPTION>\
</SELECT>\
</span>\
\
<span id=\"genus\" style=\"display:\">\
</SELECT>\
</span>\
\
<span id=\"plant\" style=\"display:none\">\
<!-- <SELECT id=\"plantOption\" NAME=\"plant\" onChange=\"dosearch('plant',options[selectedIndex].value)\"> -->\
<SELECT id=\"plantOption\" NAME=\"plant\">\
  <OPTION VALUE=\"Climbers\" SELECTED>Climbers&nbsp;</OPTION>\
  <OPTION VALUE=\"Ferns\">Ferns&nbsp;</OPTION>\
  <OPTION VALUE=\"Grasses\">Grasses&nbsp;</OPTION>\
  <OPTION VALUE=\"Hardy\">Hardy Perennials&nbsp;</OPTION>\
  <OPTION VALUE=\"Tender\">Tender Perennials&nbsp;</OPTION>\
  <OPTION VALUE=\"Shrubs\">Shrubs&nbsp;</OPTION>\
</SELECT>\
</span>\
\
<span id=\"free\" style=\"display:none\">\
<input id=\"freeOption\" type=\"text\" name=\"free\" >\
</span>\
<input type=\"button\" value=\"Go\" class=\"btn\" onClick=\"dosearchGo()\"> \
\
</FORM>\
"

	setGenusOption('a');

    if (page=='specialities') {
	display('speciality');
    }

}


function resetsearch() {
    window.location.href="about.html";
}

function setGenusOption(val) {
    var genus=document.getElementById('genus');
    var html="<SELECT id=\"genusOption\" NAME=\"genus\">";

    if (val=='a') {
	html+="\
<OPTION VALUE=\"abelia\">Abelia&nbsp;</OPTION>\
<OPTION VALUE=\"abeliophyllum\">Abeliophyllum&nbsp;</OPTION>\
<OPTION VALUE=\"acacia\">Acacia&nbsp;</OPTION>\
<OPTION VALUE=\"acanthus\">Acanthus&nbsp;</OPTION>\
<OPTION VALUE=\"achillea\">Achillea&nbsp;</OPTION>\
<OPTION VALUE=\"aconitum\">Aconitum&nbsp;</OPTION>\
<OPTION VALUE=\"acorus\">Acorus&nbsp;</OPTION>\
<OPTION VALUE=\"actaea\">Actaea&nbsp;</OPTION>\
<OPTION VALUE=\"aeonium\">Aeonium&nbsp;</OPTION>\
<OPTION VALUE=\"agapanthus\">Agapanthus&nbsp;</OPTION>\
<OPTION VALUE=\"agastache\">Agastache&nbsp;</OPTION>\
<OPTION VALUE=\"agave\">Agave&nbsp;</OPTION>\
<OPTION VALUE=\"ajuga\">Ajuga&nbsp;</OPTION>\
<OPTION VALUE=\"akebia\">Akebia&nbsp;</OPTION>\
<OPTION VALUE=\"alcea\">Alcea&nbsp;</OPTION>\
<OPTION VALUE=\"alchemilla\">Alchemilla&nbsp;</OPTION>\
<OPTION VALUE=\"allium\">Allium&nbsp;</OPTION>\
<OPTION VALUE=\"alstroemeria\">Alstroemeria&nbsp;</OPTION>\
<OPTION VALUE=\"althaea\">Althaea&nbsp;</OPTION>\
<OPTION VALUE=\"alyogyne\">Alyogyne&nbsp;</OPTION>\
<OPTION VALUE=\"amaryllis\">Amaryllis&nbsp;</OPTION>\
<OPTION VALUE=\"ameliancher\">Ameliancher&nbsp;</OPTION>\
<OPTION VALUE=\"ampelodesmos\">Ampelodesmos&nbsp;</OPTION>\
<OPTION VALUE=\"anaphalis\">Anaphalis&nbsp;</OPTION>\
<OPTION VALUE=\"anemanthele\">Anemanthele&nbsp;</OPTION>\
<OPTION VALUE=\"anemone\">Anemone&nbsp;</OPTION>\
<OPTION VALUE=\"angelica\">Angelica&nbsp;</OPTION>\
<OPTION VALUE=\"anthemis\">Anthemis&nbsp;</OPTION>\
<OPTION VALUE=\"anthericum\">Anthericum&nbsp;</OPTION>\
<OPTION VALUE=\"anthriscus\">Anthriscus&nbsp;</OPTION>\
<OPTION VALUE=\"aquilegia\">Aquilegia&nbsp;</OPTION>\
<OPTION VALUE=\"arbutus\">Arbutus&nbsp;</OPTION>\
<OPTION VALUE=\"arctotis\">Arctotis&nbsp;</OPTION>\
<OPTION VALUE=\"arenaria\">Arenaria&nbsp;</OPTION>\
<OPTION VALUE=\"argyranthemum\">Argyranthemum&nbsp;</OPTION>\
<OPTION VALUE=\"armeria\">Armeria&nbsp;</OPTION>\
<OPTION VALUE=\"artemisia\">Artemisia&nbsp;</OPTION>\
<OPTION VALUE=\"arum\">Arum&nbsp;</OPTION>\
<OPTION VALUE=\"asarum\">Asarum&nbsp;</OPTION>\
<OPTION VALUE=\"asclpeia\">Asclpeia&nbsp;</OPTION>\
<OPTION VALUE=\"asphodeline\">Asphodeline&nbsp;</OPTION>\
<OPTION VALUE=\"asphodelus\">Asphodelus&nbsp;</OPTION>\
<OPTION VALUE=\"asplenium\">Asplenium&nbsp;</OPTION>\
<OPTION VALUE=\"astelia\">Astelia&nbsp;</OPTION>\
<OPTION VALUE=\"aster\">Aster&nbsp;</OPTION>\
<OPTION VALUE=\"astilbe\">Astilbe&nbsp;</OPTION>\
<OPTION VALUE=\"astrantia\">Astrantia&nbsp;</OPTION>\
<OPTION VALUE=\"athyrium\">Athyrium&nbsp;</OPTION>\
<OPTION VALUE=\"aubrietia\">Aubrietia&nbsp;</OPTION>\
";
    } else if (val=='b') {
	html+="\
<OPTION VALUE=\"ballota\">Ballota&nbsp;</OPTION>\
<OPTION VALUE=\"baptisia\">Baptisia&nbsp;</OPTION>\
<OPTION VALUE=\"berberis\">Berberis&nbsp;</OPTION>\
<OPTION VALUE=\"bergenia\">Bergenia&nbsp;</OPTION>\
<OPTION VALUE=\"blechnum\">Blechnum&nbsp;</OPTION>\
<OPTION VALUE=\"bletilla\">Bletilla&nbsp;</OPTION>\
<OPTION VALUE=\"briza\">Briza&nbsp;</OPTION>\
<OPTION VALUE=\"brugmansia\">Brugmansia&nbsp;</OPTION>\
<OPTION VALUE=\"brunnera\">Brunnera&nbsp;</OPTION>\
<OPTION VALUE=\"buddleja\">Buddleja&nbsp;</OPTION>\
<OPTION VALUE=\"buglossoides\">Buglossoides&nbsp;</OPTION>\
<OPTION VALUE=\"buxus\">Buxus&nbsp;</OPTION>\
";
    } else if (val=='c') {
	html+="\
<OPTION VALUE=\"calamogrostis\">Calamogrostis&nbsp;</OPTION>\
<OPTION VALUE=\"caltha\">Caltha&nbsp;</OPTION>\
<OPTION VALUE=\"camassia\">Camassia&nbsp;</OPTION>\
<OPTION VALUE=\"camellia\">Camellia&nbsp;</OPTION>\
<OPTION VALUE=\"campanula\">Campanula&nbsp;</OPTION>\
<OPTION VALUE=\"campsis\">Campsis&nbsp;</OPTION>\
<OPTION VALUE=\"canna\">Canna&nbsp;</OPTION>\
<OPTION VALUE=\"cardamine\">Cardamine&nbsp;</OPTION>\
<OPTION VALUE=\"carex\">Carex&nbsp;</OPTION>\
<OPTION VALUE=\"carpenteria\">Carpenteria&nbsp;</OPTION>\
<OPTION VALUE=\"caryopteris\">Caryopteris&nbsp;</OPTION>\
<OPTION VALUE=\"catanache\">Catanache&nbsp;</OPTION>\
<OPTION VALUE=\"ceanothus\">Ceanothus&nbsp;</OPTION>\
<OPTION VALUE=\"centaurea\">Centaurea&nbsp;</OPTION>\
<OPTION VALUE=\"centranthus\">Centranthus&nbsp;</OPTION>\
<OPTION VALUE=\"cephalaria\">Cephalaria&nbsp;</OPTION>\
<OPTION VALUE=\"ceratostigma\">Ceratostigma&nbsp;</OPTION>\
<OPTION VALUE=\"cerinthe\">Cerinthe&nbsp;</OPTION>\
<OPTION VALUE=\"cestrum\">Cestrum&nbsp;</OPTION>\
<OPTION VALUE=\"chaenomeles\">Chaenomeles&nbsp;</OPTION>\
<OPTION VALUE=\"chimonanthus\">Chimonanthus&nbsp;</OPTION>\
<OPTION VALUE=\"choisya\">Choisya&nbsp;</OPTION>\
<OPTION VALUE=\"chrysanthemum\">Chrysanthemum&nbsp;</OPTION>\
<OPTION VALUE=\"cichorum\">Cichorum&nbsp;</OPTION>\
<OPTION VALUE=\"cirsium\">Cirsium&nbsp;</OPTION>\
<OPTION VALUE=\"cistus\">Cistus&nbsp;</OPTION>\
<OPTION VALUE=\"clematis\">Clematis&nbsp;</OPTION>\
<OPTION VALUE=\"clivia\">Clivia&nbsp;</OPTION>\
<OPTION VALUE=\"codonopsis\">Codonopsis&nbsp;</OPTION>\
<OPTION VALUE=\"commelina\">Commelina&nbsp;</OPTION>\
<OPTION VALUE=\"convallaria\">Convallaria&nbsp;</OPTION>\
<OPTION VALUE=\"convolvulus\">Convolvulus&nbsp;</OPTION>\
<OPTION VALUE=\"coreopsis\">Coreopsis&nbsp;</OPTION>\
<OPTION VALUE=\"cornus\">Cornus&nbsp;</OPTION>\
<OPTION VALUE=\"coronilla\">Coronilla&nbsp;</OPTION>\
<OPTION VALUE=\"corydalis\">Corydalis&nbsp;</OPTION>\
<OPTION VALUE=\"corylus\">Corylus&nbsp;</OPTION>\
<OPTION VALUE=\"cosmos\">Cosmos&nbsp;</OPTION>\
<OPTION VALUE=\"cotinus\">Cotinus&nbsp;</OPTION>\
<OPTION VALUE=\"cotoneaster\">Cotoneaster&nbsp;</OPTION>\
<OPTION VALUE=\"crambe\">Crambe&nbsp;</OPTION>\
<OPTION VALUE=\"crinum\">Crinum&nbsp;</OPTION>\
<OPTION VALUE=\"crocosmia\">Crocosmia&nbsp;</OPTION>\
<OPTION VALUE=\"cyclamen\">Cyclamen&nbsp;</OPTION>\
<OPTION VALUE=\"cynara\">Cynara&nbsp;</OPTION>\
<OPTION VALUE=\"cyrtanthus\">Cyrtanthus&nbsp;</OPTION>\
";
    } else if (val=='d') {
	html+="\
<OPTION VALUE=\"dahlia\">Dahlia&nbsp;</OPTION>\
<OPTION VALUE=\"daphne\">Daphne&nbsp;</OPTION>\
<OPTION VALUE=\"delphinium\">Delphinium&nbsp;</OPTION>\
<OPTION VALUE=\"deschampsia\">Deschampsia&nbsp;</OPTION>\
<OPTION VALUE=\"deutzia\">Deutzia&nbsp;</OPTION>\
<OPTION VALUE=\"dianella\">Dianella&nbsp;</OPTION>\
<OPTION VALUE=\"dianthus\">Dianthus&nbsp;</OPTION>\
<OPTION VALUE=\"diascia\">Diascia&nbsp;</OPTION>\
<OPTION VALUE=\"dicentra\">Dicentra&nbsp;</OPTION>\
<OPTION VALUE=\"dictamnus\">Dictamnus&nbsp;</OPTION>\
<OPTION VALUE=\"dierama\">Dierama&nbsp;</OPTION>\
<OPTION VALUE=\"digitalis\">Digitalis&nbsp;</OPTION>\
<OPTION VALUE=\"dodecatheon\">Dodecatheon&nbsp;</OPTION>\
<OPTION VALUE=\"doronicum\">Doronicum&nbsp;</OPTION>\
<OPTION VALUE=\"dryopteris\">Dryopteris&nbsp;</OPTION>\
";
    } else if (val=='e') {
	html+="\
<OPTION VALUE=\"echinacea\">Echinacea&nbsp;</OPTION>\
<OPTION VALUE=\"echinops\">Echinops&nbsp;</OPTION>\
<OPTION VALUE=\"elymus\">Elymus&nbsp;</OPTION>\
<OPTION VALUE=\"epilobium\">Epilobium&nbsp;</OPTION>\
<OPTION VALUE=\"epimedium\">Epimedium&nbsp;</OPTION>\
<OPTION VALUE=\"eremurus\">Eremurus&nbsp;</OPTION>\
<OPTION VALUE=\"erigeron\">Erigeron&nbsp;</OPTION>\
<OPTION VALUE=\"erodium\">Erodium&nbsp;</OPTION>\
<OPTION VALUE=\"eryngium\">Eryngium&nbsp;</OPTION>\
<OPTION VALUE=\"erysimum\">Erysimum&nbsp;</OPTION>\
<OPTION VALUE=\"erythronium\">Erythronium&nbsp;</OPTION>\
<OPTION VALUE=\"eucomis\">Eucomis&nbsp;</OPTION>\
<OPTION VALUE=\"eucryphia\">Eucryphia&nbsp;</OPTION>\
<OPTION VALUE=\"euonymus\">Euonymus&nbsp;</OPTION>\
<OPTION VALUE=\"eupatorium\">Eupatorium&nbsp;</OPTION>\
<OPTION VALUE=\"euphorbia\">Euphorbia&nbsp;</OPTION>\
<OPTION VALUE=\"exochorda\">Exochorda&nbsp;</OPTION>\
";
    } else if (val=='f') {
	html+="\
<OPTION VALUE=\"fatsia\">Fatsia&nbsp;</OPTION>\
<OPTION VALUE=\"festuca\">Festuca&nbsp;</OPTION>\
<OPTION VALUE=\"filipendula\">Filipendula&nbsp;</OPTION>\
<OPTION VALUE=\"foeniculum\">Foeniculum&nbsp;</OPTION>\
<OPTION VALUE=\"fragaria\">Fragaria&nbsp;</OPTION>\
<OPTION VALUE=\"fritillaria\">Fritillaria&nbsp;</OPTION>\
<OPTION VALUE=\"fuchsia\">Fuchsia&nbsp;</OPTION>\
";
    } else if (val=='g') {
	html+="\
<OPTION VALUE=\"gaillardia\">Gaillardia&nbsp;</OPTION>\
<OPTION VALUE=\"galanthus\">Galanthus&nbsp;</OPTION>\
<OPTION VALUE=\"galega\">Galega&nbsp;</OPTION>\
<OPTION VALUE=\"galium\">Galium&nbsp;</OPTION>\
<OPTION VALUE=\"galtonia\">Galtonia&nbsp;</OPTION>\
<OPTION VALUE=\"gardenia\">Gardenia&nbsp;</OPTION>\
<OPTION VALUE=\"garrya\">Garrya&nbsp;</OPTION>\
<OPTION VALUE=\"gaura\">Gaura&nbsp;</OPTION>\
<OPTION VALUE=\"gentiana\">Gentiana&nbsp;</OPTION>\
<OPTION VALUE=\"geranium\">Geranium&nbsp;</OPTION>\
<OPTION VALUE=\"geum\">Geum&nbsp;</OPTION>\
<OPTION VALUE=\"gillenia\">Gillenia&nbsp;</OPTION>\
<OPTION VALUE=\"gingko\">Gingko&nbsp;</OPTION>\
<OPTION VALUE=\"gladiolus\">Gladiolus&nbsp;</OPTION>\
<OPTION VALUE=\"gunnera\">Gunnera&nbsp;</OPTION>\
<OPTION VALUE=\"gypsophila\">Gypsophila&nbsp;</OPTION>\
";
    } else if (val=='h') {
	html+="\
<OPTION VALUE=\"hakonechloa\">Hakonechloa&nbsp;</OPTION>\
<OPTION VALUE=\"hamamelis\">Hamamelis&nbsp;</OPTION>\
<OPTION VALUE=\"hebe\">Hebe&nbsp;</OPTION>\
<OPTION VALUE=\"hedera\">Hedera&nbsp;</OPTION>\
<OPTION VALUE=\"helenium\">Helenium&nbsp;</OPTION>\
<OPTION VALUE=\"helianthemum\">Helianthemum&nbsp;</OPTION>\
<OPTION VALUE=\"helianthus\">Helianthus&nbsp;</OPTION>\
<OPTION VALUE=\"heliotropium\">Heliotropium&nbsp;</OPTION>\
<OPTION VALUE=\"helleborus\">Helleborus&nbsp;</OPTION>\
<OPTION VALUE=\"hemerocallis\">Hemerocallis&nbsp;</OPTION>\
<OPTION VALUE=\"hepatica\">Hepatica&nbsp;</OPTION>\
<OPTION VALUE=\"hesperis\">Hesperis&nbsp;</OPTION>\
<OPTION VALUE=\"heuchera\">Heuchera&nbsp;</OPTION>\
<OPTION VALUE=\"heucherella\">Heucherella&nbsp;</OPTION>\
<OPTION VALUE=\"hippeastrum\">Hippeastrum&nbsp;</OPTION>\
<OPTION VALUE=\"hoheria\">Hoheria&nbsp;</OPTION>\
<OPTION VALUE=\"holboelia\">Holboelia&nbsp;</OPTION>\
<OPTION VALUE=\"hosta\">Hosta&nbsp;</OPTION>\
<OPTION VALUE=\"hydrangea\">Hydrangea&nbsp;</OPTION>\
<OPTION VALUE=\"hyssopus\">Hyssopus&nbsp;</OPTION>\
";
    } else if (val=='i') {
	html+="\
<OPTION VALUE=\"imperata\">Imperata&nbsp;</OPTION>\
<OPTION VALUE=\"inula\">Inula&nbsp;</OPTION>\
<OPTION VALUE=\"iris\">Iris&nbsp;</OPTION>\
";
    } else if (val=='j') {
	html+="\
<OPTION VALUE=\"jasminum\">Jasminum&nbsp;</OPTION>\
";
    } else if (val=='k') {
	html+="\
<OPTION VALUE=\"kirengeshoma\">Kirengeshoma&nbsp;</OPTION>\
<OPTION VALUE=\"kitaibelia\">Kitaibelia&nbsp;</OPTION>\
<OPTION VALUE=\"knautia\">Knautia&nbsp;</OPTION>\
<OPTION VALUE=\"kniphofia\">Kniphofia&nbsp;</OPTION>\
<OPTION VALUE=\"kolkwitzia\">Kolkwitzia&nbsp;</OPTION>\
";
    } else if (val=='l') {
	html+="\
<OPTION VALUE=\"lamium\">Lamium&nbsp;</OPTION>\
<OPTION VALUE=\"lathyrus\">Lathyrus&nbsp;</OPTION>\
<OPTION VALUE=\"laurus\">Laurus&nbsp;</OPTION>\
<OPTION VALUE=\"lavandula\">Lavandula&nbsp;</OPTION>\
<OPTION VALUE=\"lavatera\">Lavatera&nbsp;</OPTION>\
<OPTION VALUE=\"leucanthemum\">Leucanthemum&nbsp;</OPTION>\
<OPTION VALUE=\"leucojum\">Leucojum&nbsp;</OPTION>\
<OPTION VALUE=\"liatris\">Liatris&nbsp;</OPTION>\
<OPTION VALUE=\"libertia\">Libertia&nbsp;</OPTION>\
<OPTION VALUE=\"ligularia\">Ligularia&nbsp;</OPTION>\
<OPTION VALUE=\"lilium\">Lilium&nbsp;</OPTION>\
<OPTION VALUE=\"limonium\">Limonium&nbsp;</OPTION>\
<OPTION VALUE=\"linaria\">Linaria&nbsp;</OPTION>\
<OPTION VALUE=\"lippia\">Lippia&nbsp;</OPTION>\
<OPTION VALUE=\"liriope\">Liriope&nbsp;</OPTION>\
<OPTION VALUE=\"lithodora\">Lithodora&nbsp;</OPTION>\
<OPTION VALUE=\"lobelia\">Lobelia&nbsp;</OPTION>\
<OPTION VALUE=\"lonicera\">Lonicera&nbsp;</OPTION>\
<OPTION VALUE=\"lunaria\">Lunaria&nbsp;</OPTION>\
<OPTION VALUE=\"lupinus\">Lupinus&nbsp;</OPTION>\
<OPTION VALUE=\"luzula\">Luzula&nbsp;</OPTION>\
<OPTION VALUE=\"lychnis\">Lychnis&nbsp;</OPTION>\
<OPTION VALUE=\"lysichiton\">Lysichiton&nbsp;</OPTION>\
<OPTION VALUE=\"lysimachia\">Lysimachia&nbsp;</OPTION>\
<OPTION VALUE=\"lythrum\">Lythrum&nbsp;</OPTION>\
";
    } else if (val=='m') {
	html+="\
<OPTION VALUE=\"macleaya\">Macleaya&nbsp;</OPTION>\
<OPTION VALUE=\"magnolia\">Magnolia&nbsp;</OPTION>\
<OPTION VALUE=\"mahonia\">Mahonia&nbsp;</OPTION>\
<OPTION VALUE=\"mathiasella\">Mathiasella&nbsp;</OPTION>\
<OPTION VALUE=\"matteucia\">Matteucia&nbsp;</OPTION>\
<OPTION VALUE=\"meconopsis\">Meconopsis&nbsp;</OPTION>\
<OPTION VALUE=\"melianthus\">Melianthus&nbsp;</OPTION>\
<OPTION VALUE=\"mentha\">Mentha&nbsp;</OPTION>\
<OPTION VALUE=\"mertensia\">Mertensia&nbsp;</OPTION>\
<OPTION VALUE=\"millium\">Millium&nbsp;</OPTION>\
<OPTION VALUE=\"miscanthus\">Miscanthus&nbsp;</OPTION>\
<OPTION VALUE=\"molinia\">Molinia&nbsp;</OPTION>\
<OPTION VALUE=\"monarda\">Monarda&nbsp;</OPTION>\
<OPTION VALUE=\"morina\">Morina&nbsp;</OPTION>\
";
    } else if (val=='n') {
	html+="\
<OPTION VALUE=\"narcissus\">Narcissus&nbsp;</OPTION>\
<OPTION VALUE=\"nemesia\">Nemesia&nbsp;</OPTION>\
<OPTION VALUE=\"nepeta\">Nepeta&nbsp;</OPTION>\
<OPTION VALUE=\"nerine\">Nerine&nbsp;</OPTION>\
<OPTION VALUE=\"nicotiana\">Nicotiana&nbsp;</OPTION>\
";
    } else if (val=='o') {
	html+="\
<OPTION VALUE=\"ocimum\">Ocimum&nbsp;</OPTION>\
<OPTION VALUE=\"oenothera\">Oenothera&nbsp;</OPTION>\
<OPTION VALUE=\"olea\">Olea&nbsp;</OPTION>\
<OPTION VALUE=\"omphalodes\">Omphalodes&nbsp;</OPTION>\
<OPTION VALUE=\"ophiopogon\">Ophiopogon&nbsp;</OPTION>\
<OPTION VALUE=\"origanum\">Origanum&nbsp;</OPTION>\
<OPTION VALUE=\"osmanthus\">Osmanthus&nbsp;</OPTION>\
<OPTION VALUE=\"osmunda\">Osmunda&nbsp;</OPTION>\
<OPTION VALUE=\"osteospermum\">Osteospermum&nbsp;</OPTION>\
";
    } else if (val=='p') {
	html+="\
<OPTION VALUE=\"pachysandra\">Pachysandra&nbsp;</OPTION>\
<OPTION VALUE=\"paeonia\">Paeonia&nbsp;</OPTION>\
<OPTION VALUE=\"panicum\">Panicum&nbsp;</OPTION>\
<OPTION VALUE=\"papaver\">Papaver&nbsp;</OPTION>\
<OPTION VALUE=\"parahebe\">Parahebe&nbsp;</OPTION>\
<OPTION VALUE=\"parthenocissus\">Parthenocissus&nbsp;</OPTION>\
<OPTION VALUE=\"passiflora\">Passiflora&nbsp;</OPTION>\
<OPTION VALUE=\"pelargonium\">Pelargonium&nbsp;</OPTION>\
<OPTION VALUE=\"pennisetum\">Pennisetum&nbsp;</OPTION>\
<OPTION VALUE=\"penstemon\">Penstemon&nbsp;</OPTION>\
<OPTION VALUE=\"perovskia\">Perovskia&nbsp;</OPTION>\
<OPTION VALUE=\"persicaria\">Persicaria&nbsp;</OPTION>\
<OPTION VALUE=\"petroselinum\">Petroselinum&nbsp;</OPTION>\
<OPTION VALUE=\"philadelphus\">Philadelphus&nbsp;</OPTION>\
<OPTION VALUE=\"phlomis\">Phlomis&nbsp;</OPTION>\
<OPTION VALUE=\"phlox\">Phlox&nbsp;</OPTION>\
<OPTION VALUE=\"phormium\">Phormium&nbsp;</OPTION>\
<OPTION VALUE=\"photinia\">Photinia&nbsp;</OPTION>\
<OPTION VALUE=\"phygelius\">Phygelius&nbsp;</OPTION>\
<OPTION VALUE=\"physocarpus\">Physocarpus&nbsp;</OPTION>\
<OPTION VALUE=\"physostegia\">Physostegia&nbsp;</OPTION>\
<OPTION VALUE=\"pimpinella\">Pimpinella&nbsp;</OPTION>\
<OPTION VALUE=\"pittosporum\">Pittosporum&nbsp;</OPTION>\
<OPTION VALUE=\"platycodon\">Platycodon&nbsp;</OPTION>\
<OPTION VALUE=\"plumbago\">Plumbago&nbsp;</OPTION>\
<OPTION VALUE=\"podophyllum\">Podophyllum&nbsp;</OPTION>\
<OPTION VALUE=\"polemonium\">Polemonium&nbsp;</OPTION>\
<OPTION VALUE=\"polygonatum\">Polygonatum&nbsp;</OPTION>\
<OPTION VALUE=\"polystichum\">Polystichum&nbsp;</OPTION>\
<OPTION VALUE=\"potentilla\">Potentilla&nbsp;</OPTION>\
<OPTION VALUE=\"primula\">Primula&nbsp;</OPTION>\
<OPTION VALUE=\"prunus\">Prunus&nbsp;</OPTION>\
<OPTION VALUE=\"pulmonaria\">Pulmonaria&nbsp;</OPTION>\
<OPTION VALUE=\"pulsatilla\">Pulsatilla&nbsp;</OPTION>\
<OPTION VALUE=\"pyracantha\">Pyracantha&nbsp;</OPTION>\
";
    } else if (val=='r') {
	html+="\
<OPTION VALUE=\"ranunculus\">Ranunculus&nbsp;</OPTION>\
<OPTION VALUE=\"rheum\">Rheum&nbsp;</OPTION>\
<OPTION VALUE=\"rhodanthe\">Rhodanthe&nbsp;</OPTION>\
<OPTION VALUE=\"rodgersia\">Rodgersia&nbsp;</OPTION>\
<OPTION VALUE=\"romneya\">Romneya&nbsp;</OPTION>\
<OPTION VALUE=\"rosa\">Rosa&nbsp;</OPTION>\
<OPTION VALUE=\"roscoea\">Roscoea&nbsp;</OPTION>\
<OPTION VALUE=\"rosmarinus\">Rosmarinus&nbsp;</OPTION>\
<OPTION VALUE=\"rubus\">Rubus&nbsp;</OPTION>\
<OPTION VALUE=\"rudbeckia\">Rudbeckia&nbsp;</OPTION>\
<OPTION VALUE=\"ruta\">Ruta&nbsp;</OPTION>\
";
    } else if (val=='s') {
	html+="\
<OPTION VALUE=\"salix\">Salix&nbsp;</OPTION>\
<OPTION VALUE=\"salvia\">Salvia&nbsp;</OPTION>\
<OPTION VALUE=\"sambucus\">Sambucus&nbsp;</OPTION>\
<OPTION VALUE=\"sanguinaria\">Sanguinaria&nbsp;</OPTION>\
<OPTION VALUE=\"sanguisorba\">Sanguisorba&nbsp;</OPTION>\
<OPTION VALUE=\"santolina\">Santolina&nbsp;</OPTION>\
<OPTION VALUE=\"sarcoccoca\">Sarcoccoca&nbsp;</OPTION>\
<OPTION VALUE=\"saxifraga\">Saxifraga&nbsp;</OPTION>\
<OPTION VALUE=\"scabiosa\">Scabiosa&nbsp;</OPTION>\
<OPTION VALUE=\"schizostylis\">Schizostylis&nbsp;</OPTION>\
<OPTION VALUE=\"scutellaria\">Scutellaria&nbsp;</OPTION>\
<OPTION VALUE=\"sedum\">Sedum&nbsp;</OPTION>\
<OPTION VALUE=\"selinum\">Selinum&nbsp;</OPTION>\
<OPTION VALUE=\"sempervivum\">Sempervivum&nbsp;</OPTION>\
<OPTION VALUE=\"sidalcea\">Sidalcea&nbsp;</OPTION>\
<OPTION VALUE=\"silene\">Silene&nbsp;</OPTION>\
<OPTION VALUE=\"sisyrinchium\">Sisyrinchium&nbsp;</OPTION>\
<OPTION VALUE=\"smilacina\">Smilacina&nbsp;</OPTION>\
<OPTION VALUE=\"solanum\">Solanum&nbsp;</OPTION>\
<OPTION VALUE=\"sorghastrum\">Sorghastrum&nbsp;</OPTION>\
<OPTION VALUE=\"sparmannia\">Sparmannia&nbsp;</OPTION>\
<OPTION VALUE=\"sphaeralcea\">Sphaeralcea&nbsp;</OPTION>\
<OPTION VALUE=\"spiraea\">Spiraea&nbsp;</OPTION>\
<OPTION VALUE=\"spiranthes\">Spiranthes&nbsp;</OPTION>\
<OPTION VALUE=\"stachys\">Stachys&nbsp;</OPTION>\
<OPTION VALUE=\"stachyurus\">Stachyurus&nbsp;</OPTION>\
<OPTION VALUE=\"stipa\">Stipa&nbsp;</OPTION>\
<OPTION VALUE=\"stokesia\">Stokesia&nbsp;</OPTION>\
<OPTION VALUE=\"symphandra\">Symphandra&nbsp;</OPTION>\
<OPTION VALUE=\"symphytum\">Symphytum&nbsp;</OPTION>\
<OPTION VALUE=\"syringa\">Syringa&nbsp;</OPTION>\
";
    } else if (val=='t') {
	html+="\
<OPTION VALUE=\"tanacetum\">Tanacetum&nbsp;</OPTION>\
<OPTION VALUE=\"tellima\">Tellima&nbsp;</OPTION>\
<OPTION VALUE=\"teucrum\">Teucrum&nbsp;</OPTION>\
<OPTION VALUE=\"thalictrum\">Thalictrum&nbsp;</OPTION>\
<OPTION VALUE=\"thymus\">Thymus&nbsp;</OPTION>\
<OPTION VALUE=\"tiarella\">Tiarella&nbsp;</OPTION>\
<OPTION VALUE=\"tolmiea\">Tolmiea&nbsp;</OPTION>\
<OPTION VALUE=\"trachelospermum\">Trachelospermum&nbsp;</OPTION>\
<OPTION VALUE=\"tradescantia\">Tradescantia&nbsp;</OPTION>\
<OPTION VALUE=\"tricyrtis\">Tricyrtis&nbsp;</OPTION>\
<OPTION VALUE=\"trillium\">Trillium&nbsp;</OPTION>\
<OPTION VALUE=\"trollius\">Trollius&nbsp;</OPTION>\
<OPTION VALUE=\"tropaeolium\">Tropaeolium&nbsp;</OPTION>\
<OPTION VALUE=\"tulbaghia\">Tulbaghia&nbsp;</OPTION>\
";
    } else if (val=='u') {
	html+="\
<OPTION VALUE=\"uncinia\">Uncinia&nbsp;</OPTION>\
<OPTION VALUE=\"uvularia\">Uvularia&nbsp;</OPTION>\
";
    } else if (val=='v') {
	html+="\
<OPTION VALUE=\"valeriana\">Valeriana&nbsp;</OPTION>\
<OPTION VALUE=\"veratrum\">Veratrum&nbsp;</OPTION>\
<OPTION VALUE=\"verbascum\">Verbascum&nbsp;</OPTION>\
<OPTION VALUE=\"verbena\">Verbena&nbsp;</OPTION>\
<OPTION VALUE=\"vernonia\">Vernonia&nbsp;</OPTION>\
<OPTION VALUE=\"veronica\">Veronica&nbsp;</OPTION>\
<OPTION VALUE=\"veronicastrum\">Veronicastrum&nbsp;</OPTION>\
<OPTION VALUE=\"viburnum\">Viburnum&nbsp;</OPTION>\
<OPTION VALUE=\"vinca\">Vinca&nbsp;</OPTION>\
<OPTION VALUE=\"viola\">Viola&nbsp;</OPTION>\
<OPTION VALUE=\"vitis\">Vitis&nbsp;</OPTION>\
";
    } else if (val=='w') {
	html+="\
<OPTION VALUE=\"watsonia\">Watsonia&nbsp;</OPTION>\
<OPTION VALUE=\"weigela\">Weigela&nbsp;</OPTION>\
<OPTION VALUE=\"wistaria\">Wistaria&nbsp;</OPTION>\
";
    } else if (val=='z') {
	html+="\
<OPTION VALUE=\"zantedeschia\">Zantedeschia&nbsp;</OPTION>\
<OPTION VALUE=\"zigadenus\">Zigadenus&nbsp;</OPTION>\
";
    }
    html+="</SELECT>";
    genus.innerHTML=html;
}


function display(val) {
if (val=='speciality') {
    document.getElementById('setSpeciality').options[0].selected=true;
document.getElementById('speciality').style.display="";
document.getElementById('free').style.display="none";
document.getElementById('genusA').style.display="none";
document.getElementById('genus').style.display="none";
document.getElementById('plant').style.display="none";
} else if (val=='genus') {
document.getElementById('speciality').style.display="none";
document.getElementById('genus').style.display="";
document.getElementById('genusA').style.display="";
document.getElementById('free').style.display="none";
document.getElementById('plant').style.display="none";
setGenusOption('a');
} else if (val=='free') {
document.getElementById('speciality').style.display="none";
document.getElementById('free').style.display="";
document.getElementById('genusA').style.display="none";
document.getElementById('genus').style.display="none";
document.getElementById('plant').style.display="none";
} else if (val=='plant') {
document.getElementById('speciality').style.display="none";
document.getElementById('free').style.display="none";
document.getElementById('genusA').style.display="none";
document.getElementById('genus').style.display="none";
document.getElementById('plant').style.display="";
} else if (val=='advanced') {
document.getElementById('speciality').style.display="none";
document.getElementById('free').style.display="none";
document.getElementById('genusA').style.display="none";
document.getElementById('genus').style.display="none";
document.getElementById('plant').style.display="none";
}
}


/* Perform a plant search depening on what type of search was asked for
   Speciality -- goes to speciality pages
   Other searches create plant listing page
*/

function dosearchGo() {
    if (document.getElementById('speciality').style.display=="") {
	var opt=document.getElementById('specialityOption');
	dosearch("speciality",opt.options[opt.selectedIndex].value);
    } else if (document.getElementById('genus').style.display=="") {
	var opt=document.getElementById('genusOption');
	if (opt.value=='agapanthus') {
	    dosearch("genus",opt.options[opt.selectedIndex].value);
	} else {
	    window.location.href=sqlsearch3+"?setsearch=genus&txtgenus="+opt.value+"&SEARCH=TRUE&RNG=&ID1=";
	}
	
    } else if (document.getElementById('plant').style.display=="") {
	var opt=document.getElementById('plantOption');
	if (opt.value=='Ferns') { 
	    window.location.href=choicesPlantType+'Fern';
	} else if (opt.value=='Climbers') { 
	    window.location.href=choicesPlantType+'Climber';
	} else if (opt.value=='Grasses') { 
	    window.location.href='grasses.html';
	} else if (opt.value=='Shrubs') { 
	    window.location.href=choicesPlantType+'Shrub';
	} else if (opt.value=='Hardy') { 
	    window.location.href=choicesPlantType+'Hardy';
	} else if (opt.value=='Tender') { // %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    window.location.href=choicesPlantType+'Tender';		
	} else {
	    alert("Search for " + opt.value);
	    //	    window.location.href=sqlsearch3+"?txtplants="+opt.value+"&SEARCH=TRUE&RNG=&ID1=";
	}

    } else if (document.getElementById('free').style.display=="") {
	var opt=document.getElementById('freeOption');

	window.location.href=sqlsearch3+"?txtdplantlistqfullname="+opt.value+"&SEARCH=TRUE&RNG=&ID1="
    } else {
	window.location.href="about.html";
    }
}

function dosearch(group,val) {
if (val=='auriculas') {
window.location.href=val+".html";
} else if (val=='agapanthus') {
window.location.href=val+".html";
} else if (val=='geraniums') {
window.location.href=val+".html";
} else if (val=='grasses') {
window.location.href=val+".html";
} else if (val=='hemerocallis') {
window.location.href=val+".html";
} else if (val=='irisbearded') {
window.location.href=val+".html";
} else if (val=='irissibirica') {
window.location.href=val+".html";
} else if (val=='irissundry') {
window.location.href=val+".html";
} else if (val=='pelargoniums') {
window.location.href=val+".html";
} else {
alert("SEARCH BY " + group + " " + val);

}
}