var selid;
function viewid(srcid,destid) {

// get source image
src=$('#src_'+srcid).attr('src');
// strip out .tn if in name
src=src.replace(/.tn/i,'');
// get alt text
title=$('#src_'+srcid).attr('desc');
// hide current img
$('#'+destid).slideDown('slow');
$('#'+destid).hide();
//$('#'+destid).animate({ height: 'hide', opacity: 'hide' });
// put it in viewer
$('#'+destid).attr('src',src);
// put alt text in comment div
$('#mstrtext').html(title);
// show new img
$('#'+destid).fadeIn('slow');
//$('#'+destid).slideDown('slow');
// reset sel class to non sel state
$(".thselborder").attr('class','nothborder');
// mark current image a selected
$('#th_'+srcid).attr('class','thselborder');
// save sel id
selid=srcid;
}

function moverimg(srcid) {
  $('#th_'+srcid).attr('class','thborder');
  if (srcid==selid) {
    $('#th_'+srcid).attr('class','thselborder');
  }
}
function moutimg(srcid) {
  if (srcid!=selid) {
    $('#th_'+srcid).attr('class','nothborder');
  }

}

