
function fillCategory(){ 
 // this function is used to fill the survey list on load
addOption(document.myform.survey, "By Mail", "By Mail", "");
addOption(document.myform.survey, "Boat Show", "Boat Show", "");
addOption(document.myform.survey, "Magazine", "Magazine", "");
addOption(document.myform.survey, "Web Search", "Web Search", "");
addOption(document.myform.survey, "Other", "Other", "");
}

function SelectSubCat(){
// ON selection of survey this function will work

removeAllOptions(document.myform.response);
addOption(document.myform.response, "", "Please Select Option", "");

if(document.myform.survey.value == 'By Mail'){
addOption(document.myform.response,"Not Applicable", "Not Applicable");
//addOption(document.myform.response,"Banana", "Banana");
//addOption(document.myform.response,"Orange", "Orange");
}
if(document.myform.survey.value == 'Boat Show'){
addOption(document.myform.response,"Michigan City", "Michigan City");
addOption(document.myform.response,"Ft. Lauderdale", "Ft. Lauderdale");
addOption(document.myform.response,"St. Petersburg", "St. Petersburg");
addOption(document.myform.response,"New York City", "New York City");
}
if(document.myform.survey.value == 'Magazine'){
addOption(document.myform.response,"Marine Max Lifestyles", "Marine Max Lifestyles");
addOption(document.myform.response,"Sea Ray Living", "Sea Ray Living");
addOption(document.myform.response,"Lakeland Boating", "Lakeland Boating");
addOption(document.myform.response,"Great Lakes Scuttlebutt", "Great Lakes Scuttlebutt");
}
if(document.myform.survey.value == 'Web Search'){
addOption(document.myform.response,"Google", "Google");
addOption(document.myform.response,"Yahoo", "Yahoo");
addOption(document.myform.response,"MSN", "MSN");
addOption(document.myform.response,"Other", "Other");
}
if(document.myform.survey.value == 'Other'){
addOption(document.myform.response,"Not Applicable", "Not Applicable");
//addOption(document.myform.response,"ASP", "ASP");
//addOption(document.myform.response,"Perl", "Perl");
}

}
////////////////// 

function removeAllOptions(selectbox)
{
	var i;
	for(i=selectbox.options.length-1;i>=0;i--)
	{
		//selectbox.options.remove(i);
		selectbox.remove(i);
	}
}


function addOption(selectbox, value, text )
{
	var optn = document.createElement("OPTION");
	optn.text = text;
	optn.value = value;

	selectbox.options.add(optn);
}
