if(top.isFS != true)
{
    top.location.href = "../index.php?redirect="+location.href;
}

function popup(datei){
    groesse = "width=300,height=240,resizable=no,status=no"; //,scrollbars
    win=window.open("" + datei + "","",groesse);
    var fenster_b=300;
    var fenster_h=240;
    xx=screen.availWidth;
    yy=screen.availHeight;
    x=(xx-fenster_b)/2;
    y=(yy-fenster_h)/2;
    win.moveTo(x,y);
    win.focus();
}

function popup2(datei,width,height){
    groesse = "width=" + width + ",height=" + height + ",resizable=no,status=no";
    win=window.open("" + datei + "","",groesse);
    win.resizeTo(width,height);
    var fenster_b=width;
    var fenster_h=height;
    xx=screen.availWidth;
    yy=screen.availHeight;
    x=(xx-fenster_b)/2;
    y=(yy-fenster_h)/2;
    win.moveTo(x,y);
    win.focus();
}

function loadNav(){
    if(parent.ptonav && parent.ptonav.activeKey != window.location.pathname){
      parent.ptonav.location.href = "../../elemente/subnav.php?datei=" + window.location.pathname;
    }
}

var streamwindow=null;
var player_base="http://www.webpk.de/player_peito/";
function stream_window(stream,medium,groesse)
{
  var stream_file=player_base+"media_player.php?stream_file="+stream;
  if(medium=='real') stream_file=player_base+"real_player.php?stream_file="+stream;

  var fenster_b=275;
  var fenster_h=212;
  if (groesse==320) { fenster_b=400; fenster_h=305; }

  xx=screen.availWidth;
  yy=screen.availHeight;
  x=(xx-fenster_b)/2;
  y=(yy-fenster_h)/2;

  if (streamwindow != null) {
      if (streamwindow.closed!=true) {
        streamwindow.close();
      }
  }
  streamwindow=window.open("","Player","toolbar=no,Width="+fenster_b+",Height="+fenster_h+",resizable=no,scrollbars=no,status=no,directories=no,menubar=no,location=no,dependent=yes");

  streamwindow.moveTo(x,y);
  streamwindow.location.href = stream_file;
  window.streamwindow.focus();
}

var oldPicture = "";
function changePicture (number,picture,div) {
        oldPicture = picture;
        if(isNS4 && div != ""){
          eval("document." + div + ".document.images['" + number + "'].src= '" + picture + "'");
        }else{
          if(document.images[number].src = picture){}
        }
}

