function delegate(instance, method) {
	return function( ) {
        return method.apply(instance, arguments);
    }
}

function GetWindowDimensions( ) {
	var windowWidth;
	var windowHeight;

	if(window.addEventListener) {
		windowWidth = window.innerWidth;
		windowHeight = window.innerHeight;
	}
	else {
		windowWidth = document.documentElement.clientWidth || document.body.clientWidth;
		windowHeight = document.documentElement.clientHeight || document.body.clientHeight;
	}
	
	return {width: windowWidth, height: windowHeight};
}