secondsBeforeBannerFlip = 30; // How many seconds should we wait before flipping the ads?
var mspause = 1000 * secondsBeforeBannerFlip; // This converts the seconds to milliseconds.
var ads = new Array(); //  // Build up the arrays that contain the rotating ad information.
var aAdLinkLocations; // This will keep track of where our links are on the page that we want to manipulate.
// This will scan though the ad positions that are registered to rotate ads and call the rotation 
// function for each of them.
function flipAds() {
	// At this point, we know that "ads" is a variable which contains an entry
	// for each of the banner positions that have rotating ads.
	for (position in ads) {
		attamptFlip(position);
	}
	timerID = setTimeout("flipAds()", mspause);
}
// Pass in a number and this will return a random number between 0 and the whole integer you pass.
// This is useful for picking a random entry on an array.
function randomIndex(topRange) {
	return Math.round(Math.random()*topRange);
}

// This will instruct all compatible banner positions on the page to show
// the next banner in the rotation without refreshing the page.
function attamptFlip(position) {
	
	// Reset this variable just in case something else changed this variable.
	var aAdLinkLocations = lookUpAdLinks();
	
	// What ad is currently displayed in this position's inventory?
	currentlyDisplayedAdIndex = ads[position][1];
	
	// If there are at least 2 ads to rotate through (AND the ad tag is on the page), we'll try to flip them here...
	// Also, only flit if we have not done the entire set 3 times yet.
	
	if (ads[position][2] < 3 && ads[position][0].length > 1 && eval("typeof document.cpstillad" + position + " != 'undefined'")) {
		
		if (currentlyDisplayedAdIndex < ads[position][0].length-1) {
			ads[position][1]++;
		} else {
			ads[position][1] = 0;
			ads[position][2]++;// Remember the fact we have iterated through this set another time.
		}
		// The next 2 lines will call back to the banner ad server and cache bust and allow you to count this view.
		tmpImg = new Image();
		
		tmpImg.src = ads[position][0][ads[position][1]][2] + cacheBust();
		eval("document.cpstillad" + position + ".src = ads[position][0][ads[position][1]][0];");
		
		document.links[aAdLinkLocations[position]].href = ads[position][0][ads[position][1]][1];
	}
}
// This function will return a new number every time you call it. Good for cache busting.
function cacheBust() {
	x = new Date();
	return x.getTime() + '' + randomIndex(1000);
}
// This will start the image flipping process.
function Start() {
	Reset();
	aAdLinkLocations = lookUpAdLinks(); // This defines the ads.
	tStart   = new Date();
	timerID  = setTimeout("flipAds()", mspause);
}
// The page first needs to build before we can analyize the links so we'll start this after a few 
// seconds.
function DelayedStart() {
	Reset();// Initialize the timer.
	tStart   = new Date();
	timerID  = setTimeout("Start()", 2000);
}
function Reset() {
	// This kills the timer object.
	var timerID = 0;
	var tStart = null;
}
// In order to be able to change the click through URL's, we'll need to find the link
// index of each of the ads. This function will build an associative array of the ad link
// locations. The key is the banner position and the value is the link index on the page.
function lookUpAdLinks() {
	aLinkLocationsX = new Array();
	// Loop over each of the links on this page 
	// searching for the rotating ad positions.
	for (i=1;i<=document.links.length;i++) {
		// If this image object appears to be one of the banner positions, try to figure out which it is.
		if (typeof(document.links[i-1].name) != 'undefined' && document.links[i-1].name.indexOf('cpstilladclick') > -1) {
			aLinkLocationsX['' + document.links[i-1].name.substring(14,document.links[i-1].name.length+1)] = i-1;
		}
	}
	return aLinkLocationsX;
}
// This stops the banner rotations.
function Stop() {
   if (typeof timerID != 'undefined' && timerID) {
      clearTimeout(timerID);
      timerID  = 0;
   }
   tStart = null;
}
// Pass an array of ads to this function and the SRC of the ad currently running. This function
// will find the index of the current ad..
function findRotationIndex(aAds, position) {
	if (aAds.length == 0 || aAds.length == 1 || eval("typeof document.cpstillad" + position + " == 'undefined'")) {
		return 0;
	} else {
		chosenIndex = null;
		// Find the index of the currently displayed ad.
		for (i=0;i<aAds.length;i++) {
			if (aAds[i][0] == eval("document.cpstillad" + position + ".src")) {
				chosenIndex = i;
				break;
			}
		}
		return chosenIndex;
	}
}
// This will start the rotations after a small amount of time passes.
DelayedStart();

