/*!
 * Ext JS Library 3.0+
 * Copyright(c) 2006-2009 Ext JS, LLC
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
Ext.onReady(function(){

	// -------------------------------------------------------------

    // create the Data Store
    var store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Financial&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'FG',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Currencies&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Div2',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Indicies&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Indices',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Dairy&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Dairy',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Grains&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Grains',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Livestock&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Livestock',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Lumber&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Lumber',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Metals&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Metals',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Softs&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Softs',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();

	// -------------------------------------------------------------

    // create the Data Store
    store = new Ext.data.Store({
        // load using HTTP
        url: "_XML_Q.php?tag=contractspecs&Q=Energies&target=http://www.pfgbest.com/common/ibs/contractspecs.xml",

        // the return will be XML, so lets set up a reader
        reader: new Ext.data.XmlReader({
               // records will have an "Item" tag
               record: 'item',
               totalRecords: '@total'
           }, [
               // set up the fields mapping into the xml doc
               // The first needs mapping, the others are very basic
               {name: 'symbol', mapping: 'symbol'},
               'commodity',
               'exchange',
               'contractSize',
               'deliveryMonths',
               'minFluctuation',
			   'pointValue'
           ])
    });

    // create the grid
    var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
            {header: "Symbol", width: 64, dataIndex: 'symbol', sortable: true},
            {header: "Future", width: 156, dataIndex: 'commodity', sortable: true},
            {header: "Exchange", width: 78, dataIndex: 'exchange', sortable: true},
            {header: "Contract Size", width: 104, dataIndex: 'contractSize', sortable: true},
            {header: "Delivery Months", width: 124, dataIndex: 'deliveryMonths', sortable: true},
            {header: "Min Fluctuation", width: 116, dataIndex: 'minFluctuation', sortable: true},
            {header: "Point Value", width: 116, dataIndex: 'pointValue', sortable: true}
        ],
        renderTo:'Energies',
		enableColumnHide : false,
		enableColumnMove : false,
		enableHdMenu : false,
		stripeRows : true,
		trackMouseOver : false,
        width:780,
        maxHeight:425
    });

    store.load();
});

