


/***********************************************
* 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 delay01 = 4000; //set delay01 between message change (in miliseconds)
var maxsteps01=30; // number of steps to take to change from start color to endcolor01
var stepdelay01=40; // time in miliseconds of a single step
//**Note: maxsteps01*stepdelay01 will be total time in miliseconds of fading effect
var startcolor01= new Array(255,255,255); // start color (red, green, blue)
var endcolor01=new Array(102,153,51); // end color (red, green, blue)

var fcontent01=new Array();
begintag01='<div>'; //set opening tag, such as font declarations

fcontent01[0]="<a href='mediaroom/Seminar_on_Water_and_Solid_Waste-SPML Initiative.pdf' class=message02>Seminar on Water & Solid Waste</a>";

fcontent01[1]="<a href='mediaroom/Steelguru-SPML_Infra_wins_orders_worth_INR_6_billion.pdf' class=message02>SPML Wins Orders worth INR 616.72 Crores</a>";


fcontent01[2]="<a href='mediaroom/spml0001.jpg' target='_blank' class=message02SPML is one of India’s Top 30 best performing infrastructure companies</a>";


fcontent01[3]="<a href='mediaroom/News_Paper001.jpg' class=message02>SPML’s initiative: Bin less waste management at Dehradun</a>";


fcontent01[4]="<a href='mediaroom/SPML-Signs-MoU.pdf' class=message02>SPML Signs MoU for 2 Hydropower Projects</a>";


fcontent01[5]="<a href='mediaroom/SPML_Bawana_story.pdf' class=message02>Managing Industrial Waste: SPML initiative at Bawana</a>";


fcontent01[6]="<a href='mediaroom/Diwali_Festival_in_REP_DVC.jpg' class=message02>SPML lights up red affected areas</a>";


fcontent01[7]="<a href='mediaroom/SPML_Case_Study_EAW_Sept_2011.pdf' class=message02>Intregated water management system at Latur</a>";

fcontent01[8]="<a href='mediaroom/ProjectVendorAug.pdf' class=message02>India's water demand to exceed supply by 2020</a>";


fcontent01[9]="<a href='mediaroom/game_changers.pdf' class=message02>The Game Changers</a>";

fcontent01[10]="<a href='mediaroom/spml_bawana_cetp.pdf' class=message02>Chief Minister of Delhi inaugurates Bawana Common Effluent Treatment Plant</a>";


fcontent01[11]="<a href='mediaroom/91-SPML.pdf' class=message02>Chief Minister of Delhi inaugurates 35 MLD Bawana CETP built by SPML Infra Ltd.</a>";


fcontent01[12]="<a href='mediaroom/Gulf News.pdf' class=message02>Cities must pay more for better services</a>";

fcontent01[13]="<a href='mediaroom/EAW-Insituform.pdf' class=message02>Article on Insituform Trenchless Sewer Rehabilitation</a>";

fcontent01[14]="<a href='mediaroom/India Water Review.pdf' target=_blank class=message02>Industrial water reuse remains the key to sustainability</a>";

fcontent01[15]="<a href='mediaroom/Ooska News.pdf' target=_blank class=message02>SPML enters into JV with Norway’s Aqualyng for RO Desalination</a>";




closetag01='</div>';

var fwidth01='150px'; //set scroller width
var fheight=''; //set scroller height

var fadelinks01=1;  //should links inside scroller content also fade like text? 0 for no, 1 for yes.

///No need to edit below this line/////////////////


var ie401=document.all&&!document.getElementById;
var DOM201=document.getElementById;
var faderdelay01=0;
var index01=0;


/*Rafael Raposo edited function*/
//function to change content
function changecontent01(){
  if (index01>=fcontent01.length)
    index01=0
  if (DOM201){
    document.getElementById("fscroller01").style.color="rgb("+startcolor01[0]+", "+startcolor01[1]+", "+startcolor01[2]+")"
    document.getElementById("fscroller01").innerHTML=begintag01+fcontent01[index01]+closetag01
    if (fadelinks01)
      linkcolorchange01(1);
    colorfade01(1, 15);
  }
  else if (ie401)
    document.all.fscroller01.innerHTML=begintag01+fcontent01[index01]+closetag01;
  index01++
}

// colorfade01() partially by Marcio Galli for Netscape Communications.  ////////////
// Modified by Dynamicdrive.com

function linkcolorchange01(step){
  var obj01=document.getElementById("fscroller01").getElementsByTagName("A");
  if (obj01.length>0){
    for (i=0;i<obj01.length;i++)
      obj01[i].style.color=getstepcolor01(step);
  }
}

/*Rafael Raposo edited function*/
var fadecounter01;
function colorfade01(step) {
  if(step<=maxsteps01) {	
    document.getElementById("fscroller01").style.color=getstepcolor01(step);
    if (fadelinks01)
      linkcolorchange01(step);
    step++;
    fadecounter01=setTimeout("colorfade01("+step+")",stepdelay01);
  }else{
    clearTimeout(fadecounter01);
    document.getElementById("fscroller01").style.color="rgb("+endcolor01[0]+", "+endcolor01[1]+", "+endcolor01[2]+")";
    setTimeout("changecontent01()", delay01);
	
  }   
}

/*Rafael Raposo's new function*/
function getstepcolor01(step) {
  var diff
  var newcolor=new Array(3);
  for(var i=0;i<3;i++) {
    diff = (startcolor01[i]-endcolor01[i]);
    if(diff > 0) {
      newcolor[i] = startcolor01[i]-(Math.round((diff/maxsteps01))*step);
    } else {
      newcolor[i] = startcolor01[i]+(Math.round((Math.abs(diff)/maxsteps01))*step);
    }
  }
  return ("rgb(" + newcolor[0] + ", " + newcolor[1] + ", " + newcolor[2] + ")");
}

if (ie401||DOM201)
  document.write('<div id="fscroller01" style="width:'+fwidth01+';height:'+fheight+'"></div>');

if (window.addEventListener)
window.addEventListener("load", changecontent01, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent01)
else if (document.getElementById)
window.onload=changecontent01

