﻿function sendFormOld(whichOne) {
    //alert(whichOne);
    document.getElementById('search_area').value = whichOne;
    //alert(document.forms['hovForm'].name);
    document.forms['hovForm'].submit();
}

function dropdown(mySel) {
    var myVal;
    myVal = mySel.options[mySel.selectedIndex].value;
    if (myVal == 1) {
        document.getElementById('search_area').value = "";
    } else if (myVal == 2) {
        document.getElementById('search_area').value = "Cambridge";
    } else if (myVal == 3) {
    document.getElementById('search_area').value = "Histon, Horningsea, Madingley, Bottisham, Barton, Fulbourn, Shelford, Harston, Girton, Cherry Hinton, Chesterton";
    } else if (myVal == 4) {
    document.getElementById('search_area').value = "Histon, Horningsea, Madingley, Bottisham, Barton, Fulbourn, Shelford, Harston, Girton, Cherry Hinton, Chesterton, Chittering, Longstanton, Whittlesford, Cottenham, Bourn, Melbourn, Duxford";
    } else if (myVal == 5) {
    document.getElementById('search_area').value = "Histon, Horningsea, Madingley, Bottisham, Barton, Fulbourn, Shelford, Harston, Girton, Cherry Hinton, Chesterton, Over, Chittering, Burwell, Longstanton, Whittlesford, Cottenham, Elsworth, Bourn, Balsham, Melbourn, Duxford, Linton";
    } 
    return false;
}

function popUp(URL, width, height) {
    day = new Date();
    id = day.getTime();
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + "');");
}

function sendForm(whichOne) {
    //alert(whichOne);

    if (whichOne == "Camb") document.getElementById('search_area').value = "Cambridge";
    else if (whichOne == "NE1") document.getElementById('search_area').value = "Milton, Landbeach, Waterbeach, Horningsea, Fen Ditton, Stow Cum Quy";
    else if (whichOne == "NE2") document.getElementById('search_area').value = "Bottisham, Swaffham Bulbeck, Swaffham Prior, Lode, Burwell, Reach, Chittering";
    else if (whichOne == "NE3") document.getElementById('search_area').value = "Stretham, Wilburton, Haddenham";
    else if (whichOne == "NW1") document.getElementById('search_area').value = "Girton, Histon, Impington, Madingley, Dry Drayton";
    else if (whichOne == "NW2") document.getElementById('search_area').value = "Oakington, Longstanton, Bar Hill, Lolworth, Elsworth, Boxworth, Swavesey, Over, Willingham, Rampton, Cottenham, Westwick, Knapwell";
    else if (whichOne == "NW3") document.getElementById('search_area').value = "Fenstanton, Fen Drayton, Papworth Everard, Hilton, Earith";
    else if (whichOne == "SE1") document.getElementById('search_area').value = "Teversham, Cherry Hinton, Fulbourn, Trumpington, Great Shelford, Little Shelford, Stapleford";
    else if (whichOne == "SE2") document.getElementById('search_area').value = "Little Wilbraham, Great Wilbraham, Six Mile Bottom, West Wratting, Balsham, Babraham, Sawston, Pampisford, Whittlesford, Duxford, Great Abington, Little Abington, Hildersham, Linton, Hinxton, Ickleton";
    else if (whichOne == "SE3") document.getElementById('search_area').value = "Great Chesterford, Little Chestertford, Hadstock, Bartlow, Horseheath, West Wickham, Weston Colville";
    else if (whichOne == "SW1") document.getElementById('search_area').value = "Grantchester, Comberton, Barton, Hauxton, Harston, Hardwick, Coton";
    else if (whichOne == "SW2") document.getElementById('search_area').value = "Haslingfield, Harlton, Barrington, Newton, Foxton, Shepreth, Orwell, Little Eversden, Great Eversden, Kingston, Toft, Caldecote, Wimpole, Cambourne, Bourn, Thriplow, Meldreth, Melbourn, Caxton, Arrington, Fowlmere";
    else if (whichOne == "SW3") document.getElementById('search_area').value = "Great Gransden, Little Gransden, Croxton, Eltisley, Wendy, Royston, Ashwell, Steeple Morden, Guilden Morden";
    
    //alert(document.forms['hovForm'].name);
    document.forms['hovForm'].submit();
}













