
function fillCategory(){ 
 // this function is used to fill the category list on load
addOption(document.drop_list.Category, "香港", "香港", "");
addOption(document.drop_list.Category, "深圳", "深圳", "");
addOption(document.drop_list.Category, "上海", "上海", "");
addOption(document.drop_list.Category, "北京", "北京", "");
addOption(document.drop_list.Category, "广州", "广州", "");
}

function SelectSubCat(){
// ON selection of category this function will work

removeAllOptions(document.drop_list.SubCat);
addOption(document.drop_list.SubCat, "", "选择服务", "");

if(document.drop_list.Category.value == '香港'){
addOption(document.drop_list.SubCat,"contact_hkaudit.html", "审计和其它认证服务");
addOption(document.drop_list.SubCat,"contact_hkchina.html", "商务咨询 - 中国");
addOption(document.drop_list.SubCat,"contact_hkitaly.html", "商务咨询 - 意大利");
addOption(document.drop_list.SubCat,"contact_hkjapan.html", "商务咨询 - 日本");
addOption(document.drop_list.SubCat,"contact_hklatin.html", "商务咨询 - 拉丁美洲");
addOption(document.drop_list.SubCat,"contact_hkfinance.html", "商务咨询 - 企业融资");
addOption(document.drop_list.SubCat,"contact_hkim.html", "商务咨询 - 移民顾问");
addOption(document.drop_list.SubCat,"contact_hkrisk.html", "商务咨询 - 风险管理");
addOption(document.drop_list.SubCat,"contact_hkbpo.html", "业务流程外包");
addOption(document.drop_list.SubCat,"contact_hkcos.html", "公司秘书");
addOption(document.drop_list.SubCat,"contact_hktax.html", "税务服务")

;
}
if(document.drop_list.Category.value == '深圳'){
addOption(document.drop_list.SubCat,"contact_szaudit.html", "审计和其它认证服务");
addOption(document.drop_list.SubCat,"contact_szchina.html", "中国商务咨询");
addOption(document.drop_list.SubCat,"contact_szim.html", "商务咨询 - 移民顾问");
addOption(document.drop_list.SubCat,"contact_szbpo.html", "业务流程外包", "");
addOption(document.drop_list.SubCat,"contact_szcos.html", "公司秘书");


;
}
if(document.drop_list.Category.value == '上海'){
addOption(document.drop_list.SubCat,"contact_shchina.html", "中国商务咨询");

addOption(document.drop_list.SubCat,"contact_shim.html", "商务咨询 - 移民顾问");

;
}
if(document.drop_list.Category.value == '北京'){
addOption(document.drop_list.SubCat,"contact_bjchina.html", "中国商务咨询");

;
}
if(document.drop_list.Category.value == '广州'){
addOption(document.drop_list.SubCat,"contact_gzchina.html", "中国商务咨询");


}
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);
}
