﻿/*
 * Ext JS Library 2.3.0
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

Ext.onReady(function() {

    // NOTE: This is an example showing simple state management. During development,
    // it is generally best to disable state management as dynamically-generated ids
    // can change across page loads, leading to unpredictable results.  The developer
    // should ensure that stable state ids are set for stateful components in real apps.
    Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

    // create some portlet tools using built in Ext tool ids
    var tools = [{
        id: 'gear',
        handler: function() {
            Ext.Msg.alert('Message', 'The Settings tool was clicked.');
        }
    }, {
        id: 'close',
        handler: function(e, target, panel) {
            panel.ownerCt.remove(panel, true);
        }
}];

        var viewport = new Ext.Viewport({
            layout: 'border', margins: '0 0 0 0',
            items: [
             {
                 region: 'north',
                 height: 60, // give north and south regions a height 
                 tag: 'div',
                 html: '<img src="http://www.nextwaver.com/image/top2.gif" style="width: 601px; height: 60px"  />'

             }, {
                 region: 'west',
                 id: 'west-panel',
                 title: 'where-in-thailand.com',
                 iconCls: 'bookmark',
                 split: true,
                 width: 220,
                 //width: 300,
                 minSize: 175,
                 maxSize: 400,
                 collapsible: true,
                 margins: '0 0 0 0',
                 cmargins: '0 0 0 0',
                 layout: 'accordion',
                 layoutConfig: { animate: true },
                 items: [
                /* {
                     title: 'สถานที่ท่องเที่ยว',
                     autoScroll: true,
                     border: false,
                     iconCls: 'ihome',
                     html: '<iframe id="geniral" name="geniral" src="home/menu/travel.htm" width="100%" height="100%"  scrolling="no" frameborder="0" border="0" marginwidth="0"  marginheight="1">'
                 },*/
                 {
                     title: 'ค้นหาสถานที่',
                     autoScroll: true,
                     border: false,
                     iconCls: 'search',
                     html: '<iframe id="search" name="geniral" src="../webpage/search/default.aspx" width="100%" height="100%"  scrolling="no" frameborder="0" border="0" marginwidth="0"  marginheight="1">'
                 } ,{
                     title: 'ข้อมูลทั่วไป',
                     autoScroll: true,
                     border: false,
                     iconCls: 'information',
                     html: '<iframe id="geniral" name="geniral" src="home/menu/geniral.htm" width="100%" height="100%"  scrolling="auto" frameborder="0" border="0" marginwidth="0"  marginheight="1">'
                }, {
                 title: 'สถานการณ์น้ำท่วม 2554',
                     border: false,
                     autoScroll: true,
                     iconCls: 'flood',
                     html: '<iframe id="flood" name="flood" src="home/menu/floodmenu.htm" width="100%" height="100%"   scrolling="no" frameborder="0" border="0" marginwidth="0"  marginheight="1">'
                }/*, {
                 title: 'Ê¶Ò¹·Õè·èÍ§à·ÕèÂÇ',
                 border: false,
                 autoScroll: true,
                 iconCls: 'nav',
                 html: '<iframe id="Transit" name="Transit" src="menu/travel.htm" width="100%" height="500px"   scrolling="no" frameborder="0" border="0" marginwidth="0"  marginheight="1">'
                } , {
                 title: 'Settings',
                 html: Ext.example.shortBogusMarkup,
                 border: false,
                 autoScroll: true,
                 iconCls: 'nav'
                 }*/
              ]},
          {
              xtype: "tabpanel",
              region: 'center',
              items: [{
                  xtype: "panel",
                  title: 'map',
                  iconCls: 'bookmark',
                  html: '<iframe id="Map" name="Map" src="home/gmap/map.htm?Lat=13.7500&Lng=100.5170&ID=1&r=0" width="100%" height="100%" scrolling="no" frameborder="0" name="map" border="0" marginwidth="0"  marginheight="1">'
              },{
                  xtype: "panel",
                  title: 'เพิ่มข้อมูลธุรกิจ',
                  iconCls: 'app',
                  html: '<iframe id="twitter" name="Map" src="../register/Default.aspx" width="100%" height="100%" scrolling="auto" frameborder="0" name="map" border="0" marginwidth="0"  marginheight="1">'
              }, {
                  xtype: "panel",
                  title: 'ข่าวสัมมนา',
                  iconCls: 'ihome',
                  html: '<iframe id="twitter" name="Map" src="http://www.nextwaver.com/Pages/semina/SUMsemina.aspx" width="100%" height="100%" scrolling="auto" frameborder="0" name="map" border="0" marginwidth="0"  marginheight="1">'
              }
              ],activeTab: 0
          }
        ]
        });
    });


