function jumpMenu(targ,selObj,restore){ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function get_search_text (form) {
	srch_txt = form.st.value;
	new_url = 'http://eptda.org/Product-locator';


	if(form.st.value.length == 0){
		alert('Type a key word.');
		form.st.focus(); // set the focus to this input
		return false;
	} else {
		window.location.href = new_url + '/(srch)/res/(st)/' + srch_txt;
	}

	return true;
}

function get_adv_search (form) {
    srch_txt = form.st.value;
	member_type = form.mt.value;
	member_country = form.mc.value;
	product_category = form.pc.value;
	new_url = 'http://eptda.org/Product-locator';
	
	if(form.st.value.length != 0){
		new_url += '/(st)/' + srch_txt;
	}
	
	if(form.mt.value.length != 0){
		new_url += '/(mt)/' + member_type;
	} else {
		new_url += '/(mt)/';
	}
	
	if(form.mc.value.length != 0){
		new_url += '/(mc)/' + member_country
	}
	
	if(form.pc.value.length != 0){
		new_url += '/(pc)/' + product_category
	}
	
	window.location.href = new_url;
	
	return true;
}

function onEnter( evt, frm ) {
	var keyCode = null;

	if( evt.which ) {
		keyCode = evt.which;
	} else if( evt.keyCode ) {
		keyCode = evt.keyCode;
	}

	if( 13 == keyCode ) {
		frm.sb.click();
		return false;
	}

return true;
}
