/*****************************************************************************
 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,
								//use 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=0 

//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.dhtmlcentral.com/coolmenus/examples/withoutframes/" 	//Value: "path_to_menu_file_online/"

oCMenu.pagecheck=1 		//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=1 	//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

//***************************
//Background bar properties
//***************************
oCMenu.usebar=0 			//If you want to use a background-bar for the top items set this on - Value: 1 || 0
oCMenu.barcolor="Navy" 		//The color of the background bar - Value: "color"
oCMenu.barwidth="100"		//The width of the background bar. Set this to "menu" if you want it to be the same width as the menu. 
							//(this will change to match the border if you have one) - Value: 100px || "100%" || "menu"
oCMenu.barheight="menu" 	//The height of the background bar. Set this to "menu" if you want it to be the same height as the menu. 
							//(this will change to match the border if you have one) - Value: px || "%" || "menu"
oCMenu.barx=0 				//The left position of the bar. Set this to "menu" if you want it be the same as the left position of the menu.
							//(this will change to match the border if you have one)  - Value: px || "%" || "menu"
oCMenu.bary=0 				//The top position of the bar Set this to "menu" if you want it be the same as the top position of the menu. 
							//(this will change to match the border if you have one)  - Value: px || "%" || "menu"
oCMenu.barinheritborder=1 	//Set this to 1 if you want the bar to have the same border as the top menus - Value: 0 || 1

//***************************
//Placement properties
//***************************
oCMenu.rows=0 			//This controls whether the top items is supposed to be laid out in rows or columns. 
						//Set to 0 for columns and 1 for row - Value 0 || 1
oCMenu.fromleft=4 		//This is the left position of the menu. (Only in use if menuplacement below is 0 or aligned) 
						//(will change to adapt any borders) - Value: px || "%"
oCMenu.fromtop=175 		//This is the left position of the menu. (Only in use if menuplacement below is 0 or aligned) 
						//(will change to adapt any borders) - Value: px || "%"
oCMenu.pxbetween=4 		//How much space you want between each of the top items. - Value: px || "%"

/**********************************************************************************
 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="left"

/***********************************************************************************
 Now we are ready for the properties of each level. For those of that have used the old 
 coolmenus for coolframemenu I will try and explain how this works like this:
 level[0] = top items
 level[1] = sub items
 level[2] = sub2 items
 level[3] = sub3 items and so on....
 
 All menus will inherit the properties, and all properties does only HAVE to be spesifed on the top level. 
 If a level doesn't have on property spesified it will look for it on the last level that was spesified, 
 if it still doesn't exist it will get the properties from level[0]

 Which means that if you set the background color on level[0] to "black" and doesn't spesify any more levels or doesn't 
 spesify the background color on the last level you spesified ALL menus will get the color from level[0]

 Did that make sense at all? This can be a little hard to understand, look at the different examples on my site
 and play with and I am sure you'll get what I mean.
***********************************************************************************/

// TOP LEVEL PROPERTIES - ALL OF THESE MUST BE SPESIFIED FOR LEVEL[0]

oCMenu.level[0]=new Array() 		// Add this for each NEW level

oCMenu.level[0].width=130 		// HEIGHT & WIDTH				
oCMenu.level[0].height=20 			

oCMenu.level[0].bgcoloroff="#666666" 	// BACKGROUND COLOR  
oCMenu.level[0].bgcoloron="#99FF66"	// BACKGROUND COLOR WHEN HIGHLIGHTED	
oCMenu.level[0].textcolor="White" 	// TEXT COLOR
oCMenu.level[0].hovercolor="Black"	// TEXT COLOR on HIGHLIGHT					
oCMenu.level[0].style="padding:2px; font-family:verdana,arial,tahoma,helvetica; font-size:9px; font-weight:normal"   

oCMenu.level[0].border=1 			// BORDER Size
oCMenu.level[0].bordercolor="Black" 		// BORDER COLOR

oCMenu.level[0].offsetX=-5 			// X-OFFSET for the SUBMENUs
oCMenu.level[0].offsetY=5			// Y-OFFSET for the SUBMENUs

oCMenu.level[0].NS4font="verdana,arial,tahoma,helvetica"
oCMenu.level[0].NS4fontSize="1"

/***********************************************************************************
 New: Added animation features that can be controlled on each level.
 ***********************************************************************************/
