// kooperative für darstellungspolitik 

// hintergrundbild resize
// window.onresize = versch;

// vars
olinit = true;
vc = 0;

function versch(Ereignis) {
//alert("1"+Ereignis);
    ww = $(window).width();
    wh = $(window).height();
    //minimal Werte
    min_ww=960;
    min_wh=675;
    if(ww < min_ww) ww = min_ww;
    if(wh < min_wh) wh = min_wh;
    // erstmal den rahmen setzen
    $('#bgb').css("height", wh+"px");
    $('#bgb').css("width", ww+"px");
    
    // dann Bildgröße machen
    if(ww >= 1.4231*wh){
		// breite
		wh = Math.floor(ww*0.7027);
    } else {
		ww = Math.floor(1.4231*wh);
    }
    wwn = (ww+2)+"px";
    whn = (wh+2)+"px";
    //alert(wh+", "+ww);
    $('#bgb_img').css("width", wwn);
    $('#bgb_img').css("height", whn);
    if($(window).width() < ww && ww > 962 && Ereignis !== false){
    	versch(false);
    }
}
