// Javascript Functions for Publications and Software Section of CLU-IN Website
// Developed by Abt Associates Inc., www.abtassoc.com

// Created: December 26, 2000 by Michael Muller, michael_muller@abtassoc.com
// Last Updated: January 15, 2001 by Michael Muller, michael_muller@abtassoc.com

 if (navigator.appVersion.substring(0,1) >= 3) {

  recent_postings1	= new Image (128,16);
  recent_postings1.src	= "../../images/recent_postings1.gif";
  recent_postings2	= new Image (128,16);
  recent_postings2.src	= "../../images/recent_postings2.gif";
  recent_postings3	= new Image (128,16);
  recent_postings3.src	= "../../images/recent_postings3.gif";
  
  custom_search1	= new Image (128,16);
  custom_search1.src	= "../../images/custom_search1.gif";
  custom_search2	= new Image (128,16);
  custom_search2.src	= "../../images/custom_search2.gif";
  custom_search3	= new Image (128,16);
  custom_search3.src	= "../../images/custom_search3.gif";

  alphabetical_list1		= new Image (141,16);
  alphabetical_list1.src	= "../../images/alphabetical_list1.gif";
  alphabetical_list2		= new Image (141,16);
  alphabetical_list2.src	= "../../images/alphabetical_list2.gif";
  alphabetical_list3		= new Image (141,16);
  alphabetical_list3.src	= "../../images/alphabetical_list3.gif";

  search_by_category1		= new Image (128,16);
  search_by_category1.src	= "../../images/search_by_category1.gif";
  search_by_category2		= new Image (128,16);
  search_by_category2.src	= "../../images/search_by_category2.gif";
  search_by_category3		= new Image (128,16);
  search_by_category3.src	= "../../images/search_by_category3.gif";

  search1	= new Image (70,28);
  search1.src	= "images/search_button1.gif";
  search2	= new Image (70,28);
  search2.src	= "images/search_button2.gif";

  custom_search_title1		= new Image (520,24);
  custom_search_title1.src	= "images/custom_search_title1.gif";
  custom_search_title2		= new Image (520,24);
  custom_search_title2.src	= "images/custom_search_title2.gif";
  
}

///////////////////////////////////////////////////
// Switches a single image (with preloaded images)
///////////////////////////////////////////////////

function switchImage(imageName,newImage) {
  if (navigator.appVersion.substring(0,1) >= 3) {
    document.images[imageName].src = eval(newImage + ".src")
  }
}

/////////////////////////////////////////////////
// Switches 2 distinct images with mouse effect
/////////////////////////////////////////////////

function switchIndexPair(imageID1,imageName1,imageID2,imageName2) { 
  if (navigator.appVersion.substring(0,1) >= 3) {
    document.images[imageID1].src = eval(imageName1 + ".src")
    document.images[imageID2].src = eval(imageName2 + ".src")
  }
}

/////////////////////////////////////////////////
// Switches 4 distinct images with mouse effect
/////////////////////////////////////////////////

function switchQuartet(imageID1,imageName1,imageID2,imageName2,imageID3,imageName3,imageID4,imageName4) { 
  if (navigator.appVersion.substring(0,1) >= 3) {
    document.images[imageID1].src = eval(imageName1 + ".src")
    document.images[imageID2].src = eval(imageName2 + ".src")
    document.images[imageID3].src = eval(imageName3 + ".src")
    document.images[imageID4].src = eval(imageName4 + ".src")
  }
}

