// sbio.no

// functions.js
function newTarget(B){var A=document.createAttribute("target");A.value="_blank";B.setAttributeNode(A)}function popUp(B,C,A){window.open(B,"popup","toolbar=0,location=0,statusbar=0,menubar=0,resizable=1,scrollbars=yes,width="+C+",height="+A+",left = 100,top = 50")}function validateEmail(A){return A.value.match(/^\w(\.?[\w-])*@\w(\.?[\w-])*\.[a-z]{2,6}$/)};

// common.js
function ajaxSubmitForm(id,formId) {
  new Ajax.Updater(id, '/', {
  asynchronous:true,
  parameters:Form.serialize(document.getElementById(formId))});
  return false;
}
function popUp(URL) {
  day = new Date();
  id = day.getTime();
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,location=0,statusbar=0,menubar=0,resizable=1,scrollbars=yes,width=760,height=800,left = 242.5,top = 112');");
  setTimeout("checkPop('"+id+"', '"+URL+"')", 2000);
}
function checkPop(id, URL) {
  eval("obj = page"+id+";")
  if (obj==undefined) {
    document.location = URL;
  }
}
// dropdown.js
function jumpto(x){
  if (document.form1.jumpmenu.value != "null") {
    document.location.href = x;
  }
}