/***************************************************
**                                                **
** Title: Pop-Up JavaScript Library               **
** Date: August 23, 2000                          **
** Author:  Kofi Garbrah                          **
** Purpose: Causes a new window to be opened      **
**          containing an html document. This new **
**          window will NOT contain the toolbars  **
**          or navigation bars of an internet     **
**          browser but it CAN be scrolled or     **
**          resized.                              **
**                                                **
****************************************************/

// Global Variable
// This variable represents the Pop-Up window
var PopUp;

// This function compensates for the change in
// how we numbered the images; we went from a
// Two digit system to an alphabetical sytem.
// Rather than re-code over 1000 webpages,
// I decided to change this one file instead.
//
//  -Kofi Garbrah
//
function correct_old_numbering(doc) 
{
	var newdoc;
	var number = doc.substring(1,doc.indexOf("_"));
	var name = doc.substring(doc.indexOf("_"),doc.length);
	if ((doc.substring(0,1) == "i") && (number.length > 0))
		doc = "i" + name;
	return doc;

}

// Generates a Pop-Up window that has
// no directories and no menu or toobars.  
// This window can be resized, however.
//
// - Kofi Garbrah
//
function pop_up(html_document) 
{
	var PopUpString =
         "toolbar=no,location=no,directories=no,status=no," +
         "menubar=no,scrollbars=yes,resizeable=yes," +
          "width=595,height=448";
	
	var new_html_document = window.open(html_document, "", PopUpString);
	//PopUp = window.open(new_html_document, "HeritageTrail", PopUpString);


}
function pop_upp(html_document) 
{
	var PopUpString =
         "toolbar=no,location=no,directories=no,status=no," +
         "menubar=no,scrollbars=yes,resizeable=yes," +
          "width=584,height=588";
	
	var new_html_document = window.open(html_document, "", PopUpString);
	//PopUp = window.open(new_html_document, "HeritageTrail", PopUpString);


}
function vid_pop_up(html_document) 
{
	var PopUpString ="width=400,height=310";
	
	PopUp = window.open(html_document, "Videos", PopUpString);
PopUp.focus();

}

//function that swaps pictures
function Switch(imgName,imgObjName) 
{
  if (document.images) 
  {
	   document.images[imgName].src = eval(imgObjName + ".src");
  }
}
