function minimize()
{
	// document.getElementById("main").className = 'invisible';
	document.getElementById("facebook").className = 'visible';
	document.getElementById("small").className = 'visible';
}

function maximize()
{
	 //document.getElementById("main").className = 'visible';
	 document.getElementById("small").className = 'invisible';
	 //document.getElementById("wiki").className = 'invisible';
	 document.getElementById("facebook").className = 'invisible';
}

function openWiki()
{
	 //document.getElementById("wiki").className = 'visible';
	 //document.getElementById("facebook").className = 'invisible';
	 //minimize();
}

function openFacebook()
{

	 document.getElementById("facebook").className = 'visible';
	 document.getElementById("small").className = 'visible';
	 //document.getElementById("wiki").className = 'invisible';
}

function showMainRoom()
{
	thisMovie("mainSWF").showCommand("menu1Wohnzimmer");
	maximize();
}

function showECard()
{
	thisMovie("mainSWF").showCommand("ECards");
	maximize();
}

function showDownloads()
{
	thisMovie("mainSWF").showCommand("menu2Download");
	maximize();
}

function showImpressum()
{
	thisMovie("mainSWF").showImpressum();
	maximize();	
}

function showData()
{
	thisMovie("mainSWF").showData();
	maximize();	
}

function showNewsletter()
{
	thisMovie("mainSWF").showNewsletter();
	maximize();	
}

function resizeFrames()
{
	

	// set iFrame visibility
	document.getElementById('facebook').className = 'visible';


	var container= document.getElementById('facebook');
	container.width = window.size().width;
	container.height = window.size().height;
	var container= document.getElementById('wiki');
	container.width = window.size().width;
	container.height = window.size().height;
	
	maximize();	
}



function thisMovie(movieName) {
    if (navigator.appName.indexOf("Microsoft") != -1) {
        return window[movieName];
    } else {
        return document[movieName];
    }
}


window.size = function()
{
    var w = 0;
    var h = 0;

    //IE
    if(!window.innerWidth)
    {
        //strict mode
        if(!(document.documentElement.clientWidth == 0))
        {
            w = document.documentElement.clientWidth;
            h = document.documentElement.clientHeight;
        }
        //quirks mode
        else
        {
            w = document.body.clientWidth;
            h = document.body.clientHeight;
        }
    }
    //w3c
    else
    {
        w = window.innerWidth;
        h = window.innerHeight;
    }
    return {width:w,height:h};
}