directoryNames = new Array();

directoryNames[1] = "ontop";
var menu1 = "On Top"; var menu1i = new Array(); var menu1s = new Array();
menu1i[1] = "Special Segment"; menu1s[1] = "A unique, unclassifiable, non-regular segment";
menu1i[2] = "News Wire"; menu1s[2] = "Summarized daily news from major periodicals";
menu1i[3] = "SexSigns"; menu1s[3] = "Horoscope";
menu1i[3] = "The Roving Eye"; menu1s[3] = "Recommendation";
menu1i[4] = "CyberClips"; menu1s[4] = "Quote of the day from e-mails sent to us, or general";

directoryNames[2] = "theweekinsex";
var menu2 = "The Week in Sex"; var menu2i = new Array(); var menu2s = new Array();
menu2i[1] = "SexNews"; menu2s[1] = "News roundup, PC Patrol, Extreme Positions, Milestones, MediaBites, Weekly Polls/Surveys, FreeSpeech";
menu2i[2] = "SensoFrenzy"; menu2s[2] = "10, People: StarFaves / Talk to Me / Eavesdropping, Strange Bedfellows";

directoryNames[3] = "takingpositions";
var menu3 = "Taking Positions"; var menu3i = new Array(); var menu3s = new Array();
menu3i[1] = "On the Spot"; menu3s[1] = "1-page putting someone in the news on the spot";
menu3i[2] = "Columns"; menu3s[2] = "US Confidential, Media, Politics, Religion, Law, Gender, Zeitgeist - any combination";

directoryNames[4] = "culture";
var menu4 = "Culture"; var menu4i = new Array(); var menu4s = new Array();
var menu4 = "Arts, Culture, Entertainment"; var menu4i = new Array(); var menu4s = new Array();
menu4i[1] = "Feature"; menu4s[1] = "A show, book, art, design, fashion, furniture, graphics";
menu4i[2] = "Pink Guide"; menu4s[2] = "Listings and reviews of books, TV, film, music, theater, websites; w/\"Timeout\"";
menu4i[3] = "Erotic Classics"; menu4s[3] = "Essays on literary erotic classics";

directoryNames[5] = "health&body";
var menu5 = "Health & Body"; var menu5i = new Array(); var menu5s = new Array();
menu5i[1] = "Sexual Mind & Body"; menu5s[1] = "Health & Fitness, Tidbits, The Lab";
menu5i[2] = "Adviser"; menu5s[2] = "Q&A General advice from Dr. Francoeur, also farmed out to Museum Board";
menu5i[3] = "Sex on the Rocks"; menu5s[3] = "Reader-driven comments on troubled relationships, daily reader feedback";
menu5i[4] = "Sex by Numbers"; menu5s[4] = "Reader-driven daily updated sex polls, daily reader feedback";
menu5i[5] = "Sex School"; menu5s[5] = "Francoeur pieces on specialized subjects, info from scanned books, other resources";
menu5i[6] = "Kinsey Page"; menu5s[6] = "Updates Kinsey Institute research";

directoryNames[6] = "sexlife";
var menu6 = "Sex Life"; var menu6i = new Array(); var menu6s = new Array();
menu6i[1] = "A Sex Life"; menu6s[1] = "True sexual biographies of ordinary women and men";
menu6i[2] = "Women's Column"; menu6s[2] = "A female perspective on sex and relationships";
menu6i[3] = "Men's Column"; menu6s[3] = "A male perspective on sex and relationships";
menu6i[4] = "Lesbian"; menu6s[4] = "What's happening in the world of lesbian sex and sexual politics";
menu6i[5] = "Gay"; menu6s[5] = "What's happening in the world of gay sex and sexual politics";
menu6i[6] = "Art of Love"; menu6s[6] = "A how-to guide to lovemaking";
menu6i[7] = "Sex Anthropology"; menu6s[7] = "Sex customs from around the world";

directoryNames[7] = "technology";
var menu7 = "Technology"; var menu7i = new Array(); var menu7s = new Array();
menu7i[1] = "TechnoSex"; menu7s[1] = "The latest high & low technology items and objects, cyber, software, computer, internet";
menu7i[2] = "Future Sex"; menu7s[2] = "Biomedical research, Cyber/Software/Computer/Internet";

