﻿<!-- 
/* This script and many more are available free online at
The JavaScript Source!! http://javascript.internet.com
Created by: Ben Kanaev :: http://www.webhostreview.biz
Adaptation for Netscape and Firefox by Fang */

var thisAd, adImages, adUrls, thisSponsorAd, sponsorAdImages, sponsorAdUrls, displayTime, speed, wait, banner1, banner2, link1, link2, bannerIndex, bannerLocations, bannerURLs;

if (document.images)
{
    adImages = new Array("images/maine_premier.jpg","images/maymadness2011.gif","images/t4p_logo_450x150.jpg");
    adURLs = new Array("http://www.mainepremiersoccer.com","http://www.gorhamyouthsoccer.com/maymadness.htm","http://www.gorhamyouthsoccer.com/photos.htm");

    thisAd = 0;

    sponsorAdImages = new Array("images/sponsors/janebell.gif",
                                "images/sponsors/mps_phoenix.gif",                                 
                                "images/sponsors/ghop.gif",
                                "images/sponsors/moodys.gif",
                                "images/sponsors/greatfalls.jpg",
                                "images/sponsors/memetrofc.jpg",
                                "images/sponsors/amica.gif",
                                "images/sponsors/martinspoint.gif",
                                "images/sponsors/narragansettunited.jpg",
                                "images/sponsors/mps_phoenix.gif",
                                "images/sponsors/customconcepts.gif",
                                "images/sponsors/so_me_appraisal.gif",
                                "images/sponsors/carters.gif",
                                "images/sponsors/dodgeoil.gif",
                                "images/sponsors/shawbros.gif",
                                "images/sponsors/skintherapy.gif",
                                "images/sponsors/polandspring.gif",
                                "images/sponsors/oob-air.gif");
    sponsorAdUrls = new Array("http://www.allstateagencies.com/janebell/welcome",
                                "http://www.mainepremiersoccer.com/",
                                "http://www.gorhamhouseofpizza.com/",
                                "http://moodyscollision.com/",
                                "http://www.greatfallsinc.com",
                                "http://www.mainemetrofc.com",
                                "http://www.amica.com/",
                                "http://www.martinspoint.org",
                                "http://www.narragansettunited.org/",
                                "http://www.mainepremiersoccer.com/",
                                "http://www.customconceptsinc.com/",
                                "http://www.gorhamyouthsoccer.com/maymadness.htm",
                                "http://automobilerepairgorham.com/",
                                "http://dodgeoil.com/",
                                "http://www.shawbros.com/site/",
                                "http://skintherapy.vpweb.com/",
                                "http://www.polandspring.com/",
                                "http://www.oldorchardbeachairbrush.com/");
    thisSponsorAd = 0;
}

/* function initVar() {
  displayTime = 10; // The amount of time each banner will be displayed in seconds.
  speed = 5; // The speed at which the banners is moved (1 - 10, anything above 5 is not recommended).
  wait = true;

  //banner1 = document.getElementById("banner1");
  //banner2 = document.getElementById("banner2");
  banner1 = document.banner1;
  banner2 = document.banner2;

  //link1 = document.getElementById("link1");
  //link2 = document.getElementById("link2");
  link1 = document.link1;
  link2 = document.link2;

  banner1.style.left = 0;
  banner2.style.left = 500;

  bannerIndex = 1;

  /* Important: In order for this script to work properly, please make sure that the banner graphic and the
  URL associated with it have the same index in both, the bannerLocations and bannerURLs arrays.
  Duplicate URLs are permitted. */
/*
  // Enter the location of the banner graphics in the array below.
  bannerLocations = new Array("images/challengercamp09.jpg","images/maine_premier.jpg");

  // Enter the URL's to which the banners will link to in the array below.
  bannerURLs = new Array("https://registration.challengersports.com/FindACamp/FindACamp.asp?Method=CampSession&Key=567882|1|9480&~","http://www.mainepremiersoccer.com");
} */

function cycleSponsorAds()
{
    if (document.images)
    {
        if (document.sponsorAdBanner.complete)
        {
            if (++thisSponsorAd == sponsorAdImages.length)
                thisSponsorAd = 0;

            document.sponsorAdBanner.src = sponsorAdImages[thisSponsorAd];
        }
    }

    // change to next banner every 15 seconds
    setTimeout("cycleSponsorAds()", 4300);
}

function cycleAds()
{
    if (document.images)
    {
        if (document.adBanner.complete)
        {
            if (++thisAd == adImages.length)
                thisAd = 0;

            document.adBanner.src = adImages[thisAd];
        }
    }

    // change to next banner every 15 seconds
    setTimeout("cycleAds()", 4300);
}

function gotoAd()
{
    document.location.href = adURLs[thisAd];
}

function gotoSponsorAd()
{
    document.location.href = sponsorAdUrls[thisSponsorAd];
}


/* function moveBanner(){
  if(!wait){
    banner1.style.left = parseInt(banner1.style.left) -  (speed * 5);
    banner2.style.left = parseInt(banner2.style.left) - (speed * 5);
    if(parseInt(banner1.style.left) <= -500){
      banner1.style.left = 500;
      bannerIndex = (bannerIndex < (bannerLocations.length - 1)) ? ++bannerIndex :0;
      banner1.src = bannerLocations[bannerIndex];
      link1.href = bannerURLs[bannerIndex];
      wait = true;
    }
    if(parseInt(banner2.style.left) <= -500){
      banner2.style.left = 500;
      bannerIndex = (bannerIndex < (bannerLocations.length - 1)) ? ++bannerIndex :0;
      banner2.src = bannerLocations[bannerIndex];
      link2.href = bannerURLs[bannerIndex];
      wait = true;
    }

    setTimeout("moveBanner()",100);
  } else {
      wait = false;
      setTimeout("moveBanner()", displayTime * 1000);
  }
}

*/

function showDetails(src, t){
var d = document.getElementById(src);

if(d.style.display=='none'){
    d.style.display = 'inline';
    t.innerHTML='Close Details';}
else{
    d.style.display = 'none';
    t.innerHTML='Show Details'
    }
}
;


-->