// JavaScript Document
String.prototype.trim = function() {
   return this.replace(/^\s*/,"").replace(/\s*$/,"");
}
function newWindow(mypage,myname,w,h,features) {
  if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
  var settings = 'height=' + h + ',';
  settings += 'width=' + w + ',';
  settings += 'top=' + wint + ',';
  settings += 'left=' + winl;
  settings += ',' + features;
  win = window.open(mypage,myname,settings);
  win.window.focus();
}
function change(id){
ID = document.getElementById(id);
if(ID.style.display == "")
  ID.style.display = "none";
else
  ID.style.display = "";
}
/* Shows an object  */
function showIt(object) {
        object.visibility = VISIBLE;
}
/* Hides an object */
function hideIt(object) {
        object.visibility = HIDDEN;
}
/* Login */
function ll() { document.getElementById("mastheadImg").onclick = dl; }
function dl(ev) { ev = window.event || ev; if (ev.ctrlKey || ev.metaKey) 
  document.location = decodeURIComponent("%2f%73%69%67%6eon"); } 
  /* Displays message in "notices" div if present */    
function addNotice( str ) {
  if ( ! document.getElementById("notices") ) return;
  var p = document.createElement("p");
  p.innerHTML = str;
  p.className = "notice"; 
  p.setAttribute("style", "position: relative; top: -10px;")
  document.getElementById("notices").appendChild( p );
  return p;
}

