function clearLog(action) {
	if (confirm(SbGetLocaleByKey('SURE-TO-CLEAR'))) {
		document.forms.listForm.action.value = action;
		document.forms.listForm.submit();
	}
}

function showRecord(logId) {
	new Ajax.Request('/index.php/Ajax/Admin/LogRecordDetails?logId=' + logId, {
		method: 'get',	
			
		onSuccess: function(transport) {
			$('logRecordDetails').update(transport.responseText);
			
			$$('tr[name="logRecordRow"]').invoke('setStyle', { background: '' });
			
			var selectedBackgroundColor = $$('th.sb-gridview-header-sorted').first().getStyle('background-color');
			
			$('logRecordRow' + logId).setStyle({ background: selectedBackgroundColor });
		},
		
		onCreate: function() {
			$$('body').invoke('setStyle', { cursor: 'wait' });
		},	
			
		onComplete: function() {
			$$('body').invoke('setStyle', { cursor: '' });
		}
	});
}