/*****************************************************************************
Default browsercheck - Leave this one
******************************************************************************/
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion; this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0; 
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5 || this.dom)
	return this
}
var bw=new lib_bwcheck() //Making browsercheck object

var mDebugging=2 //General debugging variable. Set to 0 for no debugging, 1 for alerts or 2 for status debugging.

oCMenu=new makeCoolMenu("oCMenu") //Making the menu object. Argument: menuname
oCMenu.useframes=0 //Do you want to use the menus as coolframemenu or not? (in frames or not) - Value: 0 || 1
oCMenu.frame="frmMain" //The name of your main frame (where the menus should appear). Leave empty if you're not using frames - Value: "main_frame_name"

oCMenu.useclick=0 //If you want the menu to be activated and deactivated onclick only set this to 1. - Value: 0 || 1

/*If you set this to 1 you will get a "hand" cursor when moving over the links in NS4. 
NOTE: This does not apply to the submenus if the menu is used in frames due some mayor problems with NS4*/
oCMenu.useNS4links=1  

//After adding the "hover effect" for netscape as well, all styles are lost. But if you want padding add it here.
oCMenu.NS4padding=2 

//If you have select boxes close to your menu the menu will check for that and hide them if they are in the way of the menu.
//This feature does unfortunatly not work in NS4!
oCMenu.checkselect=0

/*If you choose to have this code inside a linked js, or if your using frames it's important to set these variables. 
This will help you get your links to link to the right place even if your files are in different folders.
The offlineUrl variable is the actual path to the directory where you js file are locally. 
This is just so you can test it without uploading. Remember to start it with file:/// and only use slashes, no backward slashes!
Also remember to end with a slash                                                                                                 */
oCMenu.offlineUrl="file:///C|/Inetpub/wwwroot/dhtmlcentral/" //Value: "path_to_menu_file_offline/"
//The onlineUrl variable is the online path to your script. Place in the full path to where your js file is. Remember to end with a slash.
oCMenu.onlineUrl="http://www.ensemblerecyclons.com/" //Value: "path_to_menu_file_online/"

oCMenu.pagecheck=0 //Do you want the menu to check whether any of the subitems are out of the bouderies of the page and move them in again (this is not perfect but it hould work) - Value: 0 || 1
oCMenu.checkscroll=0 //Do you want the menu to check whether the page have scrolled or not? For frames you should always set this to 1. You can set this to 2 if you want this feature only on explorer since netscape doesn't support the window.onscroll this will make netscape slower (only if not using frames) - Value: 0 || 1 || 2
oCMenu.resizecheck=1 //Do you want the page to reload if it's resized (This should be on or the menu will crash in Netscape4) - Value: 0 || 1
oCMenu.wait=500 //How long to wait before hiding the menu on mouseout. Netscape 6 is a lot slower then Explorer, so to be sure that it works good enough there you should not have this lower then 500 - Value: milliseconds

oCMenu.usebar=0
oCMenu.rows=1 
oCMenu.fromleft=116
oCMenu.fromtop=89
oCMenu.pxbetween=0

/*You have several different ways to place the top items. 
You can have them right beside eachother (only adding the pxbetween variable)
oCMenu.menuplacement=0

You can have them aligned to one of the sides - This is mostly when not using frames, but can be used in both conditions
Values: (If you get strange results check the fromleft,fromtop and pxbetween variables above)
For menus that are placed in columns (align=left or align=right (se below)) you can align them to the "right" or "center"
For menus that are placed in rows (align=top or align=bottom (se below)) you can align them to the "bottom", "center" or "bottomcenter"
oCMenu.menuplacement="center"

You can also set them directly in pixels: (Remember to have as many array members as you have top items)
oCMenu.menuplacement=new Array(10,200,400,600)

Or you can place in percentage: (remember to use the ' ' around the numbers)


Choose one of those options to get the desired results.
*/
oCMenu.menuplacement=new Array(115,250,424,573,738) 

//TOP LEVEL PROPERTIES - ALL OF THESE MUST BE SPESIFIED FOR LEVEL[0]
oCMenu.level[0]=new Array('100%') 
oCMenu.level[0].width=160
oCMenu.level[0].height=20 
oCMenu.level[0].bgcoloroff="DAFA55" 
oCMenu.level[0].bgcoloron="#E6FA8F" 
oCMenu.level[0].textcolor="#151D75" 
oCMenu.level[0].hovercolor="#151D75" 
oCMenu.level[0].style="padding:2px; font-family:arial,verdana; font-size:12px; font-weight:normal" 
oCMenu.level[0].border=0
oCMenu.level[0].bordercolor="green" 
oCMenu.level[0].offsetX=0 
oCMenu.level[0].offsetY=0 
oCMenu.level[0].NS4font="arial,verdana"
oCMenu.level[0].NS4fontSize="2"

