var RESIZE={
	resizeOnScreen:function(root){
		typeof root=="object"? this._root=root: root = document.getElementById(root);
		refObjHeight = document.getElementsByTagName("body")[0].offsetHeight;
		refObjWidth = document.getElementsByTagName("body")[0].offsetWidth;
		var getScreenHeight = function(){
			document.documentElement.clientWidth ? wWidth = document.documentElement.clientWidth : wWidth = window.innerWidth;
			document.documentElement.clientHeight ? wHeight = document.documentElement.clientHeight : wHeight = window.innerHeight;
		}
		var anpassen = function(e){
			
			getScreenHeight();
			document.getElementById("lightbox").style.height = wHeight+'px';
			wWidth = Math.max(refObjWidth, wWidth);
			wHeight = Math.max(refObjHeight, wHeight);
			var screen_w_h = wWidth/wHeight;
			var pic_w = 1024;
			var pic_h = 676;
			var pic_w_h = pic_w/pic_h;
			var scale_w_h;
			if(pic_w_h>=1){
				if (pic_w_h == screen_w_h) {
					scale_w_h = Stage.width/pic_w;
				} else if (pic_w_h<screen_w_h) {
					scale_w_h = wWidth/pic_w;
				} else if (pic_w_h>screen_w_h) {
					scale_w_h = wHeight/pic_h;
				}
			}else{
				if (pic_w_h == screen_w_h) {
					scale_w_h = wWidth/pic_w;
				} else if (pic_w_h>screen_w_h) {
					scale_w_h = wWidth/pic_w;
				} else if (pic_w_h<screen_w_h) {
					scale_w_h = wHeight/pic_h;
				}
			}
			if(root.hasChildNodes()){
				root.style.overflow = "hidden";
				root.firstChild.style.width = "auto";
				root.firstChild.style.width = Math.round(scale_w_h*pic_w)+"px";
				root.firstChild.style.height = Math.round(scale_w_h*pic_h)+"px";
				root.style.width = wWidth+"px";
				root.style.height = wHeight+"px";
			}
		}
		return{
			refreshIt:function(e){
				anpassen(e);
			}	
		}
	}
}