<%--
 * Copyright by Intland Software
 *
 * All rights reserved.
 *
 * This software is the confidential and proprietary information
 * of Intland Software. ("Confidential Information"). You
 * shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement
 * you entered into with Intland.
 *
 * $Revision$ $Date$
--%>

<%@ taglib uri="jstl-c" prefix="c" %>

<%@page import="com.intland.codebeamer.Config"%>
<%@page import="com.intland.codebeamer.controller.support.UserAgent"%>

<%--
	small fragment sets up an "userAgentClass" request variable which contains either the strings: "IE" "IE6", "IE7", "FF".
	Then this ${userAgent} is added to the <body> tag, so conditional css-es can be easily added.

	For example the following will put a red border around every <div> for IE6, but not for the other browsers:

	.IE6 div {
		border: solid 1px red;
	}

	So this is useful when playing with CSS differences of different browsers.
 --%>
 <%
 	UserAgent userAgent = new UserAgent(request);
    String userAgentClass = "";
    if (userAgent.ie >0) {
    	userAgentClass += " IE";
    }
 	if (6 <=userAgent.ie && userAgent.ie <7) {
 		userAgentClass += " IE6";
 	}
 	if (7 <=userAgent.ie && userAgent.ie <8) {
 		userAgentClass += " IE7";
 	}
 	if (userAgent.gecko >0) {
 		userAgentClass = " FF";
 	}

 	request.setAttribute("userAgentClass", userAgentClass.trim());

 	if (Config.isDevelopmentMode()) {
 %>
<!--
<c:out value="<%=userAgent%>" escapeXml="true"/>
-->
<%  } %>

