var delay = 7000; //set delay between message change (in miliseconds)
var maxsteps=30; // number of steps to take to change from start color to endcolor
var stepdelay=30; // 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='<div style="font: normal 13px Helvetica, Arial MT; padding: 3px;">'; //set opening tag, such as font declarations
fcontent[0]="The few days in Bangalore have opened my eyes to the opportunity that India has. The meetings lined up for the delegates were excellent but the delegates and the interaction is what really made the trip!.<br><br><b>Viraj Gandhi,</b><br> CEO, Paradyme Management";
fcontent[1]="Was excellent! Loved the interactions-(social) as well<br><br><b>Himanshu Shukla,</b><br>Managing Director, Antarctica Group, Inc.";
fcontent[2]="The meetings were great and the business leaders we met gave awesome input and were very helpful. It was very well organized and the most important element is that I liked the staff. They were too good, helpful and they love what they are doing and it shows!<br><br><b>Vini Singh</b><br>";
fcontent[3]="Interactive format at the delegation was very helpful, since it allowed for a broad range of questions.  I liked the meetings with a) US Embassy b) Kapil Sibal, c) Rajnath Singh d) Dr Ashwini Kumar and e) Mr Kamal Nath. Got a broad feel for the issues and nuances pervading their fields of expertise!<br><br><b>Kanchana Dhamodaran,</b><br>";
fcontent[4]="Mostly very engaging discussions! People were open & frank in expressing opinions. I enjoyed the meetings with Bhupinder Singh Hooda who shared with us the deeper value of the business face of Haryana Government and with BJP President Rajnath Singh who shared the view of opposition on nuclear treaty<br><br><b>Inderpal Singh Mumick,</b><br> CEO, Kirusa";
fcontent[5]="Very Good! The Delhi trip certainly exceeded my expectation. It is a pleasure to be a part of USINPAC. We were able to interact with the senior Ministers and get a first hand view on various topics of politics, trade, policies, business etc. I met new Business Association and friends. I appreciate all the effort on organizing this delegation and helping us. Connect. I also take this opportunity to thank everyone who has made this such a successful event<br><br><b>Amarlal Nichani</b><br> Vice President, NITEO Partners, an NEC Company";
fcontent[6]="I was part of USINPAC delegation to India in January 2008. I am impressed by their organization and professionalism. They have created a huge platform to connect business and political leaders from India and the US. I chose to be part of the delegation because of the opportunity to meet with top business leaders. They informed me of the schedule well in advance, answered all my queries before and during the delegation. All meetings occurred as planned. The transportation to all venues was very nice and comfortable. I will always cherish meeting with Infosys founder and India's pride Mr. Narayana Murthy. Thirty minutes with Mr. Murthy taught me what otherwise takes years to learn. Thank you USINPAC!<br><br><b>Mahesh Lawani, Founder & CEO, CCube</b><br>";
fcontent[7]="USINPAC enabled delegates to gather the Indian Government and Industry's viewpoint on investment culture and globalization potential and opportunities in India.<br><br><b>Sushil Bhatia,</b><br> CEO, Anudata, Inc.";
fcontent[8]="The annual delegation to India was simply great! In a short period of time, we met several ministers, CEO's of the major corporations and various company executives.  An unanticipated benefit was that we formed a circle of great friends among us delegates.  It was a 'once in a lifetime' memorable experience.<br><br><b>Dan Kamdar,</b> <br>President, AES";
fcontent[9]="This was a great opportunity to learn about Indian business environment and culture and at the same time net work with other Indian American Business Executives.  This was a great opportunity to make new friendships and fellowships.<br><br><b>TK Rao</b><br>President<br>Integrated Laboratory Systems, Inc";
fcontent[10]="Overall it was an excellent experience. It helped me understand some of what is going on in India and interact with top business leaders in the country.<br><br><b>Neelima Grover</b><br>President, QED Group, LLC ";
closetag='</div>';

var fwidth='220px'; //set scroller width
var fheight='125px'; //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" class="sitetext" style="border:0px 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
