ImportAgents = function() {

    return {
        init : function() {

			var newsRules = {
			    'a.agent-det': function(a) {
				    Event.stopObserving(element, 'click', ImportAgents.showAgentInfo);
					Event.observe(element, 'click', ImportAgents.showAgentInfo);
				}
			};

			Behaviour.register(newsRules);
			
			Behaviour.apply();
		},
		
		showAgentInfo: function(evt) {
		    Event.stop(evt);
		    
			var aEle = Event.element(evt);

			
			Modalbox.show($(aEle).href, { width: 600, 			                              			                             
			                              title: 'Import Agent Details' });
		}
    };
}();

Event.observe(window, 'load', function() {
	ImportAgents.init();

	Behaviour.apply();
});
