/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  Copyright 2001-4 by Sharon Paine 
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

var last_td = 0;


function change_back_td(butt_id)
{
  if (last_td != 0)
  {
    // resetta il colore di sfondo dell'elemento attivo 
    // riallinea il contenuto a sinistra
    butt_name = document.getElementById(last_td);
    // butt_name = eval("document.all." + last_td);
    // butt_name.bgColor = '#ABD582';
    // butt_name.bgColor = '#00AAFF';
    butt_name.bgColor = '#FFEFAD';
  }

  // setta il colore di sfondo dell'elemento nuovo
  // allinea il contenuto a destra
  butt_name = document.getElementById(butt_id);
  butt_name.bgColor = '#FFFFFF';
  last_td = butt_id;
} 

function changetosel(num, ly_id, butt_id)
{
  if (butt_id != 'butt2')
     slideOut();
  change_back_td(butt_id);
  dw_loadLayer(num, ly_id);
} 

function initGlideLayers() {
  var glideLyrs = new Array();
  
  // Set up your layers here
  // arguments: id, left=0 (offset calculated based on width), top
  glideLyrs[0] = new dynObj('glideDivA', 0, 320);
  glideLyrs[1] = new dynObj('glideDivB', 0, 320);
  glideLyrs[2] = new dynObj('glideDivC', 0, 320);
  glideLyrs[3] = new dynObj('glideDivD', 0, 320);
  glideLyrs[4] = new dynObj('glideDivE', 0, 320);
  
  for (var i=0; i<glideLyrs.length; i++) {
		// hold original left position 
		glideLyrs[i].xOff = -(glideLyrs[i].w + 10);
		glideLyrs[i].shiftTo( glideLyrs[i].xOff, glideLyrs[i].y );
		glideLyrs[i].show();
    glideLyrs[i].el = null;
  }
}

