pastsect = "none";


function Submenu(sect)  {

if ( sect == "Extras" ) { sect = "Main" }

document.getElementById(sect).src = '/images/nav/' + sect + '2.png'; 
if ( ( pastsect != "none" ) && ( pastsect != sect ) ) { document.getElementById(pastsect).src = '/images/nav/' + pastsect + '.png'; }

pastsect = sect;

subm = new Array(8);
surl = new Array(8);


if ( ( sect == "Main" ) || ( sect == "Links" ) ) {
sublength = 7;
direct = "/"
subm[0] = "Dreaming";
//subm[2] = "Drinking";
subm[1] = "Silliness";
subm[2] = "64 Arts";
subm[3] = "Contact";
subm[4] = "Whitelist";
subm[5] = "Wallpaper";
subm[6] = "Links";
surl[0] = "greendream";
//sur[2] = "beer";
surl[1] = "goats";
surl[2] = "64";
surl[3] = "contact";
surl[4] = "whitelist";
surl[5] = "wallpaper";
surl[6] = "links";
}
else if (sect == "Training") {
sublength = 6;
direct = "/training/"
subm[0] = "Introduction";
subm[1] = "Programs";
subm[2] = "Technique";
subm[3] = "Equipment";
subm[4] = "Breathing";
subm[5] = "Cardio";
surl[0] = "intro";
surl[1] = "programs";
surl[2] = "technique";
surl[3] = "equipment";
surl[4] = "breathing";
surl[5] = "cardio";
}
else if (sect == "Photos") {
sublength = 3;
direct = "/photos/"
subm[0] = "Colour Gallery 1";
subm[1] = "Colour Gallery 2";
subm[2] = "Black & White Gallery";
surl[0] = "colour1";
surl[1] = "colour2";
surl[2] = "grey";
}
else if (sect == "Nature") {
sublength = 5;
direct = "/nature/"
subm[0] = "Canoeing";
subm[1] = "Composting";
subm[2] = "Environmentalism";
subm[3] = "Green Lifestyles";
subm[4] = "Links";
surl[0] = "canoeing";
surl[1] = "compost";
surl[2] = "environmentalism";
surl[3] = "greentips";
surl[4] = "links";
}
else if (sect == "Health") {
sublength = 5;
direct = "/health/"
subm[0] = "Non-Smoking";
subm[1] = "Yoga";
subm[2] = "Partner Yoga";
subm[3] = "Healthy Eating";
subm[4] = "Your Body";
surl[0] = "smoking";
surl[1] = "yoga";
surl[2] = "partner_yoga";
surl[3] = "diet";
surl[4] = "tips";
}
else if (sect == "Writing") {
sublength = 5;
direct = "/writing/"
subm[0] = "Aphorisms";
subm[1] = "Newer Poems";
subm[2] = "Older Poems";
subm[3] = "Ideas";
subm[4] = "Fiction";
surl[0] = "aphorisms";
surl[1] = "poems";
surl[2] = "oldpoems";
surl[3] = "thoughts";
surl[4] = "terran";
}
else if (sect == "Reading") {
sublength = 5;
direct = "/reading/"
subm[0] = "Authors";
subm[1] = "Ken Wilber";
subm[2] = "Steve Martin";
subm[3] = "Leonard Cohen";
subm[4] = "Taoism";
surl[0] = "authors";
surl[1] = "wilber";
surl[2] = "martin";
surl[3] = "cohen";
surl[4] = "taoism";
}
else if (sect == "Music") {
sublength = 5;
direct = "/music/"
subm[0] = "Albums";
subm[1] = "Mix CDs";
subm[2] = "Guitar";
subm[3] = "Lyrics";
subm[4] = "Links";
surl[0] = "albums";
surl[1] = "mixes";
surl[2] = "guitar";
surl[3] = "lyrics";
surl[4] = "links";
}
else if (sect == "Blog") {
sublength = 6;
direct = "/blog/"
subm[0] = "03-04";
subm[1] = "04-05";
subm[2] = "05-06";
subm[3] = "06-08";
subm[4] = "08-09";
subm[5] = "Bio";
surl[0] = "journal3";
surl[1] = "journal4";
surl[2] = "journal5";
surl[3] = "journal6";
surl[4] = "journal8";
surl[5] = "bio";
}
else if (sect == "Love") {
sublength = 6;
direct = "/love/"
subm[0] = "Connection";
subm[1] = "Intimacy";
subm[2] = "Separation";
subm[3] = "Solitude";
subm[4] = "Sexuality";
subm[5] = "Links";
surl[0] = "connection";
surl[1] = "intimacy";
surl[2] = "separation";
surl[3] = "solitude";
surl[4] = "sex";
surl[5] = "links";
}
else if (sect == "Sex") {
sublength = 6;
direct = "/sex/"
subm[0] = "Health";
subm[1] = "Foreplay";
subm[2] = "Positions";
subm[3] = "Variants";
subm[4] = "Solo Sex";
subm[5] = "Erotica";
surl[0] = "health";
surl[1] = "foreplay";
surl[2] = "positions";
surl[3] = "variants";
surl[4] = "solo";
surl[5] = "stories";
}

if ( sect == "Main" ) { lside = 'Leftside2'; }
else { lside = 'Leftside'; }

if ( sect == "Blog" ) { rside = 'Rightside2'; }
else { rside = 'Rightside'; }

subtable = '<table cellpadding="0" cellspacing="0" width="100%"><tr><td width="5"><img src="/images/nav/' + lside + '.png"></td>';

//tdwid = 100 / sublength;  <td width="' + tdwid + '%" background

for(i = 0; i < sublength; i++ ) 
{ subtable += '<td background="/images/nav/Bottom.png"><a href="' + direct + surl[i] + '.html"><img src="/images/nav/' + subm[i] + '.png" id="' + subm[i] + '" onMouseOver="up(\'' + subm[i] + '\')" onMouseOut="down(\'' + subm[i] + '\')"></a></td>'; }

subtable += '<td width="5"><img src="/images/nav/';
subtable += rside;
subtable += '.png"></td></tr></table>';

document.getElementById('secondmenu').innerHTML = subtable;


} 


function up(imu) { document.getElementById(imu).src = '/images/nav/' + imu + '2.png'; }
function down(imd) { document.getElementById(imd).src = '/images/nav/' + imd + '.png'; }