directoryNames[8] = "fiction";
var menu8 = "Fiction"; var menu8i = new Array(); var menu8s = new Array();
menu8i[1] = "New Talent"; menu8s[1] = "New authors of erotic fiction, reader submissions";
menu8i[2] = "General Fiction"; menu8s[2] = "Known authors";
menu8i[3] = "Erotica"; menu8s[3] = "Graphic fiction";
menu8i[4] = "Poetry"; menu8s[4] = "Reader contributions";

directoryNames[9] = "thescene";
var menu9 = "The Scene"; var menu9i = new Array(); var menu9s = new Array();
menu9i[1] = "Club Zed"; menu9s[1] = "Feature review of underground scene";
menu9i[2] = "Destinations"; menu9s[2] = "Feature review of travel oriented sex sites";
menu9i[3] = "Fetish"; menu9s[3] = "A column about the fetish scene";
menu9i[4] = "BDSM"; menu9s[4] = "S&M lifestyle; what the life is like written by two people living the life";
menu9i[5] = "Erotic Cinema"; menu9s[5] = "Erotic cinema reviews by Annie Sprinkle";

directoryNames[10] = "lastgasm";
var menu10 = "Last Gasm"; var menu10i = new Array(); var menu10s = new Array();
menu10i[1] = "Confessional"; menu10s[1] = "Readers writing in about their adventures, fantasies, etc.";
menu10i[2] = "Peephole"; menu10s[2] = "Photo/Art";
menu10i[3] = "True Adventure"; menu10s[3] = "Autobiographical";
menu10i[4] = "Bijou"; menu10s[4] = "Live video of sex-pertinent material, inaugural film: first ever sex-ed movie circa 1970 now on DVD format";

//=========================================================VARIABLES

var menuVal;
var buttY = 0;
var menuHeight = 260;
var scrollWidth = 16;
var textHeight;//filled in by measureText();
var marginWidth = 23;
var menuIconH = 48;
var textRight = 492;
var ornaMargin = 60;
var Tscrolling = false;
var scrollFactor;
var scrollButtHeight;
var scrollTop;//scroLLButtTop
//var curi;//keeps track of last rolled over top level menu item

var rootPath = parent.zPath;
var imagesPath = rootPath + 'images/';
var menuIconP = ''
+ '<A HREF="javascript:goHome();" onMouseover="showMenu();">'
+ '<IMG SRC="' + imagesPath + menuImage + '" WIDTH=' + marginWidth + ' HEIGHT=48 BORDER=0></A>'
var transpaImage = rootPath + 'images/transpa.gif';

//=========================================================GENERATE MENU

function writeMenu()
{
if ( NN ) { measureStage(); };

measureText();

menuHTML = '<DIV ID="menuL">'

for ( i = 1 ; i <= 10 ; i++ )
	{
	thisName = 'menu' + i;
	thisTitle = eval(thisName)
	menuHTML += '<DIV ID="menu' + i + 'L" CLASS="menuItem" onMouseover="show(' + i + ');" onMouseout="hide(' + i + ');">'
	menuHTML += '<TABLE WIDTH=170 BORDER=0 CELLPADDING=0 CELLSPACING=0>'
	menuHTML += '<TR><TD HEIGHT=20 ALIGN="left" VALIGN="middle" BGCOLOR="#000000">'
	menuHTML += '<NOBR>&nbsp;<A HREF="javascript:go(' + i + ');" onMouseover="show(' + i + ');return true;" onMouseout="hide(' + i + ');">' + thisTitle + '</A></NOBR>'
	menuHTML += '</TD><TD WIDTH=170 BGCOLOR="#000000" ALIGN="right"><IMG SRC="' + transpaImage + '" NAME="morna' + i + '" WIDTH=18 HEIGHT=16>'
	menuHTML += '</TD></TR></TABLE>'
	menuHTML += '</DIV>'

	thisMenuHTML = ''
	thisList = eval(thisName + 'i');
	for ( j = 1 ; j <= thisList.length-1 ; j++ )
		{
		arrow = 0;
		leftCell = '<TD></TD>'
		if ( j == 1 ) { arrow = 1; }

		if ( i == 6 )
			{ if ( j == 3 ) { arrow = 1; } else { arrow = 0; }; };
		if ( i == 8 )
			{ if ( j == 2 ) { arrow = 1; } else { arrow = 0; }; };
		if ( i == 9 )
			{ if ( j == 3 ) { arrow = 1; } else { arrow = 0; }; };
		if ( i == 10 )
			{ if ( j == 4 ) { arrow = 1; } else { arrow = 0; }; };

		if ( arrow == 1 ) { leftCell = '<TD BGCOLOR="#000000" VALIGN="top" WIDTH=20><IMG SRC="' + imagesPath + 'orna_a1.gif"></TD>'; };
		thisMenuHTML += leftCell
 		thisMenuHTML += '<TD WIDTH=170 HEIGHT=20 ALIGN="left" VALIGN=MIDDLE BGCOLOR="#000000"><NOBR>&nbsp;<A HREF="javascript:go(' + i + ',' + j + ');" onMouseover="show(' + i + ',' + j + ');return true;" onMouseout="hide(' + i + ',' + j + ');">' + thisList[j] + '</A></NOBR></TD></TR><TR>'
		};

	thisClass = "menuList";
	thisItem = ''
	+ '<TABLE WIDTH=200 BORDER=0 CELLPADDING=2 CELLSPACING=1>'
	+ thisMenuHTML

	menuHTML += '<DIV ID="menus' + i + 'L" CLASS="' + thisClass + '">'
	menuHTML += thisItem
	menuHTML += '</TR></TABLE>'
	menuHTML += '</DIV>'
	};

menuHTML += '</DIV>'

document.write(menuHTML);

if ( pageType == 'text' ) { writeTextEnv(); }
else if ( pageType == 'index' ) { writeIndexEnv(); }
else if ( pageType == 'home' ) { writeHomeEnv(); }
};

