//  Functions:
//  ---------------------------------
//  iconChange()
//  toggleText()



function iconChange( id, img, color, colorSwitch ) {

 	if (document.layers) {
    document.layers["prodcatimg_" + id].src = img;
    if ( colorSwitch == true ) { document.layers["prodcatlink_" + id].style.color = color; }
  }

 	else if (document.all) {
    document.all["prodcatimg_" + id].src = img;
    if ( colorSwitch == true ) { document.all["prodcatlink_" + id].style.color = color; }
  }

 	else if (document.getElementById) {
    document.getElementById("prodcatimg_" + id).src = img;
    if ( colorSwitch == true ) { document.getElementById["prodcatlink_" + id].style.color = color; }
  }

}




function toggleText( id, divCount ) {

  //alert('toggleText called with\nid = ' + id + '\ndivCount = ' + divCount);

 	if (document.layers) {
    //alert('document.layers');
    for (i = 0; i < divCount; i++) {
      document.layers["prodtext_" + i].style.display = 'none';
    }
    alert('show prodtext_' + i);
    document.layers["prodtext_" + id].style.display = 'block';
  }

 	else if (document.all) {
    //alert('document.all');
    for (i = 0; i < divCount; i++) {
      document.all["prodtext_" + i].className = 'prodtext_none';
      document.all["prodtext_index_" + i].className = 'prodtext_index_none';
    }
    document.all["prodtext_" + id].className = 'prodtext_block';
    document.all["prodtext_index_" + id].className = 'prodtext_index_block';
  }

 	else if (document.getElementById) {
    //alert('document.getElementById');
    for (i = 0; i < divCount; i++) {
      document.getElementById("prodtext_" + i).className = 'prodtext_none';
      document.getElementById("prodtext_index_" + i).className = 'prodtext_index_none';
    }
    document.getElementById("prodtext_" + id).className = 'prodtext_block';
    document.getElementById("prodtext_index_" + id).className = 'prodtext_index_block';
    document.getElementById("prodtext_index_" + i).blur();
  }

}