204 lines
9.7 KiB
HTML
204 lines
9.7 KiB
HTML
|
<html>
|
|||
|
<head>
|
|||
|
<title>Menu page</title>
|
|||
|
<script language="JavaScript1.2" type="text/javascript">
|
|||
|
|
|||
|
/*******************************************************************************
|
|||
|
Copyright (c) 1999 Thomas Brattli (www.bratta.com)
|
|||
|
|
|||
|
eXperience DHTML coolFrameMenus - Get it at www.bratta.com
|
|||
|
Version Beta 1.0
|
|||
|
This script can be used freely as long as all copyright messages are
|
|||
|
intact.
|
|||
|
|
|||
|
Visit www.bratta.com/dhtml/scripts.asp for the latest version of the script.
|
|||
|
*******************************************************************************/
|
|||
|
|
|||
|
/*****************************************************************************
|
|||
|
Default browsercheck
|
|||
|
******************************************************************************/
|
|||
|
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.opera=!(this.ie5 || this.ie4 || this.ns4 || this.ns5) && this.dom
|
|||
|
this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5)
|
|||
|
return this
|
|||
|
}
|
|||
|
var bw=new checkBrowser()
|
|||
|
</script>
|
|||
|
<script language="JavaScript1.2" src="coolframe.js" type="text/javascript"></script>
|
|||
|
</head>
|
|||
|
<body bgcolor="#C68484">
|
|||
|
<script language="JavaScript1.2" type="text/javascript">
|
|||
|
/*******************************************************************************
|
|||
|
Copyright (c) 1999 Thomas Brattli (www.bratta.com)
|
|||
|
|
|||
|
eXperience DHTML coolFrameMenus - Get it at www.bratta.com
|
|||
|
Version Beta 1.0
|
|||
|
This script can be used freely as long as all copyright messages are
|
|||
|
intact.
|
|||
|
|
|||
|
Visit www.bratta.com/dhtml/scripts.asp for the latest version of the script.
|
|||
|
*******************************************************************************/
|
|||
|
|
|||
|
/*****************************************************************************
|
|||
|
Main variables
|
|||
|
******************************************************************************/
|
|||
|
mDebugging=1 //Set to 0 for NO Debugging, set to 1 for alert debugging and set to 2 for status.
|
|||
|
|
|||
|
oCFMenu=new coolFrameMenu('oCFMenu') //Making a new menu
|
|||
|
|
|||
|
oCFMenu.menuFrameName="frmMain" //The name of your "main" frame
|
|||
|
oCFMenu.startPage="bienvenue.html" //The first page to appear in the main frame (it's important that this is loaded after the menu is created!)
|
|||
|
oCFMenu.maxsubs=3 //The max number of subs you will have
|
|||
|
oCFMenu.maxsubs2=2 //The max number of sub2s you will have
|
|||
|
oCFMenu.maxsubs3=0 //The max number of sub2s you will have
|
|||
|
|
|||
|
//Frametype:
|
|||
|
// 0 = menu in left frame
|
|||
|
// 1 = menu in right frame
|
|||
|
// 2 = menu in top frame
|
|||
|
// 3 = menu in bottom frame
|
|||
|
oCFMenu.frametype=2
|
|||
|
//NOTE: If your using 1 or 3 and expect to have scrollbars remember to set the subXplacement and subYplacement to suit the scrollbars.
|
|||
|
//I was going to add an automatic check of that, but then I would have had to add more code in the main pages (a onload function)
|
|||
|
//And I didn't want to do that
|
|||
|
|
|||
|
oCFMenu.pagecheck=1 //This is a check that will keep the submenus from going to far out! Only for top and bottom frame
|
|||
|
|
|||
|
oCFMenu.mainheight="25" //The height of the main menuitems in pixel or %
|
|||
|
oCFMenu.mainwidth="120" //The width of the main menuitems in pixel or %
|
|||
|
|
|||
|
oCFMenu.subwidth="180" // The width of the submenus
|
|||
|
oCFMenu.subheight=25 //The height if the subitems in pixel or % of the menu frame
|
|||
|
|
|||
|
oCFMenu.sub2width=oCFMenu.mainwidth // The width of the sub2menus in pixel or % of the menu frame
|
|||
|
oCFMenu.sub2height=oCFMenu.subheight // The height if the sub2items in pixel or % of the menu frame
|
|||
|
|
|||
|
oCFMenu.sub3width=oCFMenu.mainwidth // The width of the sub3menus in pixel or % of the menu frame
|
|||
|
oCFMenu.sub3height=oCFMenu.subheight // The height if the sub3items in pixel or % of the menu frame
|
|||
|
|
|||
|
oCFMenu.subXplacement=0 // Relative to the main item
|
|||
|
oCFMenu.subYplacement=0 // Relative to the main item
|
|||
|
|
|||
|
oCFMenu.sub2Xplacement=100 // The X placement of the subsubmenus, relative to the sub item
|
|||
|
oCFMenu.sub2Yplacement=5 // The Y placement of the subsubmenus, relative to the sub item
|
|||
|
|
|||
|
oCFMenu.sub3Xplacement=100 // The X placement of the subsubmenus, relative to the sub2 item
|
|||
|
oCFMenu.sub3Yplacement=5 // The Y placement of the subsubmenus, relative to the sub2 item
|
|||
|
|
|||
|
oCFMenu.mainbgcoloroff='#630000' //The backgroundcolor of the main menuitems
|
|||
|
oCFMenu.mainbgcoloron='#842121' //The backgroundcolor on mouseover of the main menuitems
|
|||
|
oCFMenu.maintextcolor="white" //The original text color
|
|||
|
oCFMenu.mainhovercolor="white" //The color the text should change to when mouseovered. NOTE: Doesn't work in NS4
|
|||
|
|
|||
|
oCFMenu.subbgcoloroff='#630000' //The backgroundcolor of the sub menuitems
|
|||
|
oCFMenu.subbgcoloron='#842121' //The backgroundcolor on mouseover of the sub menuitems
|
|||
|
oCFMenu.subtextcolor="white" //The original text color
|
|||
|
oCFMenu.subhovercolor="white" //The color the text should change to when mouseovered. NOTE: Doesn't work in NS4
|
|||
|
|
|||
|
oCFMenu.sub2bgcoloroff='#630000' //The backgroundcolor of the subsub menuitems
|
|||
|
oCFMenu.sub2bgcoloron='#842121' //The backgroundcolor on mouseover of the subsub menuitems
|
|||
|
oCFMenu.sub2textcolor="white" //The original text color
|
|||
|
oCFMenu.sub2hovercolor="white" //The color the text should change to when mouseovered. NOTE: Doesn't work in NS4
|
|||
|
|
|||
|
oCFMenu.sub3bgcoloroff='#630000' //The backgroundcolor of the subsub menuitems
|
|||
|
oCFMenu.sub3bgcoloron='#842121' //The backgroundcolor on mouseover of the subsub menuitems
|
|||
|
oCFMenu.sub3textcolor="white" //The original text color
|
|||
|
oCFMenu.sub3hovercolor="white" //The color the text should change to when mouseovered. NOTE: Doesn't work in NS4
|
|||
|
|
|||
|
//Borders
|
|||
|
oCFMenu.bordersize=0
|
|||
|
oCFMenu.bordercolor="Red"
|
|||
|
//NOTE: The border immplemtation isn't prefect. The width and placement of elements have nothing
|
|||
|
//to say here, so play with the fromtop, fromleft, subXplacement et cetera to get the desired effect.
|
|||
|
|
|||
|
//Styles for the top menus! - Change the colors, padding and other styles in here!
|
|||
|
oCFMenu.topstyle="font-family:arial,helvetica; font-size:13px; padding:4;"
|
|||
|
//Styles for the submenus - Change the colors, padding and other styles in here!
|
|||
|
oCFMenu.substyle="padding:3px; font-family:arial,helvetica; font-size:12px"
|
|||
|
//Styles for the sub2menus - Change the colors, padding and other styles in here!
|
|||
|
oCFMenu.sub2style="padding:3px; font-family:arial,helvetica; font-size:12px"
|
|||
|
//Styles for the sub3menus - Change the colors, padding and other styles in here!
|
|||
|
oCFMenu.sub3style="padding:3px; font-family:arial,helvetica; font-size:11px"
|
|||
|
|
|||
|
//LEAVE THESE LINES
|
|||
|
oCFMenu.makeStyle() //Writes out the style for the top menus
|
|||
|
oCFMenu.makeFrameString() //Makes the string for the main frame
|
|||
|
|
|||
|
|
|||
|
//Placement of the menuitems 136
|
|||
|
|
|||
|
//Example in %:
|
|||
|
//oCFMenu.menuplacement=new Array("0%","30%","45%","60%","75%","90%") //Remember to make the arrays contain as many values as you have main menuitems
|
|||
|
|
|||
|
//Example in px: (remember to use the ' ' around the numbers)
|
|||
|
//oCFMenu.menuplacement=new Array(10,200,300,400,500,600,700)
|
|||
|
|
|||
|
//Example right beside eachother (only adding the pxbetween variable)
|
|||
|
oCFMenu.menuplacement=0
|
|||
|
|
|||
|
//If you use the "right beside eachother" you cant how many pixel there should be between each here
|
|||
|
oCFMenu.pxbetween=0 //in pixel or %
|
|||
|
|
|||
|
//And you can set where it should start from the left here
|
|||
|
oCFMenu.fromleft=0 //in pixel or %
|
|||
|
|
|||
|
//This is how much from the top the menu should be.
|
|||
|
oCFMenu.fromtop=0 //in pixel or %
|
|||
|
|
|||
|
//Making a top element makeTop(TEXT,LINK,TARGET,WIDTH,FUNCTION)
|
|||
|
//TEXT = the text that you want displayed inside the item
|
|||
|
//LINK = The page you want the item to link to - Set to 0 or don't spesify if you don't want a link
|
|||
|
//TARGET = The target for the link, set to _blank, frame_name, _top - Set to 0 or don't spesify if you don't want a target
|
|||
|
//WIDTH = Here you can set an individual width for each top element. This is ONLY availble on the top elements
|
|||
|
//FUNCTION = If you want some Javascript code to be executed when this item is clicked place it here
|
|||
|
oCFMenu.makeTop('La gare d\'Avallon') //MAIN 1
|
|||
|
//Making a sub element makeSub(TEXT,LINK,TARGET,FUNCTION)
|
|||
|
//TEXT = the text that you want displayed inside the item
|
|||
|
//LINK = The page you want the item to link to - Set to 0 or don't spesify if you don't want a link
|
|||
|
//TARGET = The target for the link, set to _blank, frame_name, _top - Set to 0 or don't specify if you don't want a target
|
|||
|
//FUNCTION = If you want some Javascript code to be executed when this item is clicked place it here
|
|||
|
|
|||
|
oCFMenu.makeSub('Son histoire','./histoire.html','frmMain')
|
|||
|
oCFMenu.makeSub('Mat<61>riel y ayant circul<75>','./materiel.html','frmMain')
|
|||
|
oCFMenu.makeSub('Les photos')
|
|||
|
oCFMenu.makeSub2('D<>couverte','./carte.html','frmMain')
|
|||
|
oCFMenu.makeSub2('Mod<6F>le r<>duit','./im_reduit.html','frmMain')
|
|||
|
|
|||
|
oCFMenu.makeTop('Nos r<>alisations')
|
|||
|
oCFMenu.makeSub('Construction d\'une BB2000','./BB2000.html','frmMain')
|
|||
|
oCFMenu.makeSub('Construction d\'une 242 TC','./242TC.html','frmMain')
|
|||
|
|
|||
|
oCFMenu.makeTop('Nos projets')
|
|||
|
oCFMenu.makeSub('R<>seau modulaire','./modules.html','frmMain')
|
|||
|
|
|||
|
oCFMenu.makeTop('Liens')
|
|||
|
oCFMenu.makeSub('A Propos du club','./leclub.html','frmMain')
|
|||
|
oCFMenu.makeSub('Page d\'acceuil','./bienvenue.html','frmMain')
|
|||
|
oCFMenu.makeSub('Liens utiles','./liens.html','frmMain')
|
|||
|
|
|||
|
//Leave these lines!
|
|||
|
oCFMenu.construct()
|
|||
|
|
|||
|
//Setting the bottom page. This have to be done so that we are sure that the menus are built
|
|||
|
//before we load the bottom page. If the page was resized we want to load the same page back into the frameset
|
|||
|
searchtext=location.search
|
|||
|
isresized=searchtext.lastIndexOf("resizedurl")
|
|||
|
if(isresized>-1){ //Get PAGE
|
|||
|
oCFMenu.startPage="http://" + searchtext.substr(isresized+11,searchtext.length)
|
|||
|
}
|
|||
|
if(top[oCFMenu.menuFrameName])top[oCFMenu.menuFrameName].location.href=oCFMenu.startPage
|
|||
|
|
|||
|
</script>
|
|||
|
|
|||
|
|
|||
|
|
|||
|
</body>
|
|||
|
</html>
|
|||
|
|