// JavaScript Document
var east_panel=
	new Ext.FormPanel({
        labelWidth: 75,
        border:false,
        width: 350        
 	});
var my_details=
	new Ext.TabPanel({            
	activeTab: 0,
	defaults:{autoHeight:true, bodyStyle:'padding:10px'}            
});

var personal_details=
	new Ext.Panel({
		title:'Personal Details',
		layout:'form',
		defaults: {width: 230},
		defaultType: 'textfield',
		defaults: {autoScroll:true},		
		items: [{
			fieldLabel: 'First Name',
			name: 'first',
			allowBlank:false,
			value: 'Brahim Khalil',
			readOnly: true
		},{
			fieldLabel: 'Last Name',
			name: 'last',
			value: 'LOUKIL',
			readOnly: true
		},{
			fieldLabel: 'Birthday date',
			name: 'age',
			value: '18/09/1982',
			readOnly: true
		}, {
			fieldLabel: 'Email',
			name: 'email',
			vtype:'email',
			anchor:'90%',
			value: 'loukil.brahim@gmail.com',
			readOnly: true
		}]
   });
var photo=new Ext.form.FieldSet({
			id:'photo',
			title:'Photo',	
			contentEl: 'south'
			});
var educational_details=
	new Ext.Panel({
			title:'Educational details',
			layout:'form',
			defaults: {width: 230},
			listeners: {activate: handleEducationalPanelActivate}																			  
	});	
var first_diploma=
	new Ext.form.FieldSet({																					
			title: 'High School diploma',
			collapsible: false,
			autoHeight:true,
			autoWidth:true,		
			defaults: {width: 180},
			defaultType: 'textfield',
			items :[
					{
						fieldLabel: 'Date',
						name: 'date',
						anchor:'90%',
						value: '01/07/2001',
						readOnly: true
					}					
					,{
					fieldLabel: 'SCHOOL',
					name: 'school',
					anchor:'90%',
					value: 'KHAIREDINE BACHA School',
					readOnly: true
					},{
					fieldLabel: 'LOCATION',
					name: 'location',
					anchor:'90%',
					value: 'Tunisia-Tunis',
					readOnly: true
					}
				  ]
	});
var second_diploma=
	new Ext.form.FieldSet({						
		title: 'Software Engineering degree',
		collapsible: false,
		autoHeight:true,
		autoWidth:true,			
		defaults: {width: 180},
		defaultType: 'textfield',
		items :
		[
				{
				fieldLabel: 'Date',
				name: 'date',
				value: '02/02/2007',
				readOnly: true
			},{
				fieldLabel: 'University',
				name: 'school',
				anchor:'90%',
				value: 'INSAT(Institute of sciences and technologies)',
				readOnly: true
				},{
				fieldLabel: 'LOCATION',
				name: 'location',
				anchor:'90%',
				value: 'Tunisia-Tunis',
				readOnly: true
				}
				
		]
						
	});
var professional_details=
	new Ext.Panel({
			title:'Professional details',
			layout:'form',
			defaults: {width: 280},
			listeners: {activate: handleProfessionalPanelActivate}																			  
	});
var proxiad_web= 
	new Ext.form.FieldSet({
						  	title: '2010-Now: Java EE Architect',
							collapsible: false,
							autoHeight:true,
							autoWidth:true,					
							defaults: {width: 180},
							defaultType: 'textfield',
							items :[
									{
										fieldLabel: 'Company',
										anchor:'90%',
										name: 'company',
										value: 'PROXIAD',
										readOnly: true
									},{
										fieldLabel: 'Working on',
										name: 'workingOn',			
										anchor:'90%',										
										value: 'Java EE 5 & 6',
										readOnly: true
									},{
									fieldLabel: 'Language',
									name: 'language',
									anchor:'90%',
									value: 'Java',
									readOnly: true
									},{
									fieldLabel: 'Framework used',
									name: 'frameworkUsed',													
									anchor:'90%',
									value: 'Maven, Spring, WS-*, JPA',
									readOnly: true
									},{
									fieldLabel: 'IDE',
									name: 'ide',
									anchor:'90%',
									value: 'Eclipse 3.6',
									readOnly: true
									},{
									fieldLabel: 'URL',
									name: 'url',
									anchor:'90%',
									vtype:'url',
									value: 'http://www.proxiad.com',
									readOnly: true
									}
								  ]
	  
});
var teamlog_web= 
	new Ext.form.FieldSet({
						  	title: '2008-2010: Java EE Architect',
							collapsible: false,
							autoHeight:true,
							autoWidth:true,					
							defaults: {width: 180},
							defaultType: 'textfield',
							items :[
									{
										fieldLabel: 'Company',
										anchor:'90%',
										name: 'company',
										value: 'Teamlog',
										readOnly: true
									},{
										fieldLabel: 'Working on',
										name: 'workingOn',			
										anchor:'90%',										
										value: 'Java EE 5',
										readOnly: true
									},{
									fieldLabel: 'Language',
									name: 'language',
									anchor:'90%',
									value: 'Java',
									readOnly: true
									},{
									fieldLabel: 'Framework used',
									name: 'frameworkUsed',													
									anchor:'90%',
									value: 'Spring, JPA/Hibernate, Maven',
									readOnly: true
									},{
									fieldLabel: 'IDE',
									name: 'ide',
									anchor:'90%',
									value: 'Eclipse 3.4(Ganymede)',
									readOnly: true
									},{
									fieldLabel: 'URL',
									name: 'url',
									anchor:'90%',
									vtype:'url',
									value: 'http://www.teamlog.com',
									readOnly: true
									}
								  ]
	  
	});
	
