adrL = {}

ADDER_LIST_URL = '/index.php?action=adderList';
ADDER_CLASS = 'adderListMail';

$(document).ready(function() {
	rs.returnValue(ADDER_CLASS);
});

adrL.deleteSurface = function(id) {
	$.get('index.php', { action: 'surfaceListener', operation: 'deleteSurface', id: id},
			function() {
				surfaceCount = $('#' + SURFACE_COUNT_ID).text();
				surfaceCount = (surfaceCount*1) - 1;
				if(surfaceCount == 0) {
					rs.setCookie('listenAdder', 0);
					window.location = ADDER_LIST_URL;
				} else {
					$('#' + SURFACE_COUNT_ID).text(surfaceCount).html();
					$('#' + id).css({'display' : 'none'});
				}
			});
}
