// When a form includes multiple Submit buttons, use this function to
// parameterize their desired actions.

function submitMethod(target) {
	var currForm=document.forms[0]; 
 	currForm.method.value=target;
 	currForm.submit();
}

// Used to open the "add a note" popup window.
//
// (This method is used only on the admin side, but it seemed excessive to
// create a special file for it alone.  So it lives here in the scripts file
// that accessible to both of the app's modules.)
function NewWindow(mypage,myname,w,h,scroll){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  var settings  ='height='+h+',';
      settings +='width='+w+',';
      settings +='top='+wint+',';
      settings +='left='+winl+',';
      settings +='scrollbars='+scroll+',';
      settings +='resizable=yes';
  win=window.open(mypage,myname,settings);
  if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
