
/* Reloads the parent window and closes the current window. Good for popups with selections */
function reload_parent_and_close() {
    opener.location.reload(true);
    self.close();
}

/* Opens pop up window of URL*/
function popUp(URL, popwidth, popheight) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + popwidth + ",height=" + popheight + "');");
}

/* erases text (identical to str) in form field and sets black text */
function focusMe(e,str) {
  if(e.value == str) {
    e.value = "";
    e.style.color = "#000";
  }
}

/* inserts text (str) in form field and sets grey text (useful to populate with field name)*/
function blurMe(e,str) {
  if(e.value == "") {
    e.style.color = "#999";
    e.value = str;
  }
}

