// Standardfenster erzeugen

function Show(the_url)
{
	if (the_url!="")
    new_win = window.open(the_url,'','width=660,height=480,menubar=0,toolbar=0,scrollbars=1');
}

function Hint(the_url)
{
	if (the_url!="")
    new_win = window.open(the_url,'help','width=300,height=200,menubar=0,toolbar=0,scrollbars=1');
		new_win.focus();
}


function Login(the_url)
{
	if (the_url!="")
    new_win = window.open(the_url,'','width=500,height=300,menubar=0,toolbar=0,scrollbars=0,resizable=0');
}


function Show_Full(the_url)
{
	if (the_url!="")
    new_win = window.open(the_url);
}

function GrayBackground () {
  $("#page").append('<div id="graybg" style="position:absolute; top:0; left:0; background: #000000; opacity: 0.7; filter: alpha(opacity = 70);"></div>'); 
  $("#graybg").css("width","100%").css("height",$(document).height());
}
function UnGrayBackground () {
  $("#graybg").remove();
}

function CenterBox (id) {
  w = $(id).width();
  h = $(id).height();
  $(id).css("left",$(window).width()/2-w/2).css("top",$(window).height()/2-h/2);
}

function DisplayLogin () {
  GrayBackground();
  $("#loginlink").css("display","none");
  CenterBox("#theloginform");
  $("#theloginform").css("display","block");
  $("#closeimg").css('right',-7).css('top',-7);
  $("#loginname").focus(); 
}

function CloseLogin () {
  UnGrayBackground();
  $("#theloginform").css("display","none");
  $("#loginlink").css("display","inline");
}


  var merkeid = "";
  function ZeigeDetails (pre,id) {
    if (merkeid!="")
      $("#"+pre+merkeid).css("display","none");
    if (merkeid!=id) {
      merkeid = id;
      switch (pre) {
        case "tl":
          $("#"+pre+id).html("Lade Daten ...");
          $.post("ajax/tl.ajax.php", {"id":id},
            function(data){
              $("#"+pre+id).html(data);
          }, "text");
          break;
      }
      $("#"+pre+id).css("display","block");
    } else
      merkeid = "";
  }



  var letzteid = "";
  function ToggleHide (id) {
    if (letzteid!="")
      $("#"+letzteid).css("display","none");
    if (letzteid!=id) {
      letzteid = id;
      $("#"+id).css("display","block");
    } else
      letzteid = "";
  }



  var letzteid2 = "";
  var imgmore = "/image/more1.gif";
  var imgless = "/image/less1.gif";
  function ToggleHideImg (id) {
    if (letzteid2!="") {
      $("#"+letzteid2).css("display","none");
      $("#img_"+letzteid2).attr("src",imgmore);
    }
    if (letzteid2!=id) {
      letzteid2 = id;
      $("#"+id).css("display","block");
      $("#img_"+id).attr("src",imgless);
    } else
      letzteid2 = "";
  }