function writeHomeEnv()
{
lineColor = "#000000";
buttY = 0 - menuIconH;
menuButtonHTML = '<DIV ID="menuButtonL">'
+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>'
+ '<TR>'
+ '<TD WIDTH=' + marginWidth + ' HEIGHT=60 VALIGN="bottom" BGCOLOR="#666666">'
+ '<IMG SRC="./images/menuicon_home.gif">'
+ '</TD>'
+ '<TD WIDTH=1 HEIGHT=60 BGCOLOR="' + lineColor + '">'
+ '<IMG SRC="' + transpaImage + '" WIDTH=1 HEIGHT=1>'
+ '</TD>'
+ '<TD WIDTH=' + (stageW-marginWidth-1) + ' HEIGHT=60 VALIGN="bottom" COLSPAN=2 BACKGROUND="./images/home_greyborder.gif" BGCOLOR="#666666">'
+ '<IMG SRC="./images/home_osition.gif">'
+ '</TD>'
+ '</TR><TR>'
+ '<TD WIDTH=' + stageW + ' HEIGHT=1 COLSPAN=4 BGCOLOR="' + lineColor + '">'
+ '<IMG SRC="' + transpaImage + '" WIDTH=1 HEIGHT=1>'
+ '</TD>'
+ '</TR><TR>'
+ '<TD ROWSPAN=2 WIDTH=' + marginWidth + ' VALIGN="top" BACKGROUND="./images/home_greysideborder.gif" BGCOLOR="#000000">'
+ '<IMG SRC="./images/home_the.gif">'
+ '</TD>'
+ '<TD ROWSPAN=2 WIDTH=1 HEIGHT=' + (stageH-61) + ' BGCOLOR="' + lineColor + '">'
+ '<IMG SRC="' + transpaImage + '" WIDTH=1 HEIGHT=1>'
+ '</TD>'
+ '<TD VALIGN="bottom" $BGCOLOR="#DE8F7C" $BACKGROUND="./images/semitran_000000.gif">'
+ '<IMG SRC="' + transpaImage + '" WIDTH=169 HEIGHT=209 BORDER=0>'
+ '</TD>'
+ '<TD VALIGN="bottom" ROWSPAN=2 $BGCOLOR="#00ff00">'
+ '<IMG SRC="' + transpaImage + '" WIDTH=' + (stageW-marginWidth-169-1) + ' HEIGHT=1>'
+ '</TD>'
+ '</TR><TR>'
+ '<TD VALIGN="bottom" BACKGROUND="./images/semitran_000000.gif" $BGCOLOR="#666666">'
+ '<IMG SRC="' + transpaImage + '" WIDTH=1 HEIGHT=' + (stageH-60-1-209) + '>'
+ '</TD>'
+ '</TR></TABLE>'
+ '</DIV>'
document.write(menuButtonHTML);
writeScrollBars();
showScrollBars();
showMenu();
startToolTipThing();
};

