var stageWidth = 800;
var stageHeight = 670;
var resizedWidthSmall = false;
var resizedWidthBig = false;
var resizedHeightSmall = false;
var resizedHeightBig = false;

function checkResize(){
	var currWidth = document.getElementById("stage").offsetWidth;
	var currHeight = document.getElementById("stage").offsetHeight;
	var madeChange = false;
	
	if(currWidth <= stageWidth && resizedWidthSmall==false){
		newObjWidth=stageWidth + "px";
		resizedWidthSmall = true;
		resizedWidthBig = false;
		madeChange=true;
	}else if(currWidth > stageWidth && resizedWidthBig==false){
		newObjWidth="100%";
		resizedWidthBig=true;
		resizedWidthSmall=false;
		madeChange=true;
	}
	if(currHeight <= stageHeight && resizedHeightSmall==false){
		newObjHeight=stageHeight + "px";
		resizedHeightSmall=true;
		resizedHeightBig=false;
		madeChange=true;
	}else if(currHeight > stageHeight && resizedHeightBig==false){
		newObjHeight="100%";
		resizedHeightBig=true;
		resizedHeightSmall=false;
		madeChange=true;
	}
	if(madeChange==true){
		setDimensions("leadscoring", newObjWidth, newObjHeight);
	}
	madeChange=false;
}

function setDimensions(id, newWidth, newHeight){
	if(!document.getElementById(id)) return;
	var theObject = document.getElementById(id);
	theObject.style.width = newWidth;
	theObject.style.height = newHeight;
}