// JavaScript to interpolate random images into a page.
var RASize = 2;     // Number of alternative images
var xoxo = new Array(RASize);  // Array to hold filenames
var linkxoxo = new Array(RASize); // Array to hold links
var first =0;

//images
xoxo[0] ="images/newvmfbannerad.gif"
xoxo[1] ="images/newvmfbannerad.gif"
//xoxo[2] ="images/3cx_banner.gif"

//links
linkxoxo[0] ="http://www.deerfield.com/products/visnetic-mailflow";
linkxoxo[1] ="http://www.deerfield.com/products/visnetic-mailserver";
//linkxoxo[2] ="http://www.deerfield.com/products/3cx";
var topChoice = 0;
//display the items to the screen

function displayBanner()
{
document.writeln('<A href="#" onClick="toggle(linkxoxo[topChoice]);"><IMG SRC="'+xoxo[topChoice]+'" name="rotate" BORDER=0 ></a>');
}

function toggle(url)
{
	window.location.href (url);
}

function doTimer()
{
if (first==1)
	 first=0;
	else
	 {
		if (topChoice >= (RASize-1))
			topChoice =0;
		else
			topChoice = topChoice + 1;
		document.images.rotate.src=xoxo[topChoice];
	}	
	//alert(first);
	setTimeout("doTimer(first);", 28915);
}
		