// Redirect current frame to top if required
function MustBeTop() {
  if( top != self ) {
    top.location = self.location;
  } // if
} // MustBeTop

var content_tag = new String("cont");

// Inner frames without navigation frames are redirected to main page
function NeedTopFrame(path) {
  var up = "";
  if (path != null) {
    up = "../";
  } // if
  else {
    path = "";
  } // else

  if (parent == self) {
    var myname = new String(window.location);
    var lastslash;
    // if no slash is included 0 is returned which leads to a correct result
    lastslash = myname.lastIndexOf("/") + 1;
    var basename = myname.substring(lastslash);
    // window.alert(up + "index.html?" + content_tag + "=" + path + basename);
    self.location = up + "index.html?" + content_tag + "=" + path + basename;
  } // if
} // NeedTopFrame


function SetRedirFrame() {
  if(window.location.search != "")
  {
    var checktag = new String(content_tag + "=");
    var param = window.location.search;
    // remove leading question mark
    if (param.charAt(0) == "?") {
      param = param.substring(1);
    } // if

    if (param.substr(0, checktag.length) == checktag) {
      param = param.substring(checktag.length);
    } // if

    /*
    myname = new String(content.location);
    lastslash = myname.lastIndexOf("/") + 1;
    basename = myname.substring(lastslash);
    window.alert('Content: ' + basename);
    */

    window.content.location = param;
  } // if
} // SetRedirFrame


function GetParameter(parname) {
  if(window.location.search != "")
  {
    var checktag = new String(parname + "=");
    var param = window.location.search;
    // remove leading question mark
    if (param.charAt(0) == "?") {
      param = param.substring(1);
    } // if

    if (param.substr(0, checktag.length) == checktag) {
      param = param.substring(checktag.length);
    } // if

    // window.alert("parameter '" + parname + "' = '" + param + "'");

    return param;
  } // if
} // GetParameter

function Computer() {
  document.write("p&#114;o&#x66;ile&#x40;pet&#101;r&#45;k&#114;at&#122;er&#x02E;&#x064;&#101;");
} // Computer

function Mathematics() {
  document.write("&#x77;&#119;w&#46;p&#x65;ter&#x2D;&#107;r&#x061;tze&#0114;&#046;&#0100;&#x65;");
} // Mathematics

function Science() {
  document.write("&#84;e&#x6C;&#46;&#32;&#x02B;&#52;9&#x020;&#x038;&#x39;&#32;546&#x030;640");
} // Science

function Physics() {
  document.write("&#70;a&#x78;&#x3A;&#32;&#x02B;49&#x020;&#x031;8&#x30;&#x33;&#32;551&#56;45&#x032;4&#x030;&#x20;");
} // Science

function DisplayDate() {
  var current_date = new Date();
  var disp_date;
  var buffer;

  disp_date = current_date.getFullYear().toString() + "-";
  buffer = current_date.getMonth() + 1;
  if (buffer < 10) {
    disp_date = disp_date + "0";
  } // if
  disp_date = disp_date + buffer.toString() + "-";
  buffer = current_date.getDate();
  if (buffer < 10) {
    disp_date = disp_date + "0";
  } // if
  disp_date = disp_date + buffer.toString() + "&nbsp;&nbsp;&nbsp;";
  document.write(disp_date);
} // DisplayDate

