function loadcontent(wen) {
    // Nachladescript gesteuert aus dem Flashdock
    //alert("what: " + wen);

    if (wen=="bbpress/") {
        $("#content").load(wen + ""); 
    } else {
        $("#content").load(wen + "&ajax=ajax");
    }
    
}


function loadcontent2(wen) {
    // Nachladescript gesteuert aus dem Flashdock

//alert("what2: " + wen);
    $("#content").load(wen);

    
}


function dopicture(topic) {
  //  alert(topic);
thepop=window.open(topic,"katypicture","width=350,height=600,dependent=yes, scrollbars=no, menubar=no, resizeable=no,left=100;top=100;");

}


function dopopup(topic) {
  //  alert(topic);
thepop=window.open(topic,"postingantwort","width=300,height=500,dependent=yes, scrollbars=no, menubar=no, resizeable=no,left=100;top=100;");

}
function dopop(topic) {
  //  alert(topic);
thepop=window.open("","postingantwort","width=1,height=1,dependent=yes, scrollbars=no, menubar=no, resizeable=no,left=5;top=5;");
    var delay = 3000;
    var delay2 = 1000;
    
  	string="thepop.close();";
  	string2="loadcontent('" + topic + "');";
	setTimeout(string,delay);
	setTimeout(string2,delay2);
    thepop.blur();
    thepop.onload.close();
   }
    
   // $("body").css({background: "url('_grfx/backg_"+wen+".jpg')"});    
   // bildreset()
function loadcheckthis(wen) {
    $("#checkthis").load(wen,{ name: 'John'},$("#checkthis").fadeIn(1000));
}
function init(what){
 //   theresize();
//     alert("onload: " + what);
    //loadcontent(what);
}

var act_topic = "";

function initform(topic) {
//	document.getElementById("debug").innerHTML = "Test"+topic;
	
	act_topic = topic;

	$('#postform').ajaxForm(function() {
		loadcontent(act_topic);
	});
}
