﻿// JScript File

var Page = {

    moreVisible: null,
    
    showMore: function(id) {
   
        if (this.moreVisible) {
            this.hideMore(this.moreVisible);
        }

        var layout = Ext.get("Layout");
        var clipper = Ext.get("clip" + id);
        var teaser = Ext.get(id + "Teaser");
        var more   = Ext.get(id + "More");
        
//        document.getElementById("showmore").style.display = "none";        

        Ext.get("showmore" + id).fadeOut();
        Ext.get("clip" + id).scale(undefined, Ext.get("more" + id).getHeight(), {
            duration: 2,
            callback: function() {
            }
        });        
        
/*
        document.getElementById("more" + id).style.display = "block";    // for Safari
        Ext.get("more" + id).show();
        Ext.get("contacts" + id).hide();
        Ext.get("more" + id).slideIn("t", {
            callback: function() {
                Ext.get("contacts" + id).fadeIn();
            }
        });
*/        
        this.moreVisible = id;
    },

    hideMore: function(id) {

        Ext.get("clip" + id).scale(undefined, 0, {
            duration: 2,
            callback: function() {
                Ext.get("showmore" + id).fadeIn();
            }
        });        

/*
//        document.getElementById("showmore").style.display = "none";        
        Ext.get("showmore" + id).fadeIn();

        //document.getElementById("more" + id).style.display = "block";    // for Safari
        Ext.get("more" + id).hide();
        Ext.get("more" + id).setVisibilityMode(Ext.Element.DISPLAY);
        Ext.get("more" + id).slideOut();
*/        
        moreVisible = null;
    }

};