oCMenu.level[0].clip=1 			// 1=Animate SubMenus  0=Do NOT Animate
oCMenu.level[0].clippx=15 		// Animation Pixle Cliping
oCMenu.level[0].cliptim=25 		// SPEED of Animation in milliseconds
							
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)" // Animation Filter TYPE

/***********************************************************************************
  Different filter specs you can try:
  
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Wheel(duration=0.5,spokes=5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Barn(duration=0.5,orientation=horizontal)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Blinds(duration=0.5,bands=5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.CheckerBoard(duration=0.5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Fade(duration=0.5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.GradientWipe(duration=0.5,wipeStyle=0)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Iris(duration=0.5,irisStyle=STAR)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Iris(duration=0.5,irisStyle=CIRCLE)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Pixelate(duration=0.5,maxSquare=40)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.RadialWipe(duration=0.5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.RandomBars(duration=0.5,orientation=vertical)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.RandomDissolve(duration=0.5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Spiral(duration=0.5)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Stretch(duration=0.5,stretchStyle=push)"
oCMenu.level[0].filter="progid:DXImageTransform.Microsoft.Strips(duration=0.5,motion=rightdown)"
***********************************************************************************/

/***********************************************************************************
 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="right" 			//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
//      Add this for each new level (adding one to the number)
//**********************************************************************************  
oCMenu.level[1]=new Array() 					
oCMenu.level[1].width=oCMenu.level[0].width-2
oCMenu.level[1].height=20
oCMenu.level[1].style="padding:2px; font-family:verdana,arial,tahoma,helvetica; font-size:9px; font-weight:normal"
oCMenu.level[1].align="bottom" 
oCMenu.level[1].offsetX=-5
oCMenu.level[1].offsetY=5
oCMenu.level[1].border=1 
oCMenu.level[1].bordercolor="BLACK"   /***  Blue:#8080C0   Yellow: #FFFF66  Green: #CCFF66 GREY: #808080 DarkGREY: #666666  ***/
oCMenu.level[1].bgcoloroff="GRAY"
oCMenu.level[1].bgcoloron="#99FF66"


/***********************************************************************************
 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.
 
 oCMenu.makeMenu('sub01','top0','OpensAPopup','','',0,0,'','','','','','','window.open("/Path/Dir/","","width=800,height=600")') To set styles for each level see above.
***********************************************************************************/

oCMenu.makeMenu('Menu0','','&nbsp;Home','http://www.GymnasticsWorld.com')
	
oCMenu.makeMenu('Menu1','','&nbsp;Why Gymnastics World','')
	oCMenu.makeMenu('sub10','Menu1','Why Gymnastics World','/Pages/WhyGW.php','',155)
		oCMenu.makeMenu('sub100','sub10','Our Philosophy','/Pages/WhyGW.php','',135)
		oCMenu.makeMenu('sub101','sub10','Our System of Operation','/Pages/WhyGW.php','',135)
		oCMenu.makeMenu('sub102','sub10','Our Reward System','/Pages/RewardSystem.php','',135)
		oCMenu.makeMenu('sub103','sub10','Satisfaction Guaranteed','/Pages/WhyGW.php','',135)
	oCMenu.makeMenu('sub11','Menu1','Our Positive Reward System','/Pages/RewardSystem.php','',155)
	oCMenu.makeMenu('sub12','Menu1','Why Gymnastics','/Pages/WhyGymnastics.php','',155)
	
