var embedflash = function(src, w, h) {
//    src += "?style="+style;
//    var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'
//    + 'width="'+w+'" height="'+h+'"'
//    + 'data="'+src+'"'
//    + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">'
//    + '<param name="movie" value="'+src+'" />'
//    + '<param name="loop" value="false"/>'
//    + '<param name="menu" value="false" />'
//    + '<param name="quality" value="high" />'
//    + '<param name="wmode" value="transparent" />'
//    + '<embed src="'+src+'" quality="high" wmode="transparent" width="'+w+'" height="'+h+'" name="obj" align="" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>'
//    + '<\/object>';
//    document.write(oeTags);

    document.write('<div id="flashanim"></div>');
    var so = new SWFObject(src + '?lv2=1', "flanim", w, h, "8");
    if (style=='farben') style='ausstellung';
    so.addParam('wmode', 'transparent');
    so.addVariable("style", style);
    so.useExpressInstall('expressinstall.swf');
    so.write("flashanim");
};

var apply = function(o, c, defaults){
    if(defaults){
        attributeApply(o, defaults);
    }
    if(o && c && typeof c == 'object'){
        for(var p in c){
            o[p] = c[p];
        }
    }
    return o;
};

var owin = function(url, config) {
    var win;
    var winconfig = {};
    var stdconfig = {
        name: 'popupwin',
        width: 800,
        height: 600,
        scrollbars: 'yes',
        resizable: 'yes',
        left: 0,
        top: 0,
        toolbar: 'no',
        menubar: 'no'
    }
    winconfig = apply(winconfig, config||{}, stdconfig);
    stop();
    win = window.open(url, name,'width='+w+',height='+h+',scrollbars=1,resizable=1');
    win.focus();
    return(win);
}
var colors = [];
var style;
var includeStyles = function() {
    var f = document.location.href.split('/');
    style = f[f.length-1].split('.')[0];
    document.write('<link href="images/'+style+'.css" type="text/css" rel="stylesheet" media="screen">');
}

var introfinished = function() {
    document.location.href='philosophie.html';
}

var shownavi = function() {
    for (var z=1; z<=5; z++) {
        var el = Ext.get('tm'+z);
        el.fadeIn();
    }
}

Ext.onReady(function() {
    var logo = Ext.DomHelper.append(Ext.get('head'), {tag:'div', style:'position:absolute; height:80px; width:260px; border:1px;'}, true);
    logo.alignTo('head', 'tr', [-260,16]);
    logo.dom.innerHTML = '<a style="border:none;" href="index.html"><img src="images/spacer.gif" width="250" height="80" border="0"></a>';
});
