// JavaScript Document


var imgWidth = 1600;
var imgHeight = 1067;

function resizeMe(){

document.getElementById("background").top = "0px";
document.getElementById("background").left = "0px";

document.getElementById("trans").top = "0px";
document.getElementById("trans").left = "0px";

	tmpWidthScale = document.width/imgWidth;
	tmpHeightScale = document.height/imgHeight;
	
	if(tmpWidthScale > tmpHeightScale)
		scaleFactor = tmpWidthScale;
	else
		scaleFactor = tmpHeightScale;
	
	document.getElementById("background").style.width = (imgWidth*scaleFactor) + "px";
	document.getElementById("background").style.height = (imgHeight*scaleFactor) + "px";


	newImgWidth = (imgWidth*scaleFactor);

	//Moving:
//	document.getElementById("apDiv1").innerHTML = document.getElementById("background").style.width + "  " + document.width;
	
	
	if(newImgWidth > document.width){
		newPos = (newImgWidth/2) - (document.width / 2)
		document.getElementById("background").style.left = "-" +  newPos + "px";
	}
	
//	if(newImgHeight > document.height){
//		newPos = (newImgHeight/2) - (document.height / 2)
//		document.getElementById("background").style.top = "-" +  newPos + "px";
//	}



	if(document.height < 600){
		document.getElementById("contentWrapper").style.top = "170px";			
		document.getElementById("contentWrapper").style.marginTop = "0px";		
		//document.getElementById("contentWrapper").style.display = "none";
	}

		document.getElementById("trans").style.width = document.getElementById("background").style.width;
		document.getElementById("trans").style.height = document.getElementById("background").style.height;

}
