/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com */
/* -----------------------------------------------
   Streaming banners - v.1.1
   (c) 2006 www.haan.net
   contact: jeroen@haan.net
   You may use this script but please leave the credits on top intact.
   Please inform us of any improvements made.
   When useful we will add your credits.
  ------------------------------------------------ */

/* usage
<body>
<div id="slideCont" style="position:relative;z-index:1;width:140px;left:0px;overflow:hidden;">
	<div id="slideA" style="position:absolute;z-index:1;top:0px;left:0px;width:140px;overflow:hidden;">
		your banners (images inside anchor tags)
		<div id="slideB" style="position:relative;z-index:1;top:0px;left:0px;width:140px;overflow:hidden;">
			your banners (images inside anchor tags)
		</div>
	</div>
</div>
</body>

In order the have the script working in FireFox as well you need a proper "DTD" to prevent the browser's "quirksmode".

Please see http://www.quirksmode.nl/ for more details.

Or in case you experience problems, copy and paste next line on top of your webpage:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

*/
var IDIntervalBannerBrand;
function Go_clip_Brand(){
	IDIntervalBannerBrand=setInterval(clip_Brand,30)
}
function clip_Brand() {
 	// width of the banner container
 	var contWidth = 200;
 	// height of the banner container
 	var contHeight = 500;

 	var id1 = document.getElementById('slideBra1');
 	var id2 = document.getElementById('slideBra2');
 	var height = id1.offsetHeight;
 	var width = id1.offsetWidth;

	id1.style.top = parseInt(id1.style.top)-1 + 'px';
	id2.style.top = (height + parseInt(id1.style.top)) + 'px';

//alert(id1.style.top);

 	document.getElementById('slideContTBra').style.height = contHeight + "px";
 	document.getElementById('slideContTBra').style.width = contWidth + "px";
 	// document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
 	id2.style.display = '';
 	if(parseFloat(id1.style.top) == -height) {
		//alert('reset');
  		id1.style.top = '0px';
 	}
 	
}

var IDIntervalBannerTop;
function Go_clip_Top(){
	IDIntervalBannerTop=setInterval(clip_Top,30)
}
function clip_Top() {
 	// width of the banner container
 	var contWidth = 580;
 	// height of the banner container
 	var contHeight = 92;

 	var id1 = document.getElementById('slideAT');
 	var id2 = document.getElementById('slideBB');
 	var height = id1.offsetHeight;
 	var width = id1.offsetWidth;

	// id1.style.top = parseInt(id1.style.top)-1 + 'px';
	id1.style.left = parseInt(id1.style.left)-1 + 'px';
	id2.style.left = (width + parseInt(id1.style.left)) + 'px';

 	document.getElementById('slideContT').style.height = contHeight + "px";
 	document.getElementById('slideContT').style.width = contWidth + "px";
 	// document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
 	id2.style.display = '';
 	if(parseFloat(id1.style.left) == -width) {
  		id1.style.left = '0px';
 	}
 	
}


var IDIntervalBannerTopPD;
function Go_clip_TopPD(){
	IDIntervalBannerTopPD=setInterval(clip_Top,30)
}
function clip_TopPD() {
 	// width of the banner container
 	var contWidth = 580;
 	// height of the banner container
 	var contHeight = 92;

 	var id1 = document.getElementById('slideATPD');
 	var id2 = document.getElementById('slideBBPD');
 	var height = id1.offsetHeight;
 	var width = id1.offsetWidth;

	// id1.style.top = parseInt(id1.style.top)-1 + 'px';
	id1.style.left = parseInt(id1.style.left)-1 + 'px';
	id2.style.left = (width + parseInt(id1.style.left)) + 'px';

 	document.getElementById('slideContTPD').style.height = contHeight + "px";
 	document.getElementById('slideContTPD').style.width = contWidth + "px";
 	// document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
 	id2.style.display = '';
 	if(parseFloat(id1.style.left) == -width) {
  		id1.style.left = '0px';
 	}
 	
}

function clip() {
 	// width of the banner container
 	var contWidth = 450;
 	// height of the banner container
 	var contHeight = 60;

 	var id1 = document.getElementById('slideA');
 	var id2 = document.getElementById('slideB');
 	var height = id1.offsetHeight;
 	var width = id1.offsetWidth;

	// id1.style.top = parseInt(id1.style.top)-1 + 'px';
	id1.style.left = parseInt(id1.style.left)-1 + 'px';
	id2.style.left = (width + parseInt(id1.style.left)) + 'px';

 	document.getElementById('slideCont').style.height = contHeight + "px";
 	document.getElementById('slideCont').style.width = contWidth + "px";
 	// document.getElementById('slideCont').style.clip = 'rect(auto,'+ contWidth +'px,' + contHeight +'px,auto)';
 	id2.style.display = '';
 	if(parseFloat(id1.style.left) == -width) {
  		id1.style.left = '0px';
 	}
 	setTimeout(clip,30)
}
