// JavaScript Document


function checkScreen() {
	
	hValue = $('#divBox').height();
	wValue = $('#divBox').width();
	
	var uniwin = {
			width: window.innerWidth || document.documentElement.clientWidth
				|| document.body.offsetWidth,
			height: window.innerHeight || document.documentElement.clientHeight
				|| document.body.offsetHeight
		};
		

	$('#divBox').css("top", function() {

		newValue = (uniwin.height - hValue) / 2; 
		if (newValue < 0) newValue = 0;
		strValue = parseInt(newValue) + "px";
		
		return strValue;
	});
	
	$('#bgBox').css("top", strValue);
	
	$('#divBox').css("left", function() {

		newValue = (uniwin.width - wValue) / 2; 
		if (newValue < 0) newValue = 0;
		strValue = parseInt(newValue) + "px";
		
		return strValue;
	});


	
}
