function launchPrev(resource_id) {
  var prevWin = window.open("./preview?resource=" + resource_id,"preview","width=400,height=250,scrollbars=yes,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
  prevWin.focus();
}

function launchPrev2(site) {
  var prevWin2 = window.open("./preview2.html","preview2","width=400,height=250,scrollbars=yes,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
  prevWin2.focus();
}

function launchResource(site){
  var resourceWin = window.open(site,"resource");
  resourceWin.focus();
}

function launchLinkfreq(){
  var linkfreqWin = window.open("./linkfreq.html","linkfreq","width=250,height=100,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
  linkfreqWin.focus();
}

function launchEmailList() {
	 var emailListWin = window.open("./email_list", "emaillist", "width=350,height=350,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 emailListWin.focus();
}

function launchSuggestResource() {
	 var suggestResourceWin = window.open("./suggest_resource", "suggestresource", "width=350,height=450,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 suggestResourceWin.focus();
}

function launchSearchTips() {
	 var launchSearchWin = window.open("./templates/search_tips.html", "searchtips", "width=350,height=250,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchSearchWin.focus();
}

function launchHelp() {
	 var launchHelpWin = window.open("./templates/help.html", "help", "width=475,height=475,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchHelpWin.focus();
}

function launchPrivacy() {
	 var launchPrivacyWin = window.open("./templates/privacypolicy.html", "privacypolicy", "width=525,height=475,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchPrivacyWin.focus();
}

function launchDisclaimer() {
	 var launchDisclaimerWin = window.open("./templates/disclaimer.html", "infodisclaimer", "width=350,height=375,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchDisclaimerWin.focus();
}

function launchDirections() {
	 var launchDirectionsWin = window.open("./templates/directions.html", "directions", "width=350,height=375,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchDirectionsWin.focus();
}

function launchHistory() {
	 var launchHistoryWin = window.open("./templates/history.html", "history", "width=350,height=330,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchHistoryWin.focus();
}

function launchFunding() {
	 var launchFundingWin = window.open("./templates/funding.html", "funding", "width=350,height=330,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchFundingWin.focus();
}

function launchAcknowledgements() {
	 var launchAcknowledgementsWin = window.open("./templates/acknowledgements.html", "acknowledgements", "width=350,height=330,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchAcknowledgementsWin.focus();
}

function launchVisitor() {
	 var launchVisitorWin = window.open("./templates/visitor.html", "visitorservices", "width=350,height=350,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchVisitorWin.focus();
}

function launchLinkFreq() {
	 var launchVisitorWin = window.open("./templates/linkfreq.html", "linkfreq", "width=350,height=180,scrollbars=no,left=50,top=50,screenx=50,screeny=50,resizable=no,toolbar=no,status=no,location=no");
	 launchVisitorWin.focus();
}

function imgSwap() {
  /*
   * imgSwap() : An image source swap function
   * Usage: imageSwap('imgName1','imgSrc1','imgName2','imgSrc2',...,'imgNameN','imgSrcN');
   * Author: Ed Shin (AgnewMoyerSmith) Sept 2000
   *
   * Takes multiple arguments, alternate the image namd and the associated image source:
   */
  var imgObj;
  for (var j=0; j < (arguments.length/2); j++) {
    imgObj = checkImg(arguments[2*j]);
    imgObj.src = arguments[2*j + 1];
  }
}

function checkImg(img_id) {
  /*
   * checkImg()
   * Author: Ed Shin (AgnewMoyerSmith) Sept 2000
   *
   * Takes the ID of a positioned Image element and returns the object reference.
   * It is needed to retrieve imaged nested within other layers, needed for NN 4.
  */
  var theObj,i,j,x,layerQ=new Array();
  // IE
  if (document.all) {
    // the IE document.all array will contain the Image object
    // even if it is nested within "layer" (div,span) tags.
    //var log = "";
    //for (var x=0; x<document.images.length; x++) {
    //  log += document.images[x].name + '\r';
    //}
    //alert (log);
    theObj = document.images[img_id];
  }
  else if(document.layers) {
    // Netscape: Searching in nested layers...
    // check for the images at root level first.
    if (document.images.length) {
      for (x=0; x<document.images.length; x++) {
        // if the Image object you want is in there, return the object
        if(document.images[x].name == img_id) {
          theObj = document.images[x];
          return theObj;
        }
      }
    }

    with (document) {
      // create a copy of the layers into layerQ array
      // because we will be adding additional objects (nested layers objects) to it
      for (i=0; i<layers.length; i++) {
        layerQ[i]=layers[i];
      }
      for (i=0; i<layerQ.length; i++) {
        // if the current layer contains Image objects,
        // check to see if the image you want is in there.
        if (layerQ[i].document && layerQ[i].document.images.length) {
          for (x=0; x<layerQ[i].document.images.length; x++) {
            // if the Image object you want is in there, return the object
            if(layerQ[i].document.images[x].name == img_id) {
              theObj = layerQ[i].document.images[x];
              return theObj;
            }
          }
        }
        // if the layer object contains additional layers (div & spans)
        if (layerQ[i].document && layerQ[i].document.layers.length) {
          // add the nested layers to the WM_layers array...
          // this for loop will end then ALL nested layers are added
          // to the layerQ array...
          for (j=0; j<layerQ[i].document.layers.length; j++) {
            layerQ[layerQ.length] = layerQ[i].document.layers[j];
          }
        }
      }
    }
  }
  return theObj;
}

function WM_checkInLt(id) {
/*
 * WM_checkInLt() : Takes the ID of a positioned HTML element and returns an object reference.
 *  Usage: WM_checkIn('id')
 * Source: Webmonkey Code Library (http://www.hotwired.com/webmonkey/javascript/code_library/)
 * Author: Taylor
 */
  // This function checks for DOM strategy, then
  // returns an object reference.
  if (document.all) {
    return document.all[id].style;
  } else if(document.layers) {
    return document.layers[id];
  }
}