var eclipse_commiter= 
	new Ext.form.FieldSet({
						  	title: '2007-2008: R&D Engineer & Eclipse GMT Committer',
							collapsible: false,
							autoHeight:true,
							autoWidth:true,					
							defaults: {width: 180},
							defaultType: 'textfield',
							items :[
									{
										fieldLabel: 'Company',
										anchor:'90%',
										name: 'company',
										value: 'ATLAS GROUP(INRIA & LINA)',
										readOnly: true
									},{
										fieldLabel: 'Working on',
										name: 'workingOn',			
										anchor:'90%',										
										value: 'ATL + AM3 + AMW + KM3 VE',
										readOnly: true
									},{
									fieldLabel: 'Language',
									name: 'language',
									anchor:'90%',
									value: 'Java',
									readOnly: true
									},{
									fieldLabel: 'Framework used',
									name: 'frameworkUsed',													
									anchor:'90%',
									value: 'EMF + GMF + GMT tools',
									readOnly: true
									},{
									fieldLabel: 'IDE',
									name: 'ide',
									anchor:'90%',
									value: 'Eclipse 3.3',
									readOnly: true
									},{
									fieldLabel: 'URL',
									name: 'url',
									anchor:'90%',
									vtype:'url',
									value: 'http://www.eclipse.org/gmt',
									readOnly: true
									}
								  ]
	  
	});
var omondo_architect= 
	new Ext.form.FieldSet({
		 	title: '2006-2007: UML Software Architect',
			collapsible: false,			
			autoHeight:true,
			autoWidth:true,	
			defaultType: 'textfield',
			defaults: {width: 180},
			items :
			[
					{
						fieldLabel: 'Company',
						anchor:'90%',
						name: 'company',
						value: 'OMONDO corporation',
						readOnly: true
					},{
						fieldLabel: 'Worked on',
						name: 'workingOn',			
						anchor:'90%',										
						value: 'EclipseUML tool',
						readOnly: true
					},{
					fieldLabel: 'Language',
					name: 'language',
					anchor:'90%',
					value: 'Java',
					readOnly: true
					},{
					fieldLabel: 'Framework used',
					name: 'frameworkUsed',													
					anchor:'90%',
					value: 'EMF + UML2 + GEF',
					readOnly: true
					},{
					fieldLabel: 'IDE',
					name: 'ide',
					anchor:'90%',
					value: 'Eclipse 3.3',
					readOnly: true
					},{
					fieldLabel: 'URL',
					name: 'url',					
					vtype:'url',
					value: 'http://www.omondo.com',
					readOnly: true
					}
			]
	});
var sourceforge_contributor= 
	new Ext.form.FieldSet({
						title: '2006: SourceForge.net Contributor',
						collapsible: false,
						autoHeight:true,
						autoWidth:true,
						defaults: {width: 180},
						defaultType: 'textfield',
						items :
						[
							{
								fieldLabel: 'Company',
								anchor:'90%',
								name: 'company',
								value: 'Independant',
								readOnly: true
							},{
								fieldLabel: 'worked on',
								name: 'workingOn',			
								anchor:'90%',											
								value: 'OWL VE',
								readOnly: true
							},{
							fieldLabel: 'Language',
							name: 'language',
							anchor:'90%',
							value: 'Java',
							readOnly: true
							},{
							fieldLabel: 'Framework used',
							name: 'frameworkUsed',																										
							anchor:'90%',
							value: 'Eclipse RCP + GEF',
							readOnly: true
							},{
							fieldLabel: 'IDE',
							name: 'ide',
							anchor:'90%',
							value: 'Eclipse 3.2',
							readOnly: true
							},{
							fieldLabel: 'URL',
							name: 'url',
							anchor:'90%',
							vtype:'url',
							value: 'http://owlve.sourceforge.net',
							readOnly: true
							}
						]											
										
	});
Ext.onReady(function(){
	east_panel.add(my_details);		
	my_details.add(personal_details);
	//personal_details.add(photo);	
	my_details.add(educational_details);
	my_details.add(professional_details);
});

function handleActivate(tab){
       tab.doLayout();
}
function handleEducationalPanelActivate(tab){
    educational_details.add(second_diploma);
	educational_details.add(first_diploma);
	handleActivate(tab);	   
}
function handleProfessionalPanelActivate(tab){
	professional_details.add(proxiad_web);
	professional_details.add(teamlog_web);
	professional_details.add(eclipse_commiter);
	professional_details.add(omondo_architect);
	professional_details.add(sourceforge_contributor);
	handleActivate(tab);	   
}
