function $( name ) {
    return document.getElementById(name);
}

var box = 1;
function changeObj( num ) {
	$('box'+box).style.display = 'none';
	$('box'+num).style.display = 'block';

    box = num;
}

function innerDimension() {
	var x,y;

	// all except Explorer
	if (self.innerHeight)
	{
		x = self.innerWidth;
		y = self.innerHeight;

	// Explorer 6 Strict Mode
	} else if (document.documentElement && document.documentElement.clientHeight) {
		x = document.documentElement.clientWidth;
		y = document.documentElement.clientHeight;

	// other Explorers
	} else if (document.body) {
		x = document.body.clientWidth;
		y = document.body.clientHeight;
	}

	return {width: x, height: y};
}

function offsetDimension() {
	var x,y;

	// all except Explorer
	if (self.pageYOffset)
	{
		x = self.pageXOffset;
		y = self.pageYOffset;

	// Explorer 6 Strict
	} else if (document.documentElement && document.documentElement.scrollTop) {
		x = document.documentElement.scrollLeft;
		y = document.documentElement.scrollTop;

	// all other Explorers
	} else if (document.body) {
		x = document.body.scrollLeft;
		y = document.body.scrollTop;
	}

	return {x: x, y: y}
}
