/* Unsupported Banner Rotation script from Infopop -- help available only at community.infopop.net */

/* Do NOT touch the  the next 2 lines */
banners = new Array();
banner_LINK = new Array();
BannersPaid = new Array();
/* END of Do NOT touch the  the next 2 lines */

/*  set these next three values only if you want */

runOnLoadedPage = true	/* true or false whether to change banners after X secs */
myinterval = 25; 	/* number of secs between changes IF runOnLoadedPage = true */
random = true; 		/* true or false whether to start the cycle randomly for from the beginning of your list */


/*  BELOW ARE THE _ONLY_ PARTS OF THE SCRIPT YOU MUST MODIFY  */
/*  The red URL is the src for the image   */
/*  The blue URL is the where you want someone to go when the image is clicked   */
/*  DON'T forget quotes around the URLs  */
/*  Do not ADD quotes around the image width and height numbers  */
/*  Simply delete the banner sections you  don't want or paste in more sections */

 
/*  Begin #1 Banner  */
banners[banners.length] = new Image();
banners[banners.length-1].src =  	"/images/Banners/BannerJobFish.gif"; // "http://www.butterflyvista.com/JobFish/Images/Banner/JobFish_Untangle_468x60.gif";
banner_LINK[banners.length-1] =  	"http://www.butterflyvista.com";
banners[banners.length-1].width =  	468;
banners[banners.length-1].height =  	60;
/*  End #1  Banner */

/*  Begin #2 Banner  */
banners[banners.length] = new Image();
banners[banners.length-1].src =  	"/images/Banners/BannerOPG.gif"; // "http://www.onlinepromotionsgroup.com/images/opg_banner_468x60.gif";
banner_LINK[banners.length-1] =  	"http://www.onlinepromotionsgroup.com";
banners[banners.length-1].width =  	468;
banners[banners.length-1].height =  	60;
/*  End #2  Banner */

/*  Begin #3 Banner  */
banners[banners.length] = new Image();
banners[banners.length-1].src =  	"/images/Banners/BannerJobFish.gif"; // "http://www.lduhtrp.net/image-1763126-10372238";
banner_LINK[banners.length-1] =  	"http://www.jdoqocy.com/click-1763126-10372238";
banners[banners.length-1].width =  	468;
banners[banners.length-1].height =  	60;
/*  End #3  Banner */

/*  Begin #4 Banner  */
banners[banners.length] = new Image();
banners[banners.length-1].src =  	"/images/Banners/BannerMobileWirelessJobs.gif"; // "http://www.mobilewirelessjobs.com/images/mwjobs468x60banner.gif";
banner_LINK[banners.length-1] =  	"http://www.mobilewirelessjobs.com";
banners[banners.length-1].width =  	468;
banners[banners.length-1].height =  	60;
/*  End #4  Banner */

/*  Begin #5 Banner  */
banners[banners.length] = new Image();
banners[banners.length-1].src =  	"/images/Banners/BannerTicketsNow.gif"; // "http://www.ticketsnow.com/af/images/banner1.gif";
banner_LINK[banners.length-1] =  	"http://www.ticketsnow2.com/b.asp?id=9857&img=banner1.gif";
banners[banners.length-1].width =  	468;
banners[banners.length-1].height =  	60;
/*  End #5  Banner */

/*  Begin #6 Banner  */
banners[banners.length] = new Image();
banners[banners.length-1].src =  	"/images/Banners/InnovationAds3066.gif";
banner_LINK[banners.length-1] =  	"http://ipms.innovationads.com/soap/click/3944/3066/7112";
banners[banners.length-1].width =  	468;
banners[banners.length-1].height =  	60;
/*  End #6  Banner */

/*  Begin #7 Banner  */
banners[banners.length] = new Image();
banners[banners.length-1].src =  	"/images/Banners/InnovationAds3245.gif";
banner_LINK[banners.length-1] =  	"http://ipms.innovationads.com/soap/click/3944/3245/7544";
banners[banners.length-1].width =  	468;
banners[banners.length-1].height =  	60;
/*  End #7  Banner */


/* Do not touch anything below this line */
today = new Date();
rand_start = today.getTime()%banners.length;
random ?  banner_counter = rand_start :  banner_counter = 0;

function cycleBanners()
	{
	runBanners.started = true;
	banner = document.getElementById('mybanner');
	banner.src = banners[banner_counter].src;
	banner.link = banner_LINK[banner_counter];
	banner.width = banners[banner_counter].width;
	banner.height  = banners[banner_counter].height;
	banner_counter = (banner_counter+1) % (banners.length);
	}// end fn

function runBanners()
	{
	if (runBanners.started)
		{
		return
		};

	cycleBanners();

	if(runOnLoadedPage)
		{ // 
		mycycle = setInterval( 'cycleBanners()', myinterval * 1000 );
		}
	}// end fn


//
// HP Paid Ads Functions below here.
//
// Global Variables used.
m_IndexPaidAds = 0;

function RunHPPaidBannerAds( iCountBanners, strSep, strHTMLBanners )
	{
	var iBanner, iPosStart, iPosNext, iLenSep;
	var strToken;
	var objPaidAd;


	// Get the object, where we will place the banner.
	objPaidAd = document.getElementById('HPPaidBannerAds');

	// Only execute this code once.
	if (RunHPPaidBannerAds.started)
		return;

	// Get the string separator and its length.
	iLenSep = strSep.length;

	// Cycle through each banner.
	for (iBanner = 0; iBanner < iCountBanners; iBanner++)
		{
		// Initialize: Start position indicator.
		if (0 == iBanner)
			iPosStart = 0;
		else
			iPosStart = iPosNext + iLenSep;

		// Initialize: Next position indicator.
		if (1 == iCountBanners)
			iPosNext = strHTMLBanners.length;
		else
			{
			if (0 == iBanner)
				iPosNext = strHTMLBanners.indexOf( strSep );
			else if (iBanner < iCountBanners - 1)
				iPosNext = strHTMLBanners.indexOf( strSep, iPosStart );
			else
				iPosNext = strHTMLBanners.length
			}

		// Extract the token.
		strToken = strHTMLBanners.substring( iPosStart, iPosNext )
		BannersPaid[iBanner] = strToken;
		}

	// Cycle the banners.
	CycleHPPaidAds();

	// Set the interval to cycle the ads.
	mycycle = setInterval( 'CycleHPPaidAds()', myinterval * 1000 );
	}

function CycleHPPaidAds()
	{
	var objPaidAd;


	// We started the banner rotation.
	RunHPPaidBannerAds.started = true;

	// Get the object, where we will place the banner.
	objPaidAd = document.getElementById('HPPaidBannerAds');

	// Only continue, if advertisements exist.
	if (0 == BannersPaid.length)
		return;

	// Update the paid advertisement.
	objPaidAd.innerHTML = BannersPaid[m_IndexPaidAds]

	// Get ready for the next banner.
	m_IndexPaidAds = (m_IndexPaidAds + 1) % (BannersPaid.length);
	}
