function pictureWindow(file_path,title,width,height,caption) {
	var newWindow = window.open("", "newWin", "toolbar=no,status=no,location=no,scrollbars=no,directories=no,menubar=no,resizable=no,width=" + width + ",height=" + height);
	newWindow.document.write("<html>\n<head>\n<title>" + title + "<\/title>\n<style type=\"text/css\">@import url(css/popup.css);<\/style>\n<\/head>\n<body onBlur=window.close();>\n<div align=\"center\"><img src=\"" + file_path + "\" alt=\"Photo\" \/><br \/>\n");
	if (caption) newWindow.document.write("<p>" + caption + "<\/p>");
	newWindow.document.write("<p><a href=\"javascript:close();\">close window<\/a><\/p>\n<\/div>\n<\/body>\n<\/html>");
	newWindow.document.close();
}


function urlPopup(url) {
	var newWindow = window.open(url, "newWin", "toolbar=yes,status=no,location=no,scrollbars=yes,directories=no,menubar=no,resizable=yes");
}


function divToggle(divId) {
	div = document.getElementById(divId);
	div.style.display = ((div.style.display == "block") ? "none" : "block");
}


function setBuyLink(urlBase, targetId, parameter, value)
{
	var target = document.getElementById(targetId);
	
	if (value != 'undefined' && value != '')
	{
		var compiledLink = urlBase + '&' + parameter + '=' + value;
		target.href = compiledLink;
	}
	else
	{
		target.href = urlBase;
	}
}

function revealGroupTable(targetId)
{
	var target = document.getElementById(targetId);
	target.style.display = ((target.style.display == "block") ? "none" : "block");
}