// Skript zum Ein- und Ausfahren des Inline-Fensters
step = 30;
dt = 10;
status=0;
endx = 280;
startx = 0;
started = 0;
content = '';
var works=1;
with(navigator) works!= (appName=='Netscape' && appVersion<5);

function popupControl(){this.closed=1;}

jsPopup=new popupControl;
function openPopup(quelle){
  if (jsPopup.closed) jsPopup = window.open(quelle, "popup", "width=600,height=560,top=10,left=50,scrollbars,resizable"); 
  else popup.location.href=quelle;
  jsPopup.focus();
}

function slideIn(){
  if (works){
    xpos=parseInt(document.getElementById('inlinefenster').style.left);
	if (xpos<endx){
	  document.getElementById('inlinefenster').style.left=xpos+step+'px';
	  to_in=setTimeout('slideIn()', dt);
	} else {
	status=2;
	document.getElementById('inlineframe').src=content;
	}
  }
}

function slideOut(){
  if (works){
    xpos=parseInt(document.getElementById('inlinefenster').style.left);
	if (xpos>startx) {
	  document.getElementById('inlinefenster').style.left=xpos-step+'px';
	  to_out=setTimeout('slideOut()', dt);
	} else {
	if (document.getElementById('inlineframe').src.search(/leer/)==-1) 
	   document.getElementById('inlineframe').src='/inc/inline_fenster/leer.htm';
	status=0;
	}
  }
}

function hideInline(){
  if (works){
    if (status==1) {
	  clearTimeout(to_in);
	}
	status=3;
	slideOut();
  }
}

function showInline(uri){
  if (works){
    if (status==3) {
	  clearTimeout(to_out);
	}
    content = uri;
    self.scrollTo(0,0);
	if (!started){
	   startx=parseInt(document.getElementById('inlinefenster').style.left);
	   started = 1;
	}
	status=1;
    slideIn();
  } else {
    openPopup(uri);
  }
 return false;
}

function checkHidden(){
  hideInline();
}
