
package("scripts.menu");

scripts.menu.menu = function(){
 
//
//Menu
// se crean instancias de menus que se agregan al toolbar
//-------------------------------------------------------------
//

    var menuEstados = new Ext.menu.Menu({
        
        items: [
            new Ext.menu.Item({                text:'Aguascalientes',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_245aguascalientes.html';                }                }),            new Ext.menu.Item({                text:'Baja California',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_246baja_california.html';                }                }),            new Ext.menu.Item({                text:'Campeche',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_248campeche.html';                }                }),            new Ext.menu.Item({                text:'Chiapas',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_249chiapas.html';                }                }),            new Ext.menu.Item({                text:'Chihuahua',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_250chihuahua.html';                }                }),            new Ext.menu.Item({                text:'Coahuila',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_251coahuila.html';                }                }),            new Ext.menu.Item({                text:'Colima',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_252colima.html';                }                }),            new Ext.menu.Item({                text:'Distrito Federal',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_276distrito_federal.html';                }                }),            new Ext.menu.Item({                text:'Durango',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_253durango.html';                }                }),            new Ext.menu.Item({                text:'Estado de Mexico',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_258estado_de_mexico.html';                }                }),            new Ext.menu.Item({                text:'Guanajuato',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_254guanajuato.html';                }                }),            new Ext.menu.Item({                text:'Guerrero',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_255guerrero.html';                }                }),            new Ext.menu.Item({                text:'Hidalgo',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_256hidalgo.html';                }                }),            new Ext.menu.Item({                text:'Jalisco',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_257jalisco.html';                }                }),            new Ext.menu.Item({                text:'Michoacán',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_259michoac__n.html';                }                }),            new Ext.menu.Item({                text:'Morelos',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_260morelos.html';                }                }),            new Ext.menu.Item({                text:'Nayarit',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_261nayarit.html';                }                }),            new Ext.menu.Item({                text:'Nuevo León',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_262nuevo_le__n.html';                }                }),            new Ext.menu.Item({                text:'Oaxaca',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_263oaxaca.html';                }                }),            new Ext.menu.Item({                text:'Puebla',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_264puebla.html';                }                }),            new Ext.menu.Item({                text:'Querétaro',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_265quer__taro.html';                }                }),            new Ext.menu.Item({                text:'Quintana Roo',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_266quintana_roo.html';                }                }),            new Ext.menu.Item({                text:'San Luis Potosi',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_267san_luis_potosi.html';                }                }),            new Ext.menu.Item({                text:'Sinaloa',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_268sinaloa.html';                }                }),            new Ext.menu.Item({                text:'Sonora',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_269sonora.html';                }                }),            new Ext.menu.Item({                text:'Tabasco',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_270tabasco.html';                }                }),            new Ext.menu.Item({                text:'Tamaulipas',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_271tamaulipas.html';                }                }),            new Ext.menu.Item({                text:'Tlaxcala',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_272tlaxcala.html';                }                }),            new Ext.menu.Item({                text:'Veracruz',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_273veracruz.html';                }                }),            new Ext.menu.Item({                text:'Yucatán',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_274yucat__n.html';                }                }),            new Ext.menu.Item({                text:'Zacatecas',                pressed:'true',                handler: function(){		document.location.href='resultados_mexico_275zacatecas.html';                }                })         
        ]
    });
    
//
// Menu de Paises
//


    var menuPaises = new Ext.menu.Menu({
        
        items: [
        
            new Ext.menu.Item({                text:'Argentina',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_1argentina.html';                }                }),            new Ext.menu.Item({                text:'Bolivia',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_2bolivia.html';                }                }),            new Ext.menu.Item({                text:'Canada',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_24canada.html';                }                }),            new Ext.menu.Item({                text:'Chile',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_4chile.html';                }                }),            new Ext.menu.Item({                text:'Colombia',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_5colombia.html';                }                }),            new Ext.menu.Item({                text:'Costa Rica',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_6costa_rica.html';                }                }),            new Ext.menu.Item({                text:'Cuba',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_7cuba.html';                }                }),            new Ext.menu.Item({                text:'Ecuador',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_8ecuador.html';                }                }),            new Ext.menu.Item({                text:'El Salvador',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_9el_salvador.html';                }                }),            new Ext.menu.Item({                text:'España',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_10espa__a.html';                }                }),            new Ext.menu.Item({                text:'Estados Unidos',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_20estados_unidos.html';                }                }),            new Ext.menu.Item({                text:'Honduras',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_12honduras.html';                }                }),            new Ext.menu.Item({                text:'Italia',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_21italia.html';                }                }),            new Ext.menu.Item({                text:'Mexico',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_13mexico.html';                }                }),            new Ext.menu.Item({                text:'Nicaragua',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_14nicaragua.html';                }                }),            new Ext.menu.Item({                text:'Panama',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_15panama.html';                }                }),            new Ext.menu.Item({                text:'Peru',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_17peru.html';                }                }),            new Ext.menu.Item({                text:'Puerto Rico',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_18puerto_rico.html';                }                }),            new Ext.menu.Item({                text:'Rep Dominicana',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_23rep_dominicana.html';                }                }),            new Ext.menu.Item({                text:'Uruguay',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_19uruguay.html';                }                }),            new Ext.menu.Item({                text:'Venezuela',                pressed:'true',                handler: function(){		document.location.href='resultados_paises_22venezuela.html';                }                })        ]
    });

