function add_f_wwres_event_handlers() {
	document.getElementById("f_wwres").onsubmit = f_wwres_onSubmit;
	document.getElementById("s_wwres").onchange = s_wwres_onChange;
}

function f_wwres_onSubmit() {
	if (document.f_worldwide_res.wwres_region_num.value.length > 0) {
		document.location = document.f_worldwide_res.wwres_region_num.value;
        return false;
	}
}

function s_wwres_onChange() {
	if (document.f_worldwide_res.wwres_region_num.value.length > 0) {
		document.location = document.f_worldwide_res.wwres_region_num.value;
	}
}

// Safely adds to the document's onLoad event.
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}
addLoadEvent(add_f_wwres_event_handlers);