oCMenu.makeMenu('Menu3','','&nbsp;Our Programs','')
	oCMenu.makeMenu('sub30','Menu3','Gymnastics','')
		oCMenu.makeMenu('sub300','sub30','Mommy & Me','/Pages/Programs/Gymnastics/MommyMe.php','')
		oCMenu.makeMenu('sub301','sub30','MiniGym','/Pages/Programs/Gymnastics/MiniGym.php','')
		oCMenu.makeMenu('sub302','sub30','Gymster','/Pages/Programs/Gymnastics/Gymster.php','')
		oCMenu.makeMenu('sub303','sub30','Competitive','/Pages/Programs/Gymnastics/Team.php','')
		oCMenu.makeMenu('sub304','sub30','Adults','/Pages/Programs/Gymnastics/Adults.php','')
		
	oCMenu.makeMenu('sub31','Menu3','Rhythmic-Gymnastics','/Pages/UnderConstruction.php')
	
	oCMenu.makeMenu('sub32','Menu3','Dance','')
		oCMenu.makeMenu('sub320','sub32','Ballete','/Pages/UnderConstruction.php')
		oCMenu.makeMenu('sub321','sub32','Jazz','/Pages/UnderConstruction.php')
		oCMenu.makeMenu('sub322','sub32','Hip-Hop','/Pages/UnderConstruction.php')
		oCMenu.makeMenu('sub323','sub32','Modern','/Pages/UnderConstruction.php')
		
	oCMenu.makeMenu('sub33','Menu3','Figure-Skating','/Pages/UnderConstruction.php')
		oCMenu.makeMenu('sub330','sub33','Off-Ice Training','/Pages/UnderConstruction.php')
	
	oCMenu.makeMenu('sub34','Menu3','Martial Arts','/Pages/UnderConstruction.php')
		oCMenu.makeMenu('sub340','sub34','Kuk Sul Hapkido','/Pages/UnderConstruction.php')
		
	oCMenu.makeMenu('sub35','Menu3','Rock-Climbing','/Pages/Programs/RockWall/')
	oCMenu.makeMenu('sub36','Menu3','Other...','/Pages/UnderConstruction.php')

oCMenu.makeMenu('Menu4','','&nbsp;Our Special Events','')
	oCMenu.makeMenu('sub40','Menu4','Birthday Parties','/Pages/Programs/Other/BirthdayParty.php','',180)
	oCMenu.makeMenu('sub41','Menu4','Sleep-Overs','/Pages/Programs/Other/SleepOver.php','',180)
	oCMenu.makeMenu('sub42','Menu4','Camps','/Pages/Programs/Camps/','',180)
	oCMenu.makeMenu('sub43','Menu4','Gymnastics World Championships','/Pages/Programs/GWC/','',180)
	oCMenu.makeMenu('sub44','Menu4','Gymnastics World on Wheels','/Pages/UnderConstruction.php','',180)
	oCMenu.makeMenu('sub45','Menu4','Other...','#','',180)

oCMenu.makeMenu('Menu5','','&nbsp;Our Schedule/Calendar','/Pages/Calendar.php')

oCMenu.makeMenu('Menu7','','&nbsp;Our Students','')
	oCMenu.makeMenu('sub70','Menu7','Precious Moments','/Pages/Students/Team')
	oCMenu.makeMenu('sub71','Menu7','Our Team','/Pages/Students/Team')
		oCMenu.makeMenu('sub710','sub71','Team Home Page','/Pages/Students/Team','',100)
		oCMenu.makeMenu('sub711','sub71','GIRLS Team Bios','/Pages/Students/Team/Girls','',100)
		oCMenu.makeMenu('sub712','sub71','BOYS Team Bios','/Pages/Students/Team/Boys','',100)
	oCMenu.makeMenu('sub72','Menu7','Our Star-Athletes','/Pages/Students/Team')
	oCMenu.makeMenu('sub73','Menu7','Our Archives','/Pages/Students/Team')

oCMenu.makeMenu('Menu8','','&nbsp;Our Instructors / Staff','/Pages/Staff.php')
oCMenu.makeMenu('Menu9','','&nbsp;Our Products / Shop','/Pages/UnderConstruction.php')
oCMenu.makeMenu('Menu10','','&nbsp;Our Facility  "WOW!"','/Pages/Facility/Facility.php')

oCMenu.makeMenu('Menu13','','&nbsp;Links / Downloads','')
	oCMenu.makeMenu('sub130','Menu13','Our Published Stuff','/Pages/ArtWork')
	oCMenu.makeMenu('sub131','Menu13','Our Newsletters','/Newsletter')
	oCMenu.makeMenu('sub132','Menu13','USAG Links','/Links')

oCMenu.makeMenu('Menu14','','&nbsp;Contact Us','')
	oCMenu.makeMenu('sub140','Menu14','Our Directions / Map','/Pages/Map.php')
	oCMenu.makeMenu('sub141','Menu14','Our Contact Info','/Pages/ContactUs.php')


//Leave these two lines! Making the styles and then constructing the menu
oCMenu.makeStyle(); oCMenu.construct()			


//Dummy script to change filters
function changeFilter(filter){
	if(!bw.filter){ alert('This feature only works on Explorer5.5 + '); return}
	el=oCMenu.l[1].oBorder
	if(el.evnt.filters[0]) el.evnt.filters[0].Stop();
	el.css.filter=filter	
}
