/* function for opening targets in a new window */
function newTarget(linkObj) {
    var attr = document.createAttribute('target');
    attr.value = '_blank';
    linkObj.setAttributeNode(attr);
}

/* function for creating a popup window with no toolbars */
function popUp(url, width, height) {
  window.open(url, 'popup', 'toolbar=0,location=0,statusbar=0,menubar=0,resizable=1,scrollbars=yes,width=' + width + ',height=' + height + ',left = 100,top = 50');
}

/* function for validating email inputs */
function validateEmail(input) {
  return input.value.match(/^\w(\.?[\w-])*@\w(\.?[\w-])*\.[a-z]{2,6}$/);
}