function openLink(selectBox, linkId, srcArr) {
  var name=selectBox.options[selectBox.selectedIndex].text;
  var value=selectBox.options[selectBox.selectedIndex].value;
  if (value!="") {
    var newWin=false;
    if (navigator.userAgent.indexOf("Gecko")!=-1) {
      newWin=srcArr[selectBox.selectedIndex-1][2]=="Y";
    } else {
      newWin=selectBox.options[selectBox.selectedIndex].newWin=="Y";
    }
    if (newWin) {
      window.open(value);
      selectBox.selectedIndex=0;
    } else {
      if (navigator.userAgent.indexOf("Gecko")==-1) {
        document.getElementById(linkId).href=value;
        document.getElementById(linkId).click();
      } else {
        document.location.replace(value);
      }
    }
  }
}
function processDropDown(viewletArr, arrName, linkId, includeBlank) {
  //Build the select box
  var s="<select id=arrivaDropDown onchange=\"openLink(this, '"+linkId+"', '"+arrName+"')\">";
  if (includeBlank) s+="<option newWin=\"N\" value=\"\"></option>";
  for (var i=0; i<viewletArr.length; i++) {
    s+="<option newWin=\""+viewletArr[i][2]+"\" value=\""+viewletArr[i][1]+"\">"+viewletArr[i][0]+"</option>"
  }
  s+="</select>";
  //Write out a fake link to perform the change to keep the history
  var linkHtml="<a href=\"http://www.cygnite.com/\" id=\""+linkId+"\" style=\"display:none\"></a>";
  document.write(linkHtml);
  //Write the select box
  document.write(s)
} 
