/***********************************************
* Fading Scroller- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

/***********************************************
* J A S O N ' S    N O T E
* SAME CODE AS CLE SCROLLER, EXCEPT
* EVERY VARIABLE AND FUNCTION HAS THE LETTER 'g' IN FRONT OF IT SO THAT THE
* SCRIPTS WOULD NOT CONFLICT
***********************************************/

var gdelay = 3000; //set delay between message change (in miliseconds)
var gmaxsteps=30; // number of steps to take to change from start color to endcolor
var gstepdelay=100; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var gstartcolor= new Array(194,194,194); // start color (red, green, blue)
var gendcolor=new Array(0,0,0); // end color (red, green, blue)

/* LIMIT EACH ITEM TO ABOUT 40 WORDS. EACH NEW DIV CONSTITUTES 6 WORDS. */
var gcontent=new Array();
gbegintag=''; //set opening tag, such as font declarations
gcontent[0]='<div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_191.jsp#approved">Kentucky</a>: 7/1/2010</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_146.jsp#approved">New Mexico</a>: 2/1/2010</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_162.jsp#approved">West Virginia</a>: 1/1/2010</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_122.jsp#approved">California</a>: 1/1/2010</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_211.jsp#approved">ACFE</a>: 1/1/2010</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_152.jsp#approved">Pennsylvania</a>: 1/1/2010</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_157.jsp#approved">Texas</a>: 10/7/2009</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_150.jsp#approved">Ohio</a>: 7/15/2009</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_126.jsp#approved">Florida</a>: 7/1/2009</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_135.jsp#approved">Maryland</a>: 5/18/2009</div><div class="newsheadline"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_147.jsp#approved">New York</a>: 1/1/2009</div>';
gcontent[1]='<span class="newsheadline">Kentucky: 7/1/2010</span><div class="newsstory">New ethics requirements. The 65/25 exemption rescinded.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_191.jsp#approved">More details</a></div>';
gcontent[2]='<span class="newsheadline">New Mexico: 2/1/2010</span><div class="newsstory">Triennial ethics requirements. CPE periods beginning after January 1, 2010 must include ethics. 4 hours of ethics is required in triennials ending after January 1, 2013 and subsequent triennials.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_146.jsp#approved">More details</a></div>';
gcontent[3]='<span class="newsheadline">West Virginia: 1/1/2010</span><div class="newsstory">Triennial ethics requirements. CPE periods ending after December 31, 2012,  each individual who was  licensed on or before December 31, 2009 must have secured 4 hours of CPE credit in ethics as part of the 120-hour rolling-three-year period and subsequent triennials.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_162.jsp#approved">More details</a></div>';
gcontent[4]='<span class="newsheadline">California: 1/1/2010</span><div class="newsstory">New 1/1/2010 biennial ethics requirements. Changes in six year ethics requirement from 8 credit PCE to 2 credit Regulatory. New 1/1/2012 annual and technical credit requirement.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_122.jsp#approved">More details</a></div>';
gcontent[5]='<span class="newsheadline">ACFE: 1/1/2010</span><div class="newsstory">New ethics requirement for renewals beginning in January 2011.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_211.jsp#approved">More details</a></div>';
gcontent[6]='<span class="newsheadline">Pennsylvania: 1/1/2010</span><div class="newsstory">New ethics requirement. No more credit for publications after 1/1/2012.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_152.jsp#approved">More details</a></div>';
gcontent[7]='<span class="newsheadline">Texas: 10/7/2009</span><div class="newsstory">50% non-technical limitation now calculated triennially.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_157.jsp#approved">More details</a></div>';
gcontent[8]='<span class="newsheadline">Ohio: 7/15/2009</span><div class="newsstory">8-hour A&A requirement for certain tax specialists rescinded.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_150.jsp#approved">More details</a></div>';
gcontent[9]='<span class="newsheadline">Florida: 7/1/2009</span><div class="newsstory">Laws and Rules exam no longer required for biennial renewal.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_126.jsp#approved">More details</a></div>';
gcontent[10]='<span class="newsheadline">Maryland: 5/18/2009</span><div class="newsstory">New definition of self-study. Up to 16 hours for peer review, Teaching limit raised to 45, No limit on publication.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_135.jsp#approved">More details</a></div>';
gcontent[11]='<span class="newsheadline">New York: 1/1/2009</span><div class="newsstory">CPE period now based on calendar year. New A&A requirement.Self study has been redefined.</div><div class="newslink"><a href="http://www.reqwired.org/reqwired/resources/accountancy/summary_147.jsp#approved">More details</a></div>';
gclosetag='';

var gwidth='220px'; //set scroller width
var gheight='175px'; //set scroller height

var gfadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var gie4=document.all&&!document.getElementById;
var gDOM2=document.getElementById;
var gfaderdelay=0;
var gindex=0;


/*Rafael Raposo edited function*/
//function to change content
function gchangecontent(){
  if (gindex>=gcontent.length)
    gindex=0
  if (gDOM2){
    document.getElementById("gscroller").style.color="rgb("+gstartcolor[0]+", "+gstartcolor[1]+", "+gstartcolor[2]+")"
    document.getElementById("gscroller").innerHTML=gbegintag+gcontent[gindex]+gclosetag
    if (gfadelinks)
      glinkcolorchange(1);
    gcolorfade(1, 15);
  }
  else if (gie4)
    document.all.gscroller.innerHTML=gbegintag+gcontent[gindex]+gclosetag;
  gindex++
}

// gcolorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function glinkcolorchange(step){
  var gobj=document.getElementById("gscroller").getElementsByTagName("A");
  if (gobj.length>0){
    for (i=0;i<gobj.length;i++)
      gobj[i].style.color=ggetstepcolor (step);
  }
}

/*Rafael Raposo edited function*/
var gfadecounter;
function gcolorfade(step) {
  if(step<=gmaxsteps) {	
    document.getElementById("gscroller").style.color=ggetstepcolor (step);
    if (gfadelinks)
      glinkcolorchange(step);
    step++;
    gfadecounter=setTimeout("gcolorfade("+step+")",gstepdelay);
  }else{
    clearTimeout(gfadecounter);
    document.getElementById("gscroller").style.color="rgb("+gendcolor[0]+", "+gendcolor[1]+", "+gendcolor[2]+")";
    setTimeout("gchangecontent()", gdelay);
	
  }   
}

/*Rafael Raposo's new function*/
function ggetstepcolor (step) {
  var gdiff
  var gnewcolor=new Array(3);
  for(var i=0;i<3;i++) {
    gdiff = (gstartcolor[i]-gendcolor[i]);
    if(gdiff > 0) {
      gnewcolor[i] = gstartcolor[i]-(Math.round((gdiff/gmaxsteps))*step);
    } else {
      gnewcolor[i] = gstartcolor[i]+(Math.round((Math.abs(gdiff)/gmaxsteps))*step);
    }
  }
  return ("rgb(" + gnewcolor[0] + ", " + gnewcolor[1] + ", " + gnewcolor[2] + ")");
}

if (gie4||gDOM2)
  document.write('<div id="gscroller" style="width:'+gwidth+';height:'+gheight+'"></div>');

if (window.addEventListener)
window.addEventListener("load", gchangecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", gchangecontent)
else if (document.getElementById)
window.onload=gchangecontent