/*New: Added animation features that can be controlled on each level.*/
oCMenu.level[0].clip=0
oCMenu.level[0].clippx=0 //If you have clip spesified you can set how many pixels it will clip each timer in here to control the speed of the animation. - Value: px 
oCMenu.level[0].cliptim=0 //This is the speed of the timer for the clip effect. Play with this and the clippx to get the desired speed for the clip effect (be carefull though and try and keep this value as high or possible or you can get problems with NS4). - Value: milliseconds
//Filters - This can be used to get some very nice effect like fade, slide, stars and so on. EXPLORER5.5+ ONLY - If you set this to a value it will override the clip on the supported browsers
oCMenu.level[0].filter=0 //VALUE: 0 || "filter specs"

/*And last but not least the align variable.

This spesifies how the submenus of this level comes out. 
Values:
"bottom": The sub menus of this level will come out on the top of this item
"top": The sub menus of this level will come out on the bottom of this item
"left": The sub menus of this level will come out on the right of this item
"right": The sub menus of this level will come out on the left of this item

In generally "left" and "right" works best for menus in columns and "top" and "bottom" works best for menus in rows. 
But by all means feel free to play with it.

If you have set pagecheck to 1 above this is what the pagecheck will change when reaching the bounderies of the page.
If it reaches the right boundery and it's aligned left it will change the align to right and so on.
*/
oCMenu.level[0].align="bottom" //Value: "top" || "bottom" || "left" || "right" 

//EXAMPLE SUB LEVEL[1] PROPERTIES - You have to spesify the properties you want different from LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[1]=new Array() 
oCMenu.level[1].width=oCMenu.level[0].width+20
oCMenu.level[1].height=22
oCMenu.level[1].style="padding:3px; font-family:verdana,arial,helvetica,sans-serif; font-size:12px; font-weight:normal"
oCMenu.level[1].align="bottom" 
oCMenu.level[1].offsetX=-(oCMenu.level[0].width-0)/2+80
oCMenu.level[1].offsetY=0
oCMenu.level[1].border=0
oCMenu.level[1].bordercolor="#006699"

//EXAMPLE SUB LEVEL[2] PROPERTIES - You have to spesify the properties you want different from LEVEL[1] OR LEVEL[0] - If you want all items to look the same just remove this
oCMenu.level[2]=new Array() //Add this for each new level (adding one to the number)
oCMenu.level[2].width=198
oCMenu.level[2].height=22
oCMenu.level[2].bgcoloroff="DAFA55" 
oCMenu.level[2].bgcoloron="#E6FA8F"
oCMenu.level[2].style="padding:3px; font-family:verdana,arial,helvetica,sans-serif; font-size:12px; font-weight:normal"
oCMenu.level[2].align="bottom" 
oCMenu.level[2].offsetX=0
oCMenu.level[2].offsetY=0
oCMenu.level[2].border=0
oCMenu.level[2].bordercolor="#006699"
oCMenu.level[2].NS4font="tahoma,arial,helvetica"
oCMenu.level[2].NS4fontSize="1"

/*Variables for each menu item: (** means that they have to be spesified!)
name: The name of the item. This must be unique for each item. Do not use spaces or strange charachters in this one! **
parent: The name of the menuitem you want this to "connect" to. This will be a submenu of the item that have the name you place in here. ** for all other then the topitems
text: The text you want in the item. ** (except if you use images) 
link: The page you want this item to link to.
target: The target window or frame you want the link to go to (Default is same window if you're not using frames, and the mainframe if you're using frames)
width: The width of the element. If not spesified it will get the default width spesified above.
height: The height of the element. If not spesified it will get the default height spesified above.
img1: The "off" image for element if you want to use images.
img2: The image that appears onmouseover if using images.
bgcoloroff: The background color for this item. If not spesified it will get the default background color spesified above.
bgcoloron: The "on" background color for this item. If not spesified it will get the default "on" background color spesified above.
textcolor: The text color for this item. If not spesified it will get the default text color spesified above.
hovercolor: The "on" text color for this item. If not spesified it will get the default "on" text color spesified above. Netscape4 ignores this
onclick: If you want something to happen when the element is clicked (different from going to a link) spesifiy it here.
onmouseover: This will happen when you mouseover the element. Could be status text, another imageswap or whatever.
onmouseout: This will happen when you mouseout the element.

Remember you can have as many levels/sublevels as you want. Just make sure you spesify the correct "parent" for each item.
To set styles for each level see above.
*/


