
// Popup Window (Centred)
function popup(url,winname,w,h,feat)
{
	if (!(isNaN(w) || isNaN(h)))
	{
		var x=parseInt((screen.width-w)/2);
		var y=parseInt((screen.height-h)/2);
		if (x<0)	x=0;
		if (y<0)	y=0;
		
		if (feat!=null && feat!="")
		{
			feat=","+feat;
		}
		else
		{
			feat="";
		}
		feat="left="+x+",top="+y+",width="+w+",height="+h+feat;
	}
	window.open(url,winname,feat);
}


// Shows/Hides an series of ID objects
function showcontent(id,showhide)
{
	var display=(showhide)?"":"none";
	if (document.all)
	{
		if (isNaN(document.all[id].length))
		{
			document.all[id].style.display=display;
		}
		else
		{
			for (var i=0; i<document.all[id].length; i++)
			{
				document.all[id][i].style.display=display;
			}
		}
	}
	else if (document.getElementById)
	{
		var obj=document.getElementsByTagName("tr");
		for (var i=0; i<obj.length; i++)
		{
			if (obj[i].id==id)
			{
				obj[i].style.display=display;
			}
		}

	}
}
