/*
 * Ext JS Library 3.0 RC2
 * Copyright(c) 2006-2009, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */


Ext.onReady(function(){

    var mapwin;
    var button = Ext.get('show-btn');

    button.on('click', function(){
        // create the window on the first click and reuse on subsequent clicks
        if(!mapwin){

            mapwin = new Ext.Window({
                layout: 'fit',
                title: 'DOT WEB dove trovarci',
                closeAction: 'hide',
                width:400,
				height:600,
                x: 40,
                y: 60,
                items: {
                    xtype: 'gmappanel',
                    region: 'center',
                    zoomLevel: 11,
                    gmapType: 'map',
                    mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
                    mapControls: ['GSmallMapControl','GMapTypeControl','NonExistantControl'],
                    setCenter: {
                        geoCodeAddr: 'via aldo moro n° 8 Quinto di Treviso 31055 ',
                        marker: {title: 'DOTWEB Agenzia web disign - e-Business per Aziende - Web Marketing'},
                        listeners: {
                            click: function(){
                                Ext.Msg.alert('DOTWEB Agenzia Web and e-Business', "Via aldo moro n° 8 Quinto di Treviso 31055 Italia. Tel. +39 340 300 59 56 Skype: dotweb.biz");
                            }
                        }
                    }
                }
            });
            
        }
        
        mapwin.show();
        
    });
    
 });