	function CMenu(){

		this.MenuItem = [ [ 'en-cortos' , 'l' , 'encortos' , [] ] , [ 'encuentr-off' , 'l' , 'encuentroff' , [] ] , [ 'encuentr-off con el rap' , 'l' , 'encuentroffrap' , [] ] , [ 'las tribulaciones de virginia' , 'l' , 'virginia' , [] ] , [ 'm3 metro cúbico' , 'l' , 'm3' , [] ] , [ 'a medio metro de lo vivido' , 'l' , 'vivido' , [] ] , [ 'música electroacústica' , 'l' , 'electroacustica' , [] ] , [ 'white' , 'l' , 'white' , [] ] , [ 'en-tapas' , 'l' , 'entapas' , [] ] , [ '' , 's' , 'nada' , [] ] , [ 'entradas' , 's' , 'entradas' , [] ] , [ 'prensa' , 's' , 'prensa' , [] ] , [ 'patrocinadores' , 's' , 'patrocinadores' , [] ] , [ 'equipo' , 's' , 'equipo' , [] ] , [ 'contacto' , 's' , 'contacto' , [] ]  ] ;

		//this.MenuItem = [ [ 'ASD' , 'l' , 'encortos' , [] ] ] ;
		//this.MenuItem = [ [ 'EN CORTOS' , 'l' , 'encortos' ] ] ;

		this.space = 25 ;
		this.width = 440 ;
		this.height = 440 ;
		
		this.FrameWidth ;
		this.FrameHeight ;
		this.numChar ;
		this.Matrix ;

		var that = this ;											// Para solucionar los problemas de los callback

		//------------------------------------------
		// METODOS
		//------------------------------------------
	
		// CREATE
		// Se hace bastante, asi que está bien tenerlo aqui para acortar lineas de código
		//-------------------------------------------------		
		this.Create = function Create(){

			
			// Encontrar el ancho y alto del cuadro
			//
			var oMenuFrame = document.getElementById( "menuFrame" ) ;
			//this.FrameWidth = this.current_style( oMenuFrame , 'width' ) ;
			//this.FrameHeight = this.current_style( oMenuFrame , 'height' ) ;
			this.FrameWidth = oMenuFrame.style.width = this.width + "px" ;
			this.FrameHeight = oMenuFrame.style.height = this.height + "px" ;
			
			this.FrameWidth = this.FrameWidth.substring( 0 , this.FrameWidth.length - 2 ) ;
			this.FrameHeight = this.FrameHeight.substring( 0 , this.FrameHeight.length - 2 ) ;
			
			var i , j ,	wordLength , myChar ;
			
			// Encontrar las divisiones
			//
			var MenuItemLength = this.MenuItem.length ;
			this.numChar = 0 ;
			for( i = 0 ; i < MenuItemLength ; i++ ){
				
					this.numChar += this.MenuItem[i][0].length
					
			}
			
			numCols = Math.floor( this.FrameWidth / this.space ) ;
			numRows = Math.ceil(  this.numChar / numCols ) ;
			// alert( numCols + ' ' + numRows ) ;
			
			
			// creación de la matriz
			this.Matrix = new Array( this.numChar ) ;
			for( i = 0 ; i < this.numChar ; i++  ){
				
				this.Matrix[i] = false ;
				
			}

			this.Handle( "onRandom" , that.OnRandomCal ) ;

			// Crear las letras	
			//
			for( i = 0 ; i < MenuItemLength ; i++ ){
				
				wordLength = this.MenuItem[i][0].length ;
				for( j = 0 ; j < wordLength ; j++ ){
					
					
					
					myChar = this.MenuItem[i][0].charAt( j ) ;
					
					var vAleatPosition = this.GetPositionFromMatrix( numCols , numRows ) ;

					this.MenuItem[i][3][j] = new CLetter();
					this.MenuItem[i][3][j].Create( myChar , this.MenuItem[i][1] , this.MenuItem[i][2] + j , vAleatPosition[0] , vAleatPosition[1] , j * this.space , i * this.space , this.MenuItem[i][2] ) ;
					
					
				}
				
			}

			oMenuFrame.onmouseover = function(){ oEvent.Throw( "onWord" ); } ;
			oMenuFrame.onmouseout = function(){ oEvent.Throw( "onRandom" ); } ;		
			

		}


		// GET POSITION FROM MATRIX
		//-------------------------------------------------	
		this.OnRandomCal = function OnRandomCal(){

			// creación de la matriz
			that.Matrix = new Array( that.numChar ) ;
			for( i = 0 ; i < that.numChar ; i++  ){
				
				that.Matrix[i] = false ;
				
			}
			
			var L1 , L2 , i , j , vAleatPosition ;
			L1 = that.MenuItem.length ;
			for( i = 0 ; i < L1 ; i++ ){
				
				L2 = that.MenuItem[i][3].length ;
				for( j = 0 ; j < L2 ; j++ ){
				
					vAleatPosition = that.GetPositionFromMatrix( numCols , numRows ) ;
					
					that.MenuItem[i][3][j].RandX = vAleatPosition[0] ;
					that.MenuItem[i][3][j].RandY = vAleatPosition[1] ;
					that.MenuItem[i][3][j].GoRandom() ;
					
				}
				
			}
			
		}
		


		// GET POSITION FROM MATRIX
		//-------------------------------------------------	
		this.GetPositionFromMatrix = function GetPositionFromMatrix( numCols , numRows ){
			
			var nX , nY , Index ;			
			
			do{
				
				nIndex = this.Random( 0 , this.numChar - 1 ) ;
				
			}while( this.Matrix[nIndex] ) ;
			
			this.Matrix[nIndex] = true ;
			
			
			var row = Math.floor( nIndex / numCols ) ;
			var col = nIndex - ( numCols * row ) ;
			
			//alert( col );
			
			nX = ( col * this.space ) ;
			nY = ( row * this.space ) ;
			

			//nX = this.Random( 0 , this.FrameWidth - this.space ) ;
			//nY = this.Random( 0 , this.FrameHeight - this.space ) ;
			
			//nX = nX -  Math.ceil(  nX % this.space ) ;
			//nY = nY -  Math.ceil(  nY % this.space ) ;
			
			return ( [nX , nY ] ) ;
		
		} 


		// CURRENT_STYLE
		//-------------------------------------------------	
		this.current_style = function current_style( obj , atr ){ 
				
			if (document.defaultView && document.defaultView.getComputedStyle && document.body) { 
					/* para atributos de estilo de varias palabras Mozilla y Opera, no sigue las  mismas reglas de eliminar el guión y poner en mayúscula  la primera letra de las palabra que precede al guión, por ejemplo: 
					* border-top-color en IE sería borderTopColor, mientras que Mozilla y Opera8 se mantiene igual*/ 
				 atr = atr.replace(/([A-Z])/g,"-$1").toLowerCase(); 
				 return document.defaultView.getComputedStyle(obj ,null ).getPropertyValue(atr ); 
			} 
			else if (document.body && document.body.currentStyle) { 
				return obj.currentStyle[atr]; 
			} 
		} 
	


		// ALEATORIO
		//-------------------------------------------------		
		this.Random = function Random( inferior , superior ){
			
			var aleat ;
			var numPosibilidades = superior - inferior ;
			aleat = Math.random() * numPosibilidades ;
			aleat = Math.round( aleat ) ;
			aleat = parseInt( inferior ) + aleat  ;
			return aleat ;
			
		}


		// HIDE SECTIONS
		//-------------------------------------------------	
		this.HideSections = function HideSections(){
			
			var i , L1 , divSection ;
			L1 = that.MenuItem.length ;
			
			for( i = 0 ; i< L1 ; i++ ){
				
				divSection = document.getElementById( that.MenuItem[i][2] ) ;
				//alert( divSection +' '+ that.MenuItem[i][2] ) ;
				if( divSection ){
					divSection.style.display = "none" ;
				}
				
			}
			
			divSection = document.getElementById( "close" ) ;
			divSection.style.display = "none" ;
			
		}


		// SHOW SECTION
		//-------------------------------------------------	
		this.ShowSection = function ShowSection( sSection ){
			
			var divSection = document.getElementById( sSection ) ;
			divSection.style.display = "block" ;

			divSection = document.getElementById( "close" ) ;
			divSection.style.display = "block" ;
			
		}


		// HANDLE
		//
		//-------------------------------------------------		
		this.Handle = function Handle( sEvent , oFunction ){
				
			oEvent.Handle( sEvent , oFunction ) ;
				
		}
	
	
		// UN HANDLE
		//
		//-------------------------------------------------		
		this.UnHandle = function UnHandle( sEvent , oFunction ){
				
			oEvent.UnHandle( sEvent , oFunction ) ;
				
		}
		
		
		// HAS EVENT
		//
		//-------------------------------------------------		
		this.HasEvent = function HasEvent( sEvent , oFunction ){
				
			return ( oEvent.HasEvent( sEvent , oFunction ) ) ;
				
		}		

	}
