function backgroundImage(service,inout,width) {
if (service != currentService) {
  if (inout===1) {
  $('service'+service).style.backgroundPosition= width+"px 0";
  }
  else {
  $('service'+service).style.backgroundPosition="0 0";
  }
}
}

function doTheMagic(id) {
if (currentService != id) {
clearAllTimers ();
matt=1;
while (matt<=imageTotal) {
$('pic'+matt).src=pageURL+'images/loading2.gif';
matt=matt+1;
}
new Effect.Fade('workText1', { duration: 0.3, afterFinish: function() {
	var aj = new Ajax.Updater('workText1',pageURL+'ajaxStuffAdmin.php', {method: 'post', parameters: 'getService='+id,onComplete: function(response) {
		new Effect.Appear('workText1', { duration: 0.3 });
	}});	
}});
workArea='workCaseContainer';
workBox='workCaseBox';
imageTextArea="imageText";
imageNumberTextArea="imageNumberText";
currentImage = 1;
$('service'+currentService).style.backgroundPosition="0 0";
if (id==1) $('service1').style.backgroundPosition="-185px 0";
if (id==2) $('service2').style.backgroundPosition="-326px 0";
if (id==3) $('service3').style.backgroundPosition="-174px 0";
if (id==4) $('service4').style.backgroundPosition="-227px 0";
if (id==5) $('service5').style.backgroundPosition="-206px 0";
if (id==6) $('service6').style.backgroundPosition="-53px 0";
$('workCaseContainer').scrollLeft = 0;
getWork(id,0,1);
currentTextBox='workText'+id;
currentService=id;
}
}