function JSCookMenu()
{
	this.Orientation;
	this.SubMenuVerticalPosition;
	this.SubMenuHorizontalPosition;
	this.Effect;
	this.ShowSpeed;
	this.HideSpeed;
	this.SlideSpeed;
	this.Data;
	this.Width;
	this.Height;

	// Databinding for property Data
	this.SetData = function(data)
	{
		///UserCodeRegionStart:[SetData] (do not remove this comment.)
    	this.Data = data;
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	// Databinding for property Data
	this.GetData = function()
	{
		///UserCodeRegionStart:[GetData] (do not remove this comment.)
    	return this.Data;
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}

	this.show = function()
	{
		///UserCodeRegionStart:[show] (do not remove this comment.)

		var buffer = '<DIV ID='+this.ControlName+'></DIV>';
		this.setHtml(buffer);

		var myMenu = new Array();
		this.CreateMenu(this.Data,myMenu,-1);
		
		var ovh = 	this.Orientation + this.SubMenuVerticalPosition + this.SubMenuHorizontalPosition;
		switch(this.Effect)
		{
    		case 'Fade':
        		var efectos = cmClone (cmThemeClassic);
		        efectos.effect = new CMFadingEffect (this.ShowSpeed, this.HideSpeed);
        		cmDraw (this.ControlName, myMenu, ovh, efectos, "ThemeClassic");		
                break;    
            case 'Slide':
        		var efectos = cmClone (cmThemeClassic);
        		efectos.effect = new CMSlidingEffect (this.SlideSpeed);
        		cmDraw (this.ControlName, myMenu, ovh, efectos, "ThemeClassic");				
                break;
            default:
        		cmDraw (this.ControlName, myMenu, ovh, cmThemeClassic, 'ThemeClassic');
        }
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		///UserCodeRegionEnd: (do not remove this comment.)
	}
	///UserCodeRegionStart:[User Functions] (do not remove this comment.)
	
	
    this.CreateMenu = function(Data,MenuItem,y)
    {
		var i = 0;
		for(i=0;Data[i]!=undefined;i++)
		{
			y = y + 1;
			MenuItem[y] = [Data[i].Icon,Data[i].Title,Data[i].Url,Data[i].Target,Data[i].Description];
			if (Data[i].Childs!=undefined)
				this.CreateMenu(Data[i].Childs,MenuItem[y],4);
		}
		
	}	
	
	
	
	
	
	
	
	
	
	
	
	
	
	///UserCodeRegionEnd: (do not remove this comment.):
}