function writeIndexEnv()
{
ornaMargin = 0;
writeMenuLines();
menuButtonHTML = '<DIV ID="menuButtonL">'
+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>'
+ '<TR>'
+ '<TD WIDTH=' + marginWidth + ' VALIGN="top" ROWSPAN=2 $BGCOLOR="#000000">'
+ menuIconP
+ '</TD>'
+ '<TD HEIGHT=' + stageH + ' BGCOLOR="' + overColor + '" VALIGN="bottom"><IMG SRC="' + transpaImage + '" WIDTH=' + (textRight-marginWidth) + ' HEIGHT=1></TD>'
+ '<TD WIDTH=' + (stageW-textRight) + ' $BGCOLOR="#000000" VALIGN="top">'
+ '</TD>'
+ '</TR></TABLE>'
+ '</DIV>'
document.write(menuButtonHTML);

writeLetters();
writeScrollBars();
startMoveMenu();
};


function writeTextEnv()
{
menuButtonHTML = '<DIV ID="menuButtonL">'

+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>'
+ '<TD WIDTH=' + (stageW-scrollWidth) + ' VALIGN="top" ALIGN="right"><IMG SRC="' + transpaImage + '" HEIGHT=' + ornaMargin + ' WIDTH=1><IMG SRC="' + imagesPath + ornamentImage + '">'
+ '</TD></TR></TABLE>'

+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>'
+ '<TR><TD WIDTH=' + (stageW-scrollWidth) + ' COLSPAN=3 BGCOLOR="' + lineColor + '" HEIGHT=1 ALIGN="right"><IMG SRC="' + transpaImage + '" WIDTH=1 HEIGHT=1></TD></TR>'
+ '<TR>'
+ '<TD WIDTH=' + marginWidth + ' VALIGN="top" ROWSPAN=2 $BGCOLOR="#000000">'
+ menuIconP
+ '</TD>'
+ '<TD HEIGHT=' + stageH + ' BGCOLOR="' + overColor + '" VALIGN="bottom"><IMG SRC="' + transpaImage + '" WIDTH=' + (textRight-marginWidth) + ' HEIGHT=1></TD>'
//+ '<TD WIDTH=1 HEIGHT=' + stageH + ' BGCOLOR="#ffffffD757FF" ALIGN="left" VALIGN="top"><IMG SRC="' + transpaImage + '" WIDTH=1 HEIGHT=1></TD>'
+ '<TD WIDTH=' + (stageW-textRight) + ' BGCOLOR="#000000" VALIGN="top">'
+ '<SPAN CLASS="keywords">'
+ '&nbsp;KEYWORDS:<BR>' + keywordsText
+ '<BR><BR>&nbsp;RELATED:<BR>' + relatedText
+ '<BR><BR>&nbsp;<A HREF="javascript://">SEARCH ARCHIVE</A>'
+ '<BR>&nbsp;<A HREF="javascript://">PRINT TEXT</A>'
+ '</SPAN>'
+ '</TD>'
+ '</TR></TABLE>'
+ '</DIV>'

document.write(menuButtonHTML);

writeLetters();
writeScrollBars();
writeMenuLines();

startMoveMenu();
};

function writeLetters()
{
posHTML = ''
posHTML += '<DIV ID="letter1" CLASS="letter">T</DIV>'
posHTML += '<DIV ID="letter2" CLASS="letter">H</DIV>'
posHTML += '<DIV ID="letter3" CLASS="letter">E</DIV>'
//posHTML += '<DIV ID="letter4" CLASS="letter">P</DIV>'
posHTML += '<DIV ID="letter5" CLASS="letter">O</DIV>'
posHTML += '<DIV ID="letter6" CLASS="letter">S</DIV>'
posHTML += '<DIV ID="letter7" CLASS="letter">I</DIV>'
posHTML += '<DIV ID="letter8" CLASS="letter">T</DIV>'
posHTML += '<DIV ID="letter9" CLASS="letter">I</DIV>'
posHTML += '<DIV ID="letter10" CLASS="letter">O</DIV>'
posHTML += '<DIV ID="letter11" CLASS="letter">N</DIV>'
document.write(posHTML);
};

