/* Javascript Document
 *
 * Created by fire.crow@firecrow.com 2009
 */

(function(){
	
    if(!window.com) window.com = {}; 
    if(!window.com.firecrow) window.com.firecrow = {};
    var path = window.com.firecrow; 
    
    var DebugBox = function()
    {
        this.node = this.makeNode();
        document.body.appendChild(this.node);
        //this.node.innerHTML = 'hi there dude';
    }

    DebugBox.prototype = {
        makeNode: function()
        {
            var node = document.createElement('div');
            this.setStyle(node);
            return node;
        },
        nodeStyle:{
            width: '600px',
            display: 'block',
            borderWidth: '1px',
            borderColor: 'rgb(200,0,0)',
            borderStyle: 'solid', 
            height: '300px', 
            overflowY: 'scroll',
            padding: '10px',
            backgroundColor: 'rgb(255,255,255)',
            position: 'absolute',            
            top: '20px',
            left: '20px'
        }, 
        setStyle: function(node) 
        {
            if(node == undefined)
                node = this.node;
                
            for(prop in this.nodeStyle)
                node.style[prop] = this.nodeStyle[prop];
        },
        log: function(message)
        {
            this.node.innerHTML = '<div>' + message  + '</div>' + this.node.innerHTML;
        }
    }
    path.DebugBox = DebugBox;

})();
