window.onload = sizeIt;
window.onresize = sizeIt;

function sizeIt() {
        var size = getSize();
        document.getElementById("page").style.width  = (size[0] > 900) ? size[0] + "px" : "900px";
        document.getElementById("page").style.height = (size[1] > 720) ? size[1] + "px" : "720px";
}

function getSize()
{
        var w = 0, h = 0;
        if(typeof(window.innerWidth) == 'number')
        {
        	w = window.innerWidth;
        	h = window.innerHeight;
        }
        else if(document.documentElement && document.documentElement.clientWidth)
        {
        	w = document.documentElement.clientWidth;
        	h = document.documentElement.clientHeight;
        }
        else if(document.body && document.body.clientWidth)
        {
        	w = document.body.clientWidth;
        	h = document.body.clientHeight;
        }
        return [w,h];
}

function print_em(em)
{
	em += "@" + "draftfcb.com";
	document.write("<a href='mailto:" + em + "'>" + em + "</a>");
}

function shake(n)
{
	if (window.moveBy)
	{
		for (i = 10; i > 0; i--)
		{
			for (j = n; j > 0; j--)
			{
				parent.moveBy(0,i);
				parent.moveBy(i,0);
				parent.moveBy(0,-i);
				parent.moveBy(-i,0);
			}
		}
	}
}


