function showMain(g, b, i) {
    var flashvars = {};
    var params = {};
    var attributes = {};

    flashvars.gen = g;
    flashvars.bon = b;
    flashvars.id = i;
    params.base = "/"
    params.play = "true";
    params.loop = "true";
    params.menu = "false";
    params.quality = "best";
    params.scale = "noscale";
    params.salign = "tl";
    params.bgcolor = "#FFFFFF";
    params.devicefont = "true";
    params.allowfullscreen = "true";
    params.allowscriptaccess = "always";

    attributes.id = "flashcontent";
    swfobject.embedSWF("main.swf", "flashcontent", "770", "960", "10.0.0",
	    false, flashvars, params, attributes);

    onResize();
    swffit.addResizeEvent(onResize);
}

function onResize() {
    var screenWidth = 0;
    var screenHeight = 0;

    if (window.innerHeight && window.innerWidth) {
	screenHeight = window.innerHeight;
	screenWidth = window.innerWidth;
    } else if (document.documentElement
	    && document.documentElement.clientHeight
	    && document.documentElement.clientWidth) {

	screenHeight = document.documentElement.clientHeight;
	screenWidth = document.documentElement.clientWidth;
    } else if (document.body) {
	screenHeight = document.body.clientHeight;
	screenWidth = document.body.clientWidth;
    }

    fitHeight = screenHeight > 770 ? "100%" : 770;
    fitWidth = screenWidth > 960 ? "100%" : 960;

    swffit.fit("flashcontent", fitWidth, fitHeight, "100%", "100%", false,
	    false);

}

