var Admin = {
	deleteChart: function(chartId) {
		if (confirm('Are you sure?')) {
			window.location = '/charts/delete/'+chartId;
			return true;
		}
		return false;
	}, 
	
	postRecommend: function() {
		Utils.cssWindow('/admin/postRecommend', 'POST');
	},
	
	deleteEvent: function(eventId, retURL) {
		if (confirm('Are you sure?')) {
			window.location = '/events/deleteEvent/'+eventId+'/'+retURL;
			return true;
		}
		return false;
	},
	
	expiredTrials: function(m, y, salesId) {
		window.location = '/care/expiredTrials/'+m+'/'+y+'/'+salesId;
	},
	
	confirmAssign: function(retURL) {
		if (confirm('Are you sure?')) {
			Utils.submit('body', '/care/assignLeads/'+retURL, 'licenseForm');
			return true;
		}
		return false;
	},
	
	checkAllUserIds: function() {
		var checkAll = document.customerListsForm.CheckAll;
		var userIds = document.getElementsByName('UserIds[]');
		var status = false;
		if (checkAll.checked) {
			status = true;
		}
		for (i=0; i<userIds.length; i++) {
			userIds[i].checked = status;
		}
	},
	
	stageLegend: function() {
		Utils.cssWindow('/admin/stageLegend', '', '600', '500');
	},
	
	showProductName: function(productId) {
		Utils.cssWindow('/admin/productName/'+productId, '', '300', '100');
	},
	
	setCallTime: function(email, scheduleId) {
		Utils.cssWindow('/customers/setCallTime/'+email+'/'+scheduleId, '', '500', '200');
	},
	
	confirmDeleteCallSchedule: function(scheduleId) {
		if (confirm('Are you sure?')) {
			Utils.updater('setCallTime','/customers/deleteCallSchedule/'+scheduleId);
			return true;
		}
		return false;
	},
	
	notes: function(userId) {
		Utils.cssWindow('/customers/notes/'+userId, 'Notes', '800', '550');
	},
	
	addNotes: function(userId) {
		Utils.cssWindow('/customers/addNotes/'+userId);
	},
	
	abledataDeleteUser: function(username) {
		if (confirm('Are you sure?')) {
			window.location = '/admin/abledataDeleteUser/'+username;
			return true;
		}
		return false;
	}
}