/*!
 * Ext JS Library 3.3.0
 * Copyright(c) 2006-2010 Ext JS, Inc.
 * licensing@extjs.com
 * http://www.extjs.com/license
 */
Ext.onReady(function(){
    Ext.QuickTips.init();

    var tb = new Ext.Toolbar();
    tb.render('toolbar');
	
    tb.add(
	   {
	    text      : '<div style="font-family: Arial; font-size: 14pt"><pre>   </pre></div>',
	    id        : 'Home',
	    iconCls   : 'homeButtonIcon',
            autoWidth : true, 
	    scale     : 'large',
            type      : 'button',
	    listeners : {click    : function(thisButton)
	    		            {
	    			     thisButton.setIconClass('homeButtonPressedIcon');
	    			     Ext.get('innerFrame').dom.src = "html/home.html"; 
	    			    },
	    		 mouseover: function(thisButton)
	    			    {
	    			     thisButton.setIconClass('homeButtonHoverIcon');
	    			    },
	    		 mouseout : function(thisButton)
	    			    {
	    			     thisButton.setIconClass('homeButtonIcon');
	    			    }
	    		}
	   },
           {
	    text      : '<div style="font-family: Arial; font-size: 14pt;"><pre>       </pre></div>',
	    id        : 'laStruttura',
	    iconCls   : 'laStrutturaIcon',
 	    scale     : 'large',
            type      : 'button',
	    menu      : { 
	    		 items: [
	    		 	 {
	    		 	  text      : "Descrizione",
			    	  id	    : 'Descrizione',
	    		 	  iconCls   : 'descrizioneIcon',
	    		 	  width     : 220,
	    		 	  scale     : 'large',
	    		 	  listeners : {click: function(){Ext.get('innerFrame').dom.src = "html/laStruttura.html";}} 
	    		 	 },
	    		 	 {
	    		 	  text      : "Fotografie",
	    		    	  id	    : 'ImmaginiA',
	    		 	  iconCls   : 'immaginiIcon',
	    		 	  width     : 220,
	    		 	  scale     : 'large',
	    		 	  listeners : {click: function(){Ext.get('innerFrame').dom.src = "slideshows/Airtight\ AutoViewer/index.html";}} 
	    		 	 }
	    		 	]
	    		},
	    listeners : {click    : function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('laStrutturaPressedIcon');
	    		    	    },
	    		 mouseover: function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('laStrutturaHoverIcon');
	    		    	    },
	    		 mouseout : function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('laStrutturaIcon');
	    		    	    }
	    		}
	   },	       
 	   {
	    text      : '<div style="font-family: Arial; font-size: 14pt;"><pre>       </pre></div>',
	    id        : 'leSpecialita',
	    iconCls   : 'leSpecialitaIcon',
	    scale     : 'large',
	    menu      : {
	                 items: [
	    		         {
	    		          text      : "L'Unità Day Surgery",
	   		  	  id	    : 'unitaDaySurgery',
	    		          iconCls   : 'unitaDaySurgeryIcon',
	    		          width     : 220,
	    		          scale     : 'large',
	    		          listeners : {click: function(){Ext.get('innerFrame').dom.src = "html/unitaDaySurgery.html";}} 
	    		         },
	    		         {
	    		          text      : "Il Poliambulatorio",
	   		  	  id	    : 'poliAmbulatorio',
	    		          iconCls   : 'unitaDaySurgeryIcon',
	    		          width     : 220,
	    		          scale     : 'large',
	    		          listeners : {click: function(){Ext.get('innerFrame').dom.src = "html/poliambulatorio.html";}} 
	    		         }								 
	    		        ]
	    		    },
	    listeners : {click    : function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('leSpecialitaPressedIcon');
	    		    	    },
	    		 mouseover: function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('leSpecialitaHoverIcon');
	    		    	    },
	    		 mouseout : function(thisButton)
	    		 	    {
	    		    	     thisButton.setIconClass('leSpecialitaIcon');
	    		    	    }
	    		    }
	   }, 
 	   {
	    text      : '<div style="font-family: Arial; font-size: 14pt;"><pre>     </pre></div>',
	    id        : 'contatti',
	    iconCls   : 'contattiIcon',
	    scale     : 'large',
	    listeners : {click    : function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('contattiPressedIcon');
	    		    	     Ext.get('innerFrame').dom.src = "html/contatti.html"; 
	    		    	    },
	    		 mouseover: function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('contattiHoverIcon');
	    		    	    },
	    		 mouseout : function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('contattiIcon');
	    		    	    }
	    		}
	   }, 
 	   { 
	    text      : '<div style="font-family: Arial; font-size: 14pt;"><pre>        </pre></div>',
	    id        : 'doveSiamo',
	    iconCls   : 'doveSiamoIcon',
	    scale     : 'large',
	    listeners : {click    : function(thisButton)
	    			    {
	    		    	     thisButton.setIconClass('doveSiamoPressedIcon');
	    		             Ext.get('innerFrame').dom.src = "html/doveSiamo.html"; 
	    		    	    },
	    		 mouseover: function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('doveSiamoHoverIcon');
	    		    	    },
	    		 mouseout : function(thisButton)
	    		    	    {
	    		    	     thisButton.setIconClass('doveSiamoIcon');
	    		    	    }
	    		}
	   }
    );

   tb.doLayout();
   
});

