var mass = new Array("", "Kmart", "Meijer", "Target", "Wal-Mart", "Other Mass Merchandisers", "");
var conv = new Array("", "am/pm", "Circle K", "Thorton Oil", "Ameristop", "Wawa", "Other Convenience Stores");
var ware = new Array("", "BJ's", "Sams", "Other Warehouse Clubs", "", "", "");
var mall = new Array("", "Bavarian Pretzel", "Mrs. Fields", "Tropic Sun", "Great American Cookie Co.", "Other Mall Locations", "");
var th = new Array("", "AMC", "Loews", "United Artists", "Other Theatres", "", "");
var other = new Array("", "Theme Parks", "Fast Food Restaurant", "Water Parks", "Bowling Centers", "", "");
var blank = new Array("", "", "", "", "", "", "");

function swapOptions(favoption)
{
	var array_name = ""
	//var numbers_select = window.document.form1.favoriteplace1
	if (favoption == "Mass Merchandiser") {
		array_name = eval(mass);
	} 
	if (favoption == "Convenience Stores"){
		array_name = eval(conv);
	}
	if (favoption == "Warehouse Clubs"){
		array_name = eval(ware);
	}
	if (favoption == "Malls"){
		array_name = eval(mall);
	}
	if (favoption == "Theatres"){
		array_name = eval(th);
	}
	if (favoption == "Other Locations"){
		array_name = eval(other);
	}
	if (favoption == ""){
		array_name = eval(blank);
	}
	setOptionText(window.document.form1.favoriteplace2, array_name);	
}

function setOptionText(the_select, the_array)
{
	for (loop=0; loop < the_select.options.length; loop++) 	
	{
		the_select.options[loop].text = the_array[loop]; 	
		the_select.options[loop].value = the_array[loop]; 	
	}
}

function checkFields() 
{
	missinginfo = "";
	favoriteplace1 = document.form1.favoriteplace1.value;
	favoriteplace2 = document.form1.favoriteplace2.value;
	favoriteflavorgeneral = document.form1.favoriteflavorgeneral.value;
	numberoficees = document.form1.numberoficees.value;
	
	if (favoriteplace1 == "") {
		missinginfo += "\n     -  Favorite Place";
	}
	
	//if (favoriteplace2 == "") {
		//missinginfo += "\n     -  Favorite Location";
	//}
	
	if (favoriteflavorgeneral == "" ) {
		missinginfo += "\n     -  Favorite Flavor";
	}
	
	if (numberoficees == "" ) {
		missinginfo += "\n     -  How many ICEEs do you buy in one month";
	}
	
	if (missinginfo != "") {
		missinginfo = "Please select " + missinginfo; 
		alert(missinginfo);
		return false;
	}
	else 
		return true;
				
	}







