var i = 0;
var rotateB = 2;
var rotateI = 9000;
var imagesB = new Array(3);

function StartBanner() {
	for (i=0; i < imagesB.length; i++) {
		imagesB[i] = new Image(468,80);
		imagesB[i].src = "/ssc/images/topbanner_"+(i+1)+".gif";
	}

	setTimeout("RotateBanner()",rotateI);
}

function mvrB(banner) {
	banner.style.cursor = 'pointer';
}
function moutB(banner) {
	banner.style.cursor = 'default';
}
function mclkB(banner) {
	if (rotateB == 2)
	    window.open("http://www.weekendhockey.com", "_blank", "");
	else if (rotateB == 3)
	    window.open("http://www.tgwhf.ca/sites/baystreethockey/", "_blank", "");
	else
		window.open("http://workoutpass.com/2427cs?site=10", "_blank", "");
}

function RotateBanner() {
	rotateB++;

	if (rotateB == (imagesB.length+1)) rotateB = 1;

	if (rotateB == 2) rotateI = 9000;
	else if (rotateB == 3) rotateI = 8000;
	else rotateI = 12000;

	document.images['TopBanner'].src = imagesB[rotateB-1].src;
	setTimeout("RotateBanner()",rotateI);
}