
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list.Category, "香港", "Hong Kong", "");
addOption(document.drop_list.Category, "深圳", "Shenzhen", "");
addOption(document.drop_list.Category, "上海", "Shanghai", "");
addOption(document.drop_list.Category, "北京", "Beijing", "");
addOption(document.drop_list.Category, "廣州", "Guangzhou", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "", "Please select service", "");

if(document.drop_list.Category.value == '香港'){
addOption(document.drop_list.SubCat,"contact_hkaudit.html", "Audit and other Assurance Services");
addOption(document.drop_list.SubCat,"contact_hkchina.html", "Business Advisory - China");
addOption(document.drop_list.SubCat,"contact_hkitaly.html", "Business Advisory - Italy");
addOption(document.drop_list.SubCat,"contact_hkjapan.html", "Business Advisory - Japan");
addOption(document.drop_list.SubCat,"contact_hklatin.html", "Business Advisory - Latin America and Spain");
addOption(document.drop_list.SubCat,"contact_hkfinance.html", "Business Advisory - Corporate Finance");
addOption(document.drop_list.SubCat,"contact_hkim.html", "Business Advisory - Migration Consultancy");
addOption(document.drop_list.SubCat,"contact_hkrisk.html", "Business advisory - Risk Management");
addOption(document.drop_list.SubCat,"contact_hkbpo.html", "Business Process Outsourcing");
addOption(document.drop_list.SubCat,"contact_hkcos.html", "Corporate Secretarial");
addOption(document.drop_list.SubCat,"contact_hktax.html", "Tax Services")

;
}
if(document.drop_list.Category.value == '深圳'){
addOption(document.drop_list.SubCat,"contact_szaudit.html", "Audit and other Assurance Services");
addOption(document.drop_list.SubCat,"contact_szchina.html", "Business Advisory - China");
addOption(document.drop_list.SubCat,"contact_szim.html", "Business Advisory - Migration Consultancy");
addOption(document.drop_list.SubCat,"contact_szbpo.html", "Business Process Outsourcing", "");
addOption(document.drop_list.SubCat,"contact_szcos.html", "Corporate Secretarial");


;
}
if(document.drop_list.Category.value == '上海'){
addOption(document.drop_list.SubCat,"contact_shchina.html", "Business Advisory - China");

addOption(document.drop_list.SubCat,"contact_shim.html", "Business Advisory - Migration Consultancy");

;
}
if(document.drop_list.Category.value == '北京'){
addOption(document.drop_list.SubCat,"contact_bjchina.html", "Business Advisory - China");

;
}
if(document.drop_list.Category.value == '廣州'){
addOption(document.drop_list.SubCat,"contact_gzchina.html", "Business Advisory - China");


}
if(document.drop_list.Category.value == 'Scripts'){
addOption(document.drop_list.SubCat,"PHP", "PHP");
addOption(document.drop_list.SubCat,"ASP", "ASP");
addOption(document.drop_list.SubCat,"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);
}


function Redirect()
{
	var dropdownIndex = document.getElementById("SubCat").selectedIndex;
	var dropdownValue = document.getElementById("SubCat")[dropdownIndex].value;
	window.location = (dropdownValue);
}
