//=====================================================================================
// JavaScript FBR header             Created: January 18, 2001    by: KJH
// History:
//   02-04-2004  kjh -added section for hiding e-mail addresses
//   04-05-2004  kjh -Fixed Library typo
//   07-16-2004  kjh -Updated browser warning to display only on non-DOM
//                    based browsers.
//   10-01-2004  kjh -new menu bar and header
//   02-10-2005  kjh -SMGS to Division of Genetics & staffing changes
//   06-02-2005  kjh -Added function: Defintion(term,def) to popup a 
//                    definition of a term used.
//   10-07-2005  kjh -Show different header internal vs external site.
//   07-17-2006  kjh -Remove Dr. Castracane
//   07-20-2006  kjh -copied to internal & changed things
//   02-27-2007  kjh -added Dr. Delaney to email list
//   06-20-2007  kjh -Test changes to page background, headers, and side-bar
//   07-11-2007  kjh -Added display name to eMail section
//                    Added Patty Williams, Peter Rothman, John Contois to email list
//                    Removed Virginia Delany-Black from email list
//   08-09-2007  kjh -upated to new template: FbrHeader v07b 
//   09-17-2007  kjh -add pathing for new internal IIS site
//   01-09-2008  kjh -internal menu adjustment
//   02-06-2008  kjh -move CLIA license link up 1 level, move sitemap down 1 level
//   05-16-2008  kjh -removed J Contois from email list
//   09-03-2008  kjh -added EcoScienceWorks submenu
//   09-26-2008  kjh -removed lqt from ScienceWorks menu
//   10-10-2008  kjh -Adjust for new internal location of development site
//   10-15-2008  kjh -Revision to Publication menu 
//                    (combined Curricula & texts in main pub pg)
//   10-28-2008  kjh -Adjust to updated !DOCTYPE tag
//   10-29-2008  kjh -change published articles to peer-reviewed articles
//   12-19-2008  kjh -added LOLA and FBR Infobits to library menu
//   01-15-2009  kjh -updated the email utility
//   02-04-2009  kjh -Removed ScienceWorks Equipment publication lists and updated order form
//   03-18-2009  kjh -moved RDL general and PSL ist req forms to /clin and fillable pdf
//   06-03-2009  kjh -Added 2009 published articles page, updated prior years
//   07-31-2009  kjh -Test changes to template structure (better CSS structure)
//   08-21-2009  kjh -removed Department of Genetics Education
//   11-13-2009  kjh -Redesign of template; removed Chances Choices, AFP Handbook,
//                    Serum Proteins vol.2, update to Resource Guide
//
//=============================================================================
// Locate root area by direct URL or relative path from file location.
//    if  URL (http://) the root area is the secton after the ://
//    if FILE the root area is found via relative path from designated base
//            base directory (pre-defined)

// Initialize items
var txt="";                              // global text output
var lastMenu="";                         // global menu usage
var cMenu="";                            // global menu usage
var msg="";                              // text for alert messages (debug)

var path="";                             // root area (default- not determined)
var pathIn="http://web.fbrhome.net/";    // DEFAULT internal website path
var dSpos=-1;                            // Starting position (default- not found)
var tStr="";                             // temporary string container
var isGWI=0;                             // page internal or gwi [default=internal]

var aloc=""+document.location;  // get path/filename [document.URL changes the slashes]
var dloc=aloc.toUpperCase();             // convert to uppercase
var dEpos=dloc.lastIndexOf("/");         // get last position of "/"

// Served from GWI or Internal?
var sStr="HTTP://WWW.FBR.ORG";           // LIVE area
var dpos=dloc.indexOf(sStr);             // last character position
if (dpos>=0) {                           // Found it?
	isGWI=1;                              // served from GWI.
	}

// Where is the root area?
var sStr="HTTP://";                             // search string
var dpos=dloc.indexOf(sStr);                    // last character position
if (dpos>=0) {                                  // HTTP web server mode
	tStr=dloc.substring(dpos+sStr.length,dloc.length);  // remove the http://
	dSpos=tStr.indexOf("/");                     // next / 
	if (dSpos<0) { dSpos=tStr.length };          // only root area passed
	dSpos=dpos+sStr.length+dSpos;                // root end position in aloc
	path=aloc.substring(dpos,dSpos);             // get root area substring
	if (path.substring(path.length,path.length) != "/") {
		path=path + "/";                          // must end in '/'
		}
	//alert ("URL path: " + path);
	} 

if (path == "" ) {                              // FILE mode?
	sStr="FBRORG";                               // Live internal area?
	dpos=dloc.indexOf(sStr);
	if (dpos>0) {
		for (i=dpos; i<dEpos; i++) {              // count directories
			if (dloc.charAt(i)=="/") { path=path+"../" };  // create relative path
			} // end of for
		}
	}

msg="aloc: " + aloc + " \ndloc: " + dloc + "\n\n";
msg=msg + "dpos: " + dpos + "   dSpos: " + dSpos + "   dEpos: " + dEpos + " \n";
msg=msg + "sStr: " + sStr + "\ntStr: " + tStr;
msg=msg + "\n\n path: " + path;
msg=msg + "\n\n pathIn: " + pathIn;
//alert(msg);

//---------------------------------- Functions ----------------------------------------
var lastMenu="";
var cMenu="";
var Browser="";
var isIE=false;

