Ext.onReady(function(){
	Ext.state.Manager.setProvider(new Ext.state.CookieProvider({
		expires: new Date(new Date().getTime()+(1000*60*60*24)) //30 days
	}));
	
	//Ext.state.Manager.clear('disclaimer');
	
	// If they have not already agreed to the disclaimer, show it now
	if (Ext.state.Manager.get('disclaimer', false) == false) {
		// First hide the page content
		Ext.get(document.body).hide();
		
		win = new Ext.Window({
			contentEl: 'disclaimer',
			layout: 'fit',
			width: 929,
			bodyStyle: 'padding: 10px;',
			closeAction: 'hide',
			plain: true,
			autoHeight: true,
			autoScroll: true,
			closable: false,
			modal: true,
	
			buttons: [{
				text: 'No, I Disagree',
				handler: function() {
					self.location = 'about:blank';
				}
			},{
				text: 'Yes, I Agree',
				handler: function() {
					Ext.state.Manager.set('disclaimer', true);
					Ext.get(document.body).show();
					win.hide();
				}
			}]
		});
		
		win.show();
	}
});