/***********************************************
* 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
***********************************************/

var delay = 4000; //set delay between message change (in miliseconds)
var maxsteps=35; // number of steps to take to change from start color to endcolor
var stepdelay=50; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(255,255,255); // start color (red, green, blue)
var endcolor=new Array(113,112,117); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="font: normal 10px Arial; padding: 0px; ">'; //set opening tag, such as font declarations


fcontent[0]="<a class='tagline2' href='news.php'>Nicole Milos received the 2010 Illinois Association of Defense Trial Counsel Rising Star Award</a>";
fcontent[1]="<a class='tagline2' href='news.php'>John Lynch obtains trial victory for general contractor</a>";
fcontent[2]="<a class='tagline2' href='news.php'>New Associate, Brian Marquez, joins Cremer Spina</a>";
fcontent[3]="<a class='tagline2' href='news.php'>Cremer Spina supports Chicago Volunteer Legal Services Foundation at Race Judicata</a>";




fcontent[4]="<a class='tagline2' href='news.php'>John Lynch and Holly Stevens obtain $15,000,000 judgment for client in commercial case</a>";
fcontent[5]="<a class='tagline2' href='news.php'>John Lynch and Holly Stevens secure a preliminary injunction for manufacturer in federal action.</a>";
closetag='</div>';
fcontent[6]="<a class='tagline2' href='news.php'>John Lynch secures summary judgment for defendant-insurer in coverage action in Lake County Circuit Court in a case of first impression</a>";
fcontent[7]="<a class='tagline2' href='news.php'>Bill Cremer and Josh Yeager scheduled to give presentation to Spanish based Occidental Hotels and Resorts</a>";
fcontent[8]="<a class='tagline2' href='news.php'>Tom Pender and Bill Cremer obtain dismissal in Utah case for a Swiss company based on lack of personal jurisdiction</a>";
fcontent[9]="<a class='tagline2' href='news.php'>John Lynch elected to a third term on Board of Directors of the Illinois Association of Defense Trial Counsel</a>";
fcontent[10]="<a class='tagline2' href='news.php'>Gary Jansen and Nicole Milos obtain dismissal based upon a Choice of Law analysis.  </a>";
fcontent[11]="<a class='tagline2' href='news.php'>Brian O'Gallagher obtains summary judgment for insured and carrier regarding another carrier's duty to defend and indemnify</a>";
fcontent[12]="<a class='tagline2' href='news.php'>Bill Cremer and Josh Yeager retained in Panama City, Panama bus fire case</a>";
fcontent[13]="<a class='tagline2' href='news.php'>John Lynch obtains summary judgment for defendant in defamation case filed by DuPage County Sheriff</a>";
fcontent[14]="<a class='tagline2' href='news.php'>Brian O'Gallagher and John Lynch obtain summary judgment for insurer in advertising injury case </a>";
fcontent[15]="<a class='tagline2' href='news.php'>Gary Jansen and Nicole Milos obtain dismissal based upon an Architect's Decision clause in cause of action for breach of warranty. </a>";
fcontent[16]="<a class='tagline2' href='news.php'>Bill Cremer attended FERMA symposium in Prague</a>";
fcontent[17]="<a class='tagline2' href='news.php'>Ed Siegert Obtains Summary Judgment In Wrongful Death Case</a>";
fcontent[18]="<a class='tagline2' href='news.php'>John Lynch and Matt Weiss prevail on appeal in case interpreting Home Repair & Remodeling Act</a>";
fcontent[19]="<a class='tagline2' href='news.php'>Stacy Fulco and Katherine Haussermann obtain summary judgment </a>";
fcontent[20]="<a class='tagline2' href='news.php'>Bill Cremer's 1992 Yates v. Chicago National League Ball Club case now a law school research project</a>";
fcontent[21]="<a class='tagline2' href='news.php'>Congratulations to Nicole Milos for being named partner</a>";
fcontent[22]="<a class='tagline2' href='news.php'>New associate, Adam Gill, joins Cremer Spina</a>";
fcontent[23]="<a class='tagline2' href='news.php'>New associate, Drew Block, joins Cremer Spina </a>";
fcontent[24]="<a class='tagline2' href='news.php'>Gary Jansen and Nicole Milos obtain summary judgment in fraud and strict liability action.</a>";
fcontent[25]="<a class='tagline2' href='news.php'>Ed Siegert obtains dismissal of Italian logistics company</a>";
fcontent[26]="<a class='tagline2' href='news.php'>Stacy Fulco obtains defense verdict in Will County trial</a>";
fcontent[27]="<a class='tagline2' href='news.php'>New Associate, Jessica Burtnett, joins Cremer Spina</a>";
fcontent[28]="<a class='tagline2' href='news.php'>John Lynch and Holly Stevens obtain not guilty verdict in product liability trial.</a>";
fcontent[29]="<a class='tagline2' href='news.php'>Bill Cremer Featured Speaker In Mexico City</a>";
fcontent[30]="<a class='tagline2' href='news.php'>New Senior Counsel, Jeanne Zeiger, joins Cremer Spina</a>";
fcontent[31]="<a class='tagline2' href='news.php'>Heather Kingery Obtains Not Guilty Verdict in Negligence Trial</a>";
fcontent[32]="<a class='tagline2' href='news.php'>New Associate, Tara McTague, joins Cremer Spina</a>";
fcontent[33]="<a class='tagline2' href='news.php'>Welcome Back Tim Hoerman</a>";


closetag='</div>';

var fwidth='360px'; //set scroller width
var fheight='10px'; //set scroller height

var fadelinks=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var ie4=document.all&&!document.getElementById;
var DOM2=document.getElementById;
var faderdelay=0;
var index=0;


/*Rafael Raposo edited function*/
//function to change content
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++
}

// colorfade() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

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);
  }
}

/*Rafael Raposo edited function*/
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);
	
  }   
}

/*Rafael Raposo's new function*/
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:none;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