//sizing function
function setDIVsize(px){
	//get the animation DIV object
	animationDiv	= document.getElementById(animationDivName);
	//set size
	animationDiv.style.height	= Math.floor(px)+'px';
}

function switchExpandCollapse(){
	boolExpandContainer	= !boolExpandContainer;
	//
	if(boolExpandContainer){
		animateDIVresize(swfHeight);
	}else{
		animateDIVresize(swfMinHeight);
	}
}

function resizeAnimation(to){
	//
	var step			= 25;
	var delta			= Math.abs(currentH - to);
	var currentH	= getAnimationDIVheight();
	var direction	= currentH > to ? -1 : 1;
	var nextH			= currentH + (direction * step);
	var nextDelta	= Math.abs(nextH - to);
	nextH					= nextDelta < step ? currentH + (direction * nextDelta) : nextH;
	//
	setDIVsize(nextH);
	//animation complete ...
	if(nextDelta < step){
		setDIVsize(to);
		clearInterval(animationInterval);
	}
}

function animateDIVresize(to) {
	clearInterval(animationInterval);
	//start animation
	animationInterval	= setInterval("resizeAnimation("+to+")", 1);
}

function getAnimationDIVheight(){
	return Number(animationDiv.style.height.replace('px',''));
}

/*
*	Mouse Wheel handler:
*/
var bAgent				= navigator.userAgent.toUpperCase();
var isOpera				= navigator.userAgent.indexOf("OPERA") != -1;
var isIE					= navigator.userAgent.indexOf("MSIE") != -1;
var blockScroller	= true;
var mouseWheelSWFs= new Array();

function swfInitMouseWheelScrolling(id){
	//
	if(isIE) return;
	//
	if (window.addEventListener)
		window.addEventListener('DOMMouseScroll', deltaDispatcher, false);
	//
	window.onmousewheel = document.onmousewheel = deltaDispatcher;
	//
	mouseWheelSWFs.push(id);
}
			//
function deltaDispatcher(event){
	var delta, id, 
	delta = deltaFilter(event);
	//
	for(i=0;i<mouseWheelSWFs.length;i++){
		id	= mouseWheelSWFs[i];
		swf	= document.getElementById(id);
		//
		swf.jsMouseWheel(delta);
	}
	//
	if(blockScroller){
		event.preventDefault();
//		scroll(0,0);
	}
	//
	return !blockScroller;
}
//
function enableDisableScroller(boo){
	blockScroller	= boo == true;
}
//
function deltaFilter(event){
	var delta = 0;
	if (event.wheelDelta != null) {
		delta = event.wheelDelta/120;
			if (isOpera)
				delta = -delta;
	}else if (event.detail) {
		delta = -event.detail;
	}
	//
	return delta;
}
//