/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Jerome Caron |  */
town = new Array(
new Array(
new Array("Select Town", "#"),
new Array("All Towns", "towns.php"),
new Array("Barnet", "barnet.php"),
new Array("Bishops Stortford", "bishopsstortford.php"),
new Array("Broxbourne", "broxbourne.php"),
new Array("Cheshunt", "cheshunt.php"),
new Array("Hatfield", "hatfield.php"),
new Array("Hertford", "hertford.php"),
new Array("Hoddesdon", "hoddesdon.php"),
new Array("Potters Bar", "pottersbar.php"),
new Array("Sawbridgeworth", "sawbridgeworth.php"),
new Array("Waltham Cross", "walthamcross.php"),
new Array("Ware", "ware.php"),
new Array("Welwyn Garden City", "welwyngardencity.php")
),
new Array(
new Array("Select Town", "#"),
new Array("All Towns", "towns.php"),
new Array("Abridge", "abridge.php"),
new Array("Buckhurst Hill", "buckhursthill.php"),
new Array("Chigwell", "chigwell.php"),
new Array("Chingford", "chingford.php"),
new Array("Epping", "epping.php"),
new Array("Loughton", "loughton.php"),
new Array("Old Harlow", "oldharlow.php"),
new Array("Ongar", "ongar.php"),
new Array("Snarebrook", "snarebrook.php"),
new Array("South Woodford", "southwoodford.php"),
new Array("Theydon Bois", "theydonbois.php"),
new Array("Waltham Abbey", "walthamabbey.php"),
new Array("Wanstead", "wanstead.php"),
new Array("Woodford Green", "woodfordgreen.php")
),
new Array(
new Array("Alexei Yashin", 20394802),
new Array("Daniel Alfredson", 34982039),
new Array("Marian Hossa", 92348902),
new Array("Patrick Lalime", 98203894),
new Array("Radek Bonk", 98234902)
)
);
function fillSelectFromArray(selectCtrl, itemArray, goodPrompt, badPrompt, defaultItem) {
var i, j;
var prompt;
// empty existing items
for (i = selectCtrl.options.length; i >= 0; i--) {
selectCtrl.options[i] = null;
}
prompt = (itemArray != null) ? goodPrompt : badPrompt;
if (prompt == null) {
j = 0;
}
else {
selectCtrl.options[0] = new Option(prompt);
j = 1;
}
if (itemArray != null) {
// add new items
for (i = 0; i < itemArray.length; i++) {
selectCtrl.options[j] = new Option(itemArray[i][0]);
if (itemArray[i][1] != null) {
selectCtrl.options[j].value = itemArray[i][1];
}
j++;
}
// select first item (prompt) for sub list
selectCtrl.options[0].selected = true;
   }
}
