var mod = '';
var lang= 'en';
var prefix = '';

function pausecomp(millis) {
   var date = new Date();
   var curDate = null;
   
   do { curDate = new Date(); }
   while(curDate-date < millis);
   return;
} 

function getObjects(id) {
  if (document.all) {
     return document.all[id];
  }
  else {
     return document.getElementById(id);
  }
}

function activeImage(obj, menuid, tipe) {
   oth = getObjects('b'+menuid);
   if (tipe == 1) {
      obj.src='images/' + menuid + '2' + prefix + '.jpg';
      if (oth != null) {
         oth.src= 'images/b'+menuid+'2.jpg';
      }
   } else {
      if ((oth != null) && (mod != menuid)) { 
         obj.src='images/in' + menuid + '2.jpg';
         oth.style.visibility='visible';
      }
   }
}


function deactiveImage(obj, menuid, tipe) {
   
   oth = getObjects('b'+menuid);
   if (tipe == 1) {
      obj.src='images/' + menuid + prefix + '.jpg';
      if (oth != null) {
         oth.src= 'images/b'+menuid+'.jpg';
      }
   } else {
      // only change if mod != menuid
      if ((oth != null) && (mod != menuid)) {
         obj.src='images/in' + menuid + prefix + '.jpg';
         oth.style.visibility='hidden';
      }
   }
}
