/**
 * Common Functions
 */
var Common = {
	/**
     * returns an object with width and height
     * properties of the current visible area of the page
     * @return object
     */
    getViewportDimensions:function() {
       	var intH = 0, intW = 0;

       	if(self.innerHeight) {
          	intH = window.innerHeight;
          	intW = window.innerWidth;
       	}
       	else {
           	if(document.documentElement && document.documentElement.clientHeight) {
               	intH = document.documentElement.clientHeight;
               	intW = document.documentElement.clientWidth;
           	}
           	else {
               	if(document.body) {
                   	intH = document.body.clientHeight;
                   	intW = document.body.clientWidth;
               	}
           	}
       	}
       	return {
          	height: parseInt(intH, 10),
           	width: parseInt(intW, 10)
       	};

    }, // getViewportDimensions

	log: function(msg) {
    	try { console.log(msg); } catch(e) {}
    }

}; // end Common
