var nw = 0, nh = 0;

if(typeof(window.innerWidth) == 'number') {
	nw = window.innerWidth;
	nh = window.innerHeight;
} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
	nw = document.documentElement.clientWidth;
	nh = document.documentElement.clientHeight;
} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
	nw = document.body.clientWidth;
	nh = document.body.clientHeight;
}

if (window.ph && ph > nh) {
	var ie7offset = ph - nh;

	if (ie7offset > 91) ie7offset = 91;

	document.title = document.title + " - Page " + currentPage + " of " + totalPages;
	document.body.style.backgroundPosition = "-" + ie7offset + "px 0px";

	if (el("tipicon"))			el("tipicon").style.left		= "60px";
	if (el("tipiconm"))			el("tipiconm").style.left		= "94px";
	if (el("interactivity"))	el("interactivity").style.top	= (91 - ie7offset) + "px";
	if (el("tipbox"))			el("tipbox").style.top			= (543 - ie7offset) + "px";
	if (el("tipbox_m"))			el("tipbox_m").style.top		= (543 - ie7offset) + "px";
	if (el("soundtoggle"))		el("soundtoggle").style.top		= (704 - ie7offset) + "px";
	if (el("te"))				el("te").style.top				= (el("te").offsetTop - ie7offset) + "px";
	if (el("correctarea"))		el("correctarea").style.top		= (el("correctarea").offsetTop - ie7offset) + "px";

	if (el("heading")) {
		var obs = el("heading").getElementsByTagName("span");

		for (var i=0; i < obs.length; i++) {
			if (obs[i].className == "h2mtext3" && (91 - ie7offset) <= 32) obs[i].style.display = "none";
			if (obs[i].className == "h2mtext1" && (91 - ie7offset) <= 20) obs[i].style.display = "none";
		}
	}

	for (var i=1; i < 9; i++) {
		if (el("ca"+i)) {
			hsTop[i-1] -= ie7offset;
			el("ca"+i).style.top = hsTop[i-1] + "px";
			if (el("ca"+i+"txt"))el("ca"+i+"txt").style.top	= (hsTop[i-1] + hsHeight[i-1] + 4) + "px";
		}
	}
}
else {
	if (window.pw)
		resizeBy(pw-nw, ph-nh);
	else
		resizeBy(790-nw, 571-nh);
}