
/***********************************************
* 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 = 9000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=40; // 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(0,0,0); // end color (red, green, blue)
var fwidth='220px'; //set scroller width
var fheight='300px'; //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 fcontent=new Array();

begintag='<div style="font: normal 12px Arial; padding: 5px;" align="justify">'; //set opening tag, such as font declarations
fcontent[0]="<br><br><br><b><font color='#FF0000'>Latest News !!!</Font></b><br><br>Lalbaug Branch</b> opened on <br> 26<sup>th</sup> Aug 10 at <br><br><b>Address :</b><br>Ground Floor, Hilla Tower CHS Ltd.,<br>Dr. S.S.Rao Road,<br> Lalbaug,<br>Mumbai - 400 012.<br>"
fcontent[1]="<br><br>The Shamrao Vithal Co-operative Bank Ltd., Mumbai (SVCB) has received permission from the Reserve Bank of India to operate the <b>'SVC Cache24 Insta ATM Sharing Arrangement'</b>.<br> This will facilitate the other co-operative Banks to provide facility to their customers to withdraw from the ATMs of any of the ATM network that SVCB join across the country"
fcontent[2]="<br><br>The Vidya Sahakari Bank Ltd., Pune has recently signed up with The Shamrao Vithal Co-operative Bank Ltd., Mumbai (SVCB) for the implementation of the SVCB in-house developed Core Banking Application Software 'Genius' at the 11 branches of the Vidya Bank on an ASP Model. With this the SVCB Genius software is operational at 23 Banks with 200+ branches. <br><br><a href='OtherPictures.asp'>Click here to see pictures</a>"
fcontent[3]="<br><br><br><b><font color='#FF0000'>Latest News !!!</Font></b><br><br>Wadala Branch</b> opened on <br> 02<sup>nd</sup> Aug 10 at <br><br><b>Address :</b><br>Vijay Niwas, Block No.2,<br>Plot No. 193,<br> Station Road,Wadala (W)<br>Mumbai - 400 031.<br>"
fcontent[4]="<br><br><br><br><br>Bhosari Branch</b> opened on <br> 21<sup>st</sup> Jun 10 at <br><br><b>Address :</b><br>Sneh Vishwa Palace,Sector No.1,<br>Near Hotel Haveli,<br>Nashik-Pune Highway,<br>Indrayani Nagar,<br>Bhosari,<br>Pune -411 026.<br> "
//fcontent[6]="<br><br><br><b><font color='#FF0000'>Latest News !!!</Font></b><br><br>Kurla (E) Branch</b> opened on <br> 03<sup>rd</sup> Mar 10 at <br><br><b>Address :</b><br>Gala No. G-6, Building No. 42,<br>Nehru Nagar Kranti Co-op. Hsg. Society,<br>Nehru Nagar, Kurla (E),<br>Mumbai -400 024.<br>"
closetag='</div>';



var ie5=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 (ie5)
    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 (ie5||DOM2)
  document.write('<div id="fscroller" style="border:1px 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