/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Jerome Caron |  */
group = new Array(



new Array(
new Array("Commercial Auto", "1Commercial Auto"),
new Array("Commercial Umbrella", "2Commercial Umbrella"),
new Array("Course of Construction", "3Course of Construction"),
new Array("Directors & Officers", "4Directors & Officers"),
new Array("Errors & Omissions", "5Errors & Omissions"),
new Array("General Liability", "6General Liability"),
new Array("Package", "7Package"),
new Array("Property", "8Property"),
new Array("Workers Compensation", "9Workers Compensation"),
new Array("Other", "10Other")
),


new Array(
new Array("Dental", "11Dental"),
new Array("Group Health", "12Group Health"),
new Array("Individual Health", "13Individual Health"),
new Array("Vision", "14Vision"),
new Array("Other", "15Other")
),



new Array(
new Array("Life Insurance", "16Life Insurance"),
new Array("Qualified Plan Design", "17Qualified Plan Design"),
new Array("Investments", "18Investments"),
new Array("Financial Planning & Retirement Income Forecasting", "19Financial Planning"),
new Array("Estate Tax Liability Analysis & Planning", "20Estate Tax"),
new Array("Key Man", "21Key Man"),
new Array("Buy-Sell / Partnership Funding", "22Buy-Sell"),
new Array("Other", "23Other")
),



new Array(
new Array("Auto", "24Auto"),
new Array("Homeowners", "25Homeowners"),
new Array("Jewelry / Furs / Fine Arts", "26Jewelry"),
new Array("Motorcycle / ATV", "27Motorcycle"),
new Array("Package", "28Package"),
new Array("Personal Umbrella", "29Personal Umbrella"),
new Array("Watercraft", "30Watercraft"),
new Array("Other", "31Other")
),



new Array(
new Array("Contract", "32Contract"),
new Array("Court", "33Court"),
new Array("License", "34License"),
new Array("Notary", "35Notary"),
new Array("Offsite", "36Offsite"),
new Array("Other", "37Other")
)



);
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;
   }
}
