function change_button(_obj, text_old, text_new){
	var _element = document.getElementById(_obj);
	var str = _element.src
	if (_element){
		_element.src= str.replace(text_old, text_new);
	}
}

function change_arrow(_obj){
	if ($('#' + _obj).hasClass('Closed')){
		$('#' + _obj).removeClass('Closed').addClass('Opened');
	}
	else{
		$('#' + _obj).removeClass('Opened').addClass('Closed');
	}
}

/* function current_date(){
	$('#OutBlockTopCurrentBody').css(
		'width', $('#OutBlockTopCurrent').width()
	);
	$('#OutBlockTopCurrentBody').css({
		top: ($('#OutBlockTopCurrent').offset().top + $('#OutBlockTopCurrentDate').height() + 1) + 'px',
		left: ($('#OutBlockTopCurrent').offset().left) + 'px'
	});
} */

function hide_show(_obj, slide){
	if ($('#' + _obj).css('display') == 'none'){
		if (slide != null){
			$('#' + _obj).slideDown(slide);
		}
		else{
			$('#' + _obj).show();
		}
	}
	else{
		if (slide != null){
			$('#' + _obj).slideUp(slide);
		}
		else{
			$('#' + _obj).hide();
		}
	}
}

function hide_show_news(property){
	if (property == 'show'){
		$('.NewsBody').each(function(){
			$(this).show();
		});
	}
	else{
		$('.NewsBody').each(function(){
			$(this).hide();
		});
	}
}

function set_equal_height(columns){
	var tallestcolumn = 0;
	columns.css('height', 'auto').each(
		function(){
			currentHeight = $(this).height();
			if (currentHeight > tallestcolumn){
				tallestcolumn = currentHeight;
			}
		}
	);
	columns.height(tallestcolumn);
}