function popImage(entry_id, list_index, size)
{
	if (size == 'medium')
	{
		width = 700;
		height = 470;
	}
	else if (size == 'large')
	{
		width = 750;
		height = 650;
	}
	var w = window.open("/photocontest/popImage.cfm?entry_id=" + entry_id + "&list_index=" + list_index +  "&size=" + size, "imagewin", "width=" + width + ",height=" + height + ",menubar=no");
	w.focus();
}

function rollover(imageId, newfilename)
{
	var i = document.getElementById(imageId);
	i.src = newfilename;
}

function doneNowVote(entry_id)
{
	window.opener.location = 'Vote.cfm?entry_id=' + entry_id;
	self.close();
}

function vote(entry_id)
{
	window.location = 'Vote.cfm?entry_id=' + entry_id;
}

var size = "";

function detectSize()
{
	var width = screen.width;
	var height = screen.height;
//	alert("width = " + width + "/ height = " + height);

	if (width > 800)
	{
		size = "large";
	}
	else
	{
		size = "medium";
	}
}

detectSize();