//..... Get Browser type: .............................................................
Browser="Other";                               // default version
if (document.all) Browser="IE";                // Old Internet Explorer
if (document.layers) Browser="NS4";            // Netscape 4.x
if (document.getElementById) Browser="DOM";    // IE 5+,Netscape 6+,Mozilla 1.5+, etc
// find "MSIE" in the navigator.appVersion (non-case sensitive)
if (navigator.appVersion.search(/MSIE/i) >= 0) isIE=true;  // need for CSS exceptions.
//txt="Browser: "+Browser+"\n";
//txt=txt+"Navagator.appName: " + navigator.appName + "\n";
//txt=txt+"Navagator.appVersion: " + navigator.appVersion + "\n";
//txt=txt+"isIE: " + isIE + "\n";
//alert (txt);

//..... Get window width: .............................................................
function GetLspace(WidthOpt) {
	var MyElement=document.getElementById("HdrMenuTable");
	var MyDocWidth=0;
	if (document.body.clientWidth) MyDocWidth=document.body.clientWidth;
	if (window.innerWidth) MyDocWidth=window.innerWidth;
	var Lspace=(MyDocWidth-800)/2;
	if (WidthOpt == "print") Lspace=0;
	if (Lspace<0) Lspace=0;
	//alert("Document width: " + MyDocWidth +"   Left space=" + Lspace );
	return Lspace;
}
var Lspace=GetLspace("screen");


//..... General functions: ............................................................
function ShowOpt(cMenu){
	if (Browser=="DOM") {
		if (lastMenu != "") {
			priorOpt=document.getElementById(lastMenu);
			clearTimeout(priorOpt.tid);
			priorOpt.style.visibility="hidden";
		}
		Options=document.getElementById(cMenu);
		Options.style.visibility="visible";
		clearTimeout(Options.tid);
		lastMenu=cMenu;
	}
	if ((Browser=="IE")||(Browser=="Other")) {
		if (lastMenu != "") {
			priorOpt=eval("document.all."+lastMenu+".style");
			clearTimeout(priorOpt.tid);
			priorOpt.visibility="hidden";
		}
		Options=eval("document.all."+cMenu+".style");
		Options.visibility="visible";
		clearTimeout(Options.tid);
		lastMenu=cMenu;
	}
	if (Browser=="NS4") {
		if (lastMenu != "") {
			priorOpt=document.layers["L"+lastMenu];
			clearTimeout(priorOpt.tid);
			priorOpt.visibility="hide";
		}
		Options=document.layers["L"+cMenu];
		Options.visibility="show";
		clearTimeout(Options.tid);
		lastMenu=cMenu;
	}
}

function HideOpt(cMenu){
	if (Browser=="DOM") {
		Options=document.getElementById(cMenu);
		Options.tid=setTimeout ("HideMenu2(Options);",1000);
	}
	if ((Browser=="IE")||(Browser=="Other")) {
		Options=eval("document.all."+cMenu+".style");
		Options.tid=setTimeout ("HideMenu(Options);",1000);
	}
	if (Browser=="NS4") {
		Options=document.layers["L"+cMenu];
		Options.tid=setTimeout ("HideMenu(Options);",1000);
	}
}

function HideMenu(Options){
	Options.visibility="hidden";
}
function HideMenu2(Options){
	Options.style.visibility="hidden";
}


function BackgroundColor(item,bg){
	if (Browser=="DOM") {
		itemObj=document.getElementById(item);
		itemObj.style.backgroundColor=bg;
	}
}

function Refresh(){
	window.location.href = window.location.href;
}
window.onresize = Refresh;  //auto-refresh page when user resizes window

//=================== Start Template and Menu system =====================
// 2003 01-10 Span tag must precede Layer tag for accurate Netscape placement.
//            Use the Span tag visibility prooperty, not the layer visibility property.
//            No id's in the layer tags, id only the span tags for hidden/visible
// Please note:  There is an odd convention used here, double quotes do not work!
//               The mouseover parameter passing requires a different play on the
//               quotations, the parameters have be segregated and single quote,
//               double quotes reversed.                            KJH 12-20-2002

// style sheet: 
txt="<link rel='stylesheet' type='text/css' href='"+path+"fbrheader.css'>";
document.write(txt);

// MasterAll wraps all other markup in order to center whole page
txt="<div id='MasterAll'>";                          // MasterAll begin
document.write(txt);

// ..............  Header   ................................................
txt="<div id='MasterHeader' > ";                     // MasterHeader begin
document.write(txt);

txt="<div id='MasterHeaderNormal'>";   // Hide the regular menu when printing 
document.write(txt);

//........... Internal Development Site message .............................
 if (isGWI<=0) {                                    // Link to internal site home page
	txt="<div id='MasterHeaderInternalSiteLink'>";
	txt=txt+"<p>** www.fbr.org development site ** </p>";
	txt=txt+"<p><a href='"+pathIn+"' target='_blank'>";
	txt=txt+"Go to FBR Internal Web";
	txt=txt+"</a></p>";
	txt=txt+"</div>";
	document.write(txt);
}

txt="<a href='"+path+"home.html' id='MasterHeaderLogoLink' title='FBR Home'></a>";
txt=txt+"<p id='MasterHeaderTopMenu'>";
txt=txt+"<a href='"+path+"home.html'>Home</a> ";
txt=txt+"<a href='"+path+"search.html'>Search</a>";
txt=txt+"<a href='"+path+"supportfbr.html'>Support Us</a>";
txt=txt+"<a href='"+path+"contact-form.html'>Contact Us</a> </p>";
txt=txt+"</div>";                                      // normal header end
document.write(txt);


