/***********************************************
* Omni Slide Menu script - © John Davenport Scheuer
* very freely adapted from Dynamic-FX Slide-In Menu (v 6.5) script- by maXimus
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full original source code
* as first mentioned in http://www.dynamicdrive.com/forums
* username:jscheuer1
***********************************************/

/* Set a variable with the current page number. Default to "1". */
var nPage, lPage,
pNum=window.location.href.replace(/.*\/(\d+)[^\/]*$/,'$1'),
lastP=15, //set to highest page number available
firstP=1; //set to lowest page number available
if(isNaN(pNum=pNum-0))
pNum=1; //default value
lPage=pNum-1<firstP? lastP : pNum-1;
nPage=pNum+1>lastP? firstP : pNum+1;

//One global variable to set, use true if you want the menus to reinit when the user changes text size (recommended):
resizereinit=true;


/*

menu[1] = {  // REQUIRED!!  This menu explicitly declares all available options even if they are the same as the defaults
id:'menu1', //use unique quoted id (quoted) REQUIRED!!
/////////////////////////////////////
///////////// no quotes for these properties (numbers represent pixels unless otherwise noted): ////////////
/////////////////////////////////////
user_defined_stylesheet:false, //if true, prevents script from generating stylesheet for this menu
user_defined_markup:false, //if true, prevents script from generating markup for this menu
design_mode:false,  //if true, generates a report of the script generated/intended styles and markup (as a design aid)
menutop:160,     // initial top offset - except for top menu, where it is meaningless
menuleft:210,    // initial left offset - only for top menu, as pixels (can be a quoted percentage - ex: '50%')
keepinview:80,   // Use false (for not static) - OR - true or numeric top offset when page scrolls
menuspeed:20,    // Speed of menu sliding smaller is faster (interval of milliseconds)
menupause:500,   // How long menu stays out when mouse leaves it (in milliseconds)
d_colspan:3,     // Available columns in menu body as integer
allowtransparent:false, // true to allow page to show through menu if other bg's are transparent or border has gaps
barwidth:20,     // bar (the vertical cell) width
wrapbar:true,    // extend and wrap bar below menu for a more solid look (default false) - will revert to false for top menu
hdingwidth:210,  // heading - non linked horizontal cells width
hdingheight:25,  // heading - non linked horizontal cells height
hdingindent:1,   // heading - non linked horizontal cells text-indent represents ex units (@8 pixels decimals allowed)
linkheight:20,   // linked horizontal cells height
linktopad:3,     // linked horizontal cells top padding
borderwidth:2,   // inner border-width used for this menu
/////////////////////////// quote these properties: /////////////////////
bordercolor:'#cccccc', // inner border color   Original '#000080'
borderstyle:'solid',    // inner border style (solid, dashed, inset, etc.)  Original 'solid'
outbrdwidth:'0ex 0ex 0ex 0ex', // outer border-width used for this menu (top right bottom left)
outbrdcolor:'lightblue',  // outer border color   Original 'lightblue'
outbrdstyle:'solid',     // outer border style (solid, dashed, inset, etc.)
barcolor:'#000066',        // bar (the vertical cell) text color     Original 'white'
barbgcolor:'#ccff99',   // bar (the vertical cell) background color     Original colour '#4d6814'
barfontweight:'bold',    // bar (the vertical cell) font weight
baralign:'center',       // bar (the vertical cell) right left or center text alignment
menufont:'verdana',      // menu font
fontsize:'90%',          // express as percentage with the % sign
hdingcolor:'#999999',      // heading - non linked horizontal cells text color   Original 'white'
hdingbgcolor:'#ccffcc',  // heading - non linked horizontal cells background color  Original colour '#4d6814'
hdingfontweight:'bold',  // heading - non linked horizontal cells font weight
hdingvalign:'middle',    // heading - non linked horizontal cells vertical align (top, middle or center)
hdingtxtalign:'left',    // heading - non linked horizontal cells right left or center text alignment
linktxtalign:'left',     // linked horizontal cells right left or center text alignment
linktarget:'',           // default link target, leave blank for same window (other choices: _new, _top, or a window or frame name)
kviewtype:'fixed',       // Type of keepinview - 'fixed' utilizes fixed positioning where available, 'absolute' fluidly follows page scroll
menupos:'top',         // set side that menu slides in from (right or left or top)
bartext:'THIS TALK',       // bar text (the vertical cell) use text or img tag
///////////////////////////

menuItems:[
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["Hot Sites"], //create header
["Lois Images", "http://www.loisimages.com", "_new"],
["State Street Blues", "http://www.statestreetbluesstroll.com/","_new"],
["Media Jazz by Night", "http://www.mediajazzbynight.com/", "_new"],
["DD Help Forum", "http://www.dynamicdrive.com/forums", "_new"],

["Search", "", "", 2, "no"], //create two column header w/ 2 and 1 column members, requires d_colspan:3
["Search", "", "", 1],
["Google", "http://www.google.com/", "_new", 1, "no"], //create three column row, requires d_colspan:3
["Yahoo", "http://www.yahoo.com/", "_new", 1, "no"],
["AltaVista", "http://www.altavista.com/", "_new", 1],

["Personal", "", ""], //create header
["Ansi Art Gallery", "http://home.comcast.net/~ansiguy", "_new"],
["John's Javascript Jungle", "http://home.comcast.net/~jscheuer1/side", "_new"]  //no comma after last entry


]}; // REQUIRED!! do not edit or remove

*/



