Begge ligger i samme bibliotek. Her ligger også coolmenus_cc_borders2.js.
menu.js:
/********************************************************************************
Copyright (C) 1999 Thomas Brattli
This script is made by and copyrighted to Thomas Brattli at
www.bratta.comVisit for more great scripts. This may be used freely as long as this msg is intact!
I will also appriciate any links you could give me.
********************************************************************************/
//Default browsercheck, added to all scripts!
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie5=(this.ver.indexOf(\"MSIE 5\")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
return this
}
bw=new checkBrowser()
</script>
</HEAD>
<BODY bgcolor=\"#ffffff\">
<script language=\"JavaScript1.2\" src=\"coolmenus_cc_borders2.js\">
/*******************************************************************************
Copyright (c) 1999 Thomas Brattli (
www.bratta.com)
eXperience DHTML coolMenus - Get it at
www.bratta.comVersion 2.0
This script can be used freely as long as all copyright messages are
intact. Visit
www.bratta.com/dhtml for the latest version of the script.
These are the varibles you have to set to customize the menu.
CoolMenus with borders
Modifications by DCage
*******************************************************************************/
</script>
<script>
/********************************************************************************
Variables to set.
Remember that to set fontsize and fonttype you set that in the stylesheet
above!
********************************************************************************/
//Making a menu object
oMenu=new menuObj(\'oMenu\') //Place a name for the menu in there. Must be uniqe for each menu
//Setting menu object variables
//Style variables NOTE: The stylesheet have been removed. Use this instead! (some styles are there by default, like position:absolute ++)
/*************************************************************/
// NEW NOTE: Don\'t specify your font colors in the styles below. They\'ll be ignored. Use the variables further down in the script.
// The styles with the \'Hilite\' suffixes are for the Netscape \"on\" state.
// If you want IE to display the \"hand\" cursor over the links, add \"cursor:hand;\" to each of the three classes with the \"clA\" prefixes at the bottom.
/*************************************************************/
oMenu.clMain=\'padding:5px; font-family:verdana; font-size:12px; font-weight:bold\' //The style for the main menus
oMenu.clMainHilite=\'padding:5px; font-family:verdana; font-size:10px; font-weight:bold;\' //The style for NN main mouseovers
oMenu.clSub=\'padding:5px; font-family:verdana; font-size:10px;\' //The style for the submenus
oMenu.clSubHilite=\'padding:5px; font-family:verdana; font-size:8px;\' //The style for NN submenu mouseovers
oMenu.clSubSub=\'padding:5px; font-family:verdana; font-size:10px;\' //The style for the subsubmenus
oMenu.clSubSubHilite=\'padding:5px; font-family:verdana; font-size:8px;\' //The style for NN subsubmenu mouseovers
oMenu.clAMain=\'text-decoration:none; cursor:default\' //The style for the main links
oMenu.clASub=\'text-decoration:none; cursor:default\' //The style for the sub links
oMenu.clASubSub=\'text-decoration:none; cursor:default\' //The style for the subsub links
/***************************************
Border and separator variables
NOTE: The first sub border (s1BorderSize) will default to the main border size if you\'re arranging the menus in columns across the top (menurows=1). Only if the menus are in left-hand rows (menurows=0) will the s1BorderSize variable be applied.
****************************************/
oMenu.mBorderColor= \'000000\';
oMenu.s1BorderColor= \'000000\';
oMenu.s2BorderColor= \'000000\';
oMenu.mBorderSize= 2; // The \"frame\" border size
oMenu.s1BorderSize= 2;
oMenu.s2BorderSize= 2;
oMenu.s1Separator= 1; // The borders between the menu items
oMenu.s2Separator= 1;
/****************************************
*****************************************/
//Background bar properties
oMenu.backgroundbar=1 //Set to 0 if no backgroundbar
oMenu.backgroundbarfromleft=0 //The left placement of the backgroundbar in pixel or %
oMenu.backgroundbarfromtop=20 //The top placement of the backgroundbar in pixel or %
oMenu.backgroundbarsize=\"100%\" //The size of the bar in pixel or %
oMenu.backgroundbarcolor=\"99CCFF\" //The backgroundcolor of the bar
oMenu.mainheight=25 //The height of the main menuitems in pixel or %
oMenu.mainwidth=130 //The width of the main menuitems in pixel or %
/**************************************************************/
// NEW VARIABLES
oMenu.mainOff= \'171746\'; // The main menu font \"off\" color
oMenu.mainHilite= \'FFFFFF\'; // The main menu font \"on\" color
oMenu.subOff= \'171746\' // The submenu font \"off\" color
oMenu.subHilite= \'FFFFFF\'; // The submenu font \"on\" color
oMenu.subsubOff= \'171746\' // The subsubmenu font \"off\" color
oMenu.subsubHilite= \'FFFFFF\' // The subsubmenu font \"on\" color
/**************************************************************/
/*These are new variables. In this example they are set like the previous version*/
oMenu.subwidth=oMenu.mainwidth // ** NEW ** The width of the submenus
oMenu.subheight=20 //The height if the subitems in pixel or %
oMenu.subsubwidth=oMenu.mainwidth // ** NEW ** The width of the subsubmenus in pixel or %
oMenu.subsubheight=oMenu.subheight //** NEW ** The height if the subsubitems in pixel or %
//Writing out the style for the menu (leave this line!)
oMenu.makeStyle()
oMenu.subplacement=oMenu.mainheight //** NEW ** Relative to the main item
oMenu.subsubXplacement=oMenu.subwidth/2 //** NEW ** The X placement of the subsubmenus, relative to the sub item
oMenu.subsubYplacement=7 //** NEW ** The Y placement of the subsubmenus, relative to the sub item
oMenu.mainbgcoloroff=\'#99CCFF\' //The backgroundcolor of the main menuitems
oMenu.mainbgcoloron=\'#171746\' //The backgroundcolor on mouseover of the main menuitems
oMenu.subbgcoloroff=\'#99CCFF\' //The backgroundcolor of the sub menuitems
oMenu.subbgcoloron=\'#171746\' //The backgroundcolor on mouseover of the sub menuitems
oMenu.subsubbgcoloroff=\'#99CCFF\' //The backgroundcolor of the subsub menuitems
oMenu.subsubbgcoloron=\'#171746\' //The backgroundcolor on mouseover of the subsub menuitems
oMenu.menuspeed=10 //The speed of the clipping in px
oMenu.menusubspeed=15 //The speed of the submenus clipping in px
oMenu.menurows=1 //Set to 0 if you want rows and to 1 if you want columns
//Placement of the menuitems
//Example in %:
//oMenu.menuplacement=new Array(\"20%\",\"40%\",\"60%\",\"50%\",\"65%\") //Remember to make the arrays contain as many values as you have main menuitems
//Example in px: (remember to use the \' \' around the numbers)
//oMenu.menuplacement=new Array(10,200,300,400,500)
//Example right beside eachother (only adding the pxbetween variable)
oMenu.menuplacement=0
//If you use the \"right beside eachother\" you cant how many pixel there should be between each here
oMenu.pxbetween=0 //in pixel or %
//And you can set where it should start from the left here
oMenu.fromleft=0 //in pixel or %
//This is how much from the top the menu should be.
oMenu.fromtop=20 //in pixel or %
/********************************************************************************
Construct your menus below
********************************************************************************/
//MAIN 0
//Main items:
// makeMain(MAIN_NUM,\'TEXT\',\'LINK\',\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeMain(0,\'Who are we?\',\'0\',\'0\')
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(0,0,\'The Baroness\',\'#\',4,\'bob\')
oMenu.makeSub(0,1,\'My husbond\',\'#\',4)
oMenu.makeSub(0,2,\'My daugther Camilla\',\'#\',4)
oMenu.makeSub(0,3,\'My daugther Annica\',\'#\',4)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(0,0,0,\'Introduction\',\'Liz/liz.htm\',2,\'main\')
oMenu.makeSubSub(0,0,1,\'Thoughts to share\',\'Liz/univers.htm\',2)
oMenu.makeSubSub(0,1,0,\'Introduction\',\'#\',2)
oMenu.makeSubSub(0,1,1,\'?\',\'#\',2)
oMenu.makeSubSub(0,2,0,\'Introduction\',\'#\',2)
oMenu.makeSubSub(0,2,1,\'?\',\'#\',2)
oMenu.makeSubSub(0,3,0,\'Introduction\',\'#\',2)
oMenu.makeSubSub(0,3,1,\'?\',\'#\',2)
//MAIN 1
//Main items:
// makeMain(MAIN_NUM,\'TEXT\',\'LINK\',\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeMain(1,\'Favourites\',\'0\',\'0\')
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(1,0,\'The Baroness\',\'#\',4,\'bob\')
oMenu.makeSub(1,1,\'Henrik\',\'#\',4)
oMenu.makeSub(1,2,\'Camilla\',\'#\',4)
oMenu.makeSub(1,3,\'Annica\',\'#\',4)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(1,0,0,\'Michael T. Weiss\',\'Liz/michael.htm\',2,\'main\')
oMenu.makeSubSub(1,0,1,\'Quotes\',\'#\',2)
oMenu.makeSubSub(1,1,0,\'?\',\'#\',2)
oMenu.makeSubSub(1,1,1,\'?\',\'#\',2)
oMenu.makeSubSub(1,2,0,\'Backstreet Boys\',\'#\',2)
oMenu.makeSubSub(1,2,1,\'?\',\'#\',2)
oMenu.makeSubSub(1,3,0,\'Aaron Carter\',\'#\',2)
oMenu.makeSubSub(1,3,1,\'?\',\'#\',2)
//MAIN 2
//Main items:
// makeMain(MAIN_NUM,\'TEXT\',\'LINK\',\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeMain(2,\'Photoalbum\',\'0\',\'0\')
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(2,0,\'New Year\',\'#\',4,\'bob\')
oMenu.makeSub(2,1,\'Friends\',\'#\',4)
oMenu.makeSub(2,2,\'?\',0,4)
oMenu.makeSub(2,3,\'?\',0,4)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(1,0,0,\'About me\',\'liz/liz.html\',2,\'main\')
oMenu.makeSubSub(1,0,1,\'Thoughts too share\',\'#\',2)
oMenu.makeSubSub(1,1,0,\'About Henrik\',\'#\',2)
oMenu.makeSubSub(1,1,1,\'?\',\'#\',2)
oMenu.makeSubSub(1,2,0,\'About Camilla\',\'#\',2)
oMenu.makeSubSub(1,2,1,\'?\',\'#\',2)
oMenu.makeSubSub(1,3,0,\'About Annica\',\'#\',2)
oMenu.makeSubSub(1,3,1,\'?\',\'#\',2)
//MAIN 3
//Main items:
// makeMain(MAIN_NUM,\'TEXT\',\'LINK\',\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeMain(3,\'Empty\',\'#\',\'#\')
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(3,0,\'The Baroness\',\'liz/main.htm\',4,\'bob\')
oMenu.makeSub(3,1,\'My husbond\',\'henrik/main.htm\',4)
oMenu.makeSub(3,2,\'My daugther, Camilla\',0,4)
oMenu.makeSub(3,3,\'My daugther, Annica\',0,4)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(3,0,0,\'About me\',\'liz/liz.html\',2,\'main\')
oMenu.makeSubSub(3,0,1,\'Thoughts too share\',\'#\',2)
oMenu.makeSubSub(3,1,0,\'About Henrik\',\'#\',2)
oMenu.makeSubSub(3,1,1,\'?\',\'#\',2)
oMenu.makeSubSub(3,2,0,\'About Camilla\',\'#\',2)
oMenu.makeSubSub(3,2,1,\'?\',\'#\',2)
oMenu.makeSubSub(3,3,0,\'About Annica\',\'#\',2)
oMenu.makeSubSub(3,3,1,\'?\',\'#\',2)
//MAIN 4
//Main items:
// makeMain(MAIN_NUM,\'TEXT\',\'LINK\',\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeMain(4,\'Links\',0,0)
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(4,0,\'Scripts\',\'0\',4,\'bob\')
oMenu.makeSub(4,1,\'Others\',\'0\',4)
oMenu.makeSub(4,2,\'?\',0,4)
oMenu.makeSub(4,3,\'?\',0,4)
//SubSub items:
// makeSubSub(MAIN_NUM,SUB_NUM,SUBSUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\')
oMenu.makeSubSub(4,0,0,\'About me\',\'liz/liz.html\',2,\'main\')
oMenu.makeSubSub(4,0,1,\'Thoughts too share\',\'#\',2)
oMenu.makeSubSub(4,1,0,\'About Henrik\',\'#\',2)
oMenu.makeSubSub(4,1,1,\'?\',\'#\',2)
oMenu.makeSubSub(4,2,0,\'About Camilla\',\'#\',2)
oMenu.makeSubSub(4,2,1,\'?\',\'#\',2)
oMenu.makeSubSub(4,3,0,\'About Annica\',\'#\',2)
oMenu.makeSubSub(4,3,1,\'?\',\'#\',2)
//MAIN 5
//Main items:
// makeMain(MAIN_NUM,\'TEXT\',\'LINK\',\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeMain(5,\'Animations\',0)
//Sub items:
// makeSub(MAIN_NUM,SUB_NUM,\'TEXT\',\'LINK\',TOTAL,\'FRAME_TARGET\') (set link to 0 if you want submenus of this menu item)
oMenu.makeSub(5,0,\'Animals\',\'#\',4,\'bob\')
oMenu.makeSub(5,1,\'People\',\'#\',4)
oMenu.makeSub(5,2,\'Mail\',\'#\',4)
oMenu.makeSub(5,3,\'Misc\',\'#\',4) /********************************************************************************
End menu construction
********************************************************************************/
//When all the menus are written out we initiates the menu
oMenu.construct()
index.htm:
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\">
<HTML>
<HEAD>
<!-- Minus AutoDato -->
<TITLE>index.htm</TITLE>
<META NAME=\"Generator\" CONTENT=\"Stone\'s WebWriter 3\">
<style type=\"text/css\">
</style>
<script language=\"javascript\" type=\"text/javascript\" src=\"menu.js\"></script>
</HEAD>
<BR>
<BR>
<BR>
<TABLE BORDER=\"0\" CELLPADDING=\"4\">
<TR>
<TD WIDTH=\"10%\"><BODY <body BGCOLOR=\"#FFFFFF\">
<B><I><FONT FACE=\"Americana\" SIZE=\"5\" COLOR=\"#99CCFF\"><DIV STYLE=\"text-align:left\">T<BR>h<BR>e<BR><BR> B<BR>a<BR>r<BR>o<BR>n<BR>e<BR>s<BR>s</DIV></FONT></I></B>
<BR>
</body></TD>
<TD WIDTH=\"90%\" BGCOLOR=\"#99CCFF\"><BODY TEXT=\"#171746\" LINK=\"#0000FF\" VLINK=\"#660066\" ALINK=\"#FF0000\">
<FONT FACE=\"Americana\" STYLE=\"BOLD\" SIZE=\"3\">Welcome</FONT>
<BR>
<BR><FONT FACE=\"Americana\" STYLE=\"BOLD\" SIZE=\"2\">This is a site mainly about me, my family and our interests. Hope you\'ll find something interesting.</FONT>
<BR>
<BR>
<DIV STYLE=\"text-align:center\"><IMG SRC=\"Grafik/monkeybusiness.gif\" BORDER=\"0\" WIDTH=\"271\" HEIGHT=\"240\" ALIGN=\"bottom\" ALT=\"\"></DIV>
</TD>
</TR>
</TABLE>
</BODY>
</HTML>