  //JavaScript Rotating Banners
  //copyright daxassist, 2000-2004
  //visit http://www.daxassist.com for this and other javascripts with full tutorials.

  var delay = 5000;
  var maxiterations = 2;

// Customised the functions to have multiple banners on page

  function MyBannerChanger(from, bannertype) 
  {	
	// Only continue if iterations for current banner have not exceeded the max value
    //if(document.images && eval("baniterations_" + bannertype) <= maxiterations) 
	//{
		
      document.images[from].src = eval("banpics_"  + bannertype + "[currentimage_" + bannertype + "].src");
	  document.images[from].title = eval("bantitles_"  + bannertype + "[currentimage_" + bannertype + "]");

      eval("currentlink_" + bannertype + " = currentimage_" + bannertype);
	
	  //alert("for banner type : " + bannertype + " value is : " + eval("currentimage_" + bannertype));
	  
		if (eval("currentimage_" + bannertype) < eval("banpics_" + bannertype + ".length - 1")) 
		{
			eval("currentimage_" + bannertype + " = currentimage_" + bannertype + " + 1");
		}
		else 
		{
			eval("currentimage_" + bannertype + " = 0");
			//alert("before : " + eval("baniterations_" + bannertype));
			//alert("increasing iterations for banner type : " + bannertype);		
			// Increase the banner iteration for this banner type by 1
			//eval("baniterations_" + bannertype + "++");
			//alert("after : " + eval("baniterations_" + bannertype));
		}

      setTimeout("MyBannerChanger('" + from + "', " + bannertype + ")", delay);
    }
  //}	

  function MyFollowLink(bannertype) 
	{
    if(document.images) 
		{
		window.open(eval("banlinks_"+ bannertype + "[currentlink_" + bannertype + "]"), 'newwindow', '', false);			
	    }
   }

