	
	/*
	    Javascript Fading Banner Rotater 
	    
	    Author: Derek Harvey 
	    Website: http://www.lotsofcode.com
	    
	    Notes:
	    
	    > Compatibility:
	      FF1+ & IE6+ (AFAIK)
  */
	
	var repatitionSeconds = 15;
	
	var display;
	var currentAdCount = 0
	var imgCount = 0;
	
	function loadRotater()
	{
		display = document.getElementById('adBanner1');
		linkage = document.getElementById('adLink1');
		
		fade(0, 'out');
		if (imgs1.length > 1)
		{
			imgCount = imgs1.length;
			window.setInterval("rotateBanner()", 1000 * repatitionSeconds)
		}
	}
	
	function rotateBanner()
	{
		fade(0, 'out');
		
		if (!imgs1) return;
		
		// alert (currentAdCount)
		
		if (currentAdCount == imgCount)
			currentAdCount = 0;
			
		// alert(currentAdCount + ":" + imgs1[currentAdCount])
		
		display.src 	= imgs1[currentAdCount]
		display.alt 	= alt1[currentAdCount]
		linkage.href 	= lnks1[currentAdCount]
		
		currentAdCount++
	}
	
	function fade(opacity, inOut)
	{
		var canContinue = false;
		
		if (inOut == 'out') {
		  if (opacity < 100)
		    canContinue = true;
		} else {
		  if (opacity >= 10)
		    canContinue = true;
		}
		  
		if (canContinue) {
		  setOpacity(opacity);
		  
		  if (inOut == 'out')
		    opacity += 10;
		  else
		    opacity -= 10;
		
		  window.setTimeout("fade(" + opacity + ", '" + inOut + "')", 100);
		}
	}
	
	function setOpacity(opacity)
	{
	  opacity = (opacity == 100) ? 99.999 : opacity;          
	  display.style.filter = "alpha(opacity:" + opacity + ")";
	  display.style.KHTMLOpacity = opacity / 100;
	  display.style.MozOpacity = opacity / 100;
	  display.style.opacity = opacity / 100;
	}
	
	window.onload = loadRotater;
