<!-- Hide from old browsers

/*---------------------------------
function stopError() { 
  //kills js errors after squishing banner
  return true;
}
window.onerror = stopError;
---------------------------------*/

// OPEN LINKS IN EXTERNAL 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;


//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();
}


//Jump menu opening links in new window
function newWindow(options) {
	var url = options[options.selectedIndex].value;
	var winArgs = "toolbar=1,location=1,directories=1,status=1,\
	menubar=1,scrollbars=1,resizable=1";
    winArgs+= "top=20,left=20,width=700,height=440";
	if  (options[options.selectedIndex].value != 0) {
		var launchNewWindow = open(url,"newlink",winArgs);
 	}
}


//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;
  imgString = "width="+winW+",height="+winH+",\
  left="+winL+",top="+winT;
  doFotoPopup = window.open(img,"",imgString);
}

// end hiding -->