 var timeID=1;
function call(){
	if(timeID==1){
	timeID=setTimeout(repos,1000);
	timeID++;
	}
}

function repos(){
	var swidth = document.body.offsetWidth;
	var sheight =document.body.offsetHeight;
	if(swidth<=1000){
		document.getElementById("box").style.width="1000px";
	}else if(swidth>1000){
		document.getElementById("box").style.width="100%";
	}

	if(sheight<=580){
		document.getElementById("box").style.height="580px";
	}else if(sheight>580){
		document.getElementById("box").style.height="100%";
	}

}

window.onresize = call;
