function popRecall(recno) {
  var path = "http://www.tc.gc.ca/roadsafety/Recalls/recall_e.asp?recno=" + recno + "&"
  Wnd = window.open(path,"recalldatabase","toolbar=yes,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=650,height=580,focus");
  return false;
}

/*
function submitRecall(f) {
  var make = (f.make.selectedIndex > 0) ? f.make.options[f.make.selectedIndex].text : "";
  var model = (f.model.selectedIndex > 0) ? f.model.options[f.model.selectedIndex].text : "";
  var year = (f.year.selectedIndex > 0) ? f.year.options[f.year.selectedIndex].text : "";
  var url;
  var qs;
  
  if(make != "") {
    qs = "?make=" + encodeURIComponent(make) + "&model=" + encodeURIComponent(model) + "&year=" + encodeURIComponent(year);
    url = f.action + qs;
    
    if(model == "") {
      var e = document.getElementById("nomdurl");
      if(e != null) {
        url = e.value + qs;
      }
    }
    
    document.location.href = url;
  }
    
  return false;
}*/


function submitRecall(f) {
  var make = (f.make.selectedIndex > 0) ? f.make.options[f.make.selectedIndex].text : "";
  var model = (f.model.selectedIndex > 0) ? f.model.options[f.model.selectedIndex].text : "";
  var year = (f.year.selectedIndex > 0) ? f.year.options[f.year.selectedIndex].text : "";  
  var qs;
  
  if(make != "") {
    qs = "?make=" + encodeURIComponent(make);
    if(model!="") qs += "&model=" + encodeURIComponent(model);
    if(year!="") qs += "&year=" + encodeURIComponent(year);    
    
    if(model == "") {
      var e = document.getElementById("nomdurl");
      if(e != null) {      
        f.action = e.value;
      }
      appendTextToAction(f, f.make);      
    } else {
      appendTextToAction(f, f.make);
      appendTextToAction(f, f.model);
    }
    
    document.location.href = f.action + qs;
  }
    
  return false;
}
