
window.onload = function() {
  rez();
}


window.onresize = function() {
  rez();
}

$(document).ready(function(){
   rez();
   $("#content").corner("10px");
 });

 
function rez() {
/*
  if (w = window.innerWidth) {
    if (x = document.getElementById("sitef1bg")) {
      var bgsize = (w-565)/2;
      if (bgsize > 0) x.style.width=bgsize+"px"; else x.style.width="0px";
    }
  }
*/
  //$("#sitef1bg").height("100%");
  if ($("#sitef1bg").css('display')!='none') { //resize bei aelteren Browsern nicht ausfuehren - Weiche s. CSS
    var sheight = ($("#site").height());
    $("#sitef1bg").height(sheight);
  }
}

function showflash(id,movie,style,bgcolor) {
  var flashvars="";
  var txt = '<object type="application/x-shockwave-flash" style="'+style+'" data="'+movie+'"><param name="movie" value="'+movie+'" /><param name="bgcolor" value="'+bgcolor+'" />';
  if (flashvars!='') txt+='<param name="FlashVars" value="'+flashvars+'" />';
  txt+='</object>';
  //alert(txt);
  if (document.getElementById(id)) document.getElementById(id).innerHTML = txt; else alert(id+' nicht gefunden!');
}

function pload(site) {
  //$('#content').empty();
  $("#content dd").empty();
  $("#content").fadeOut("slow", function() {
    $("#content").html('<div style="height: 300px;">Loading...</div>');
    $("#content").load('index.php?page='+site, {}, function() { $("#content").corner("10px"); $("#content").fadeIn("slow"); rez(); });
  });
}
