// JavaScript Document

function closeVideo() {
    //if(global.vi)
    alert('Closer');
    global.vi.parentNode.removeChild(global.vi);
    global.fc.style.visibility = 'visible';
}

function showVideo(path) {
    var d = document.createElement('div');
    d.setAttribute('id', 'flashVideo');
    document.body.appendChild(d);
    var fv = new SWFObject('./vid.swf', 'vidspi', '60O', '450', '8', '#000000');
    fv.write('flashVideo');
    global.vi = document.getElementById('flashVideo');
    global.fc.style.visibility = 'hidden';
}

/*
function alpha(opacity, object) {
    // var object = document.getElementById(id).style;
    object.opacity = (opacity / 100);
    object.MozOpacity = (opacity / 100);
    object.KhtmlOpacity = (opacity / 100);
    object.filter = 'alpha(opacity=' + opacity + ')';
}
*/

function main() {
    var so = new SWFObject('./loader.swf', 'spiesser', '800', '500', '8', '#000000');
    so.write('flashContent');
    // global.spiesser = so;
    global.fc = document.getElementById('flashContent');
}
var global = {
    spiesser : null,
    fc : null,
    vi : null
};
window.onload = main;

