﻿var container = null;

function flashCloseStart(w, h) {
    //clearDisplay();

    if (container != null) { container.style.height = h + 'px'; }    
}
function flashCloseUpdate(w, h) {
    if (container != null) { container.style.height = h + 'px'; }    
}
function flashCloseEnd(w, h) {
    if (container != null) {
        container.style.height = h + 'px';

        $(container).hide();
        $(container).show();
     }    
}

function flashOpenStart(w, h) {
    //clearDisplay();

    if (container != null) { container.style.height = h + 'px'; }
}
function flashOpenUpdate(w, h) {
    if (container != null) {
        container.style.height = h + 'px'; $(container).hide();
        $(container).show();
    }
}
function flashOpenEnd(w, h) {
    if (container != null) {
        container.style.height = h + 'px';

        $(container).hide();
        $(container).show();
      }
}

function clearDisplay() {
    var main_div = document.getElementById("flash_output");
    if (main_div != null && main_div.hasChildNodes()) {
        while (main_div.childNodes.length >= 1) {
            main_div.removeChild(main_div.firstChild);
        }
    }
}