﻿// Functions to control the visibility of elements when flash is being called or closed;
// and functions to control printing of flash and frames


// Called when the "Investments" button is clicked
function showInvestments() {

	// Show the div containing the flash
    var unhide;
	unhide = document.getElementById("investmentsHolder");
    unhide.className = 'contentVisible';
    
	// Hide divs holding frames to prevent interference with flash
	var hideFrame;
	hideFrame = document.getElementById("frameContentDiv");
    if(hideFrame) hideFrame.className = 'contentHidden';
   
	// Hide the divs holding frames on the bio pages
	var hideBio;
	hideBio = document.getElementById("bioFrameContentDiv");
    if(hideBio) hideBio.className = 'contentHidden'; 
    
	// Hide the side navigation 
	var hideNav;
	hideNav = document.getElementById("sideNavHolder");
    if(hideNav) hideNav.className = 'contentHidden';
   
	// Hide content other than the flash div when the print style sheet is called
	var hideContent;
	hideContent = document.getElementById("hideForPrint");
    if(hideContent) hideContent.className = 'hideForPrint'; 
}


// Called when the "Close" button is clicked in the investments flash
function hideInvestments() {
	// Hide the div holding the investments flash
    var hide;
	hide = document.getElementById("investmentsHolder");
    hide.className = 'contentHidden';
    
    // Unhide the divs holding frames 
    var unhideFrame;
	unhideFrame = document.getElementById("frameContentDiv");
    if(unhideFrame) unhideFrame.className = 'frameContentHolder';
   
	// Unhide the divs holding frames on the bios pages
	var unhideBio;
	unhideBio = document.getElementById("bioFrameContentDiv");
    if(unhideBio) unhideBio.className = 'bioContentRight'; 
    
	// Show the side navigation 
	var showNav;
	showNav = document.getElementById("sideNavHolder");
    if(showNav) showNav.className = 'sideNav';
   
	// Show all content when the print style sheet is called
	var showContent;
	showContent = document.getElementById("hideForPrint");
    if(showContent) showContent.className = ''; 
}


// Called when the "Letter" button is clicked
function showLetter() {
	// Show the div containing the flash
    var unhide;
	unhide = document.getElementById("letterHolder");
    unhide.className = 'contentVisible';
   
	// Hide content other than the flash div when the print style sheet is called
	var hideContent;
	hideContent = document.getElementById("hideForPrint");
    if(hideContent) hideContent.className = 'hideForPrint'; 
}


// Called when the "Close" button is clicked in the letter flash
function hideLetter() {
	// Hide the div holding the letter flash
    var hide;
	hide = document.getElementById("letterHolder");
    hide.className = 'contentHidden';
	
	// Show all content when the print style sheet is called
	var showContent;
	showContent = document.getElementById("hideForPrint");
    if(showContent) showContent.className = '';
}


// Used for "book" popup image
function popup1(filename) {
		
var pWindow=window.open(filename,'filename','width=450,height=636,scrollbars=no,location=no,menubar=no,toolbar=no,resizable=no,status=no,locationbar=no');
pWindow.focus();
		
}


// Called when "Print" button is clicked on pages containing frames to print the frame content
function zPrint(oTgt) {
	oTgt.focus();
	oTgt.print();
}


