/****************************************************************/
/* This Function links to a catalog entry by dynamically 	*/
/* writing the html						*/
/*								*/
/* Inputs: IndexLink, link to catalog index page for entry	*/
/*         BibLink, link to catalog bibliography page for entry	*/
/* 								*/
/* Postcondition, catalog page will be displayed at spots	*/
/*   for IndexLink and BibLink					*/
/****************************************************************/

function CatalogLink (IndexLink, BibLink) {
  if (!IndexLink || !BibLink){
    alert ("Data for catalog not available");
    return;
  }
  top.document.write("<frameset cols='30%,*' framespacing='0' ",
    "frameborder='0' border='0'>",
    "  <frameset rows='40%,*'>",
    "    <frame name=alpha",
    " src='",
    "http://bell.lib.umn.edu/cat/alpha.html'>",
    "    <frame name=menu",
    " src='",
    "http://bell.lib.umn.edu/cat/"+IndexLink,
    "'>",
    "  </frameset>",
    "  <frame name=main",
    " src='",
    "http://bell.lib.umn.edu/cat/"+BibLink,
    "'>",
    "</frameset>");
  top.document.close();
}

/*
function LinkMap (name) {

  alert ("This function is currently being revised");
  return;

  var cpath = "http://bell.lib.umn.edu/hist/";
  var stuff;
  stuff = new Cookie (document, "ImageStuff", 0, "/");
  stuff.image = MapNum;
  stuff.store();

  var d = top.document;
  var tstr = "";
  tstr = MapNum;

  stuff.load();

  top.document.location = cpath;
}
*/

function LinkMap (name) {

  var cpath = "http://bell.lib.umn.edu/hist/";
  var stuff;
  var information;

  information = new Cookie (document, "DocInfo", 0);
  information.load ();

  stuff = new Cookie (document, "ImageStuff", 0, "/");
  stuff.n = true;
  stuff.name = name;
  stuff.store();
 
  if (information.NewWindow == 1)
    close(); 
  else
    top.document.location = cpath;

}
