﻿function OnMouseOver(element) {
    if (element != undefined)
        element.onOver();
}

function OnMouseOut(element) {
    if (element != undefined)
    element.onOut();
}

function SetupIcon(elementId, flashElementId) {
    var element = $get(elementId);

    if (element == null)
        return;

    var flashElement = $get(flashElementId);

    if (flashElement == null)
        return;

    $addHandler(element, "mouseover", function(event) {
        OnMouseOver(flashElement);
    });
    $addHandler(element, "mouseout", function(event) {
        OnMouseOut(flashElement);
    });
}

function SetupIcons() {
    SetupIcon('Block1', 'Flash1');
    SetupIcon('Block2', 'Flash2');
    SetupIcon('Block3', 'Flash3');
}
