publicationinfo = new Array(
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("CosmoGIRL", "COG"),
		new Array("Country Living", "CLA"),
		new Array("Cosmopolitan", "COA"),
		new Array("Esquire", "ESA"),
		new Array("Good Housekeeping", "GHA"),
		new Array("Harper's Bazaar", "HAD"),
		new Array("House Beautiful", "HOA"),
		new Array("Marie Claire", "MAR"),
		new Array("O at Home", "OAH"),
		new Array("O, The Oprah Magazine", "OPA"),
		new Array("Popular Mechanics", "PMA"),
		new Array("Redbook", "RBA"),
		new Array("Seventeen", "SEV"),
		new Array("Smart Money", "SMA"),
		new Array("Town & Country", "TCA"),
		new Array("Veranda", "VRA"),
		new Array("Test Publication", "TPA")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Better Homes and Gardens", "Better Homes and Gardens"),
		new Array("Ladies Home Journal", "Ladies Home Journal"),
		new Array("More Magazine", "MAD"),
		new Array("Country Home", "CHA"),
		new Array("Traditional Home", "THA")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Flying", "FLY"),
		new Array("Sound & Vision", "SOU"),
		new Array("Elle", "Elle")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Links Magazine", "LKA")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Road King", "RKA")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Jewish Living", "JLA")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Trader Monthly", "TDA"),
		new Array("Private Air", "PVA"),
		new Array("Dealmaker", "DME")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Art in America", "AIA")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("National Parks", "NPA"),
		new Array("Lowes", "LWA")
	),
	new Array(
		new Array("-- Select Publication --", '#'),
		new Array("Customer Living", "CLS")
	)
);


function fillPublicationsFromArray(selectCtrl, selectedIndex, goodPrompt, badPrompt, defaultItem) {
	var i, j;
	var prompt;
	var itemArray;
if (null == selectCtrl)
	false;
	if (selectedIndex > 0) {
		itemArray = publicationinfo[selectedIndex-1]; 
	} else {
		itemArray = null;
	}
	// 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;
	}
}