//
// Menu de Articulos
//


    var menuArticulos = new Ext.menu.Menu({
        
        items: [
            new Ext.menu.Item({
                //icon:'iconos/page_white_cup.png',
                text:'Tests de Natacion',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_tests_de_natacion.html';
                }
                }),
            new Ext.menu.Item({
               // icon:'iconos/email.png',
                text:'Preparacion Fisica',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_preparacion_fisica.html';
                }
                }),
            new Ext.menu.Item({
               // icon:'iconos/book_open.png',
                text:'Flexibilidad',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_flexibilidad_y_estiramiento.html';
                }
                }),              
            new Ext.menu.Item({
                //icon:'iconos/film.png',
                text:'Psicologia',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_psicologia.html';
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Fisiologia',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_fisiologia_y_anatomia.html';
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Entrenamiento',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_entrenamiento.html';
                }
                }),            
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Ense�anza',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_ensenanza_y_metodologia.html';
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Vivencias',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_vivencias_y_experiencias.html'; 
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Historia',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_historia.html';
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Nutricion',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_nutricion.html'; 
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Salud y Deporte',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_salud_y_deporte.html'; 
                }
                }),
            new Ext.menu.Item({
               // icon:'iconos/emoticon_grin.png',
                text:'Tecnicas de Natacion',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_tecnica_de_natacion.html';
                }
                }),
            new Ext.menu.Item({
               // icon:'iconos/emoticon_grin.png',
                text:'Primeros Auxilios',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_primeros_auxilios.html';
                }
                }),
            new Ext.menu.Item({
               // icon:'iconos/emoticon_grin.png',
                text:'Salvamento',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_salvamento_y_socorrismo.html';
                }
                }),
            new Ext.menu.Item({
               // icon:'iconos/emoticon_grin.png',
                text:'Reglamentos',
                pressed:'true',
                handler: function(){
					document.location.href='articulos_reglamentos.html'; 
                }
                })               
        ]
    });

//
// Menu de Servicios
//


    var menuServicios = new Ext.menu.Menu({
        
        items: [
				
            new Ext.menu.Item({
                //icon:'iconos/page_white_cup.png',
                text:'Galeria de Fotos',
                pressed:'true',
                handler: function(){
		window.open("http://picasaweb.google.com/natacion/");
                }
                }),

            new Ext.menu.Item({
               // icon:'iconos/email.png',
                text:'Bolsa Trabajo',
                pressed:'true',
                handler: function(){
                    document.location.href='bolsa_de_trabajo.html';
                }
                }),
            new Ext.menu.Item({
               // icon:'iconos/book_open.png',
                text:'Calculadora IPS',
                pressed:'true',
                handler: function(){
                    window.open("http://www.swimnews.com/Ranking/ips.jhtml"); 
                }
                }),
			
            new Ext.menu.Item({
                //icon:'iconos/film.png',
                text:'Contactanos',
                pressed:'true',
                handler: function(){
                    new scripts.contactanos.mostrar();
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Entrenamientos',
                pressed:'true',
                handler: function(){
                    window.open("http://www.entrenamientos-natacion.com/"); 
                }
                }),

            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Calendario',
                pressed:'true',
                handler: function(){
                   document.location.href='calendario_de_natacion.html';
                }
                }),

            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Noticias',
                pressed:'true',
                handler: function(){
                   document.location.href='noticias_de_natacion.html';
                }
                })
			/*
			,            
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Otras Paginas',
                pressed:'true',
                handler: function(){
                    alert("CONSTRUCCCION"); 
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Directorio Clubes',
                pressed:'true',
                handler: function(){
                    alert("CONSTRUCCCION");
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Videos',
                pressed:'true',
                handler: function(){
                    alert("CONSTRUCCCION");
                }
                })
			*/
        ]
    });
 
