function toggleInfo(which){

  var list = new Array('item_description','item_technology','item_features','item_buynow');

  if( document.getElementById(which).style.display == 'none'){
    for(var i=0; i<list.length;i++){ // close the open blind
      if( document.getElementById(list[i]) &&  document.getElementById(list[i]).style.display != 'none' ){
	Effect.toggle(list[i],'blind',{duration:0.0,scaleMode:'contents'});
	document.getElementById(list[i] + "_indicator").src="/oboz/images/plus.png";
      }
    }
    Effect.Appear(which,{duration:.5});
    Effect.toggle(which,'blind',{duration:.2,scaleMode:'contents'});
    document.getElementById(which + "_indicator").src="/oboz/images/minus.png";
  }
  
}

/* BEGIN: Morphing */
function myMorphOn(){
  // hide description and morph	
  $('item_description').fade({duration:0.2,from:1,to:0});
  $('zoom_in').fade({duration:0.2,from:1,to:0});

  $('test_image_1').morph('background:#ffffff; width:480px;height:360px');
  $('test_image_2').morph('background:#ffffff; width:480px;height:360px');

  setTimeout("$('viewsTable').appear()",'500');
  setTimeout("$('close').appear()",'500');

  setTimeout("document.getElementById('image_container').style.height = '370px'",'1000');// The height of the large images
  setTimeout("document.getElementById('image_container').style.width  = '480px'",'1000');// The width of the large images
  //document.getElementById('strut').style.height = '480px';
}

function myMorphOff(){
   // show description and morph
  $('test_image_2').morph('background:#ffffff; width:240px;height:180px');    
  $('test_image_1').morph('background:#ffffff; width:240px;height:180px');

  setTimeout("$('item_description').appear()",'1000');
  setTimeout("$('zoom_in').appear()",'1000');

  //$('viewsTable').fade();
  $('close').fade();
  document.getElementById('image_container').style.height = '185px';
  document.getElementById('image_container').style.width  = '';
}

function showTestImage(view_id){

  var mainImg1 = document.getElementById('test_image_1');
  var mainImg2 = document.getElementById('test_image_2');


  if( mainImg1.style.display ==  'none' ){
    mainImg1.src           = imageMap[view_id];
    mainImg2.style.display = 'none';
    $('test_image_1').appear();
  }else{
    mainImg2.src           = imageMap[view_id];
    mainImg1.style.display ='none';
    $('test_image_2').appear();
  }

  //clear all borders, then set the one we called.
  var thumbs = new Array('pair', 'back','bottom','front','left','right','top');
  for(var i=0;i< thumbs.length; i++){
    if( document.getElementById(thumbs[i]) ){
      document.getElementById(thumbs[i]).style.border = '1px solid transparent';
    }
  }
  document.getElementById(view_id).style.border = '1px solid #81B83D';

  return;
}
/* END: Morphing   */
