wait = 5000;
speed = 100;
var st;

function init() {
	if(! document.getElementById("exbanner")) return;
	cmd = (document.all && ! window.opera) ? "filter" : (document.getElementById) ? "opacity" : "";
	obj = document.getElementById("exbanner");
	obj.innerHTML = obj.innerHTML.replace(/\r|\n/g, "");
	obj.innerHTML = obj.innerHTML.replace(/> /g, ">");
	ex = obj.getElementsByTagName("a");
	if(! ex.length) return;
	for(i = 0; i < ex.length; i ++)
		ex[i].style.zIndex = (i == 0) ? 2 : 0;
	bn = 0;
	st = setTimeout("banex()", wait);
	if(location.pathname.match(/^\/behavior\//i)) {
		a = document.getElementsByTagName("a");
		for(i = 0; i < a.length; i ++) {
			if(a[i].parentNode.tagName.match(/strong/i)) {
				a[i].onclick = function() { return false; }
				a[i].onmouseover = function() { window.status = ""; return true; }
			}
		}
	}
}
function banex() {
	clearTimeout(st);
	bn = (bn >= ex.length - 1) ? 0 : bn + 1;
	for(i = 0; i < ex.length; i ++)
		ex[i].style.zIndex = (ex[i].style.zIndex == 2) ? 1 : (i == bn) ? 2 : 0;
	fn = 0;
	fade();
}
function fade() {
	clearTimeout(st);
	op = (cmd == 'filter') ? "alpha(opacity=" + (fn * 10) + ")" : fn / 10;
	ex[bn].style[cmd] = op;
	fn ++;
	st = (fn <= 10) ? setTimeout("fade()", speed) : setTimeout("banex()", wait);
}
if(location.pathname.match(/^\/behavior\//i)) document.write("<style>strong{font-weight:inherit;color:inherit;}strong a{color:inherit!important;text-decoration:none;cursor:text;outline:0px;}</style>");

onload = init;
