function changePage(pageName, obj, aSavedPage, iView) {
  document.getElementById('page_index').value = aSavedPage;
 // alert(document.all('frm').src);
  document.getElementById('page_name').value = pageName;  
  document.getElementById('frm').src = pageName;
  clearTDs() 
  obj.parentElement.childNodes.item(1).bgColor = "#330066";
  obj.bgColor = "#330066"; 
}

function clearTDs() {
  for(i=0; i<28; i++) {
    document.getElementById('tab').childNodes.item(0).childNodes.item(i).childNodes.item(2).bgColor = "#3B76B4";
    document.getElementById('tab').childNodes.item(0).childNodes.item(i).childNodes.item(1).bgColor = "#0099CC";    
  }
}

function ChangeLanguage(bDeutsch) {
  str = document.location.href;
  if (bDeutsch) {
    index = str.indexOf('czech');
    if (index != -1) {
      zacatek = str.substring(0, index-1);
      konec = str.substring(index + 6, str.length);
      loc = zacatek + '/deutsch/' + konec;
      document.location.href = loc;      
    }
  }  
  else {
    index = str.indexOf('deutsch');
    if (index != -1) {
      zacatek = str.substring(0, index-1);
      konec = str.substring(index + 8, str.length);
      loc = zacatek + '/czech/' + konec;
      document.location.href = loc;      
    }  
  }
}