function showNetworkBanner (iposition) {
	switch (iposition) {
		case 2:
			document.write('<img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			document.write('<a href="http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=24418&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2Fciti.bridgetrack.com%2Fads%2Fclick%2F%3FBT_PID%3D16400%26r%3D20041028150504" target="_blank" name="cpstilladclick2"><img src="http://citi.bridgetrack.com/ads/image/?BT_PID=16400&r=20041028150504" border="0" name="cpstillad2"></a>');
			document.write('<br><img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			ads2 = new Array();
			ads2[0] = new Array('http://citi.bridgetrack.com/ads/image/?BT_PID=16400&r=20041028150504', 'http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=24418&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2Fciti.bridgetrack.com%2Fads%2Fclick%2F%3FBT_PID%3D16400%26r%3D20041028150504', 'http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=24418&random=');
			ads['2'] = new Array(ads2, findRotationIndex(ads2, 2), 0);
			var impressionIMG2=new Image();
			impressionIMG2.src="http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=24418&random=20041028150504";
			break;
		case 3:
			document.write('<img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			document.write('<a href="http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=24711&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2Fciti.bridgetrack.com%2Fads%2Fclick%2F%3FBT_PID%3D16398%26r%3D20041028150504" target="_blank" name="cpstilladclick3"><img src="http://citi.bridgetrack.com/ads/image/?BT_PID=16398&r=20041028150504" border="0" name="cpstillad3"></a>');
			document.write('<br><img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			ads3 = new Array();
			ads3[0] = new Array('http://citi.bridgetrack.com/ads/image/?BT_PID=16398&r=20041028150504', 'http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=24711&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2Fciti.bridgetrack.com%2Fads%2Fclick%2F%3FBT_PID%3D16398%26r%3D20041028150504', 'http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=24711&random=');
			ads['3'] = new Array(ads3, findRotationIndex(ads3, 3), 0);
			var impressionIMG3=new Image();
			impressionIMG3.src="http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=24711&random=20041028150504";
			break;
		case 6:
			document.write('<table cellspacing="2" cellpadding="2"><tr><td>');
			document.write('<script language=\"JavaScript1.1\" src=\"http://adfarm.mediaplex.com/ad/js/2095-18517-6416-0?mpt=20041028150504&mpvc=\"></scr' + 'ipt>');
			document.write('</td></tr></table>');			ads6 = new Array();
			ads['6'] = new Array(ads6, findRotationIndex(ads6, 6), 0);
			var impressionIMG6=new Image();
			impressionIMG6.src="http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=20370&random=20041028150504";
			break;
		case 9:
			document.write('<img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			document.write('<a href="http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=26559&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2Fwww.fordcollegegrad.com%2Finterstitial.asp%3Fcid%3DEG19" target="_blank" name="cpstilladclick9"><img src="http://mirrorimageorigin.collegepublisher.com/media/Images/ads/ford/xplan_120x240.gif" border="0" name="cpstillad9"></a>');
			document.write('<br><img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			ads9 = new Array();
			ads9[0] = new Array('http://mirrorimageorigin.collegepublisher.com/media/Images/ads/ford/xplan_120x240.gif', 'http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=26559&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2Fwww.fordcollegegrad.com%2Finterstitial.asp%3Fcid%3DEG19', 'http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=26559&random=');
			ads['9'] = new Array(ads9, findRotationIndex(ads9, 9), 0);
			var impressionIMG9=new Image();
			impressionIMG9.src="http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=26559&random=20041028150504";
			break;
		case 10:
			document.write('<img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			document.write('<a href="http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=26613&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2F%5BcallingSite%5D%2Fmain.cfm%3Finclude%3DviewChannel%26channel_id%3D59" target="_self" name="cpstilladclick10"><img src="http://media.collegepublisher.com/media/Images/ads/statravel/125x125_travelchannel.jpg" border="0" name="cpstillad10"></a>');
			document.write('<br><img src="http://media.collegepublisher.com/media/images/blank.gif" border="0" height="2"><br>');
			ads10 = new Array();
			ads10[0] = new Array('http://media.collegepublisher.com/media/Images/ads/statravel/125x125_travelchannel.jpg', 'http://admanager2.broadbandpublisher.com/networkBannerServerClickThrough.adp?paperBannerAdId=26613&callingSite=www.dailylobo.com&timeStamp=20041028150504&redirecturl=http%3A%2F%2F%5BcallingSite%5D%2Fmain.cfm%3Finclude%3DviewChannel%26channel_id%3D59', 'http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=26613&random=');
			ads['10'] = new Array(ads10, findRotationIndex(ads10, 10), 0);
			var impressionIMG10=new Image();
			impressionIMG10.src="http://admanager2.broadbandpublisher.com/networkImpression.adp?pbaid=26613&random=20041028150504";
			break;
	}
}

// total execution time: 2.95 ms
var admanagerIsAvailable = 1;