oCMenu.makeMenu('top0','','','','',0,0,'http://www.ensemblerecyclons.com/images/menu/tr2-inf0.gif','http://www.ensemblerecyclons.com/images/menu/tr2-inf1.gif')
	oCMenu.makeMenu('sub00','top0','le tri chez vous','http://www.ensemblerecyclons.com/html/infopratiques/commune.htm','',120,'')
	oCMenu.makeMenu('sub01','top0','les outils du tri','','',120,'')
		oCMenu.makeMenu('sub010','sub01','le sac transparent','http://www.ensemblerecyclons.com/html/infopratiques/sactransparent.htm')
		oCMenu.makeMenu('sub011','sub01','les conteneurs','http://www.ensemblerecyclons.com/html/infopratiques/conteneurs.htm')
		oCMenu.makeMenu('sub012','sub01','les composteurs individuels','http://www.ensemblerecyclons.com/html/infopratiques/composteurs.htm')
		oCMenu.makeMenu('sub013','sub01','les déchèteries','http://www.ensemblerecyclons.com/html/infopratiques/decheterie.htm')
		oCMenu.makeMenu('sub017','sub01','la boîte à papier','http://www.ensemblerecyclons.com/html/laboiteapapier.htm')
	oCMenu.makeMenu('sub02','top0','les sites du tri','','',120,'')
		oCMenu.makeMenu('sub014','sub02','la plate-forme de compostage','http://www.ensemblerecyclons.com/html/infopratiques/lecompostvegetal.htm')
		oCMenu.makeMenu('sub015','sub02','la plate-forme de bois-énergie','http://www.ensemblerecyclons.com/html/infopratiques/leboisenergie.htm')
		oCMenu.makeMenu('sub016','sub02','l`atelier des D3E','http://www.ensemblerecyclons.com/html/infopratiques/lesd3e.htm')
	oCMenu.makeMenu('sub03','top0','les Relais','http://www.ensemblerecyclons.com/html/infopratiques/relais.htm','',120,'')
	oCMenu.makeMenu('sub04','top0','Somergie','http://www.ensemblerecyclons.com/html/infopratiques/somergie.htm','',120,'')
		

oCMenu.makeMenu('top1','','','','',0,0,'http://www.ensemblerecyclons.com/images/menu/tr2-ici0.gif','http://www.ensemblerecyclons.com/images/menu/tr2-ici1.gif')
	oCMenu.makeMenu('sub10','top1','de la consommation ...','http://www.ensemblerecyclons.com/html/icidsmonde/consoemb.htm')
	oCMenu.makeMenu('sub11','top1','au recyclage des déchets','http://www.ensemblerecyclons.com/html/icidsmonde/recyclagedechets.htm')
	oCMenu.makeMenu('sub12','top1','les actions originales','http://www.ensemblerecyclons.com/html/icidsmonde/actionsoriginales.htm')
	oCMenu.makeMenu('sub13','top1','les symboles du recyclage','')
		oCMenu.makeMenu('sub13a','sub13','en France','http://www.ensemblerecyclons.com/html/icidsmonde/symbrecyc_fr.htm','',120,'')
		oCMenu.makeMenu('sub13b','sub13','dans le monde','http://www.ensemblerecyclons.com/html/icidsmonde/symbrecyc_monde.htm','',120,'')
	oCMenu.makeMenu('sub14','top1','zoom sur un pays','http://www.ensemblerecyclons.com/html/icidsmonde/zoomsurunpays.htm')
	oCMenu.makeMenu('sub15','top1','notre lettre en papier','http://www.ensemblerecyclons.com/html/icidsmonde/lettrepapier.htm')
	oCMenu.makeMenu('sub16','top1','notre sélection de sites','http://www.ensemblerecyclons.com/html/icidsmonde/selectionsites.htm')
	oCMenu.makeMenu('sub17','top1','le glossaire','http://www.ensemblerecyclons.com/html/icidsmonde/glossaire.htm')
	
	
oCMenu.makeMenu('top2','','','','',0,0,'http://www.ensemblerecyclons.com/images/menu/tr2-enf0.gif','http://www.ensemblerecyclons.com/images/menu/tr2-enf1.gif')
	oCMenu.makeMenu('sub20','top2','l`Ecole et le Recyclage','http://www.ensemblerecyclons.com/html/avecenfants/ecolerecyclage.htm','',155,'')
	oCMenu.makeMenu('sub21','top2','Cubo(t)(r)(i)','http://www.ensemblerecyclons.com/html/avecenfants/maternelles.htm','',155,'')
	oCMenu.makeMenu('sub22','top2','Tapi(t)(r)(i)','http://www.ensemblerecyclons.com/html/avecenfants/tapitri.htm','',155,'')
	oCMenu.makeMenu('sub23','top2','l`Homodé(t)(r)(i)tus','http://www.ensemblerecyclons.com/html/avecenfants/homodetritus.htm','',155,'')
	oCMenu.makeMenu('sub24','top2','les collèges','http://www.ensemblerecyclons.com/html/avecenfants/colleges.htm','',155,'')
	oCMenu.makeMenu('sub25','top2','Sages et Recyclage','http://www.ensemblerecyclons.com/html/avecenfants/Sagesetrecyclage.htm','',155,'')	
		

oCMenu.makeMenu('top4','','','','',0,0,'http://www.ensemblerecyclons.com/images/menu/tr2-jeu0.gif','http://www.ensemblerecyclons.com/images/menu/tr2-jeu1.gif')
		oCMenu.makeMenu('sub40','top4','le quizz','http://www.ensemblerecyclons.com/html/jeux/quizz.htm','',90,'')
	
		
oCMenu.makeStyle(); oCMenu.construct()	