
var delay = 1000; //set delay between message change (in miliseconds)
var maxsteps=40; // number of steps to take to change from start color to endcolor
var stepdelay=200; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(0,0,0); // start color (red, green, blue)
var endcolor=new Array(255,255,255); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="width:200px;font: normal normal 13px Arial,Tahoma; padding-left: 0px;  text-align:left;">'; //set opening tag, such as font declarations
fcontent[0]="<span style='color:#6C96C4;font: bold 13px Arial,Tahoma;'><img src='/images/coursescroll.gif'/>  Software Development Courses</span><br/><font style=\"text-align:justify; font-size:12px;\">Two months intensive training program on software development tools .Net, Java, PHP & Linux. Learn with experienced professionals and enhance your programming skills by completing different projects. Placement guidance is provided with the course.</font>";
fcontent[1]="<span style='color:#6C96C4;font: bold 13px Arial,Tahoma;'><img src='/images/coursescroll.gif'/>  Web design course</span><br/><font style=\"text-align:justify; font-size:12px;\">Learn to design web sites using HTML, create and edit images using the latest Photoshop. Bring life to your image using image ready and flash movies & dreamweaver software to create web pages. A program designed to enhance your career in web design</font>";
fcontent[2]="<span style='color:#6C96C4;font: bold 13px Arial,Tahoma;'><img src='/images/coursescroll.gif'/>  Call center Training</span><br/><font style=\"text-align:justify; font-size:12px;\">Career oriented training on Spoken English, Listening skills, Soft skills, Voice and accent, and Technical skill required for individuals seeking career in Call centers and BPO. Interview tips and tricks are part of the training, to help the candidates to secure the job</font>";
fcontent[3]="<span style='color:#6C96C4;font: bold 13px Arial,Tahoma;'><img src='/images/coursescroll.gif'/>  Medical Transcription</span><br/><font style=\"text-align:justify; font-size:12px;\">A career oriented training program by industry experienced trainers on medical transcription. Learn to transcribe files from different doctors by practicing from simulated and live files. Placement assistance is provided to the trainees.</font>";
fcontent[4]="<span style='color:#6C96C4;font: bold 13px Arial,Tahoma;'><img src='/images/coursescroll.gif'/>  Medical Billing</span><br/><font style=\"text-align:justify; font-size:12px;\">A career oriented training program on Medical billing. Learn from experts the different features of the billing process. Get yourself familiarized with the medisoft software used by different medical billing firms. Placement assistance is provided with the course.</font>";
fcontent[5]="<span style='color:#6C96C4;font: bold 13px Arial,Tahoma;'><img src='/images/coursescroll.gif'/>  Hardware and Networking</span><br/><font style=\"text-align:justify; font-size:12px;\">Learn the concepts of Computer Hardware and Networking. This career oriented training program gives the trainee in depth knowledge to trouble shoot hardware, operating system and networking related issues. Placement assistance is provided to the candidates.</font>";
fcontent[6]="<span style='color:#6C96C4;font: bold 13px Arial,Tahoma;'><img src='/images/coursescroll.gif'/>  Corporate Training</span><br/><font style=\"text-align:justify; font-size:12px;\">Dynamic Corporate training program is to train employees from different sectors on soft skills, written skills, selling skills, team building, team management, human resourcesetc., Designed to enhance the performance of the employees.</font>";
/*fcontent[7]="<span style='color:#656669;font: bold 13px Arial,Tahoma;'>Diploma Courses (6months)</span><br/>Add some short text about the course, which will highlight the course information and its objectives.";
fcontent[8]="<span style='color:#656669;font: bold 13px Arial,Tahoma;'>Combo Courses</span><br/>Add some short text about the course, which will highlight the course information and its objectives.";*/
closetag='</div></div>';

var fwidth='200px'; //set scroller width
var fheight='200px'; //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;



//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++
}



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);
  }
}


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);
	
  }   
}


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: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