function writeScrollBars()
{
scrollFactor = textHeight/(stageH-scrollWidth*2);
scrollButtHeight = Math.round(stageH/scrollFactor);
if ( scrollButtHeight <= scrollWidth*2 ) { scrollButtHeight = scrollWidth*2; };

if ( scrollFactor <= 1 ) { scrollButtHeight = stageH - scrollWidth*2; };

scrollHTML = ''

+ '<DIV ID="scrollBarL">'
+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT=' + stageH + '>'
+ '<TR><TD VALIGN="top" ALIGN="right"><IMG SRC="' + imagesPath + '_scrollup.gif" WIDTH=16 HEIGHT=16></TD></TR>'
+ '<TR><TD VALIGN="bottom" ALIGN="right"><IMG SRC="' + imagesPath + '_scrolldown.gif" WIDTH=16 HEIGHT=16></TD></TR>'
+ '</TD></TR></TABLE>'
+ '</DIV>'

+ '<DIV ID="scrollButtL">'
+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 HEIGHT=' + scrollButtHeight + '>'
+ '<TR><TD BACKGROUND="' + imagesPath + '_scrollb.gif" VALIGN="top" ALIGN="right"><IMG SRC="' + imagesPath + '_scrollbup.gif" WIDTH=16 HEIGHT=16></TD></TR>'
+ '<TR><TD BACKGROUND="' + imagesPath + '_scrollb.gif" VALIGN="bottom" ALIGN="right"><IMG SRC="' + imagesPath + '_scrollbdown.gif" WIDTH=16 HEIGHT=16></TD></TR>'
+ '</TABLE>'
+ '</DIV>'
document.write(scrollHTML);

coverHTML = ''
if ( NN )
	{
	coverHTML += dMakeDiv('','scrollCoverL',0,0,'100%','100%','none',10010,clipL,clipT,clipR,clipB,thisClassN,thisVisibility,thisExtra,'get');
	coverHTML += dMakeDiv('','scrollBarCoverL',stageW-scrollWidth,0,scrollWidth,stageH,'none',1000,clipL,clipT,clipR,clipB,thisClassN,thisVisibility,thisExtra,'get');
	}
else
	{
	coverHTML += '<DIV ID="scrollCoverL"></DIV>'
	};
document.write(coverHTML);
};

function writeMenuLines()
{
menuLinesHTML = ''
+ '<DIV ID="menuLineL">'
+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>'
+ '<TR><TD BGCOLOR="#' + lineColor + '" WIDTH=1 HEIGHT=' + stageH + ' VALIGN="bottom" ALIGN="right"><IMG SRC="' + transpaImage + '" WIDTH=1 HEIGHT=1>'
+ '</TD></TR></TABLE>'
+ '</DIV>'

+ '<DIV ID="leftMarginL">'
+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>'
+ '<TR><TD BGCOLOR="#000000" HEIGHT=' + stageH + ' VALIGN="bottom" ALIGN="right"><IMG SRC="' + transpaImage + '" WIDTH=' + marginWidth + ' HEIGHT=1>'
+ '</TD></TR></TABLE>'
+ '</DIV>'

+ '<DIV ID="rightMarginL">'
+ '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>'
+ '<TR><TD BGCOLOR="#' + rightColor + '" WIDTH=' + stageW + ' HEIGHT=' + stageH + ' VALIGN="bottom" ALIGN="right"><IMG SRC="' + transpaImage + '" WIDTH=' + stageH + ' HEIGHT=1>'
+ '</TD></TR></TABLE>'
+ '</DIV>'

document.write(menuLinesHTML);
};

//=========================================================SYTEM

function measureStage()
{
sizeHTML = ''
+ '<DIV ID="sizeL">'
+ '<TABLE WIDTH=100% HEIGHT=100% BORDER=0 CELLPADDING=0 CELLSPACING=0><TR><TD ALIGN=CENTER VALIGN=MIDDLE>'
+ '&nbsp;'
+ '</TD></TR></TABLE>'
+ '</DIV>'

document.write(sizeHTML);
thisW = dMeasure('sizeL','document.','width');
thisH = dMeasure('sizeL','document.','height');
//alert(stageW + ' ' + thisW);
stageW = thisW;
stageH = thisH;
};

