var delay = 16000;
var maxsteps=0; //30
var stepdelay=0; //40
var startcolor= new Array(255,255,255);
var endcolor=new Array(51,51,51);
var fcontent=new Array();
begintag='';

//fcontent[0]="";
//fcontent[1]="<div style='float:left;margin:0 0 0 0px;'><h2 class='red' style='margin:0 0 0 0px;'>Planning a reunion?</h2><a href='?action=reunion-in-a-box' class='menu2' title='Reunion in a box'><img src='images/081014-reunion-in-a-box-2.gif' align='right' border='0' alt='Reunion in a box'></a><p class='dark' style='margin:8 0 0 0px;'>Our <a href='?action=reunion-in-a-box' title='Reunion in a box'>Reunion in a Box</a> can streamline your planning by personalizing an array of materials for your event-from jackets and T-shirts to ball caps and coffee mugs. We'll even package each person's items in their own personalized canvas tote bag.<div style='float:right;margin-top:-8px;'><a href='?action=reunion-in-a-box' title='Reunion in a box'>More ></a></p></div></div>";

fcontent[0]="<div style='float:left;margin:10 0 0 0px;'><span id='jiggle0' class='jc'><h2 class='blue' style='margin:0 0 0 0px;text-decoration:underline;text-align:center;'>INTRODUCTORY OFFER</h2></span><p style='margin:8 0 0 0px;'>For a short time only we are offering a 20% discount on any purchase! At checkout you will be able to enter a discount code.  Enter <strong>INTROPROMO</strong> and 20% will be deducted from the cost of your garments!</p><p class='red' style='font-size:12pt;text-align:center;'><strong>Order now, and Save!</strong></p></div>";

//fcontent[1]="<div style='float:left;margin:10 0 0 0px;'><img src='images/081016-gift-box.gif' align='right' border='0' alt='gift box'><h2 class='blue' style='margin:0 0 0 0px;'>Looking for a <br>one-of-a-kind gift?</h2><p class='dark' style='margin:8 0 0 0px;'>Can't decide on a gift for your favorite military aviator? Personalize a Wings4Aviators garment just for him or her. Choose your wings, plus your aviator's call sign, squadron name&mdash;whatever you'd like. We'll make your item to order&mdash;and even include a handsome gift box.</p></div>";
//fcontent[2]="<div style='float:left;margin:10 0 0 0px;'><h2 class='blue' style='margin:0 0 0 0px;font-size:11pt;'>Your purchase supports the <br>Families of the Wounded Fund</h2><div style='float:right;margin:6 4 0 0px;'><img src='images/image-home-purple-heart.jpg' width='58px;' alt='purple heart medal'></div><p class='dark'>Wings4Aviators will donate 10% of the proceeds for every sale to the <a href='http://www.familiesofthewoundedfund.org/' target='_blank' title='Families of the Wounded Fund'>Families of the Wounded Fund</a>. This 501(c)3 charity provides financial resources in support of family members and caregivers of military service men and women wounded in combat operations or injured in line-of-duty activities in support of combat operations.</p></div>";

closetag='&nbsp;';
var fwidth='384px';
var fheight='150px';
var fadelinks=0;
var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;
function changecontent(){
  if (index>=fcontent.length)
    index=0
  if (DOM2){
    document.getElementById("fscroller").style.color="rgb("+startcolor[0]+", "+startcolor[1]+", "+startcolor[2]+")"
    document.getElementById("fscroller").innerHTML=begintag+fcontent[index]+closetag
    if (fadelinks)
      linkcolorchange(1);
    colorfade(1, 15);
  }
  else if (ie4)
    document.all.fscroller.innerHTML=begintag+fcontent[index]+closetag;
  index++
}
function linkcolorchange(step){
  var obj=document.getElementById("fscroller").getElementsByTagName("A");
  if (obj.length>0){
    for (i=0;i<obj.length;i++)
      obj[i].style.color=getstepcolor(step);
  }
}
var fadecounter;
function colorfade(step) {
  if(step<=maxsteps) {	
    document.getElementById("fscroller").style.color=getstepcolor(step);
    if (fadelinks)
      linkcolorchange(step);
    step++;
    fadecounter=setTimeout("colorfade("+step+")",stepdelay);
  }else{
    clearTimeout(fadecounter);
    document.getElementById("fscroller").style.color="rgb("+endcolor[0]+", "+endcolor[1]+", "+endcolor[2]+")";
    setTimeout("changecontent()", delay);
  }   
}
function getstepcolor(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor[i]-endcolor[i]);
    if(diff > 0) {
      newcolor[i] = startcolor[i]-(Math.round((diff/maxsteps))*step);
    } else {
      newcolor[i] = startcolor[i]+(Math.round((Math.abs(diff)/maxsteps))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (ie4||DOM2)
  document.write('<div id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></div>');

if (window.addEventListener)
  window.addEventListener("load", changecontent, false)
  else if (window.attachEvent)
    window.attachEvent("onload", changecontent)
    else if (document.getElementById)
      window.onload=changecontent