menu[2] = {  // THIS TALK                  REQUIRED!!  This menu explicitly declares all available options even if they are the same as the defaults
id:'menu2', //use unique quoted id (quoted) REQUIRED!!
/////////////////////////////////////
///////////// no quotes for these properties (numbers represent pixels unless otherwise noted): ////////////
/////////////////////////////////////
user_defined_stylesheet:false, //if true, prevents script from generating stylesheet for this menu
user_defined_markup:false, //if true, prevents script from generating markup for this menu
design_mode:false,  //if true, generates a report of the script generated/intended styles and markup (as a design aid)
menutop:160,     // initial top offset - except for top menu, where it is meaningless
menuleft:115,    // initial left offset - only for top menu, as pixels (can be a quoted percentage - ex: '50%')
keepinview:false,   // Don't float the menues when scrolling. Use false (for not static) - OR - true or numeric top offset when page scrolls
menuspeed:20,    // Speed of menu sliding smaller is faster (interval of milliseconds)
menupause:500,   // How long menu stays out when mouse leaves it (in milliseconds)
d_colspan:3,     // Available columns in menu body as integer
allowtransparent:false, // true to allow page to show through menu if other bg's are transparent or border has gaps
barwidth:20,     // bar (the vertical cell) width
wrapbar:true,    // extend and wrap bar below menu for a more solid look (default false) - will revert to false for top menu
hdingwidth:160,  // heading - non linked horizontal cells width
hdingheight:25,  // heading - non linked horizontal cells height
hdingindent:1,   // heading - non linked horizontal cells text-indent represents ex units (@8 pixels decimals allowed)
linkheight:20,   // linked horizontal cells height
linktopad:3,     // linked horizontal cells top padding
borderwidth:2,   // inner border-width used for this menu
/////////////////////////// quote these properties: /////////////////////
bordercolor:'#cccccc', // inner border color   Original '#000080'
borderstyle:'solid',    // inner border style (solid, dashed, inset, etc.)  Original 'solid'
outbrdwidth:'0ex 0ex 0ex 0ex', // outer border-width used for this menu (top right bottom left)
outbrdcolor:'lightblue',  // outer border color   Original 'lightblue'
outbrdstyle:'solid',     // outer border style (solid, dashed, inset, etc.)
barcolor:'#000066',        // bar (the vertical cell) text color     Original 'white'
barbgcolor:'#ccffcc',   // bar (the vertical cell) background color     Original colour '#4d6814'
barfontweight:'bold',    // bar (the vertical cell) font weight
baralign:'center',       // bar (the vertical cell) right left or center text alignment
menufont:'verdana',      // menu font
fontsize:'90%',          // express as percentage with the % sign
hdingcolor:'#999999',      // heading - non linked horizontal cells text color   Original 'white'
hdingbgcolor:'#ccffcc',  // heading - non linked horizontal cells background color  Original colour '#4d6814'
hdingfontweight:'bold',  // heading - non linked horizontal cells font weight
hdingvalign:'middle',    // heading - non linked horizontal cells vertical align (top, middle or center)
hdingtxtalign:'left',    // heading - non linked horizontal cells right left or center text alignment
linktxtalign:'left',     // linked horizontal cells right left or center text alignment
linktarget:'',           // default link target, leave blank for same window (other choices: _new, _top, or a window or frame name)
kviewtype:'absolute!important',   //  Don't float the menus when scrolling. Type of keepinview - 'fixed' utilizes fixed positioning where available, 'absolute' fluidly follows page scroll
menupos:'top',         // set side that menu slides in from (right or left or top)
bartext:'THIS TALK',       // bar text (the vertical cell) use text or img tag
///////////////////////////

menuItems:[ // THIS TALK
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["Download"], //create header
["Printable PDF", "/MostlyTheravada/printablePDF.html", ""], // "_new", instead of "" will create a new window 
["Podcast", "/MostlyTheravada/podcast.html",""],

["Subscribe"], //create header
["Weekly eMail", "/MostlyTheravada/weeklyeMail.html", ""],
["Weekly Podcast", "/MostlyTheravada/weeklyPodcast.html", ""]  //no comma after last entry


]}; // REQUIRED!! do not edit or remove



