			var intervalID = undefined;
			 
			function setApplicationSize (id, width, height)
			{
				//alert ( id );
				changeSize(id, width, height);
			}
			
			function changeSize (id, width, height)
			{
				var f = function ()
				{
					var appWidth = getAppWidth(id);
					var appHeight = getAppHeight(id);
					
					var newWidth = appWidth + ((width - appWidth) / 2);
					var newHeight = appHeight + ((height - appHeight) / 2);
					
					setAppWidth(id, newWidth);
					setAppHeight(id, newHeight);
				}
			
				if (intervalID != undefined)
					clearInterval(intervalID);
				
				intervalID = setInterval(f, 50);
			}

			function setAppWidth (id, width)
			{
				if (width != undefined)
					document.getElementById(id).width = width;
			}
			
			function setAppHeight (id, height)
			{
				if (height != undefined)
					document.getElementById(id).height = height;
			}
			
			function getAppWidth (id)
			{
				return parseInt(document.getElementById(id).width);
			}
			
			function getAppHeight (id)
			{
				return parseInt(document.getElementById(id).height);
			}
