function lswitch(lang) {
  modulehtml = window.location.pathname.substr(4);
  if (!modulehtml.length) { modulehtml = 'index.html'; }
  window.location.href = '/'+lang+'/'+modulehtml;
}

function iset(curr, repl) {
   $('#img_'+curr).hide();
   $('#lnk_'+curr).removeClass('selected');
   $('#img_'+repl).show();
   $('#lnk_'+repl).addClass('selected');
   curr = repl;
   return curr;  
} 

function iprev(curr) {
 if(curr > 1) {
    $('#img_'+curr).hide();
    $('#lnk_'+curr).removeClass('selected');
    curr = curr-1;
    $('#img_'+curr).show();
    $('#lnk_'+curr).addClass('selected');
  }
  return curr;
} 

function inext(curr) {
  if(curr < count) {
    $('#img_'+curr).hide();
    $('#lnk_'+curr).removeClass('selected');
    curr = parseInt(curr)+1;
    $('#img_'+curr).show();
    $('#lnk_'+curr).addClass('selected');
  } 
  return curr;
} 
