dojo.declare("com.mgh.ProgramsModel", null, {
	constructor : function (){
		this.programsArray;
	},

	PopulateModel : function (results){
		try {
			var data = results.data;
			this.programsArray = new Array();
			for (var i = 0; i < data.length; i++){
				this.programsArray[i] = new com.mgh.Program(data[i].id, data[i].name.replace("&#39;", ""));
			}					
			dojo.publish('programsModelReady',[this.programsArray]);
		}
		catch (e){
			alert(console.log('ProgramsModel.PopulateModel Error: ' + e));
		}
	}	
});