dojo.declare("com.mgh.ProgramsController", null, {
	constructor : function (url){
		this.url = url;
	},
	
	GetData : function(id,name,type){
		try {
			dojo.xhrGet({
				url: this.url + 'getPrograms.ashx?id=' + id,
				handleAs: "json",
				load : function (response,ioArgs){			
					dojo.publish('programsDataReady',[response]);
				},
				error : function(response, ioArgs){
					alert("An error occurred, with response: " + response);
				}
			});	
		} catch(e){
			
		}	
	},

	Filter : function(id,name,type){
		showTimer();
		mySearch.queryParams.program = id;
		mySearch.getXmlString();	
	},

	ResetPrograms : function(id,name,type){
		mySearch.queryParams.program = '';
	}
});
