//******************************************************************** // MainHeader.js is used to include the leftnav, get required CSS files // included and prepare the leftnav image which works hand in hand with // MainFooter.js for establishing the links related to the leftnav image. //******************************************************************** // Constants that may be defined in the calling document to affect attributes used in here. //***************************************************************************************** // Right table cell width; this can be predefined in any doc that includes MainHeader.js docWidth = setDefault('docWidth', 480); // Fix the window.opener issue that new browsers // break because of Cross Site Scripting attacks -Dan if(window.name != '__BLB') { window.name='__BLB'; __BLB=window.open(document.location, '__BLB'); } // Window names for which we don't want to display the background image and leftnav //***************************************************************************************** var noLeftNav = new Array(); noLeftNav["CommWndw"] = 1; // The array item points to either the first level directory or the root level file // You can establish which css you may want to include. //***************************************************************************************** var IEcssArray = []; IEcssArray["hta"] = "./css/hta_ie.css"; var cssArray = []; cssArray["study"] = "./css/study.css"; cssArray["hta"] = "./css/hta.css"; cssArray["p"] = "./css/p.css"; cssArray["kjv"] = "./css/kjv.css"; cssArray["commentary"] = "./css/commentary.css"; cssArray["Comm"] = "./css/commentary.css"; cssArray["sn"] = "./css/SmithSermonNotes.css"; var menuArray = []; // Files? menuArray["index.html"] = 0; menuArray["s.html"] = 2; menuArray["search1.html"] = 2; menuArray["c.html"] = 3; menuArray["d.html"] = 7; menuArray["a.html"] = 4; menuArray["i.html"] = 6; menuArray["f.html"] = 10; menuArray["k.html"] = 9; menuArray["h.html"] = 8; menuArray["e.html"] = 5; menuArray["m.html"] = 11; menuArray["l.html"] = 12; menuArray["contribution.html"] = 14; // Directories? menuArray["alpha_tables"] = 2; menuArray["audio_video"] = 4; menuArray["Comm"] = 3; menuArray["commentary"] = 3; menuArray["devotions"] = 7; menuArray["faq"] = 8; menuArray["help"] = 8; menuArray["gifs"] = 6; menuArray["kjv"] = 0; menuArray["images"] = 6; menuArray["study"] = 5; var browserName=navigator.userAgent; var browserVer=parseInt(navigator.appVersion, 10); if(browserName.search(/Netscape/) >=0) {browserName="Netscape";} else if(browserName.search(/MSIE/) >=0) {browserName="Internet Explorer";} else if(browserName.search(/Safari/) >=0) {browserName="Safari";} else if(browserName.search(/Firefox/) >=0) {browserName="Firefox";} if (navigator.appName=="Konqueror" && browserVer>=2) version="Kong"; else if (navigator.appName=="Mozilla" && browserVer>=1) version="Moz"; else if (browserName=="Firefox") version="FOX"; else if (browserName=="Safari") version="Safari"; else if (browserName=="Netscape" && browserVer>4) version="N6"; else if (navigator.appName=="Opera" && browserVer>=6) version="OP"; else if (navigator.appName=="Microsoft Internet Explorer" && browserVer>=4) version="IE"; document.write(''); if (version=="IE") document.write(''); else if (browserName=="Safari") document.write(''); else if (version=="N6") document.write(''); if(cssArray[topicDir[0]]) document.write(''); if(cssArray[topicDir[1]]) document.write(''); if(cssArray[topicDir[2]]) document.write(''); if (version=="IE") { if(IEcssArray[topicDir[0]]) document.write(''); if(IEcssArray[topicDir[1]]) document.write(''); if(IEcssArray[topicDir[2]]) document.write(''); } // Testing by Dan to see if we can manage the leftnav for the Comm's when they get opened in a pop-up if(noLeftNav[window.name]) { document.write(''); } document.write( '