

/***********************************************
* 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 = 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=40; // time in miliseconds of a single step
//**Note: maxsteps*stepdelay will be total time in miliseconds of fading effect
var startcolor= new Array(143,19,21); // start color (red, green, blue)
var endcolor=new Array(255,255,255); // end color (red, green, blue)

var fcontent=new Array();
begintag='<div style="font: bold 11px Tahoma; padding: 5px;">'; //set opening tag, such as font declarations
fcontent[0]="“We must not<br>compensate for a<br>lack of competence<br>among our leaders<br>with the bravery<br>of our soldiers.”<br><br>….U.S. Army<br>Field Manual<br>100-5, Operations";
fcontent[1]="“To create great<br>armies is one<br>thing;<br>to lead them and<br>to handle them<br>is another.”<br><br>….Sir Winston<br>Churchill";
fcontent[2]="“Indirect methods<br>will be needed<br>in order to<br>ensure victory.”<br><br>….Sun Tzu";
fcontent[3]="“Subtlety is the<br>Essence of Strategy”<br><br>….B. H. Liddell Hart";
fcontent[4]="“Those who cannot<br>remember the past<br>are condemned<br>to repeat it.”<br><br>…. George Santayana";
fcontent[5]="“True education<br>consists in training the<br>mind how to think, in<br>place of cramming it<br>with what to think.<br><br>….H. F. C. Fuller";
fcontent[6]="“There are a<br>small number<br>of fundamental<br>principles of war,<br>which cannot be<br>deviated from<br>without danger,<br>and the application<br>of them, on the<br>contrary, has<br>been nearly<br>always crowned<br>with success.”<br><br>….Antoine-Henri Jomini";
fcontent[7]="“A good plan<br>violently executed<br>today, is better<br>than the perfect<br>plan tomorrow.”<br><br>...Patton";
fcontent[8]="“To lead an<br>untrained people<br>to war is to<br>throw them away.”<br><br>….Confucius";
fcontent[9]="“The best form<br>of welfare for<br>the troops is<br>first-class<br>training.”<br><br>….Erwin Rommel";
fcontent[10]="“In business,<br>it’s always better<br>to be vaguely<br>right than<br>precisely wrongly.”<br><br>….Richard I. Levin";
fcontent[11]="“Take my railroads,<br>take my millions,<br>but leave me my<br>organization and<br>within a year<br>I’ll be back<br>stronger than ever.”<br><br>….Andrew Carnegie";
fcontent[12]="“The goodness of<br>your soldiers is of<br>more consequence<br>than the number<br>of them.”<br><br>….Niccolo Machiavelli";
fcontent[13]="“The transition<br>from the defensive<br>to the offensive<br>is one of the most<br>delicate operations<br>in war.”<br><br>….Napoleon I:<br><br>Maxims of War, 1831";
fcontent[14]="“The statesman<br>who, seeing war<br>inevitable,<br>hesitates to strike<br>first is guilty of<br>a crime against<br>his country.  The<br>best defense is<br>a good offense.”<br><br>….Carl Von Clausewitz";
fcontent[15]="“Pursuit is a second<br>act of the victory,<br>in many cases<br>more important<br>than the first.”<br><br>….Carl Von Clausewitz<br><br>(To many companies quit while they’re ahead.)";
fcontent[16]="“In things such as<br>war, those errors<br>which proceed<br>from a spirit of<br>benevolence<br>are the worst.”<br><br>….Carl Von Clausewitz";
fcontent[17]="“Everything is very<br>simple in war,<br>but the simplest<br>thing is difficult.”<br><br>….Carl Von Clausewitz";
fcontent[18]="“Many assume that<br>half efforts can be<br>effective.  A small<br>jump is easier than<br>a large one, but<br>no one wishing to<br>cross a wide ditch<br>would cross half<br>of it first.”<br><br>….Carl Von Clausewitz";
fcontent[19]="“If you can’t get<br>them to salute<br>when they should<br>salute and wear the<br>clothes you tell<br>them to wear,<br>how are you going<br>to get them to die<br>for their country.”<br><br>….Patton";
fcontent[20]="“Use steamroller<br>strategy.  That is,<br>make up your mind<br>on course and<br>direction of action<br>and stick to it.<br>But in tactics,<br>do not steamroller.<br>Attach weaknesses.<br>Hold them by the<br>nose and kick<br>them in the pants.”<br><br>….Patton";
fcontent[21]="“A piece of spaghetti<br>or a military unit<br>can only be led<br>from the front end.”<br><br> ….Patton";
fcontent[22]="“Never tell people<br>how to do things,<br>tell them what to<br>do and they will<br>surprise you with<br>their ingenuity.”<br><br>….Patton";
fcontent[23]="“An educated<br>guess is just as<br>accurate and<br>far faster than<br>compiled errors.”<br><br>….Patton";
fcontent[24]="“A study of the<br>map will indicate<br>where critical<br>situations<br>exist or are apt<br>to develop, and<br>so indicate where<br>the commander<br>should be.”<br><br>….Patton";
fcontent[25]="“Promulgation of an<br>order represents<br>not over ten<br>percent of your<br>responsibility.  The<br>remaining ninety<br>percent consists in<br>assuring through<br>personal supervision<br>on the ground, by<br>yourself and your<br>staff, proper and<br>vigorous execution.”<br><br>….Patton";
fcontent[26]="“Strategy without<br>tactics is the<br>longest path to<br>victory, tactics<br>without strategy<br>is the noise<br>before defeat.”<br><br>….Yum Woon Sen";
fcontent[27]="“Successful generals<br>make plans to fit<br>circumstances, but<br>do not try to create<br>circumstances to<br>fit plans.”<br><br>….Patton";
fcontent[28]="“A good plan<br>violently executed<br>now, is better than<br>a perfect plan<br>next week.”<br><br>….Patton";
fcontent[29]="“There is no<br>approved solution<br>to any tactical<br>situation.”<br><br>….Patton";
closetag='</div>';

var fwidth='150px'; //set scroller width
var fheight='150px'; //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" 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

