function JMenu()
{
	this.MenuCollectionData;
	this.Width;
	this.Height;
	this.Orientations;
	this.Themes;
	this.Effects;

	// Databinding for property MenuCollectionData
	this.SetMenuCollectionData = function(data)
	{
		///UserCodeRegionStart:[SetMenuCollectionData] (do not remove this comment.)
		this.MenuCollectionData = data ;		
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	// Databinding for property MenuCollectionData
	this.GetMenuCollectionData = function()
	{
		///UserCodeRegionStart:[GetMenuCollectionData] (do not remove this comment.)

		return this.MenuCollectionData;		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	this.show = function()
	{
		///UserCodeRegionStart:[show] (do not remove this comment.)
		
	    var i = 0;
		var demoMenu = new Array();		
	    for( i=0; this.MenuCollectionData[i]!=undefined;i++)
		{
			
			Icon   = this.MenuCollectionData[i].Icon
			Title  = this.MenuCollectionData[i].Title
			Url    = this.MenuCollectionData[i].Url
			Target = this.MenuCollectionData[i].Target
			Desc   = this.MenuCollectionData[i].Description
			Sub    = this.MenuCollectionData[i].SubMenu
			var Item = new Array();	
			
			if (Sub==null)
			{			
				if(	Icon   == ""){Item[0] = null }else{Item[0] = Icon }
				if(	Url    == ""){Item[2] = null }else{Item[2] = Url  }
				if(	Target == ""){Item[3] = null }else{Item[3] = Target  }
				Item[1] = Title 
				Item[4] = Desc 					
			}
			else{
				
				if(	Icon   == ""){Item[0] = null }else{Item[0] = Icon }
				if(	Url    == ""){Item[2] = null }else{Item[2] = Url  }
				if(	Target == ""){Item[3] = null }else{Item[3] = Target  }
				Item[1] = Title 
				Item[4] = Desc 					

				for( j=0; Sub[j]!=undefined;j++)
				{
					var SubItem = new Array();
						
					if(	Sub[j].Icon   == ""){SubItem[0] = null }else{SubItem[0] = Sub[j].Icon }
					if(	Sub[j].Url    == ""){SubItem[2] = null }else{SubItem[2] = Sub[j].Url  }
					if(	Sub[j].Target == ""){SubItem[3] = null }else{SubItem[3] = Sub[j].Target }
					SubItem[1] = Sub[j].Title  
					SubItem[4] = Sub[j].Description 
					SubSub     = Sub[j].SubMenu
						
					if(SubSub==null)
					{
						Item[5+j] = SubItem
					}
					else{
					
						for( x=0; SubSub[x]!=undefined;x++)
						{	
							var SubItem1 = new Array();							

							if(	SubSub[x].Icon   == ""){SubItem1[0] = null }else{SubItem1[0] = SubSub[x].Icon }
							if(	SubSub[x].Url    == ""){SubItem1[2] = null }else{SubItem1[2] = SubSub[x].Url  }
							if(	SubSub[x].Target == ""){SubItem1[3] = null }else{SubItem1[3] = SubSub[x].Target }	
							SubItem1[1] = SubSub[x].Title  
							SubItem1[4] = SubSub[x].Description 
							SubItem[5+x] = SubItem1															
						}	
					}
					Item[5+j] = SubItem					
				}				
			}			
			demoMenu[i] =  Item  ;			
		}	
		
		var buffer = '<div id="demo1"></div>' ;	
		
		this.setHtml(buffer);
		if (this.Themes == "ThemeIE"){
			cmDraw ('demo1', demoMenu, this.Orientations ,  cmThemeIE, this.Themes );
		}
		else if(this.Themes == "ThemeGray"){
			if (this.Effects == "Y"){
				var prop = cmClone (cmThemeGray);
				prop.effect = new CMSlidingEffect (8);				
				cmDraw ('demo1', demoMenu, this.Orientations ,  prop , this.Themes );
			}
			else {
				cmDraw ('demo1', demoMenu, this.Orientations ,  cmThemeGray, this.Themes );
			}
			
		}
		else if(this.Themes == "ThemeOffice2003"){
			cmDraw ('demo1', demoMenu, this.Orientations ,  cmThemeOffice2003, this.Themes );
		}
		else if(this.Themes == "ThemeMiniBlack"){
			cmDraw ('demo1', demoMenu, this.Orientations ,  cmThemeMiniBlack, this.Themes );
		}	
		else if(this.Themes == "ThemeOffice"){
			cmDraw ('demo1', demoMenu, this.Orientations ,  cmThemeOffice, this.Themes );
		}		
		else if(this.Themes == "ThemePanel"){
			cmDraw ('demo1', demoMenu, this.Orientations ,  cmThemePanel, this.Themes );
		}		
		else if(this.Themes == "ThemeMsn"){
			cmDraw ('demo1', demoMenu, this.Orientations ,  cmThemeMsn, this.Themes );
		}			
		
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}
	///UserCodeRegionStart:[User Functions] (do not remove this comment.)
	
	
	
	
	///UserCodeRegionEnd: (do not remove this comment.):
}

