function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function canAcceptBehavior(){
  return true;
}
function behaviorFunction(){
  return "MM_openBrWindow";
}
function applyBehavior() {
  var i,theURL,theName,arrayIndex = 0;
  var argArray = new Array; //use array to produce correct number of commas w/o spaces
  var checkBoxNames = new Array("toolbar","location","status","menubar","scrollbars","resizable");

  for (i=0; i<checkBoxNames.length; i++) {
    theCheckBox = eval("document.theForm." + checkBoxNames[i]);
    if (theCheckBox.checked) argArray[arrayIndex++] = (checkBoxNames[i] + "=yes");
  }
  if (document.theForm.width.value)
    argArray[arrayIndex++] = ("width=" + document.theForm.width.value);
  if (document.theForm.height.value)
    argArray[arrayIndex++] = ("height=" + document.theForm.height.value);
  theURL = dw.doURLEncoding(document.theForm.URL.value);
  theName = document.theForm.winName.value;
  if (badChars(theName)) return MSG_BadChars;
  else return "MM_openBrWindow('"+theURL+"','"+theName+"','"+argArray.join()+"')";
}
function identifyBehaviorArguments(fnCallStr) {
  var argArray;

  argArray = extractArgs(fnCallStr);
  if (argArray.length == 4) {
    return "NAV,other,other";
  } else {
    return "";
  }
}
function inspectBehavior(enteredStr) {
  var i;
  var argArray = extractArgs(enteredStr);

  if (argArray.length == 4) {  //first arg is fn name, so ignore that
    document.theForm.URL.value = unescape(argArray[1]);
    document.theForm.winName.value = argArray[2];
    var featuresStr = argArray[3];
    var tokArray = getTokens(featuresStr, "=,");

    var checkBoxNames = new Array("toolbar","location","status","menubar","scrollbars","resizable");
    for (i in checkBoxNames) {
      if (featuresStr.indexOf(checkBoxNames[i]) != -1)
        theCheckBox = eval("document.theForm." + checkBoxNames[i] + ".checked = true");
    }
    for (i=0; i < (tokArray.length-1); i++) {
      if (tokArray[i] == "height") document.theForm.height.value = tokArray[i+1];
      if (tokArray[i] == "width")  document.theForm.width.value = tokArray[i+1];
    }
  }
}
function initializeUI(){
  document.theForm.URL.focus(); //set focus on textbox
  document.theForm.URL.select(); //set insertion point into textbox
}

