var delay = 4500; //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 fcontent=new Array();
begintag=''; //set opening tag, such as font declarations
fcontent[0]="<p><img src='1.jpg' align='left' />Spanish Leader Company in the construction field, with an outstanding international presence in more than 30 countries</p>";
fcontent[1]="<p><img src='2.jpg' align='left' />Wensil i Technologies is a complete Web and IT solutions provider</p>";
fcontent[2]="<p><img src='3.jpg' align='left' />The world's largest selling magazine and the bible of sports world-wide celebrates its annual Sports Illustrated Power list in association with Gitanjali Lifestyle</p>";
fcontent[3]="<p><img src='4.jpg' align='left' />Infrastructure Leasing & Financial Services Limited (IL&FS) is one of India's leading infrastructure development and finance companies.</p>";
fcontent[4]="<p><img src='5.jpg' align='left' />Mufti</p>";
fcontent[5]="<p><img src='6.jpg' align='left' />Aviacon is a Renowned Professional Heliport Consultant Company provides solutions for the over expanding needs of the Aviation Industry..</p>";
fcontent[6]="<p><img src='7.jpg' align='left' />GS3 America</p>";
fcontent[7]="<p><img src='8.jpg' align='left' />The Confederation of Indian Industry (CII) works to create and sustain an environment conducive to the growth of industry in India, partnering industry and government alike through advisory and consultative processes.</p>";
fcontent[8]="<p><img src='9.jpg' align='left' />Subway is the most popular American fast food franchise, Subway Fastway provides the fastest way to order food online.</p>";
fcontent[9]="<p><img src='10.jpg' align='left' />Universal Satellite Mapping Consultants Pvt Ltd offers services in remote sensing,GIS,GPS Surveys, Data collection, Civil Surveys and image processing.</p>";
fcontent[10]="<p><img src='11.jpg' align='left' />SOLINTEL offers a great variety of technologic services oriented to the business.</p>";
fcontent[11]="<p><img src='12.jpg' align='left' />Stardust is an Indian Monthly Bollywood news magazine and also sponsors the Stardust Awards.</p>";
fcontent[12]="<p><img src='13.jpg' align='left' />Rajasthan Electronics & Instruments Limited (REIL) has a prominent place amongst the electronics industry of Rajasthan.</p>";
fcontent[13]="<p><img src='14.jpg' align='left' />Rajasthan Rajya Sahakari Upbhokta SanghRajasthan(Confed)</p>";
fcontent[14]="<p><img src='15.jpg' align='left' />Himachal Gramin Bank (Govt. of India Undertaking). Sponsored By Punjab National Bank, Committed to Development of Rural India.</p>";
fcontent[15]="<p><img src='18.jpg' align='left' />Pathey Kan</p>";
closetag='';
fcontent[16]="<p><img src='16.jpg' align='left' />Rajasthan Rajya Vidyut Prasaran Nigam Limited (RVPN) a State Transmission Utility (STU) Winner of National Awards for Meritorious performance in the year 2008-09</p>";
closetag='';
fcontent[17]="<p><img src='3.jpg' align='left' />Punjab Public Service Commission  (PPSC)</p>";
closetag='';
fcontent[18]="<p><img src='19.jpg' align='left' />Mother Dairy</p>";
closetag='';
fcontent[19]="<p><img src='20.jpg' align='left' />Bharat Pertroleum</p>";
closetag='';
fcontent[20]="<p><img src='21.jpg' align='left' /></p>";
closetag='';
fcontent[21]="<p><img src='22.jpg' align='left' /></p>";
closetag='';
fcontent[22]="<p><img src='23.jpg' align='left' /></p>";
closetag='';
fcontent[23]="<p><img src='24.jpg' align='left' /></p>";
closetag='';
fcontent[24]="<p><img src='25.jpg' align='left' /></p>";

fcontent[25]="<p><img src='logo_1.jpg' align='left' />Career Point was incorporated to impart quality education to students preparing for various competitive examinations. </p>";


fcontent[26]="<p><img src='logo_21.jpg' align='left' />Lead Manpower is a world leader in Employment services Industry. Creating and delivering services that enable our clients to win in the changing world of work.</p>";


fcontent[27]="<p><img src='logo_3.jpg' align='left' />The Info India offers professional website design, hosting and ecommerce for a fraction of the cost of traditional providers.</p>";


fcontent[28]="<p><img src='logo_4.jpg' align='left' />We are a group of young entrepreneurs from India and US of Uttarakhand community. </p>";

fcontent[29]="<p><img src='logo_5.gif' align='left' />SSR Wireless Pvt. Ltd is a leading end to end provider of mobile promotions and online services. It believes in delivering quality IT solutions to its client.</p>";




fcontent[30]="<p><img src='27.jpg' align='left' /> OWSPL is working in the cutting edge technology for filling the desires of clients and companies in various sectors </p>";

var fwidth='225px'; //set scroller width
var fheight='60px'; //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('<font id="fscroller" style="border:0px solid black;width:'+fwidth+';height:'+fheight+'"></font>');

if (window.addEventListener)
window.addEventListener("load", changecontent, false)
else if (window.attachEvent)
window.attachEvent("onload", changecontent)
else if (document.getElementById)
window.onload=changecontent
