
var cardwidth=896;
var cardheight=512;

function centercard()
{
	var w;
	var h;
	var card = document.getElementById("postcard");

	if (self.innerHeight) // all except Explorer
	{
		w = self.innerWidth;
		h = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	// Explorer 6 Strict Mode
	{
		w = document.documentElement.clientWidth;
		h = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
		w = document.body.clientWidth;
		h = document.body.clientHeight;
	}
	
	card.style.left = (w - cardwidth) / 2;
	card.style.top = (h - cardheight) / 2;
}

window.onresize=centercard;
