
function cmb_manu_onChange(strWhereAmI,strQueryString) {
	if (document.frmSearch.cmb_manu.options[document.frmSearch.cmb_manu.selectedIndex].value!=''){
		//alert(strWhereAmI);
		var strURL=strWhereAmI;
		//alert(strQueryString);
		//TODO remove cid if new mid
		if (strQueryString!='') {
			//need to replace mid value
			if (strQueryString.indexOf('&mid=')>0) {
				strQueryString=strQueryString.substring(0,strQueryString.indexOf('&mid'));
			}else if (strQueryString.substring(0,4)=='mid=') {
				if (strQueryString.indexOf('&')>0 ) {
					strQueryString=strQueryString.substring(strQueryString.indexOf('&')+1,strQueryString.length-(strQueryString.indexOf('&mid')+1));
				}else{
					strQueryString='';
				}
			}
			if (strQueryString!='') {
				strURL+='?'+strQueryString+'&mid='+document.frmSearch.cmb_manu.options[document.frmSearch.cmb_manu.selectedIndex].value
			}else{
				strURL+='?mid='+document.frmSearch.cmb_manu.options[document.frmSearch.cmb_manu.selectedIndex].value
			}
		}else{
			strURL+='?mid='+document.frmSearch.cmb_manu.options[document.frmSearch.cmb_manu.selectedIndex].value
		}
		//alert(strURL);
		window.location=strURL;
	}
}
function cmb_product_onChange() {
	if (document.frmSearch.cmb_product.options[document.frmSearch.cmb_product.selectedIndex].value!=''){
		window.location='/products/shw-list.asp?mid='+document.frmSearch.cmb_manu.options[document.frmSearch.cmb_manu.selectedIndex].value+'&cid='+document.frmSearch.cmb_product.options[document.frmSearch.cmb_product.selectedIndex].value;
	}
}
function search_onsubmit() {
	if (document.frmSearchKeyword.txt_Keyword.value!='') {
		return true;
	}else{
		return false;
	}
}

