candidaturas_s4= function()
{
	
	var addOpt	=	function(){
			if(Ext.getCmp("uText_estudos_musicais_formacao"))
				return;
			
			var p = Ext.getCmp('step_4');
			
			var newEl	=	{
						xtype		:'textfield'
						,fieldLabel	: l.explicitar
						,name		: 'uText_estudos_musicais_formacao'
						,id			: 'uText_estudos_musicais_formacao'
						,maxLength	: 250
						,minLength	: 3
						,allowBlank: 0
						//,anchor		:'95%'
						,width:		300
					}
			for( var i = 0 ; i < p.items.items.length ; i++ ){
				if( p.items.items[i].id == "estudos_musicais_formacao" ){
					p.insert( i + 1, newEl );
					p.doLayout();
					return;
				}
			}
			p.doLayout();
		}


	var removeOpt	=	function(){
			var el	=	Ext.getCmp("uText_estudos_musicais_formacao")
			//var p	=	Ext.getCmp("step_0")
			if(!el)
				return;
			
			var v1	=	parseInt(Ext.getCmp("estudos_musicais_formacao").getValue())
			if((v1!=1000))
			{
				var p =	el.ownerCt;
				p.remove(el);
				p.doLayout(true);
			}
			
		}
	
	
	
	var l	=	candidaturas_imod_lang;
	return new Ext.Panel({
		//estudos_musicais_formacao_data
		xtype		: "panel"
		,id			: "step_4"
		,title		: l.estudos_musicais_title
		,border		: false
		,layout		: "form"
		,anchor		: '100%'
		,bodyStyle	: 'padding: 20px;'
		,labelWidth: 250
		//,collapsible:	true
		,defaults: {
				//,anchor: '50%'
				width: 300
				,maxLength	: 250
				,allowBlank: false
				,msgTarget: 'side'
			}
		,items		:[
			
			
			{
				fieldLabel:			l.estudos_musicais_formacao
				,name:				'estudos_musicais_formacao'
				,id:				'estudos_musicais_formacao'
				,allowBlank:		false
				,border       : false
				,listWidth:			300
				,width:				300
				,hiddenName:		'hidden_estudos_musicais_formacao'
				,grow:true
				//,value	:	"F"
				,store: new Ext.data.SimpleStore({
						'id': 0
						,fields: ['value', 'lable']
						,data :  estudos_musicais_formacao_data
						})
				,mode:				'local'
				,editable:			false
				,valueField:		'value'
				,displayField:		'lable'
				,xtype:				'combo'
				,typeAhead:			false
				,triggerAction:		'all'
				,forceSelection:	true
				,emptyText:			'Seleccione uma opção...'
				,listeners: {
					render: function(me) {
					  //me.setValue("1")
					}
					,select:function(me) {
						
						if(parseInt(me.getValue())==1000)
							addOpt();
							removeOpt();
					}
				}
			}
			
			,{
				fieldLabel:			l.estudos_musicais_ano
				,name:				'estudos_musicais_ano'
				,id:				'estudos_musicais_ano'
				,allowBlank:		1
				,border       : false
				,listWidth:			100
				,width:				100
				,hiddenName:		'hidden_estudos_musicais_ano'
				,grow:true
				//,value	:	"F"
				,store: new Ext.data.SimpleStore({
						'id': 0
						,fields: ['value', 'lable']
						,data :  [
								  [1,1]
								  ,[2,2]
								  ,[3,3]
								  ,[3,3]
								  ,[4,4]
								  ,[5,5]
								  ,[6,6]
								  ,[7,7]
								  ,[8,8]
								  ]
						})
				,mode:				'local'
				,editable:			false
				,valueField:		'value'
				,displayField:		'lable'
				,xtype:				'combo'
				,typeAhead:			false
				,triggerAction:		'all'
				,forceSelection:	true
				,emptyText:			'Seleccione uma opção...'
				,listeners: {
					render: function(me) {
					  //me.setValue("1")
					}
					,select:function(me) {
						if(parseInt(me.getValue())==1000)
							addOpt();
							removeOpt();
					}
				}
			}
			,{
				xtype	:	"label"
				,html	:	"<div class=decri_label>"+ l.estudos_musicais_ano_nota +"</div>"
			}
			,{
				xtype		:'textfield'
				,fieldLabel	: l.estudos_musicais_escola
				,name		: 'estudos_musicais_escola'
				,id			: 'estudos_musicais_escola'
				,allowBlank: 1
			}
			
			,{
				xtype		:'textarea'
				,fieldLabel	: l.estudos_musicais_obs
				,name		: 'estudos_musicais_obs'
				,id			: 'estudos_musicais_obs'
				,allowBlank: 1
			}
			
			/*
			
			,{
				xtype		:'textfield'
				,fieldLabel	: l.actual_habilitMusicais
				,name		: 'actual_habilitMusicais'
				,id			: 'actual_habilitMusicais'
				,allowBlank : 1
			}
			,{
				xtype		:'textfield'
				,fieldLabel	: l.actual_habilitaDaEscola
				,name		: 'actual_habilitaDaEscola'
				,id			: 'actual_habilitaDaEscola'
				,allowBlank : 1
			}
			*/
		]
	});	
}
