 var prev_pic;
 
  function testExplode(start, end){
    if (typeof prev_pic == "string") document.getElementById(prev_pic).style.display = 'none';
	dojo.lfx.explode(start, end, 350).play();
    prev_pic = end;
  }

  function close_pic(id_pic){
   document.getElementById(id_pic).style.display = 'none';
  }
  
/*
  function previ_pic(str_image_ids, idimage, from){
   pic_id = "0";
   arr_id = str_image_ids.split(" ");
   l = arr_id.length;
   for (var i = 0; i <l; i++) {
      if (arr_id[i] == idimage) {
      pic_id = arr_id[i-1];
      }
   }
   if (pic_id != "0") {
    if (typeof pic_id == "string") {
      pic_from = pic_id.concat("_tn");
      testExplode(pic_from, pic_id);
     }
   }
	}

  function next_pic(str_image_ids, idimage, from){
   pic_id = "0";
   arr_id = str_image_ids.split(" ");
   l = arr_id.length;
   for (var i = 0; i <l; i++) {
      if (arr_id[i] == idimage) pic_id = arr_id[i+1];  
   }
   if (pic_id != "0") {
   if (typeof pic_id == "string") {
      pic_from = pic_id.concat("_tn");
      testExplode(pic_from, pic_id);
     } else {
       //alert('next');
     }
   }
	}
*/
  function previ_pict(count_pics, idimage) {
   pic_id = idimage-1;
   if (pic_id>=1) {
    pic_from = pic_id+"_tn";
     testExplode(pic_from, pic_id+"");	
   }
  }

  function next_pict(count_pics, idimage){
   pic_id = idimage+1;
   if (pic_id<=count_pics) {
     pic_from = pic_id+"_tn";
     testExplode(pic_from, pic_id+"");	
   }
  }
  
  

