<!--
theKey=tiKey;
theSub=tiSub;

function loadFeatures()
 {
  img1 = new Image();
  img1.src = 'images/tabHome.gif';
  img2 = new Image();
  img2.src = 'images/tabHomeO.gif';
  img3 = new Image();
  img3.src = 'images/tabProd.gif';
  img4 = new Image();
  img4.src = 'images/tabProdS.gif';
  img5 = new Image();
  img5.src = 'images/tabProdO.gif';
  img6 = new Image();
  img6.src = 'images/tabServ.gif';
  img7 = new Image();
  img7.src = 'images/tabServS.gif';
  img8 = new Image();
  img8.src = 'images/tabServO.gif';
  img9 = new Image();
  img9.src = 'images/tabClie.gif';
  img10 = new Image();
  img10.src = 'images/tabClieS.gif';
  img11 = new Image();
  img11.src = 'images/tabClieO.gif';
  img12 = new Image();
  img12.src = 'images/tabAbou.gif';
  img13 = new Image();
  img13.src = 'images/tabAbouS.gif';
  img14 = new Image();
  img14.src = 'images/tabAbouO.gif';
  img15 = new Image();
  img15.src = 'images/tabCont.gif';
  img16 = new Image();
  img16.src = 'images/tabContS.gif';
  img17 = new Image();
  img17.src = 'images/tabContO.gif';
  img18 = new Image();
  img18.src = 'images/tabEdge.gif';
  img19 = new Image();
  img19.src = 'images/tabEdgeO.gif';
  img20 = new Image();
  img20.src = 'images/tabEdgeS.gif';
 }

function tiInit()
 {
    loadFeatures();

    document.images[tiKey].src='images/'+theKey+'O.gif';
    document.images[tiSub].src='images/'+theSub+'S.gif';
 }

function tiClear(target,neighbor)
 {
  theTarget=target;
  theNeighbor=neighbor;
  if(theNeighbor!=theKey)
   {
    document.images[tiKey].src='images/'+theKey+'.gif';
   }

  if(theTarget!=theSub)
   {
    document.images[tiSub].src='images/'+theSub+'.gif';
   }
 }

function tiSwap(target,neighbor)
 {
  theTarget=target;
  theNeighbor=neighbor;
  document.images[target].src='images/'+theTarget+'O.gif';
  document.images[neighbor].src='images/'+theNeighbor+'S.gif';

  if(theTarget!=theKey){tiClear(target,neighbor);}
 }

function tiBase(target,neighbor)
 {
  theTarget=target;
  theNeighbor=neighbor;
  document.images[target].src='images/'+theTarget+'.gif';
  document.images[neighbor].src='images/'+theNeighbor+'.gif';

  tiInit();
 }

function genSwap(target,state)
 {
  theTarget=target;
  theState=state;
  if(theState=='over')
   { document.images[target].src='images/'+theTarget+'O.gif'; }
  else
   { document.images[target].src='images/'+theTarget+'.gif'; }
 }
//-->
