$(document).ready(function(){
	$('#' + MyLink).addClass('ActiveLink');

	$('#' + MyBrand).addClass('ActiveLink');
	$('#' + MyLiBrand).addClass('ActiveLink');

	$('#' + MyLiBrand + '> ul').css("display","block");

	$("#ScrollUp").mousehold( function (ev) {
		var TheTop = parseInt($('.InnerContentText').css('top'));
		var TheHeight = parseInt($('.InnerContentText').height());
		var ContainerHeight = parseInt($('.InnerContentTextContainer').height());
		if ( (TheTop + 15) < 0) {
			TheTop = TheTop + 15;
			$('.InnerContentText').css('top', TheTop);
		}
		else
			$('.InnerContentText').css('top', 0);
	}).click(
		function (ev) {
			ev.preventDefault();
		});

	$("#ScrollDown").mousehold( function (ev) {
		var TheTop = parseInt($('.InnerContentText').css('top'));
		var TheHeight = parseInt($('.InnerContentText').height());
		var ContainerHeight = parseInt($('.InnerContentTextContainer').height());
		if ( (TheTop - 15) > ContainerHeight - TheHeight) {
			TheTop = TheTop - 15;
			$('.InnerContentText').css('top', TheTop);
		}
		else
			$('.InnerContentText').css('top', ContainerHeight - TheHeight);
	}).click(
		function (ev) {
			ev.preventDefault();
		});

	$("#ScrollTop").click( function (ev) {
		$('.InnerContentText').animate({'top': 0});
		ev.preventDefault();
	});

});

$(window).load(function() {
	var TheHeight = parseInt($('.InnerContentText').height());
	var ContainerHeight = parseInt($('.InnerContentTextContainer').height());
	if (ContainerHeight >= TheHeight) {
		$('div.MyScroll').hide();
	}
});