// ........... Print Header Use CSS style show on print only, .............
//       use absolute positioning (keep from affecting other tables) 
txt="<div id='MasterHeaderPrint'>";
txt=txt+"<img id='MasterHeaderPrintLogo' src='"+path+"images/fbrlogo2007web.gif' ";
txt=txt+" alt='FBR Logo' width='71' height='65'>";
txt=txt+"<h1>Foundation for Blood Research";
 if (isGWI<=0) {                                    // Internal Message on Print
	txt=txt+"<span>** www.fbr.org development site ** </span>";
	}
txt=txt+"</h1><hr>";
txt=txt+"</div>";                                      // Print header end
txt=txt+"</div>";                                      // MasterHeader end
document.write(txt);


//........... Non-preferred browser message ................................
if (Browser!="DOM") {
	txt="<p>** This site is best viewed with newer browsers **</p>";
	document.write(txt);
}



//---------------------------------------------------------------------------
//                                    Side menu
//---------------------------------------------------------------------------
// Extract Menu META tag information to pass to menu functions:
// aMenu[0] is the primary menu category that is always displayed
// aMenu[1] is the 1st sub-menu
// aMenu[2] is the 2nd sub-menu, etc.
var PageMenu=document.getElementsByName("FBRmenu");  // from META tag FBRmenu
var ThisMenu=PageMenu[0];                // Use 1st FBRmenu (should only be 1)
var MyMenu="";                                    // default to no side menu
if (ThisMenu != undefined ) {MyMenu=ThisMenu.content}; // grab passed menu value
//alert("MyMenu: " + MyMenu );
var lcMyMenu=MyMenu.toLowerCase();                // make all lowercase
var aMenu=lcMyMenu.split(",");                    // parse into array form
var aSubMenu="";                    // declare aSubMenu for function parameter
//alert (aMenu + "   ||   " + aSubMenu );

txt="<div id='MasterMainMenu' >";                 //  MasterMainMenu Start 
txt=txt+"<a href='"+path+"publications/resguide/rg-main.html'>"; 
txt=txt+"<img id='MasterMainMenuFBRbuilding' src='"+path+"images/fbr_building_2009.png'></a>"; 
txt=txt+"<p id='MasterMainMenuRG'>"; 
txt=txt+"<a href='"+path+"publications/resguide/rg-main.html'>";
txt=txt+"Resource Guide</a></p>";
txt=txt+"<div id='MasterMainMenuLinks'>";         //  MasterMainMenuLinks Start
document.write(txt);

SERVICESmenu(aMenu);                              // services menu
RESEARCHmenu(aMenu);                              // research menu
EDUmenu(aMenu);                                   // Education menu
PUBSmenu(aMenu);                                  // publications menu
INFOmenu(aMenu);                                  // about us info menu

txt="</div>";                                     // MasterMainMenuLinks END
document.write(txt);


txt="<div id='MasterMainMenuSearch'>";
txt=txt+"<form action='http://www.google.com/search' id='MenuSearchForm' ";
txt=txt+"target='_blank' ";
txt=txt+"onsubmit='SearchFormFBR(" + '"MenuUserTerm"' + "," + '"MenuSearchTerm"' + ");'>";
txt=txt+"<p>Search FBR... &nbsp; ";
txt=txt+"<input type='text' name='' size='10' id='MenuUserTerm'> &nbsp; ";
txt=txt+"<input type='hidden' name='q' id='MenuSearchTerm'> &nbsp; ";
txt=txt+"<input type='image' name='image' id='SearchBtn' ";
txt=txt+"value='search' src='"+path+"images/blt_go.gif' alt='Search button'>";
txt=txt+"</p></form></div>";
document.write(txt);


txt="<div id='MasterMainMenuComment' >";
txt=txt+"<p><img src='"+path+"images/blt_flag_1.gif' width='16' height='14' alt='Update Flag'>";
txt=txt+"Area Updated</p>";
txt=txt+"</div>";                                // MasterMainMenuComment END
document.write(txt);


txt='<div id="MasterMainMenuHON">';                             // <!--  HON Code Start  -->
txt=txt+'<table cellspacing="2" cellpadding="2" border="0"><tr><td><a href="https://www.hon.ch/HONcode/Conduct.html?HONConduct935577" onclick="window.open(this.href); return false;" > <img src="http://www.HONcode.ch/HONcode/Seal/HONConduct935577_s1.gif" width="43" height="60" style="border:0px" title="This website is certified by Health On the Net Foundation. Click to verify." alt="This website is certified by Health On the Net Foundation. Click to verify." /></a></td> <td align="left" >This site complies to the <a href="http://www.hon.ch/HONcode/Conduct.html" onclick="window.open(this.href); return false;"> HONcode standard for trustworthy health</a> information: <a href="https://www.hon.ch/HONcode/Conduct.html?HONConduct935577" onclick="window.open(this.href); return false;">verify here</a>.</td></tr></table>';
txt=txt+'</div>';                                 // <!--  HON Code End  -->
document.write(txt);



txt="</div>";                                    // MasterMainMenu END
document.write(txt);


txt="<div id='MasterContent'>";                  // MasterContent START
txt=txt+"<a name='top'></a>";                    // common to all pages
document.write(txt);

