﻿"use strict";

Poseidon.Logo = {

    // Pointer to the divLogo in the main page.
    div: null,

    image: null,

    width: null,

    height: null,

    scaleLineControl: null,

    initialize: function (div, image, width, height) {
        this.div = div;
        this.image = image;
        this.width = width;
        this.height = height;
    },

    show: function () {
        if (this.div) {
            if (this.scaleLineControl) {
                this.scaleLineControl.style.left += this.width;
            }
            this.div.innerHTML = '<img src="' + this.image + '" alt="" />';
            this.div.style.display = 'inline';
        }
    },

    hide: function () {
        if (this.div) {
            if (this.scaleLineControl) {
                this.scaleLineControl.style.left -= this.width;
            }
            this.div.style.display = 'none';
        }
    }
};
