var linknum;
var num;
function changebody(linknum)
{
  if(linknum == 1)
    document.getElementById("manage1").style.color = "black";
  if(linknum == 2)
    document.getElementById("object1").style.color = "black";
  if(linknum == 3)
    document.getElementById("home1").style.color = "black";
  if(linknum == 4)
    document.getElementById("about1").style.color = "black";
  if(linknum == 5)
    document.getElementById("mail1").style.color = "black";
  if(linknum == 6)
    document.getElementById("serv5").style.color = "black";
  if(linknum == 7)
    document.getElementById("serv3").style.color = "black";
  if(linknum == 8)
    document.getElementById("serv4").style.color = "black";
  if(linknum == 9)
    document.getElementById("mail2").style.color = "black";
  if(linknum == 10)
    document.getElementById("mail3").style.color = "black";
  if(linknum == 11)
    document.getElementById("manage2").style.color = "black";
  if(linknum == 12)
    document.getElementById("object2").style.color = "black";
  if(linknum == 13)
    document.getElementById("home2").style.color = "black";
  if(linknum == 14)
    document.getElementById("about2").style.color = "black";
  if(linknum == 15)
    document.getElementById("mailme").style.color = "black";
  if(linknum == 16)
    document.getElementById("tech1").style.color = "black";
  if(linknum == 17)
    document.getElementById("tech2").style.color = "black";
  if(linknum == 18)
    document.getElementById("leg1").style.color = "black";
  if(linknum == 19)
    document.getElementById("leg2").style.color = "black";														
}

function changeback(num)
{
  if(num == 1)
    document.getElementById("manage1").style.color = "blue";
  if(num == 2)
    document.getElementById("object1").style.color = "blue";
  if(num == 3)
    document.getElementById("home1").style.color = "blue";
  if(num == 4)
    document.getElementById("about1").style.color = "blue";
  if(num == 5)
    document.getElementById("mail1").style.color = "blue";
  if(num == 6)
    document.getElementById("serv5").style.color = "blue";
  if(num == 7)
    document.getElementById("serv3").style.color = "blue";
  if(num == 8)
    document.getElementById("serv4").style.color = "blue";
  if(num == 9)
    document.getElementById("mail2").style.color = "blue";
  if(num == 10)
    document.getElementById("mail3").style.color = "blue";
  if(num == 11)
    document.getElementById("manage2").style.color = "blue";
  if(num == 12)
    document.getElementById("object2").style.color = "blue";
  if(num == 13)
    document.getElementById("home2").style.color = "blue";
  if(num == 14)
    document.getElementById("about2").style.color = "blue";
  if(num == 15)
    document.getElementById("mailme").style.color = "blue";
  if(num == 16)
    document.getElementById("tech1").style.color = "blue";
  if(num == 17)
    document.getElementById("tech2").style.color = "blue";
  if(num == 18)
    document.getElementById("leg1").style.color = "blue";
  if(num == 19)
    document.getElementById("leg2").style.color = "blue";							
}

msgtec = "MacGregor Consulting can help businesses deliver and exploit new technology...........";
spacetec=".";
posntec=0;
function ScrollAcrossTec()
{
  var freshtexttec=msgtec.substring(posntec, msgtec.length)+ 
      spacetec + msgtec.substring(0, posntec);
  var tdind=document.getElementById("scrolltec");
  tdind.firstChild.nodeValue=freshtexttec;
  posntec++;
  if(posntec>msgtec.length) posntec=0;
  window.setTimeout("ScrollAcrossTec()",300);
}


msgman = "MacGregor Consulting are here to deliver on bottom line performance...........";
spaceman=".";
posnman=0;
function ScrollAcrossMan()
{
  var freshtextman=msgman.substring(posnman, msgman.length)+ 
      spaceman + msgman.substring(0, posnman);
  var tdind=document.getElementById("scrollman");
  tdind.firstChild.nodeValue=freshtextman;
  posnman++;
  if(posnman>msgman.length) posnman=0;
  window.setTimeout("ScrollAcrossMan()",300);
}

msgobj = "The emphasis is always on delivering workable solutions...........";
spaceobj=".";
posnobj=0;
function ScrollAcrossObj()
{
  var freshtextobj=msgobj.substring(posnobj, msgobj.length)+ 
      spaceobj + msgobj.substring(0, posnobj);
  var tdind=document.getElementById("scrollobj");
  tdind.firstChild.nodeValue=freshtextobj;
  posnobj++;
  if(posnobj>msgobj.length) posnobj=0;
  window.setTimeout("ScrollAcrossObj()",300);
}

msg = "MacGregor Consulting are here to solve your problems...........";
space=".";
posn=0;
function ScrollAcross()
{
  var freshtext=msg.substring(posn, msg.length)+ 
      space + msg.substring(0, posn);
  var td=document.getElementById("scrollac");
  td.firstChild.nodeValue=freshtext;
  posn++;
  if(posn>msg.length) posn=0;
  window.setTimeout("ScrollAcross()",300);
}
	  
