
function fillCategory(){ 
removeAllOptions(document.drop_list.Category);
addOption(document.drop_list.Category, "", "Step1...", "");
removeAllOptions(document.drop_list.Category2);
addOption(document.drop_list.Category2, "", "Step2...", "");
removeAllOptions(document.drop_list.SubCat1);
addOption(document.drop_list.SubCat1, "", "Step3...", "");
 // this function is used to fill the category list on load
addOption(document.drop_list.Category, "1 to 50,000", "1 to 50,000", "");
addOption(document.drop_list.Category, "50,000 to 250,000", "50,000 to 250,000", "");
addOption(document.drop_list.Category, "More than 250,000", "More than 250,000", "");
}

function fillCategory2(){ 

removeAllOptions(document.drop_list.Category2);
addOption(document.drop_list.Category2, "", "Step2...", "");
removeAllOptions(document.drop_list.SubCat1);
addOption(document.drop_list.SubCat1, "", "Step3...", "");

if(document.drop_list.Category.value == '1 to 50,000'){
addOption(document.drop_list.Category2, "1A", "Personal use, communicating with friends and family only", "");
addOption(document.drop_list.Category2, "1B", "Business/corporate use, alerts, marketing etc.", "");
}
if(document.drop_list.Category.value == '50,000 to 250,000'){
addOption(document.drop_list.Category2, "2A", "Marketing, alerts, or integration with my organisation's applications and services", "");
addOption(document.drop_list.Category2, "2B", "My organisation is a mobile operator, an aggregator of SMS traffic, or a communications reseller", "");
}
if(document.drop_list.Category.value == 'More than 250,000'){
addOption(document.drop_list.Category2, "3A", "Marketing, alerts, or integration with my organisation's applications and services", "");
addOption(document.drop_list.Category2, "3B", "My organisation is a mobile operator, an aggregator of SMS traffic, or a communications reseller", "");

}

}

function SelectSubCat1(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat1);
addOption(document.drop_list.SubCat1, "", "Step3...", "");

if(document.drop_list.Category2.value == '1A'){
addOption(document.drop_list.SubCat1,"/products/personal/windowsdesktopsms.html", "I need software for a Windows PC");
addOption(document.drop_list.SubCat1,"/products/personal/osxwidget.html", "I need software for an Apple Mac");
addOption(document.drop_list.SubCat1,"/products/personal/javadesktopsms.html", "I need software for another PC OS");
}
if(document.drop_list.Category2.value == '1B'){
addOption(document.drop_list.SubCat1,"/products/business/windowsdesktopsms.html", "I need single user software for a Windows PC");
addOption(document.drop_list.SubCat1,"/products/business/osxwidget.html", "I need single user software for an Apple Mac");
addOption(document.drop_list.SubCat1,"/products/business/javadesktopsms.html", "I need single user software for another PC OS");
addOption(document.drop_list.SubCat1,"/products/business/batchsender.html", "I need a web interface for sending messages to my number lists in batches");
addOption(document.drop_list.SubCat1,"/products/business/httpsms_xmlsms.html", "I need a simple HTTP API for connecting to the CardBoardFish gateway");
addOption(document.drop_list.SubCat1,"/products/business/email2sms.html", "I need to be able to send, and receive, text messages via email");
addOption(document.drop_list.SubCat1,"/products/business/incomingsms.html", "I need my own number for receiving incoming text messages");
}
if(document.drop_list.Category2.value == '2A'){
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/batchsender.html", "I need a web interface for sending messages to my number lists in batches");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/numbervalidation.html", "I need to remove invalid and inactive numbers from my number lists");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/sms_mt.html", "I need direct connectivity to the CardBoardFish gateway (SMS MT)");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/sms_mo.html", "I need to receive incoming text messages (SMS MO)");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/windowssmsserver.html", "I need a simple windows-based SMS server");
}
if(document.drop_list.Category2.value == '2B'){
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/sms_mt.html", "I need direct connectivity to the CardBoardFish gateway (SMS MT)");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/sms_mo.html", "I need to receive incoming text messages (SMS MO)");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/hlr_lookup.html", "I need to query numbers against the operator's Home Location Register (HLR Lookup)");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/batchsender.html", "I need a web interface for sending messages to my number lists in batches");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/windowssmsserver.html", "I need a simple windows-based SMS server");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/reselleraccount.html", "I need my customers to connect directly to CardBoardFish but under my own brand (Reseller Account)");
}
if(document.drop_list.Category2.value == '3A'){
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/batchsender.html", "I need a web interface for sending messages to my number lists in batches");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/numbervalidation.html", "I need to remove invalid and inactive numbers from my number lists");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/sms_mt.html", "I need direct connectivity to the CardBoardFish gateway (SMS MT)");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/sms_mo.html", "I need to receive incoming text messages (SMS MO)");
addOption(document.drop_list.SubCat1,"/products/largesmsaccounts/windowssmsserver.html", "I need a simple windows-based SMS server");
}
if(document.drop_list.Category2.value == '3B'){
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/sms_mt.html", "I need direct connectivity to the CardBoardFish gateway (SMS MT)");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/sms_mo.html", "I need to receive incoming text messages (SMS MO)");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/hlr_lookup.html", "I need to query numbers against the operator's Home Location Register (HLR Lookup)");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/batchsender.html", "I need a web interface for sending messages to my number lists in batches");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/windowssmsserver.html", "I need a simple windows-based SMS server");
addOption(document.drop_list.SubCat1,"/products/aggregatoroperator/reselleraccount.html", "I need my customers to connect directly to CardBoardFish but under my own brand (Reseller Account)");
}


}
////////////////// 

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