menu[3] = {  // two column
id:'menu3', //use unique quoted id (quoted) REQUIRED!!
/* bartext:'RIGHT MENU', */
/* menupos:'top', */
/* kviewtype:'fixed', */

/////////////////////////////////////
///////////// no quotes for these properties (numbers represent pixels unless otherwise noted): ////////////
/////////////////////////////////////
user_defined_stylesheet:false, //if true, prevents script from generating stylesheet for this menu
user_defined_markup:false, //if true, prevents script from generating markup for this menu
design_mode:false,  //if true, generates a report of the script generated/intended styles and markup (as a design aid)
menutop:160,     // initial top offset - except for top menu, where it is meaningless
menuleft:303,    // initial left offset - only for top menu, as pixels (can be a quoted percentage - ex: '50%')
keepinview:false,   // Don't float the menues when scrolling. Use false (for not static) - OR - true or numeric top offset when page scrolls
menuspeed:20,    // Speed of menu sliding smaller is faster (interval of milliseconds)
menupause:500,   // How long menu stays out when mouse leaves it (in milliseconds)
d_colspan:2,     // Available columns in menu body as integer
allowtransparent:false, // true to allow page to show through menu if other bg's are transparent or border has gaps
barwidth:20,     // bar (the vertical cell) width
wrapbar:true,    // extend and wrap bar below menu for a more solid look (default false) - will revert to false for top menu
hdingwidth:180,  // heading - non linked horizontal cells width
hdingheight:25,  // heading - non linked horizontal cells height
hdingindent:1,   // heading - non linked horizontal cells text-indent represents ex units (@8 pixels decimals allowed)
linkheight:20,   // linked horizontal cells height
linktopad:3,     // linked horizontal cells top padding
borderwidth:2,   // inner border-width used for this menu
/////////////////////////// quote these properties: /////////////////////
bordercolor:'#cccccc', // inner border color   Original '#000080'
borderstyle:'solid',    // inner border style (solid, dashed, inset, etc.)  Original 'solid'
outbrdwidth:'0ex 0ex 0ex 0ex', // outer border-width used for this menu (top right bottom left)
outbrdcolor:'lightblue',  // outer border color   Original 'lightblue'
outbrdstyle:'solid',     // outer border style (solid, dashed, inset, etc.)
barcolor:'#000066',        // bar (the vertical cell) text color     Original 'white'
barbgcolor:'#ccffcc',   // bar (the vertical cell) background color     Original colour '#4d6814'
barfontweight:'bold',    // bar (the vertical cell) font weight
baralign:'center',       // bar (the vertical cell) right left or center text alignment
menufont:'verdana',      // menu font
fontsize:'90%',          // express as percentage with the % sign
hdingcolor:'#999999',      // heading - non linked horizontal cells text color   Original 'white'
hdingbgcolor:'#ccffcc',  // heading - non linked horizontal cells background color  Original colour '#4d6814'
hdingfontweight:'bold',  // heading - non linked horizontal cells font weight
hdingvalign:'middle',    // heading - non linked horizontal cells vertical align (top, middle or center)
hdingtxtalign:'left',    // heading - non linked horizontal cells right left or center text alignment
linktxtalign:'left',     // linked horizontal cells right left or center text alignment
linktarget:'',           // default link target, leave blank for same window (other choices: _new, _top, or a window or frame name)
kviewtype:'absolute!important',   //  Don't float the menus when scrolling. Type of keepinview - 'fixed' utilizes fixed positioning where available, 'absolute' fluidly follows page scroll
menupos:'top',         // set side that menu slides in from (right or left or top)
bartext:'DHARMA TALKS',       // bar text (the vertical cell) use text or img tag
///////////////////////////
menuItems:[ // REQUIRED!!
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["First and Current", "", ""], //create header
["The Very First Talk", "/MostlyTheravada/dharmaTalks/1.html", ""], // "_new", instead of "" will create a new window 
["The Current Talk", "/MostlyTheravada/dharmaTalks/" + lastP + ".html", ""], 

["Series"], //create header
["The Quest", "/MostlyTheravada/dharmaTalks/1.html", ""],
["Dukkha", "/MostlyTheravada/dharmaTalks/7.html",""],
["The Eightfold Path", "/MostlyTheravada/dharmaTalks/8.html", ""],
["All the Talks", "/MostlyTheravada/dharmaTalks/allTheTalks.html", ""], 

["Backwards & Forwards", "", ""], //create header
["<<< Talk", "/MostlyTheravada/dharmaTalks/" +lPage+ ".html", "", 1, "no"], //create two column row, requires d_colspan:2 (the default)
["Talk >>>", "/MostlyTheravada/dharmaTalks/" +nPage+ ".html", "", 1] //no comma after last entry

]}; // REQUIRED!! do not edit or remove


