///////////////////////////////////
//    ESTRUCTURA DEL FORM        // 
///////////////////////////////////

function strucForm(){
	var struc = [
		{type:"settings", inputWidth:150, labelWidth:200},
		{type:"fieldset", name:"frbuscar", width:880, list:[
			{type:"label", label:"Reporte de Programas", labelWidth:500},
			{type:"combo", name:"agenciab", label:"Departamento:", inputWidth:300},
			{type:"combo", name:"entidadb", label:"Entidad:", inputWidth:300},
			{type:"combo", name:"codigob", label:"C&oacute;digo del Programa:", inputWidth:300},
			{type:"block", width: 800, list:[
					{type:"button", name:"reportar", value:"Reportar", offsetLeft:280, offsetTop:10},
			]}
		]},
		{type:"fieldset", name:"frinversion", width:880, list:[
			{type:"label", label:"Formulario Cabecera de Programas TIC", labelWidth:500},
			{type:"fieldset", name:"general", label:"Datos Generales", width:840, list:[
				{type:"input", name:"codigo", label:"C&oacute;digo del Programa:", inputWidth:200, readonly:true, className:"fondogris"},
				{type:"input", name:"fechaalta", label:"Fecha de Alta:", readonly:true, className:"fondogris"},
				{type:"input", name:"agencia", label:"Departamento:", inputWidth:300, readonly:true, className:"fondogris"},
				{type:"input", name:"entidad", label:"Entidad:", inputWidth:300, readonly:true, className:"fondogris"},
				{type:"input", name:"tipo", label:"Tipo:", inputWidth:300, readonly:true, className:"fondogris"},
				{type:"input", name:"funcion", label:"Categor&iacute;a Funcional:", inputWidth:300, readonly:true, className:"fondogris"},
				{type:"input", name:"nombre", label:"Nombre del Programa:", inputWidth:300, readonly:true, className:"fondogris"},
				{type:"input", name:"descripcion", label:"Descripci&oacute;n del Programa:", inputWidth:300, rows:3, readonly:true, className:"fondogris"},
				{type:"input", name:"responsablenombre", label:"Nombre del Responsable:", inputWidth:300, readonly:true, className:"fondogris"},
				{type:"input", name:"estado", label:"Estado:", inputWidth:200, readonly:true, className:"fondogris"},
				{type:"block", width: 800, list:[
						{type:"button", name:"cancelar", value:"Regresar", offsetLeft:250, offsetTop:20}
				]}
			]},
			{type:"fieldset", name:"frcontratos", label:"Contratos", width:840, list:[
				{type: "container", name: "contratosgrid", label: "", inputWidth:800, inputHeight:250},
				{type:"block", width: 800, list:[
					{type:"button", name:"contratoini", value:"Iniciar", offsetLeft:280, offsetTop:10},
					{type:"newcolumn", offset:20},
					{type:"button", name:"contratofin", value:"Finalizar", offsetTop:10}
				]}
			]},
			{type:"fieldset", name:"frproyectos", label:"Proyectos", width:840, list:[
    			{type: "container", name: "proyectosgrid", label: "", inputWidth:800, inputHeight:250},
				{type:"block", width: 800, list:[
					{type:"button", name:"proyectoini", value:"Iniciar", offsetLeft:280, offsetTop:10},
					{type:"newcolumn", offset:20},
					{type:"button", name:"baseline", value:"Baseline", offsetTop:10}
				]}
			]}
		]}
	];
	return struc;
}

function formProyectos(lyt)
{
	var struc = [
		{type:"settings", inputWidth:100, labelWidth:100, offsetLeft:30},
		{type:"label", label:"Avance de Proyectos", labelWidth:200},
		{type:"input", name:"nombre", label:"Nombre:", inputWidth:200, rows:2, readonly:true, className:"fondogris"},
		{type:"input", name:"costo", label:"Costo:", readonly:true, className:"fondogris"},
		{type:"input", name:"inicio_ro", label:"Inicio Previsto:", readonly:true, className:"fondogris"},
		{type:"input", name:"final_ro", label:"Final Previsto:", readonly:true, className:"fondogris"},
		{type:"container", name:"gdbaseline", label:"Baseline:", inputWidth:400, inputHeight:200},
		{type:"hidden", name:"baseline"},
		{type:"hidden", name:"programa"},
		{type:"hidden", name:"op", value:"proy"},
		{type:"hidden", name:"id"},
		{type:"hidden", name:"act_tipo", value:"1"},
		{type:"block", width: 400, list:[
			{type:"button", name:"proyectoguardar", value:"Guardar", offsetLeft:80, offsetTop:20},
			{type:"newcolumn"},
			{type:"button", name:"proyectocancelar", value:"Cancelar", offsetLeft:20, offsetTop:20}
		]}
	];
	var form = lyt.attachForm(struc);
	return form;
}