 //JavaScript Rotating Banners
  //copyright daxassist, 2000-2004
  //visit http://www.daxassist.com for this and other javascripts with full tutorials.
  
  // NOTE:
  // This script has been extended to handle three images in one HTYML file,
  // the calling images are in an "include" named "fln_banner.inc",
  // the calling script is in all the templates as an onload, in the body tag
  // keep in mind, this overall routine contains the click counting routine

  //specify interval between rotating banners (in mili seconds)
  var currentlink1 = 0;
  var currentlink2 = 0;
  var currentlink3 = 0;
  var currentimage = 0;
  var delay1 = 4000;
  var delay2 = 5000;
  var delay3 = 4500;
  var newbrowser = true;
	
  // specify banners NOTE replicate two line in stanza one and one line in stanza two
  // be sure to change the numbers on the brackets
  
  if(document.images) {
    banpics = new Array();	
    banpics[0] = new Image();
    banpics[0].src = "http://fingerlakes.net/banner/fln_banner_DanMorse.jpg";
    banpics[1] = new Image();
    banpics[1].src = "http://fingerlakes.net/banner/fln_bellwether.jpg";
    banpics[2] = new Image();
    banpics[2].src = "http://fingerlakes.net/banner/Ginny-Lee-vnyds-Reynolds.gif";
    banpics[3] = new Image();
    banpics[3].src = "http://fingerlakes.net/banner/fln_grayhaven.gif";
 	banpics[4] = new Image();
    banpics[4].src = "http://fingerlakes.net/banner/fln_hosmer_banner.gif";
	banpics[5] = new Image();
    banpics[5].src = "http://fingerlakes.net/banner/fln_drfrank_banner.gif";
	banpics[6] = new Image();
    banpics[6].src = "http://fingerlakes.net/banner/fln_jeff_south3_200.jpg";

    //specify banner links and set the cpcID		
    banlinks = new Array();	
    banlinks[0] = "directory_submit.php?cl_ID=103&to_url=www.danmorserealestate.com";
    banlinks[1] = "directory_submit.php?cl_ID=126&to_url=www.cidery.com";
    banlinks[2] = "directory_submit.php?cl_ID=130&to_url=wagnervineyards.com";
    banlinks[3] = "directory_submit.php?cl_ID=105&to_url=www.grayhavenmotel.com";
    banlinks[4] = "directory_submit.php?cl_ID=5&to_url=www.hosmerwinery.com";
    banlinks[5] = "directory_submit.php?cl_ID=5&to_url=www.drfrankwines.com";
    banlinks[6] = "directory_submit.php?cl_ID=160&to_url=www.fingerlakeswinenews.com";
  }		

	
//	NOTE: this is the first function, it's for the uppper of three panels
	
  function bannerchanger1(from) {
    if(document.images) {
      document.images[from].src = banpics[currentimage].src;
      currentlink1 = currentimage;
      if (currentimage < banpics.length-1) 
        currentimage = currentimage + 1;
      else 
        currentimage = 0;
      setTimeout("bannerchanger1('" + from + "')", delay1);
    }
  }
	
  function FollowLink1() {
    if(document.images) {
      if (newbrowser == true) {
        window.open(banlinks[currentlink1], 'self', '', false);
      } else
        document.location.href = banlinks[currentlink1];
    }
  }
  
  //	NOTE: this is the second function, it's for the middle of three panels
	
  function bannerchanger2(from) {
    if(document.images) {
      document.images[from].src = banpics[currentimage].src;
      currentlink2 = currentimage;
      if (currentimage < banpics.length-1) 
        currentimage = currentimage + 1;
      else 
        currentimage = 0;
      setTimeout("bannerchanger2('" + from + "')", delay2);
    }
  }
	
  function FollowLink2() {
    if(document.images) {
      if (newbrowser == true) {
        window.open(banlinks[currentlink2], 'self', '', false);
      } else
        document.location.href = banlinks[currentlink2];
    }
  }
  
  //	NOTE: this is the third function, it's for the lower of three panels
	
  function bannerchanger3(from) {
    if(document.images) {
      document.images[from].src = banpics[currentimage].src;
      currentlink3 = currentimage;
      if (currentimage < banpics.length-1) 
        currentimage = currentimage + 1;
      else 
        currentimage = 0;
      setTimeout("bannerchanger3('" + from + "')", delay3);
    }
  }
	
  function FollowLink3() {
    if(document.images) {
      if (newbrowser == true) {
        window.open(banlinks[currentlink3], 'self', '', false);			
      } else
        document.location.href = banlinks[currentlink3];
    }
  }
    //BEST PLACE FOR THIS IE HACK IS HERE - corrects CSS issues with IE
   if(navigator.appName == "Microsoft Internet Explorer")
{
 document.write('<style>#rtnv li.sub {right:-52px;}\n#rtnv li.main {left:-81px;}</style>')
 }