/*
window.addEvent('domready', function() {
									 
	//get height of panel
	var finalHeight = document.getElementById('switch_tab').offsetHeight;

	//stored element ids in variable
	var otherEl = $('switch_tab_container');

	//add tween effect to on click
	$('heightEffect').addEvent('mouseover', function(){
		//open panel drop down
		otherEl.tween('height', finalHeight);
		//$('closeHeightEffect').style.display = "block";
		//$('heightEffect').style.display = "none";
	});
	
	//stop tween and close
	$('heightEffect').addEvent('mouseout', function(e) {
		e.stop();
		otherEl.tween('height', 43);
		//$('closeHeightEffect').style.display = "none";
		//$('heightEffect').style.display = "block";
	});
});
*/




//////////////////////////////
// Banner Tween				//
// Dev:		OS				//
// Data:	04-11-08		//
//////////////////////////////
var yVelocity = 0;//starting velocity, set for a moving start
var friction = 10;
var yDestination = 43;
var bannerInterval;


function UpdateBannerScroll(){
	intHeight = document.getElementById('switch_tab_container').offsetHeight;
	mod = Math.floor((yDestination-intHeight)/friction);
	if (intHeight<yDestination && (yDestination-intHeight)>1){
		if(mod==0 && (yDestination-intHeight)!=0){
			intHeight++;
		}else{
			intHeight+=mod;
		}
//		document.getElementById('debug').innerHTML="1 - "+intHeight+" / "+yDestination+" / "+mod+" / "+(intHeight-yDestination);
	}else if (intHeight>yDestination && (intHeight-yDestination)>1){
		intHeight+=mod;
//		document.getElementById('debug').innerHTML="2 - "+intHeight+" / "+yDestination+" / "+mod+" / "+(intHeight-yDestination);
	}else{
		intHeight=yDestination
//		document.getElementById('debug').innerHTML="3 - "+intHeight+" / "+yDestination+" / "+mod+" / "+(intHeight-yDestination);
	}
	document.getElementById('switch_tab_container').style.height=intHeight+"px";
//	document.getElementById('debug').innerHTML=intHeight+" / "+yDestination+" / "+mod+" / "+(intHeight-yDestination);
}

function BannerOver(){
	yDestination = 143;
	clearInterval(bannerInterval)
	 bannerInterval = setInterval(UpdateBannerScroll,10);
}

function BannerOut(){
	yDestination = 43;
}