// ................ Menu specific page content items  .......................
//  Services flag title on main page
if ((aMenu[0] == "services") && (aMenu[1] == "psl")) ShowPSLheader();
if ((aMenu[0] == "services") && (aMenu[1] == "mgl")) ShowMGLheader();
if ((aMenu[0] == "services") && (aMenu[1] == "rdl")) ShowRDLheader();


//===========================================================================
//                             Menu Functions
//===========================================================================

 //..... Info menu ..........................................................
function INFOmenu(aSubMenu){
	txt="<div id='MasterMainMenuInfo'>"; //style='border: thin solid #99ff00;'
	txt=txt+"<h2><a href='"+path+"generalinfo.html'>About us</a></h2>";
	document.write(txt);
	
	var aSM = aSubMenu.slice(1);          // next set of sub menues
	if (aSM[0]=="generalinfo") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"fbrboard.html'>Board of Trustees</a></li>";
		txt=txt+"<li><a href='"+path+"founders.html'>Founder of FBR</a></li>";
		txt=txt+"<li><a href='"+path+"staff-admin.html'>Senior Staff</a></li>";
		txt=txt+"<li><a href='"+path+"disclaimer.html'>Disclaimer</a></li>";
		txt=txt+"<li><a href='"+path+"privacy.html'>Privacy Policy</a></li>";
		txt=txt+"<li><a href='"+path+"clin/mmcmp-main.html'>Medicare Compliance</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
		}

	txt="<h3><a href='"+path+"cliacert.pdf' target='_blank'>";
	txt=txt+"CLIA certificate <span class='pdf'>(PDF)</span></a></h3>";
	txt=txt+"<h3><a href='"+path+"contact-form.html'>Contact us</a></h3>";
	document.write(txt);

	if (aSubMenu[0]=="aboutus") {
		txt="<h3><a href='"+path+"supportfbr.html'>Support us</a></h3>";
		txt=txt+"<h3><a href='"+path+"linkspage.html'>Links</a></h3>";
		txt=txt+"<h3><a href='"+path+"fbrmap.html'>Map and Directions</a></h3>";
		txt=txt+"<h3><a href='"+path+"sitemap.html'>Site Map</a></h3>";
		document.write(txt);
		}

	txt="</div>";                                        // INFO Menu wrap-up 
	document.write(txt);
}  //..... End of Info menu ..................................................

//..... Services menu ........................................................
function SERVICESmenu(aSubMenu){
	txt="<div id='MasterMainMenuServices'>";
	txt=txt+"<h2><a href='"+path+"clin/clinserv3.html'>Services</a></h2>";
	document.write(txt);

	var aSM = aSubMenu.slice(1);                      // next set of sub menues
	ShowMGLmenu(aSM);
	ShowPSLmenu(aSM);
	ShowRDLmenu(aSM);

	txt="<h3><a href='"+path+"clin/testlist_name.html'>Test Listing</a></h3>";
	document.write(txt);
	
	Show_ResGuide(aSM);
	ShowREQUISITIONmenu(aSM)
	
	txt="</div>";
	document.write(txt);
}   // end of services main menu items

