
Ext.onReady(function(){



    


 var contactForm = new Ext.FormPanel({
        labelWidth: 400,  
        url:'',
        frame:true,
        title: '' ,
		id:'contact',
       //  renderTo:'contact', 
        bodyStyle:'padding:5px 5px 0',
        autowidth: true,
      
        defaults: {width: 300},
        defaultType: 'textfield',

        items: [{  
            	xtype: 'checkbox', //defining the type of component  
            	fieldLabel:'',
            	anchor:'90%',
				boxLabel: 'Ne plus afficher cette fenêtre',
            	fieldLabel: '', //assigning a label  
            	name: 'donotshow', 	//and a "name" so we can retrieve it in the server...  
            	id: 'donotshow'		// ...when the form is sent  
        	}

               
        ]
    });

  
 var panel1 =  new Ext.FormPanel   ({
		  title : '',
		  height:450,
		  autoLoad:{url:'translohr_event/js/event.html'}
		 
		});


 var mywin = new Ext.Window({
	  width        : 720,
	  height       : 560,
	  title        : 'Présentation Translohr le samedi 28 janvier 2012',
	  modal : true,
      closeAction : 'hide',
	// renderTo:'win',
      resizable: false,
	  border       : false,
	 
	 
	  items :  [ panel1,contactForm  ],
	 
      buttons: [{
    	    text: 'Fermer',
    	    handler: function(){
				
			var v_donotshow = Ext.getCmp('donotshow').getValue();

if (v_donotshow == true){
	
 Ext.util.Cookies.set("eventthr", 'no');

	
}  

				
    	    mywin.hide();
    	              
    	    }

      }]
	  
	});
 
 var vshow = Ext.util.Cookies.get("eventthr");
 
 if ( vshow != 'no') {
 
 mywin.show();

 }


});







    
 
