/*
	VDM.js
*/

function getWindowWidth()
{
	if (window.innerWidth)
		return window.innerWidth;
	else
		return document.body.clientWidth;
	return -1;
}

function getWindowHeight()
{

	if (window.innerHeight)
		return window.innerHeight;
	else
		return document.body.clientHeight;
	return -1;
}

function popup_image(aUrl)
{
	window.open('../scripts/preview.html?name=' + aUrl, 'fullsize', 'width=480,height=480');
}

function centerpopup()
{
	var xpos = (screen.width - getWindowWidth())/2;
	var ypos = (screen.height - getWindowHeight())/2;
	window.moveTo(xpos, ypos);
}

function adjustscroll()
{
	var theDiv = document.getElementById('divContent');
	if (theDiv)
	{
		theDiv.style.height = getWindowHeight() - 82;
	}
}

function initpage()
{
	adjustscroll();
//	document.body.scroll = "no";
	window.onresize = adjustscroll;
}
