// Script to change the latest news headlines
var interval = 20; //Move 10px every initialization

var y = 5; //Starting Location -news1
var dest_y = 560;  //Ending Location -news1

var x = 5; //Starting Location -news2
var dest_x = 520;  //Ending Location -news2

var w = 5; //Starting Location -news3
var dest_w = 485;  //Ending Location -news3

var v = 5; //Starting Location -news4
var dest_v = 425;  //Ending Location -news4

var u = 5; //Starting Location -news5
var dest_u = 405;  //Ending Location -news5

var t = 5; //Starting Location -news6
var dest_t = 365;  //Ending Location -news6

var s = 5; //Starting Location -news7
var dest_s = 285;  //Ending Location -news7

var r = 5; //Starting Location -news8
var dest_r = 245;  //Ending Location -news8

var q = 5; //Starting Location -news9
var dest_q = 205;  //Ending Location -news9

var p = 5; //Starting Location -news10
var dest_p = 185;  //Ending Location -news10

var n = 5; //Starting Location -news11
var dest_n = 125;  //Ending Location -news11



function moveNews1() 
  {
  // Keep on moving the image till the target is achieved

  if (y < dest_y)
    {
    y = y + interval;
    }
	
  //Move the image to the new location
  document.getElementById("news1").style.top  = y+'px';

  if (y+interval < dest_y) 
    {
    //Keep on calling this function every 1000 microsecond till location reached
    window.setTimeout('moveNews1()',1000);
    }
  else
    {
    y = 5;
    window.setTimeout('moveNews1()',1000);
    }
  }


function moveNews2() 
  {
  // Keep on moving the image till the target is achieved

  if (x < dest_x)
    {
    x = x + interval;
    }

  document.getElementById("news2").style.top  = x+'px';

  if (x+interval < dest_x) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews2()',1000);
    }
  else
    {
    x = -30;
    window.setTimeout('moveNews2()',1000);
    }
  }



function moveNews3() 
  {
  // Keep on moving the image till the target is achieved

  if (w < dest_w)
    {
    w = w + interval;
    }

  document.getElementById("news3").style.top  = w+'px';

  if (w+interval < dest_w) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews3()',1000);
    }
  else
    {
    w = -65;
    window.setTimeout('moveNews3()',1000);
    }
  }


function moveNews4() 
  {
  // Keep on moving the image till the target is achieved

  if (v < dest_v)
    {
    v = v + interval;
    }

  document.getElementById("news4").style.top  = v+'px';

  if (v+interval < dest_v) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews4()',1000);
    }
  else
    {
    v = -120;
    window.setTimeout('moveNews4()',1000);
    }
  }


function moveNews5() 
  {
  // Keep on moving the image till the target is achieved

  if (u < dest_u)
    {
    u = u + interval;
    }

  document.getElementById("news5").style.top  = u+'px';

  if (u+interval < dest_u) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews5()',1000);
    }
  else
    {
    u = -140;
    window.setTimeout('moveNews5()',1000);
    }
  }


function moveNews6() 
  {
  // Keep on moving the image till the target is achieved

  if (t < dest_t)
    {
    t = t + interval;
    }

  document.getElementById("news6").style.top  = t+'px';

  if (t+interval < dest_t) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews6()',1000);
    }
  else
    {
    t = -180;
    window.setTimeout('moveNews6()',1000);
    }
  }

  
function moveNews7() 
  {
  // Keep on moving the image till the target is achieved

  if (s < dest_s)
    {
    s = s + interval;
    }

  document.getElementById("news7").style.top  = s+'px';

  if (s+interval < dest_s) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews7()',1000);
    }
  else
    {
    s = -260;
    window.setTimeout('moveNews7()',1000);
    }
  }  
  
  
function moveNews8() 
  {
  // Keep on moving the image till the target is achieved

  if (r < dest_r)
    {
    r = r + interval;
    }

  document.getElementById("news8").style.top  = r+'px';

  if (r+interval < dest_r) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews8()',1000);
    }
  else
    {
    r = -300;
    window.setTimeout('moveNews8()',1000);
    }
  }    
  
  
function moveNews9() 
  {
  // Keep on moving the image till the target is achieved

  if (q < dest_q)
    {
    q = q + interval;
    }

  document.getElementById("news9").style.top  = q+'px';

  if (q+interval < dest_q) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews9()',1000);
    }
  else
    {
    q = -340;
    window.setTimeout('moveNews9()',1000);
    }
  }   
  
    
function moveNews10() 
  {
  // Keep on moving the image till the target is achieved

  if (p < dest_p)
    {
    p = p + interval;
    }

  document.getElementById("news10").style.top  = p+'px';

  if (p+interval < dest_p) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews10()',1000);
    }
  else
    {
    p = -360;
    window.setTimeout('moveNews10()',1000);
    }
  }     
  
  
  
function moveNews11() 
  {
  // Keep on moving the image till the target is achieved

  if (n < dest_n)
    {
    n = n + interval;
    }

  document.getElementById("news11").style.top  = n+'px';

  if (n+interval < dest_n) 
    {
    //Keep on calling this function every 1000 microsecond till locatin reached
    window.setTimeout('moveNews11()',1000);
    }
  else
    {
    n = -420;
    window.setTimeout('moveNews11()',1000);
    }
  }    
  
