/*
    Document   : lbgm.general
    Created on : Nov 24, 2009, 11:33:13 AM
    Author     : Andreas Hadjigeorgiou
    Description:
        Purpose of the stylesheet follows.
*/

lbgm.helper = {
    round: function(num, dec) {
        var result = Math.round(num*Math.pow(10,dec))/Math.pow(10,dec);
	return result;
    },

    getBrowserWidth: function() {
        if (window.innerWidth) { //if browser supports window.innerWidth
            //document.write(window.innerWidth+" by "+window.innerHeight)
            return window.innerWidth;
        }
        else if (document.all) { //else if browser supports document.all (IE
           // 4+)
           //document.write(document.body.clientWidth+" by "+document.body.clientHeight)
           return document.body.clientWidth;
        }
        return 0;
    },

    getBrowserHeight: function() {
        if (window.innerWidth) { //if browser supports window.innerWidth
            //document.write(window.innerWidth+" by "+window.innerHeight)
            return window.innerHeight;
        }
        else if (document.all) { //else if browser supports document.all (IE
           // 4+)
           //document.write(document.body.clientWidth+" by "+document.body.clientHeight)
           return document.body.clientHeight;
        }
        return 0;
    }
};

