/*  This was originally intended to be done inline with the HTML, but there 
*   were problems with the script working correctly in Netscape 4.7.  */

var mws = new Array(
"Your store experiences",
"Store locations",
"Tailoring services"
);

var mwo = new Array(
"Purchasing gift certificates on-line",
"Tailoring of your on-line purchse",
"Shipping options/charges",
"Site functionality",
"Site navigation"
);

var of = new Array(
"Order status",
"How to track your order",
"Returns/exchanges"
);

var tr = new Array(
"Locations of availability",
"Size/selection availability",
"Group order inquiries",
"Questions regarding my order"
);

var mi = new Array(
"Size availability",
"Do you carry?",
"Garment care"
);

var pfcc = new Array(
"How to apply",
"Loyalty Points/Reward Certificates",
"How to make a payment",
"How to change my address",
"Questions regarding my account"
);

var oc = new Array(
"Charitable donations",
"Vendor inquiries",
"Advertising/Marketing"
);

var pf = new Array(
"Reward points",
"Reward certificates",
"Other"
);

var ja = new Array(
"Application Entry",
"Application Follow-up",
"Technical Help",
"Other"
);

/*
var t = new Array(
"Browser",
"Navigational",
"AOL User",
"Site Functionality",
"Other",
"",
"",
"",
"",
"",
""
);  */
  
function switchTopic(subject) {
	resetTopic();
	if (subject == "Men's Wearhouse Stores") {
		getArray(mws);
	}
  
    if (subject == "Men's Wearhouse On-line") {
		getArray(mwo);
	}
	  
    if (subject == "Order Follow-up") {
		getArray(of);
	}
	  
    if (subject == "Tuxedo Rentals") {
		getArray(tr);
	}
	  
    if (subject == "Merchandise Information") {
		getArray(mi);
	}
	  
    if (subject == "Perfect Fit Credit Card") {
		getArray(pfcc);
	}
	  
    if (subject == "Our Company") {
		getArray(oc);
	}
	
	if (subject == "Perfect Fit Rewards Card") {
		getArray(pf);
	}
	
	if (subject == "Job Application") {
		getArray(ja);
	}
}

function emptyList(list) { 
	for (var i=list.options.length-1; i>=0; i--) { 
		list.options[i]=null; 
	} 
}

function getArray(topicArray) {
	emptyList(document.form_contact_us.cu_topic);
	document.form_contact_us.cu_topic.options[0] = new Option("Pick a Topic", "");
	for (var i=1; i<topicArray.length+1; i++) {
		document.form_contact_us.cu_topic.options[i] = new Option(topicArray[i-1], topicArray[i-1]);
	}
}

function resetTopic() {
	document.form_contact_us.cu_topic.options[0].selected = true;
}

