function getURLParameters()
{
	var paramIndex = window.location.href.indexOf('?');
	if (paramIndex == -1) {
		return '';
	}
	else {
		return window.location.href.substring(paramIndex+1);
	}
}

function getObjectWidth(minWidth, maxWidth, margin)
{
	var x = 0;
	if (self.innerHeight)
	{
		x = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	{
		x = document.documentElement.clientWidth;
	}
	else if (document.body)
	{
		x = document.body.clientWidth;
	}
	x -= margin;
	if (x < minWidth)
	{
		x = minWidth;
	}
	if (x > maxWidth)
	{
		x = maxWidth;
	}
	return x;
}
 
function getObjectHeight(minHeight, maxHeight, margin)
{
	var y = 0;
	if (self.innerHeight)
	{
		y = self.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	{
		y = document.documentElement.clientHeight;
	}
	else if (document.body)
	{
		y = document.body.clientHeight;
	}
	y -= margin;
	if (y < minHeight)
	{
		y = minHeight;
	}
	if (y > maxHeight)
	{
		y = maxHeight;
	}
	return y;
}

function getAvantGardeWidthForHeight(height)
{
	var imgRatio = 915 / 610;
	var imgHeight = height - 150;
	var imgWidth = imgHeight * imgRatio;
	return (imgWidth + 225);
}

function openFullWindow(url, name)
{
	params  = 'width='+screen.width;
	params += ', height='+screen.height;
	params += ', top=0, left=0'
	params += ', resizable=yes';
	params += ', menubar=no';
	params += ', toolbar=yes';
	params += ', location=no';
	params += ', status=no';
	params += ', fullscreen=no';
	
	newwin=window.open(url,name, params);
	if (window.focus) {newwin.focus()}
}