var image1 = $('<img />').attr('src', '../images/preload32.gif');

function Toggle(obj) {
    $("#" + obj).toggle();
}

function Show(obj) {
    $("#" + obj).show();
}

function Hide(obj) {
    $("#" + obj).hide();
}

function showPreloader(block_name) {
	
	block_name = block_name || process_block;
	
	$('<div id="indicator"><img src="/images/preload32.gif" /></div>').insertAfter('#' + block_name);
	
	var content_block_position = $('#' + block_name).position();
	var content_block_width = $('#' + block_name).outerWidth();
	var content_block_height = $('#' + block_name).outerHeight();
	
	$('#' + block_name).css('z-index', '2');
	
	$('#indicator').css('top', content_block_position.top);
	$('#indicator').css('left', content_block_position.left);
	
	$('#indicator').width(content_block_width);
	$('#indicator').height(content_block_height);
	
	$('#indicator').show();	
}

function hidePreloader() {
    $("#indicator").remove(); 
}

