<script type="text/javascript" src="js/widgets/widgets.js"></script>
<td id='widgets_tabs'>
<%
	String widgets[] = {"Chat", "File Sharing", "Tasks"};
	String state = "active";
	String display = "";
	for (String widget : widgets)
	{
		String widgetName = widget.toLowerCase().replaceAll(" ", "_");
		String image = widgetName + ".png";
		String title = state.equals("active") ? "Minimize " + widget : widget;
		display = "";
		display = state.equals("active") ? "" : "display: none";
		%><div class="<%= state %> widget_tab" title="<%= title %>" id="<%= widgetName + "_tab" %>" widget_title="<%= widget %>" name="<%= widgetName %>" style="<%= display %>"><img src="images/widgets/<%= image %>"/></div><%
		state = "";
	}
%>
</td>
<td width="0px" style="padding-bottom:7px;vertical-align:top">
	<div id='widget' state="open">
	<%
		state = "active";
		for (String widget : widgets)
		{
			widget = widget.toLowerCase().replaceAll(" ", "_");
			String widgetPage = "widgets/" + widget + ".jsp";
			display = state.equals("active") ? "" : "display: none";
			%><div id="<%= widget + "_widget" %>" name="<%= widget %>" class="<%= state %> widget" style="<%= display %>"><jsp:include page="<%= widgetPage %>" /></div><%
			state = "";
		}
	 %>
	</div>
</td>