function activateInteractions()
{
	if($("#submenu").length > 0)
	{
		setInterval("scrollingDIV('submenu', 0)", 100);
	}
	$('.mainmenu ul li ul').hide();
	$('.mainmenu ul li a').each( function()
		{
			if($(this).attr('href') == location.href)
				$(this).addClass('active');
		}
	);
	$('.mainmenu ul li').hover(
		function()
		{
			$(this).find('ul').stop(true, true);
			$(this).addClass('over');
			$(this).find('ul').animate({ height: 'show', opacity: 'show' }, 'slow');
		},function()
		{
			if($(this).find('ul').html())
			{
				$(this).find('ul').stop(true, true);
				$(this).addClass('over');
				$(this).find('ul').animate({ height: 'hide', opacity: 'hide' }, 'slow', function(){$(this).parent().removeClass('over');});
			}
			else
			{
				$(this).removeClass('over');
			}
		}
	);
	$('#submenu ul li').hover(
		function()
		{
			$(this).addClass('over');
		},function()
		{
			$(this).removeClass('over');
		}
	);

	$('.thumbnail a small').hide();
	$('.thumbnail a small').css({'margin-left' : '0px', 'margin-top' : '0px'});
	$('.thumbnail a').hover(
		function()
		{
			$('.thumbnail a small').hide();
			$(this).find('small').stop(true, true);
			$(this).find('small').animate({ height: 'show', width: 800, opacity: 'show', marginLeft: -400, marginTop: -120}, 'slow');
		},function()
		{

			$(this).find('small').stop(true, true);
			$(this).find('small').animate({ height: 'hide', width: 0, opacity: 'hide', marginLeft: 0, marginTop: 0 }, 'slow');
		}
	);
	
	var dynamicQuotes = document.getElementById("dynamicQuotes")
	
	dynamicQuotes.className = "activeQuotes";
	
	dynamicQuotes.style.marginLeft = "382px";
	
	for(i=0;i<dynamicQuotes.childNodes.length;i++)
	{
		if(dynamicQuotes.childNodes[i].nodeName == "DIV")
		{
			dynamicQuotes.childNodes[i].id = "dynamicQuotes" + i;
			quoteItems.push(dynamicQuotes.childNodes[i]);
		}
	}
	activateNews();
	setInterval(activateNews,6000);	
}

var quoteCount = 0;

var quoteItems = new Array();

function activateNews()
{
	fadeNews(quoteCount, quoteItems);
	quoteCount++;
	if(quoteCount == quoteItems.length) { quoteCount = 0; }
}


function fadeNews(myCount,myArray)
{
	if(myCount == 0)
	{
		opacity(myArray[myArray.length-1].id,100,0,msec);
	}
	else
	{
		opacity(myArray[myCount-1].id,100,0,msec);
	}
	changeOpac(0, myArray[myCount].id);
	setDisplay(myArray[myCount].id,"block");
	opacity(myArray[myCount].id,0,100,msec);
}

var originalTop;

function scrollingDIV(scrollingID, upperLimit)
{
 if(document.getElementById(scrollingID))
 {
  if(originalTop == undefined)
  {
  	originalTop = document.getElementById(scrollingID).offsetTop;
  }
  var currentScroll;
  var currentTop = document.getElementById(scrollingID).style.top;
  currentTop.replace(/px/,"");
  currentTop = parseInt(currentTop);
  if(typeof(window.pageYOffset) == "undefined")
  {
   currentScroll = document.documentElement.scrollTop;
  }
  else
  {
   currentScroll = window.pageYOffset;
  }
  currentScroll -= originalTop;
  if(currentTop < upperLimit || isNaN(currentTop))
  {
   document.getElementById(scrollingID).style.top = upperLimit + "px";
   currentTop = upperLimit;
  }
  else
  {
   var nextStep = (currentTop - currentScroll)/2;
   if(!isNaN(nextStep))
   {
    if(currentScroll + nextStep  > upperLimit)
    {
     document.getElementById(scrollingID).style.top = (currentScroll + nextStep + upperLimit) + "px";
    }
    else
    {
     document.getElementById(scrollingID).style.top = upperLimit + "px";
    }
   }
  }
 }
}