if (document.images) {
	var theImages = new Array()
	theImages[0] = '/images/bnrs/Parthenon_288x288.gif'
	theImages[1] = '/images/bnrs/ConvaTecFeb09b.jpg'
	theImages[2] = '/images/bnrs/NuHope08.png'
	theImages[3] = '/images/bnrs/coloplast_apr09_b.jpg'
	theImages[4] = '/images/bnrs/BestBuyHomePage3.gif'
	theImages[5] = '/images/magazine/PhoenixHome6.jpg'
	theImages[6] = '/images/bnrs/Schena_288_Mar-2011.jpg'
	var theURLs = new Array()
	theURLs[0] = 'www.ostomy.org/redir1.cgi?id=0127'
	theURLs[1] = 'www.ostomy.org/redir1.cgi?id=0128'
	theURLs[2] = 'www.ostomy.org/redir1.cgi?id=0109'
	theURLs[3] = 'www.ostomy.org/redir1.cgi?id=0110'
	theURLs[4] = 'www.ostomy.org/redir1.cgi?id=0111'
	theURLs[5] = 'www.ostomy.org/redir1.cgi?id=0112'
	theURLs[6] = 'www.ostomy.org/redir1.cgi?id=0159'
// do not edit below this line
		thisImageFirst = true;
		applePosition = navigator.userAgent.indexOf("AppleWebKit");
		isSafari = (applePosition != -1) ? true : false;
		if (isSafari) {
			if (parseInt(navigator.userAgent.charAt(applePosition+12)) > 4) isSafari = false;
		}
}
function cycleImages() {
	if (document.images) {
		if (thisImageFirst) {
			var p = theImages.length;
			thisImage = Math.min(Math.floor(Math.random()*p),p-1);
			document.cycleWindow.src = theImages[thisImage];
			thisImageFirst = false;
		}
		else if (isSafari || document.cycleWindow.complete) {
			if (++thisImage == theImages.length)
				thisImage = 0;
			document.cycleWindow.src = theImages[thisImage];
		}
	}
	// change to next image every 5 seconds
	setTimeout("cycleImages()", 5000);
}
function gotoLink() {
	document.location.href = "http://" + theURLs[thisImage];
}