menu[4] = { // THE PORTAL           REQUIRED!!  This menu explicitly declares all available options even if they are the same as the defaults
id:'menu4', //use unique quoted id (quoted) REQUIRED!!
/////////////////////////////////////
///////////// no quotes for these properties (numbers represent pixels unless otherwise noted): ////////////
/////////////////////////////////////
user_defined_stylesheet:false, //if true, prevents script from generating stylesheet for this menu
user_defined_markup:false, //if true, prevents script from generating markup for this menu
design_mode:false,  //if true, generates a report of the script generated/intended styles and markup (as a design aid)
menutop:160,     // initial top offset - except for top menu, where it is meaningless
menuleft:509,    // initial left offset - only for top menu, as pixels (can be a quoted percentage - ex: '50%')
keepinview:false,   // Don't float the menues when scrolling. Use false (for not static) - OR - true or numeric top offset when page scrolls
menuspeed:20,    // Speed of menu sliding smaller is faster (interval of milliseconds)
menupause:500,   // How long menu stays out when mouse leaves it (in milliseconds)
d_colspan:3,     // Available columns in menu body as integer
allowtransparent:false, // true to allow page to show through menu if other bg's are transparent or border has gaps
barwidth:20,     // bar (the vertical cell) width
wrapbar:true,    // extend and wrap bar below menu for a more solid look (default false) - will revert to false for top menu
hdingwidth:160,  // heading - non linked horizontal cells width
hdingheight:25,  // heading - non linked horizontal cells height
hdingindent:1,   // heading - non linked horizontal cells text-indent represents ex units (@8 pixels decimals allowed)
linkheight:20,   // linked horizontal cells height
linktopad:3,     // linked horizontal cells top padding
borderwidth:2,   // inner border-width used for this menu
/////////////////////////// quote these properties: /////////////////////
bordercolor:'#cccccc', // inner border color   Original '#000080'
borderstyle:'solid',    // inner border style (solid, dashed, inset, etc.)  Original 'solid'
outbrdwidth:'0ex 0ex 0ex 0ex', // outer border-width used for this menu (top right bottom left)
outbrdcolor:'lightblue',  // outer border color   Original 'lightblue'
outbrdstyle:'solid',     // outer border style (solid, dashed, inset, etc.)
barcolor:'#000066',        // bar (the vertical cell) text color     Original 'white'
barbgcolor:'#ccffcc',   // bar (the vertical cell) background color     Original colour '#4d6814'
barfontweight:'bold',    // bar (the vertical cell) font weight
baralign:'center',       // bar (the vertical cell) right left or center text alignment
menufont:'verdana',      // menu font
fontsize:'90%',          // express as percentage with the % sign
hdingcolor:'#999999',      // heading - non linked horizontal cells text color   Original 'white'
hdingbgcolor:'#ccffcc',  // heading - non linked horizontal cells background color  Original colour '#4d6814'
hdingfontweight:'bold',  // heading - non linked horizontal cells font weight
hdingvalign:'middle',    // heading - non linked horizontal cells vertical align (top, middle or center)
hdingtxtalign:'left',    // heading - non linked horizontal cells right left or center text alignment
linktxtalign:'left',     // linked horizontal cells right left or center text alignment
linktarget:'',           // default link target, leave blank for same window (other choices: _new, _top, or a window or frame name)
kviewtype:'absolute!important',   //  Don't float the menus when scrolling. Type of keepinview - 'fixed' utilizes fixed positioning where available, 'absolute' fluidly follows page scroll
menupos:'top',         // set side that menu slides in from (right or left or top)
bartext:'THE PORTAL',       // bar text (the vertical cell) use text or img tag
///////////////////////////

menuItems:[ // THE PORTAL
//[name, link, target, colspan, endrow?] - leave 'link' and 'target' blank to make a header
["Portal Domains"], //create header
["The Library", "/MostlyTheravada/thePortal/theLibrary.html", ""], // "_new", instead of "" will create a new window 
["Talks Archive", "/MostlyTheravada/thePortal/theArchive.html",""],
["Glossary", "/MostlyTheravada/thePortal/glossary.html", ""],
["Bibliography", "/MostlyTheravada/thePortal/bibliography.html", ""], 
["Links", "/MostlyTheravada/thePortal/links.html", ""], 
["Finding A Teacher", "/MostlyTheravada/thePortal/findingATeacher.html", ""], 
["Search This Site Tool", "/MostlyTheravada/thePortal/searchThisSite.html", "_new"] //no comma after last entry
]}; // REQUIRED!! do not edit or remove



////////////////////Stop Editing/////////////////

make_menus();
