﻿
var DivResizer = Class.create();
DivResizer.prototype = {
initialize: function(options) {
        this.container = null;
        this.secretStorage = $(options.secretStorage);
        this.panel = $(options.panel);
        this.moreButton = $(options.moreButton);
        this.lessButton = $(options.lessButton);
        this.moreButton.onclick = this.viewMore.bindAsEventListener(this);
        this.lessButton.onclick = this.viewLess.bindAsEventListener(this);
    },
    viewMore: function() {
    this.lessButton.style.display = "";
    this.moreButton.style.display = "none";
        this.swap();
    },
    viewLess: function() {
        this.moreButton.style.display = "";
        this.lessButton.style.display = "none";
        this.swap();
    },
    swap: function() {
        var temp = this.secretStorage.value;
        this.secretStorage.value = this.panel.innerHTML;
        this.panel.innerHTML = temp;
    }
};


