function formHtmlUrl() {
  par='&'+window.location.search.substring(1)+'&';
  codeArr=par.match(/&code=([^&]*)/);
  code=codeArr[1];
  newpar=par.replace(/&code=[^&]*/,'');
  newpar=newpar.substr(1,newpar.length - 2);
  lnk=code+'.html';
  if(newpar!='') lnk=lnk+'?'+newpar;
  return lnk;
}
function loadInFrame(frame) {
  loadframe=false;
  if (window.location.href.substr(0,21)=='http://airticket24.de') {
    if(parent.frames.length!=1) loadframe=true;
    else if (parent.frames[0].name!=frame) loadframe=true;
  }
  if (loadframe) {
    if (location.pathname=='/main.php') newpath=formHtmlUrl();
    else newpath=location.pathname;
    if (newpath[0]=='/') newpath=newpath.substr(1,255);
    parent.location.href='/?load=' + newpath;
  }
}
var docEl = (
  typeof document.compatMode != "undefined" &&
  document.compatMode        != "BackCompat"
  )? "documentElement" : "body";