/*
 * Ext JS Library 1.1 RC 1
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://www.extjs.com/license
 */

var TabsExample = {
    init : function(){
        // basic tabs 1, built from existing content
//        var tabs = new Ext.TabPanel('tabs1');
//        tabs.addTab('script', "View Script");
//        tabs.addTab('markup', "View Markup");
//        tabs.activate('script');
    
        // second tabs built from JS
        var jtabs = new Ext.TabPanel('jtabs');

/*		var tab1 = jtabs.addTab('jtabs-1', "","<iframe src='url_Tab1.html' width='100%' height='100%' frameborder=0></iframe>");//iframe porque carga mal galeria.html directamente
		tab1.on('activate',function(){
           this.bodyEl.setWidth('100%');this.bodyEl.setHeight('900px');
        });*/
   
        var tab2 = jtabs.addTab('jtabs-2', "Bases del Premio");
        var updater = tab2.getUpdateManager();
        updater.setDefaultUrl('url_Tab2.html');
        tab2.on('activate', updater.refresh, updater, true);
		//jtabs.syncHeight(800);//necesario para pdf

		var tab3 = jtabs.addTab('jtabs-3', "Ediciones anteriores","<iframe src='url_Tab3.html' width='100%' height='100%' frameborder=0></iframe>");//iframe porque carga mal galeria.html directamente
		tab3.on('activate',function(){
           this.bodyEl.setWidth('100%');this.bodyEl.setHeight('900px');
        });
		
		var tab4 = jtabs.addTab('jtabs-4', "Fallo Jurado 2000","<iframe src='url_Tab4.html' width='100%' height='100%' frameborder=0></iframe>");//iframe porque carga mal galeria.html directamente
		tab4.on('activate',function(){
           this.bodyEl.setWidth('100%');this.bodyEl.setHeight('900px');
        });
		
		var tab5 = jtabs.addTab('jtabs-5', "Fallo Jurado 1998","<iframe src='url_Tab5.html' width='100%' height='100%' frameborder=0></iframe>");//iframe porque carga mal galeria.html directamente
		tab5.on('activate',function(){
           this.bodyEl.setWidth('100%');this.bodyEl.setHeight('900px');
        });		
    
    
        jtabs.activate('jtabs-2');
    }
}
Ext.EventManager.onDocumentReady(TabsExample.init, TabsExample, true);