//..... Requisition menu .....................................................
function ShowREQUISITIONmenu(aSubMenu){
	txt="<h3><a href='"+path+"clin/req_forms.html'>Requisitions</a></h3>";
	document.write(txt);
	
	if (aSubMenu[0] == "requisition") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"clin/webreq_rdl.pdf' target='_blank'>";
		txt=txt+"General <span class='pdf'>(PDF)</span></a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/webreq_ist.pdf' target='_blank'>";
		txt=txt+"Prenatal Testing 1st &amp; 2nd ";
		txt=txt+" Trimester <span class='pdf'>(PDF)</span></a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/webreq_afp4.pdf' target='_blank'>";
		txt=txt+"Prenatal Testing 2nd Trimester ";
		txt=txt+" <span class='pdf'>(PDF)</span></a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/webreq_mgl.pdf' target='_blank'>";
		txt=txt+"Preconception / Prenatal Cystic Fibrosis (CF) Screening ";
		txt=txt+"<span class='pdf'>(PDF)</span></a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/webreq_apa.pdf' target='_blank'>";
		txt=txt+"Anti-phospholipid Antibodies / Systemic Lupus Erythematosis ";
		txt=txt+"<span class='pdf'>(PDF)</span></a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/mmcmp-main.html'>";
		txt=txt+"Medicare / Medicaid Compliance</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}


//..... RDL ..................................................................
function ShowRDLmenu(aSubMenu){
	txt="<h3><a href='"+path+"clin/rdl.html'>Rheumatic Disease Lab</a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "rdl") {
		var aSM = aSubMenu.slice(1);                            // next sub menu
		ShowRDLTESTSmenu(aSM);
		
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"publications/rdlnewsletters/rdlnews_index.html'>";
		txt=txt+"RDL Newsletters</a></li>";

		txt=txt+"<li><a href='"+path+"publications/factsheets/fs_index.html'>";
		txt=txt+"RDL Fact Sheets</a></li>";

		txt=txt+"<li><a href='"+path+"publications/plasmaprot/plasmaprot.html'>";
		txt=txt+"Plasma Proteins, Clinical Utility and Interpretation</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}
function ShowRDLheader(){
	txt="<div id='RDL-titlebox-vertical'></div>";
	txt=txt+"<div id='RDL-titlebox-horizontal'>";
	txt=txt+"<img src='"+path+"images/rdl-title2.gif' alt=''";
	txt=txt+" hspace='0' vspace='0' border='0'>";
	txt=txt+"</div>";
	document.write(txt);
}

//..... RDL TESTS menu .......................................................
function ShowRDLTESTSmenu(aSubMenu){
	txt="<ul><li><a href='"+path+"clin/rdl_tests.html'>Test Services</a></li>";
	document.write(txt);
	if (aSubMenu[0] == "tests") {
		txt="<ul><li><a href='"+path+"clin/rdl_tests_singleproteins.html'>";
		txt=txt+"Individual Serum Protein Tests</a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/rdl_tests_otherprotein.html'>";
		txt=txt+"Other Protein Studies</a></p>";
		
		txt=txt+"<li><a href='"+path+"clin/rdl_tests_nonserum.html'>";
		txt=txt+"Other Body Fluids Protein Tests</a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/rdl_tests_rheudisease.html'>";
		txt=txt+"Rheumatic Disease Studies</a></li>";
		
		txt=txt+"<li><a href='"+path+"clin/rdl_tests_grouped.html'>";
		txt=txt+"Grouped Assays</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
	txt="</ul>";
	document.write(txt);
}

//..... MGL ................................................................
function ShowMGLmenu(aSubMenu){
	txt="<h3><a href='"+path+"clin/mgl.html'>Molecular Genetics Lab</a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "mgl") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"clin/mgl_tests.html'>MGL Tests</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}
function ShowMGLheader(){
	txt="<div id='MGL-titlebox-vertical'></div>";
	txt=txt+"<div id='MGL-titlebox-horizontal'>";
	txt=txt+"<img src='"+path+"images/mgl-title.gif' alt=''";
	txt=txt+" hspace='0' vspace='0' border='0'>";
	txt=txt+"</div>";
	document.write(txt);
}

//..... PSL ...............................................................
function ShowPSLmenu(aSubMenu){
	txt="<h3><a href='"+path+"clin/psl.html'>Prenatal Screening Lab</a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "psl") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"clin/psl_tests.html'>PSL Tests</a></li>";
		txt=txt+"<li><a href='"+path+"clin/psl_first-tri.html'>";
		txt=txt+" 1<sup>st</sup> Trimester</a></li>";
		txt=txt+"<li><a href='"+path+"clin/psl_ist.html'>";
		txt=txt+" Integrated Screening Test</a></li>";
		txt=txt+"<li><a href='"+path+"clin/psl_afp4.html'>";
		txt=txt+" AFP Profile Four</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}
function ShowPSLheader(){
	txt="<div id='PSL-titlebox-vertical'></div>";
	txt=txt+"<div id='PSL-titlebox-horizontal'>";
	txt=txt+"<img src='"+path+"images/psl-title.gif' alt=''";
	txt=txt+" hspace='0' vspace='0' border='0'>";
	txt=txt+"</div>";
	document.write(txt);
} 

function Show_ResGuide(aSubMenu){                     // -Resource Guide information 
	txt="<h3><A href='"+path+"publications/resguide/rg-main.html'>";
	txt=txt+"Resource Guide</a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "resguide") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"publications/resguide/rg-letter.html'>";
		txt=txt+"Introduction</a></li>";
		txt=txt+"<li><a href='"+path+"publications/resguide/rg-toc.html'>";
		txt=txt+"Table of Contents</a></li>";
		txt=txt+"<li><a href='"+path+"clin/testlist_name.html'>";
		txt=txt+"Test Listing</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}
//..... End of Services menu ...............................................


//..... Research menu ......................................................
function RESEARCHmenu(aSubMenu){
	txt="<div id='MasterMainMenuResearch'>";
	document.write(txt);

	txt="<h2><a href='"+path+"research/research-main.html'>Research</a></h2>";
	document.write(txt);
	
	var aSM = aSubMenu.slice(1);          // next set of sub menues
	ShowResListmenu(aSM);
	ShowJournals(aSM);
	ShowLibraryMenu(aSubMenu);

	// Menu table wrap-up ...................................................
	txt="</div>";
	document.write(txt);
} //..... End of Research menu .....

function ShowLibraryMenu(aSubMenu){
	txt="<h3><a href='"+path+"research/library.html'>Biomedical Library</a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "research") {
		txt="<ul>";
		txt=txt+"<li><a href='http://slk080.liberty3.net/fbr' target='_blank'>";
		txt=txt+"LOLA - Library OnLine </a></li>";
		txt=txt+"<li><a href='http://fbrlibrarynews.blogspot.com/' target='_blank'>";
		txt=txt+"FBR Infobits</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}

//..... Research & Project list menu .......................................
function ShowResListmenu(aSubMenu){
	txt="<h3><a href='"+path+"research/research_list.html'>";
	txt=txt+"Research &amp; Project List</a></h3>";
	document.write(txt);
	if (aSubMenu[0] == "researchlist") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"swksweb/biomed.html'>";
		txt=txt+"BiomedicineWorks</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/esw.html'>";
		txt=txt+"EcoScienceWorks</a></li>";
		txt=txt+"<li><a href='"+path+"research/thyroid-dd.html'>";
		txt=txt+"Thyroid Study: Low T4</a></li>";
		document.write(txt);
	
		txt="<li><a href='"+path+"research/slo-dd.html'>";
		txt=txt+"Smith-Lemli-Opitz Syndrome</a></li>";
		txt=txt+"<li><a href='"+path+"research/cdcacce-dd.html'>";
		txt=txt+"ACCE - DNA Testing Standards:</a></li>";
		txt=txt+"<li><a href='"+path+"research/ist-dd.html'>";
		txt=txt+"Integrated Serum Test</a></li>";
		document.write(txt);

		txt="</ul>";
		document.write(txt);
	}
}

function ShowJournals(aSubMenu){    // journal articles ....................
	txt="<h3><a href='"+path+"research/pubarticles.html'>Peer-reviewed Articles</a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "articles") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"research/fbrpub2009.html'>2009 Articles</a></li>";
		txt=txt+"<li><a href='"+path+"research/fbrpub2008.html'>2008 Articles</a></li>";
		txt=txt+"<li><a href='"+path+"research/fbrpub2007.html'>2007 Articles</a></li>";
		txt=txt+"<li><a href='"+path+"research/fbrpub2006.html'>2006 Articles</a></li>";
		txt=txt+"<li><a href='"+path+"research/fbrpub2005.html'>2005 Articles</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}


//..... Education menu .....................................................
function EDUmenu(aSubMenu){
	txt="<div id='MasterMainMenuEducation'>";   
	txt=txt+"<h2><a href='"+path+"edu/education.html'>Education</a></h2>";
	document.write(txt);
	
	var aSM = aSubMenu.slice(1);          // next set of sub menues
	ShowBiomedicineWorks(aSM);
	ShowEcoScienceWorks(aSM);
	ShowScienceWorks(aSM);
	
	txt="<h3><a href='"+path+"edu/cap/cap_topics-index.html'>";
	txt=txt+"Prenatal Screening 'Special Topics'</a></h3>";
	document.write(txt);

	txt="</div>";                         // Menu div wrap-up 
	document.write(txt);
}

function ShowBiomedicineWorks(aSubMenu) {

	txt="<h3><a href='"+path+"swksweb/biomed.html'>BiomedicineWorks</a></h3>";
	document.write(txt);
	
	//if (aSubMenu[0] == "bmw") {
	//	txt="<ul>";
	//	txt=txt+"<li><a href='"+path+"swksweb/biomed_recruit.html'>";
	//	txt=txt+"Field Test Information</a></li>";
	//	txt=txt+"</ul>";
	//	document.write(txt);
	//}
}

function ShowEcoScienceWorks(aSubMenu) {
	txt="<h3><a href='"+path+"swksweb/esw.html'>EcoScienceWorks</a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "esw") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"swksweb/eswtlist_name.html'>Teacher List</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/esw_y1_highlights.html'>Year 1 Highlights</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/esw_y1_fieldtest.html'>Year 1 Field Test</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/esw_y2_highlights.html'>Year 2 Highlights</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}


function ShowScienceWorks(aSubMenu) {
	txt="<h3><a href='"+path+"swksweb/sciworks.html'>ScienceWorks for ME</a></h3>";
	document.write(txt);
	
	if (aSubMenu[0] == "scienceworks") {
		var aSM = aSubMenu.slice(1);          // next set of sub menues
	
		txt="<ul>";
		document.write(txt);

		ShowSwkEquip(aSM);
		ShowSwkLabs(aSM);
	
		txt="<li><a href='"+path+"swksweb/swklink.html'>Links</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}

function ShowSwkLabs(aSubMenu){
	txt="<li><a href='"+path+"swksweb/swklab.html'>Learning Labs</a></li>";
	document.write(txt);

	if (aSubMenu[0] == "swklabs") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"swksweb/dnajustice_outline.html'>";
		txt=txt+"DNA Fingerprinting - Forensics</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/dna_cf_outline.html'>";
		txt=txt+"DNA Fingerprinting - CF Screening</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/pv92_outline.html'>";
		txt=txt+"Polymerase Chain Reaction (PCR)</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/bi_intro.html'>";
		txt=txt+"Bioinformatics</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/immunolymeoutline.html'>";
		txt=txt+"Lyme Disease Lab</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}

function ShowSwkEquip(aSubMenu){
	txt="<li><a href='"+path+"swksweb/equip.html'>Equipment Program</a></li>";
	document.write(txt);
	
	if (aSubMenu[0] == "swkequip") {
		txt="<ul>";
		txt=txt+"<li><a href='"+path+"swksweb/web_equip-list.pdf'>";
		txt=txt+"Equipment List<br> (154K PDF)</a></li>";
		txt=txt+"<li><a href='"+path+"swksweb/equip_orderform.html'>";
		txt=txt+"Order Form</a></li>";
		txt=txt+"</ul>";
		document.write(txt);
	}
}
//..... End of Education menu .....

//..... Publications menu ..................................................
function PUBSmenu(aSubMenu){
	txt="<div id='MasterMainMenuPubs'>";           // side link table settings
	document.write(txt);

	txt="<h2><a href='"+path+"publications/publications.html'>Publications</a></h2>";
	document.write(txt);

	txt="<h3><a href='"+path+"publications/orderform.pdf'>";
	txt=txt+"Order Form <span class='pdf'>(PDF)</span></a></h3>";
	document.write(txt);

	if (aSubMenu[0] == "pubs") {
		var aSM = aSubMenu.slice(1);                 // next set of sub menues
		ShowDocHC(aSM);
		ShowPatientHC(aSM);
		ShowHandbook(aSM);
	}
	txt="</div>";                                    // Menu table wrap-up
	document.write(txt);
}

function ShowPatientHC(aSubMenu){   // Patient health information ...........
	txt="<h3><a href='"+path+"publications/publications.html#patient'>Patient Health</a></h3>";
	document.write(txt);
	
	txt="<ul>";
	txt=txt+"<li><a href='"+path+"publications/pamphlets/cotinine.html'>";
	txt=txt+"Cotinine Testing</a></li>";
	txt=txt+"<li><a href='"+path+"publications/pamphlets/uasbvw.html'>";
	txt=txt+"Understanding Anencephaly</a></li>";
	txt=txt+"<li><a href='"+path+"publications/pamphlets/uasbvw.html'>";
	txt=txt+"Understanding Spina Bifida</a></li>";
	txt=txt+"<li><a href='"+path+"publications/pamphlets/uasbvw.html#undventwall'>";
	txt=txt+"Understanding Ventral Wall Defects</a></li>";
	txt=txt+"</ul>";
	document.write(txt);
}

function ShowDocHC(aSubMenu){   // Health-care provider information .........
	txt="<h3><a href='"+path+"publications/publications.html#provider'>";
	txt=txt+"Health-care Provider</a></h3>";
	document.write(txt);
	
	var aSM = aSubMenu.slice(1);          // next set of sub menues
	txt="<ul>";
	txt=txt+"<li><a href='"+path+"clin/psl_afp4.html'>AFP Profile Four</a></li>";
	txt=txt+"<li><a href='"+path+"clin/psl_ist.html'>Integrated Serum Test</a></li>";
	txt=txt+"<li><a href='"+path+"clin/psl_first-tri.html'>First Trimester Screening</a></li>";
	txt=txt+"<li><a href='"+path+"publications/pamphlets/cotininefaq.html'>";
	txt=txt+"Cotinine FAQ</a></li>";
	document.write(txt);
		
	txt="<li><a href='"+path+"publications/factsheets/fs_index.html'>";
	txt=txt+"RDL Factsheets</a></li>";
	document.write(txt);
		
	txt="<li><a href='"+path+"publications/rdlnewsletters/rdlnews_index.html'>";
	txt=txt+"RDL Newsletter</a></li>";
	txt=txt+"<li><a href='"+path+"publications/resguide/rg-main.html'>";
	txt=txt+"Resource Guide</a></li>";
	document.write(txt);

	txt="</ul>";
	document.write(txt);
}

function ShowHandbook(aSubMenu){   // Health-care provider information .........
	txt="<h3><a href='"+path+"publications/publications.html#handbooks'>";
	txt=txt+"Handbooks</a></h3>";
	document.write(txt);
	
	var aSM = aSubMenu.slice(1);          // next set of sub menues
	txt="<ul>";
	txt=txt+"<li><a href='"+path+"publications/plasmaprot/plasmaprot.html'>";
	txt=txt+"Plasma Proteins</a></li>";
	txt=txt+"</ul>";
	document.write(txt);
}

//..... End of Publications menu ............................................

//==============================  End of Side-menu system  ==================

//===============================    Misc. Functions   ======================
//
// Change the background color or image of the 'MasterContentContainer':
function MasterBackground(BkgColor,BkgImage) {
	if (BkgColor==undefined) { BkgColor="" };
	if (BkgImage==undefined) { BkgImage="" };
	if (Browser=="DOM") {
		myElement=document.getElementById("MasterContent");
		if (BkgColor.length>0) {
		myElement.style.backgroundColor=BkgColor;           // background color
		}
		if (BkgImage.length>0) {
			myElement.style.background="URL(" + BkgImage + ")"; // background color
			}
		}
}

function MasterBackgroundColor(BkgColor) {
	if (Browser=="DOM") {
		myElement=document.getElementById("MasterContent");
		myElement.style.backgroundColor=BkgColor;              // background color
		}
}

function MasterBackgroundImage(BkgImage) {
	if (Browser=="DOM") {
		myElement=document.getElementById("MasterContent");
		myElement.style.background="URL(" + BkgImage + ")";    // background color
		}
}
// Use ChangePic function to change the source picture to SrcName
// of an IMG tag with id of ImgId.
function ChangePic(ImgId,SrcName){
	var MyElement=document.getElementById(ImgId);
	MyElement.src=SrcName;
}


// Use the following with onmouseover and onmouseout events using a tab with
// the TermLink and div.Definition styles (see fbrheader.css).
// This approximates a popup without being a popup.  
// See example in:  /sciwks/biworksheet.html
function ShowDef(DefId) {
  var myDef=document.getElementById(DefId);
  myDef.style.visibility = "visible";
  myDef.style.position = "relative";
}

function HideDef(DefId) {
  var myDef=document.getElementById(DefId);
  myDef.style.visibility = "hidden";
  myDef.style.position = "absolute";
}


// SearchFormFBR() prepares FBR site specific search terms to Google
// See search.html for usage.
function SearchFormFBR(UserTermId,SearchTermId){
	var uTerm;
	var sTerm;
	var site;

	term="";
	if (Browser=="DOM") {
		uTerm=document.getElementById(UserTermId);
		sTerm=document.getElementById(SearchTermId);
	}
	if (Browser=="IE") {
		uTerm=document.all[UserTermId];
		sTerm=document.all[SearchTermId];
	}
	site=" site:www.fbr.org";
	sTerm.value= uTerm.value + site;
	
	//alert("sTerm.value: " +sTerm.value);
}



// SearchLinkFBR() prepares FBR site specific search terms to Google
// for use in an <a href></a> tag.  Call SearchLinkFBR() on the OnMouseOver event
function SearchLinkFBR(LinkId,TermId){
	var aObj;
	var term;
	var txt;
	var site;

	aObj="";
	term="";
	if (Browser=="DOM") {
		aObj=document.getElementById(LinkId);
		term=document.getElementById(TermId);
	}
	if (Browser=="IE") {
		aObj=document.all[LinkId];
		term=document.all[TermId];
	}
	site="+site%3Awww.fbr.org";
	txt="http://www.google.com/search?&q=";
	aObj.href=txt + term.value + site;
}

//=====================================================================================
//                             Hidden E-mail Address utility 
//=====================================================================================
// Insert the following two lines to call up the email address,
// substitute "tag" for whomever.
//            "name" for the display text of the email link
//            "class" for the name of the style class to use for formatting the link.
//
//   <script language="JavaScript" type="text/javascript"><!-- 
//   addr("tag","name","class");  //--> </script>
//   Changes to the default email class style format use .emailLink

function addr(tag,name,CSSclass) {
	DisplayEmail(tag,name,CSSclass);
}

function DisplayEmail(tag,name,CSSclass) {
	var mymail= new GetEmail(tag,name);
	var txt;
	
	if (mymail.email == undefined) { mymail.email = "" };
	if (mymail.name == undefined) { mymail.name = "" };
	if (CSSclass == undefined) { CSSclass = "" };
	if ((mymail.email != "") && (mymail.name !="")){
		txt="<a href='mailto:" + mymail.email+ "' class='" + CSSclass + "'>";
		txt=txt + mymail.name + "</a>";
		document.write(txt);
	}
}


function GetEmail(tag,name) {
	var act="";
	var site="fbr.org";
	var at="@";
	
	if (tag == undefined) { tag = "ContactFBR" };
	if (name == undefined) { name = "" };
	
	if ( tag == "accecomments") {
		if (name == "")  { name="accecomments" + at + site };
		act="accecomments";
		}
	if ( tag == "ContactFBR") {
		if (name == "")  { name="ContactFBR" + at + site };
		act="contactfbr";
		}
	if ( tag == "Webmaster") {
		if (name == "")  { name="Webmaster" };
		act="contactfbr";
		}
	if ( tag == "FurtherInformation") {
		if (name == "")  { name="Further Information" };
		act="contactfbr";
		}
	if ( tag == "JeriErickson") {
		if (name == "")  { name="Jeri Erickson" };
		act="ericks";
		}
	if ( tag == "ericks") {
		if (name == "")  { name="ericks" + at + site };
		act="ericks";
		}
	if ( tag == "JanetJohnson") {
		if (name == "")  { name="Janet Johnson" };
		act="scienceworks";
		}
	if ( tag == "ScienceWorks") {
		if (name == "")  { name="<em>ScienceWorks</em> for ME" };
		act="scienceworks";
		}
	if ( tag == "WalterAllan") {
		if (name == "")  { name="Walter C. Allan" };
		act="allan";
		}
	if ( tag == "WendyCraig") {
		if (name == "")  { name="Wendy Craig" };
		act="wcraig";
		}
	if ( tag == "JaneSheehan") {
		if (name == "")  { name="Jane Sheehan" };
		act="jsheehan";
		}
	if ( tag == "DeborahSykes") {
		if (name == "")  { name="Deborah Sykes" };
		act="sykes";
		}
	if ( tag == "DaleLea") {
		if (name == "")  { name="Dale Halsey Lea" };
		act="lead";
		site="mail.nih.gov";
		}
	if ( tag == "DwightSmith") {
		if (name == "")  { name="Dwight E. Smith" };
		act="desmith";
		}
	if ( tag == "Ng") {
		if (name == "")  { name="Ah-Kau Ng" };
		act="ahkaung";
		site="maine.edu";
		}
	if ( tag == "AndreaPulkkinen") {
		if (name == "")  { name="Andrea J. Pulkkinen" };
		act="ajpulk";
		}
	if ( tag == "ClinicalSupport") {
		if (name == "")  { name="Clinical Support" };
		act="dgroft";
		}
	if ( tag == "DaveGroft") {
		if (name == "")  { name="David W. Groft" };
		act="dgroft";
		}
	if ( tag == "KellyHickey") {
		if (name == "")  { name="Kelly Hickey" };
		act="khickey";
		}
	if ( tag == "SueLaPierre") {
		if (name == "")  { name="Sue E. LaPierre" };
		act="slapierre";
		}
	if ( tag == "ThomasLedue") {
		if (name == "")  { name="Thomas B. Ledue" };
		act="tledue";
		}
	if ( tag == "PeterRothman") {
		if (name == "")  { name="Peter Rothman" };
		act="prothman";
		}
	if ( tag == "DrMadan") {
		if (name == "")  { name="Juliette Madan" };
		act="JMadan";
		site="tufts-nemc.org";
		}
	if ( tag == "TrishJewett") {
		if (name == "")  { name="Trish Jewett" };
		act="tjewett";
		}
	if ( tag == "GavinWelch") {
		if (name == "")  { name="Gavin Welch" };
		act="gwelch";
		}
	if ( tag == "PattyWilliams") { 
		if (name == "")  { name="Patricia Williams" };
		act="pawilliams";
		}
	email=act + at + site;
	this.name=name;
	this.site=site;
	this.email=email;
	this.tag=tag;
	
	return email;
}   //... end of email utility ...
// ============================ end =========================================