<!-- Hide from old browsers

function stopError() {
  //kills js errors after squishing banner
  return true;
}
window.onerror = stopError;

//Open external links in new window.
function externalLinks() {
  if (!document.getElementsByTagName) return;
  var anchors = document.getElementsByTagName("a");
  for (var i=0; i<anchors.length; i++) {
    var anchor = anchors[i];
    if (anchor.getAttribute("href") &&
        anchor.getAttribute("rel") == "external")
      anchor.target = "_blank";
    }
}
window.onload = externalLinks;


// OPEN CENTERED POPUP
window.name = 'mainwindow';
function NewWindow(mypage, myname, w, h, scroll) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',\
  left='+winl+',scrollbars='+scroll+',resizable'
  win = window.open(mypage, myname, winprops)
  if (parseInt(navigator.appVersion) >= 4) { 
	win.window.focus(); 
  }
}


//Reusable popup window
//Script allows addition of window dimensions inline
function reusablePop(mypopupurl,mypopupname,sizew,sizeh,popuppos) {
  if(popuppos=="center") {
    leftpos=(screen.width)?(screen.width-sizew)/2:100;
   toppos=(screen.height)?(screen.height-sizeh)/2:100;
  }
  else if((popuppos!='center') || popuppos==null) {
    leftpos=+0;
    toppos=+0
  }
  //Set the window properties
  winpopoptions="width=" + sizew + ",\
  height=" + sizeh + ",\
  top=" + toppos + ",\
  left=" + leftpos + ",\
  scrollbars=yes,location=no,directories=no,status=no,\
  menubar=no,toolbar=no,resizable=yes";
  //Configure the window launcher
  winOpener=window.open(mypopupurl,mypopupname,winpopoptions);
  winOpener.focus();
}


//OPEN IMAGE LINKS IN NEW POPUP WINDOW
//New window automatically takes the size of the image.
function openFoto(img){
  foto= new Image();
  foto.src=(img);
  Controller(img);
}
function Controller(img){
  if((foto.width!=0)&&(foto.height!=0)){
    viewFoto(img);
  }
  else{
    operation="Controller('"+img+"')";
    interval=setTimeout(operation,20);
  }
}
function viewFoto(img){
  winL=20;
  winT=20;
  winW=foto.width+10;
  winH=foto.height+10;
  string="width="+winW+",height="+winH+",left="+winL+",top="+winT;
  doFotoPopup=window.open(img,"",string);
}

// end hiding -->