function measureText()
{
if ( NN )
	{
	textHeight = dMeasure('textL','document.','height');
	}
else
	{
	textHeight = textL.scrollHeight;
	};
};


//=========================================================EVENT CAPTURING & CURSOR INTERACTION

function mDown(e)
{
if ( mouseX >= stageW-scrollWidth )
	{
	clearInterval(menuVal);
	how = "not";
	scrollTop = dMeasure('scrollButtL','document.','top');
	if ( mouseY <= scrollWidth ) { how = "up"; }
	else if ( mouseY >= stageH - scrollWidth ) { how = "down"; }
	else if ( dMouseOn('scrollButtL','document.') ) { how = "butt";	}
	else if ( mouseY < scrollTop ) { how = "upup"; }
	else if ( mouseY > scrollTop + scrollButtHeight ) { how = "downdown"; }
	scrollText(how);
	menuVal = setInterval('scrollText("' + how + '");',100);
	dShow('scrollCoverL','document.','visible');
	if ( how != "not" ) { dColor('scrollBarL','document.',scrollOnColor); dragging = true; };
	Tscrolling = true;
	};
if ( dragging && yourPlatform == "Mac" ) { return false; };
};

function mUp(e)
{
if ( Tscrolling )
	{
	clearInterval(menuVal);
	if ( pageType == 'text' ) { menuVal = setInterval('moveMenu();',100); };
	dShow('scrollCoverL','document.','hidden');
	dColor('scrollBarL','document.',scrollOffColor);
	Tscrolling = false;
	};
dragging = false;
};

function mMove(e)
{
dGetMouse(e);
if ( dragging && navigator.appName == "Microsoft Internet Explorer" ) { return false; };
};

function scrollText(how)
{
scrollTop = dMeasure('scrollButtL','document.','top');
if ( how == "butt" ) { sY = mouseY-clickY; }
else if ( how == "up" ) { sY = scrollTop - 5; }
else if ( how == "down" ) { sY = scrollTop + 5; }
else if ( how == "upup" ) { sY = scrollTop - 20; }
else if ( how == "downdown" ) { sY = scrollTop + 20; }

if ( sY < scrollWidth ) { sY = scrollWidth; }
else if ( sY + scrollButtHeight > stageH - scrollWidth ) { sY = stageH - scrollButtHeight - scrollWidth; }

dMove('scrollButtL','document.','none',sY);

tY = (scrollWidth - sY) * scrollFactor;
dMove('textL','document.','none',tY);
};

function moveMenu()
{
if ( mouseX < textRight )
	{
	if ( NN ) { sTop = 0; } else { sTop = document.body.scrollTop; };
	buttY = dMeasure('menuButtonL','document.','top') + sTop;
	thisMouseY = mouseY - ornaMargin - menuIconH/2;
	newY = thisMouseY - ( thisMouseY - buttY )*0.8;
	if ( newY > -ornaMargin && newY < stageH-ornaMargin-menuIconH ) { dMove('menuButtonL','document.','none',newY); };
	if ( scrollFactor > 1 ) { moveText(); };
	};
moveLetters();
};

function moveText()
{
if ( NN ) { sTop = 0; } else { sTop = document.body.scrollTop; };
textY = dMeasure('textL','document.','top') + sTop;
var plusY = 0;
if ( mouseY > stageH - 5 ) { plusY = -10; }
else if ( mouseY > stageH - stageH/4) { plusY = -2; }
else if ( mouseY < 5 ) { plusY = +10; }
else if ( mouseY < stageH/4 ) { plusY = +2; }
if ( plusY != 0 )
	{
	thisY = textY + plusY;
	thissY = scrollWidth-thisY/scrollFactor;
	if ( thissY < scrollWidth ) { thissY = scrollWidth; thisY = 0}
	else if ( thissY + scrollButtHeight > stageH - scrollWidth ) { thissY = stageH - scrollButtHeight - scrollWidth; thisY = stageH - textHeight; }
	dMove('textL','document.',50,thisY);
	dMove('scrollButtL','document.','none',thissY);
	};
};