//
// Menu de Triatlon
//


    var menuTriatlon = new Ext.menu.Menu({
        
        items: [
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Calendario',
                pressed:'true',
                handler: function(){
                   document.location.href='calendario_de_triatlon.html';
                }
                }),

            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Resultados',
                pressed:'true',
                handler: function(){
                   document.location.href='resultados_triatlon.html';
                }
                })		

        ]
    });  
 
//
// Menu de Masters
//


    var menuMasters = new Ext.menu.Menu({
        
        items: [
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Calendario',
                pressed:'true',
                handler: function(){
                   document.location.href='calendario_de_master.html';
                }
                }),

            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Resultados',
                pressed:'true',
                handler: function(){
                   document.location.href='resultados_masters.html';
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Records Mexicanos',
                pressed:'true',
                handler: function(){
                   document.location.href='records_masters.html';
                }
                })			

        ]
    }); 
	
//
// Menu de Masters
//


    var menuFMN = new Ext.menu.Menu({
        
        items: [
 
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Resultados',
                pressed:'true',
                handler: function(){
                   document.location.href='resultados_fmn.html';
                }
                }),
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Rankings',
                pressed:'true',
                handler: function(){
                   document.location.href='rankings_fmn.html';
                }
                })			

        ]
    }); 	
 
//
// Menu de Aguas Abiertas
//


    var menuAA = new Ext.menu.Menu({
        
        items: [
            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Calendario',
                pressed:'true',
                handler: function(){
                   document.location.href='calendario_de_aguas_abiertas.html';
                }
                }),

            new Ext.menu.Item({
                //icon:'iconos/emoticon_grin.png',
                text:'Resultados',
                pressed:'true',
                handler: function(){
                   document.location.href='resultados_aguas_abiertas.html';
                }
                })		

        ]
    });  
 
//
// ToolBar
// 1ero se crea una toolbar, el cual solo puede contener 1 opcion si deseamos varias en una seccion
// es necesario crear una nueva instacia de menu
//
    var toolbar = new Ext.Toolbar({
        style:'background-color:#204888;'
        //style:'width:755px;margin-left:auto; margin-right:auto;'
        });
// como no se coloco una id para agregar la toolbar se rendea al cuerpo del documento
toolbar.render("menu");

//
// Inicio
//
toolbar.add({
        cls: 'x-btn-text-icon bmenu', // icon and text class
        text:'Inicio',
        icon:'iconos/house.png',
        handler: function(){
            document.location.href='index.php'
        }
    });

//
// Servicios
//
toolbar.add({
        cls: 'x-btn-text-icon bmenu', // icon and text class
        text:'Servicios',
        icon:'iconos/brick.png',
        menu: menuServicios 
    });

//
// Articulos
//

toolbar.add({
    cls: 'x-btn-text-icon bmenu', // icon and text class
    icon:'iconos/page_white_edit.png',
    text:'Articulos',
    menu: menuArticulos 
    });

//
// Masters
//
toolbar.add({
        cls: 'x-btn-text-icon bmenu', // icon and text class
        text:'Masters',
        icon:'iconos/medal_gold_1.png',
		menu: menuMasters
    });

//
// Aguas Abiertas
//
toolbar.add({
        cls: 'x-btn-text-icon bmenu', // icon and text class
        text:'Aguas Abiertas',
        icon:'iconos/medal_silver_1.png',
        menu: menuAA
    });
//
// Triatlon
//
toolbar.add({
    cls: 'x-btn-text-icon bmenu', // icon and text class
    text: 'Triatlon',
    icon: 'iconos/medal_bronze_1.png',
    menu: menuTriatlon
    });

//
// Estados
//
toolbar.add({
        cls: 'x-btn-text-icon bmenu', // icon and text class
        text: 'Estados',
        icon: 'iconos/shield.png',
        menu: menuEstados
        });

//
// Paises
//
toolbar.add({
        cls: 'x-btn-text-icon bmenu', // icon and text class
        text: 'Paises',
        icon: 'iconos/world.png',
        menu: menuPaises
        });


//
// Federacion Mexicana
//
toolbar.add({
        cls: 'x-btn-text-icon bmenu', // icon and text class
        text: 'Fede. Mex',
        icon: 'iconos/mx.png',
		menu: menuFMN
        });


toolbar.getEl().child("table").wrap({tag:'center'});


}