
function ResizeWindows(width, height) {
	
	var getClientHeight = function() {
		
		var nClientHeight = 0;
		
		if ('number' === typeof (window.innerHeight)) {
			
			//Non-IE
			nClientHeight = window.innerHeight;
			
		} else if (document.documentElement && document.documentElement.clientHeight) {
			
			//IE 6+ in 'standards compliant mode'
			nClientHeight = document.documentElement.clientHeight;
			
		} else if (document.body && document.body.clientHeight) {
			
			//IE 4 compatible
			nClientHeight = document.body.clientHeight;
			
		}
		
		return nClientHeight;
	}
	
	var getClientWidth = function() {
		
		var nClientWidth = 0;
		
		if ('number' === typeof (window.innerWidth)) {
			
			//Non-IE
			nClientWidth = window.innerWidth;
			
		} else if (document.documentElement && document.documentElement.clientWidth) {
			
			//IE 6+ in 'standards compliant mode'
			nClientWidth = document.documentElement.clientWidth;
			
		} else if (document.body && document.body.clientWidth) {
			
			//IE 4 compatible
			nClientWidth = document.body.clientWidth;
			
		}
		
		return nClientWidth;
	}
	
	var resize = function() {
		
		try {
			
			if (!getClientHeight() || !getClientWidth()) {
				return;
			} else if (navigator.userAgent.match(/safari/i)) {
				window.resizeTo(width + (window.outerWidth - window.innerWidth), height + (window.outerHeight - window.innerHeight));
			} else {
				window.resizeTo(width, height);
				window.resizeTo(width + (width - getClientWidth()), height + (height - getClientHeight()));
			}
			
		} catch (e) {}
		
	}
	
	try {
		if (jQuery) jQuery().ready(resize);
		else window.onload = resize;
	} catch (e) {
		window.onload = resize;
	}
}