function moveLetters()
{
letterH = (buttY+ornaMargin)/3;
for ( i = 2 ; i <= 3 ; i++ )
	{
	newY = letterH*(i-1)
	thisY = newY + (dMeasure('letter' + i,'document.','top')-newY)*0.5;
	if ( thisY > 5 ) { dMove('letter' + i,'document.','none',thisY); };
	};
buttBott = buttY + ornaMargin + menuIconH;
letterH = (stageH-buttBott)/7;
buttBott += letterH/2;
for ( i = 5 ; i <= 10 ; i++ )
	{
	newY = buttBott + letterH*(i-5)
	thisY = newY + (dMeasure('letter' + i,'document.','top')-newY)*0.5;
	if ( thisY < stageH - 20 ) { dMove('letter' + i,'document.','none',thisY); };
	};
};

function startMoveMenu()
{
mouseY = halfH;
hideMenu();
clearInterval(menuVal);
menuVal = setInterval('moveMenu();',100);
setTimeout("dShow('menuButtonL','document.','visible');",200);
if ( pageType != 'home' )
	{
	showScrollBars();
	dMove('letter1','document.','none',5);
	dMove('letter11','document.','none',stageH-20);
	};
};

function showScrollBars()
{
dColor('scrollBarL','document.',scrollOffColor);
dMove('scrollBarL','document.',stageW-scrollWidth,'none');
dMove('scrollButtL','document.',stageW-scrollWidth,'none');
dShow('scrollCoverL','document.','hidden');
if ( scrollFactor > 1 )
	{
	dShow('scrollBarL','document.','visible');
	dShow('scrollButtL','document.','visible');
	};
}

function checkMenu()
{
if ( pageType == 'home' )
	{
	if ( mouseX > 380 || mouseX < marginWidth || mouseY < 60 )
		{ hideSubMenus(); };
	}
else
	{ 
	if ( mouseX > 380 || mouseY < buttY + ornaMargin )
		{ startMoveMenu(); };
	moveLetters();
	}
};

//=========================================================NAVIGATION

function showMenu()
{
clearInterval(menuVal);
if ( pageType != 'home' )
	{
	if ( stageH - buttY < menuHeight ) { dMove('menuButtonL','document.','none',stageH-menuHeight - ornaMargin);buttY = stageH - menuHeight - ornaMargin; };
	};
thisY = buttY+2;
if ( pageType == 'index' ) { thisY -= 60; };
dMove('menuL','document.','none',thisY);
dShow('menuL','document.','visible');
menuVal = setInterval('checkMenu();',100);
};

function goHome()
{
location.href = rootPath + "_home.html";
};

function hideMenu()
{
hideSubMenus();
dShow('menuL','document.','hidden');
};

function go(thisi,thisl)
{
if ( thisl )
	{
	location.href = rootPath + directoryNames[thisi] + '_text.html';
	}
else
	{
	location.href = rootPath + directoryNames[thisi] + '_index.html';
	};
};

function show(thisi,thisl)
{
if ( thisl )
	{
	window.status = eval('menu' + thisi + 's[' + thisl + ']');
	}
else
	{
	hideSubMenus();
	dSize('menuL','document.',340,315);
	dShow('menus' + thisi + 'L','document.menuL.document.','visible');
	//dColor('menus' + thisi + 'L','document.menuL.document.','ffffff');
	//dColor('menu' + thisi + 'L','document.menuL.document.','ff0000');
	window.status = eval('menu' + thisi);
	};
//dImgSrc('morna' + thisi,'document.menuL.document.menu' + thisi + 'L.document.',imagesPath + 'orna_a1.gif');
};

function hide(thisi,thisl)
{
};

function hideSubMenus()
{
for ( i = 1 ; i <= 10 ; i++ )
	{
	dShow('menus' + i + 'L','document.menuL.document.','hidden');
	};
dSize('menuL','document.',170,315);
};

function startToolTipThing()
{
tipVal = setInterval("toolTipThing();",100);
};

function toolTipThing()
{
thisX = dMeasure('tooltipL','document.','left');
thisY = dMeasure('tooltipL','document.','top');
newX = thisX + ( mouseX+10 - thisX ) * 0.5
newY = thisY + ( mouseY+10 - thisY ) * 0.5
dMove('tooltipL','document.',newX,newY);
thisX = dMeasure('abstractart','document.','left');
thisY = dMeasure('abstractart','document.','top');
newX = thisX + ( mouseX-300 - thisX ) * 0.1
newY = thisY + ( mouseY-300 - thisY ) * 0.1
dMove('abstractart','document.',newX,newY);
};

