<%@page buffer="none" session="false" import="java.util.*, org.opencms.frontend.templateone.*" %><%

// initialize action element to access the API
CmsTemplateStyleSheet cms = new CmsTemplateStyleSheet(pageContext, request, response);

// get the template width
String tabWidth = cms.getTemplateWidth();

// main settings
String mainFontFamily = cms.getConfigValue("main.font.family", "Verdana, Arial, Helvetica, sans-serif;");
String mainSidesBg = cms.getConfigValue("main.sides.bg", "#FFFFFF");

String mainBorder = cms.getConfigValue("main.border", "#000000");
boolean showMainBorder = true;
if (mainSidesBg.equals(mainBorder)) {
	showMainBorder = false;
}

String navFontFamily = cms.getConfigValue("nav.font.family", "Tahoma, Arial, Helvetica, sans-serif");

// head image settings
String headImgBg = cms.getConfigValue("head.img.bg", "#DDDDDD");

// head links
String headLinksBorder = cms.getConfigValue("head.links.border", "#000000");
String headLinksBg = cms.getConfigValue("head.links.bg", "#EEEEEE");

// head navigation
String headNavBg = cms.getConfigValue("head.nav.bg", "#660033");
String headNavFont = cms.getConfigValue("head.nav.font", "#FFFFFF");
String headNavBgHover = cms.getConfigValue("head.nav.bg.hover", "#000000");
String headNavFontHover = cms.getConfigValue("head.nav.font.hover", headNavFont);
String headNavBorder = cms.getConfigValue("head.nav.border", headNavBgHover);

// left navigation
String navLeftBg = cms.getConfigValue("navleft.bg", "#CCCCCC");
String navLeftFont = cms.getConfigValue("navleft.font", "#000000");
String navLeftActiveColor = cms.getOptionalConfigValue("navleft.font.color", navLeftFont);
String navLeftActiveWeight = cms.getFontWeight("navleft.font.bold", "true");

String navLeftImgBgUri = cms.getConfigValue("navleft.img.bg.uri", "");

if (!"".equals(navLeftImgBgUri)) {
	navLeftImgBgUri = cms.link(navLeftImgBgUri );
}

// content area
String contentAccessibleBg = cms.getConfigValue("content.accessible.bg", "#FFFFFF");
String contentBg = cms.getConfigValue("content.bg", "#FFFFFF");
String contentBorder = cms.getConfigValue("content.border", "#CCCCCC");
String contentFont = cms.getConfigValue("content.font", "#000000");
String contentLink = cms.getConfigValue("content.link", "#cc0033");
String contentLinkHover = cms.getConfigValue("content.link.hover", "#cc0033");
String contentLinkActive = cms.getConfigValue("content.link.active", contentLink);
String contentLinkVisited = cms.getConfigValue("content.link.visited", contentLink);

// side infoarea
String sideBg = cms.getConfigValue("side.bg", contentBg);

// page foot
String footLinksBorder = cms.getConfigValue("foot.links.border", "#000000");
String footLinksBg = cms.getConfigValue("foot.links.bg", "#EEEEEE");
String footLinksFont = cms.getConfigValue("foot.links.font", "#000000");
String footLinksFontHover = cms.getConfigValue("foot.links.font.hover", "#cc0033");
String footLinksFontActive = cms.getConfigValue("foot.links.font.active", "#000000");
String footLinksFontVisited = cms.getConfigValue("foot.links.font.visited", "#000000");

// form buttons
String formButtonBorder = cms.getConfigValue("form.button.border", headLinksBorder);
String formButtonBg = cms.getConfigValue("form.button.bg", headLinksBg);
String formButtonFont = cms.getConfigValue("form.button.font", footLinksFont);

// optional additional CSS files
String cssUri = cms.getConfigValue("css.optional.uri", null);
String layoutPageCss = "/system/modules/org.opencms.frontend.layoutpage/resources/style.css";

%>

/* old styles */
.headerwhite { font-size: 0.8em; color: #ffffff; }
.headerinfo  { font-size: 0.8em; text-indent: 7px; text-align: left; }	
.text8justify	{ font-size: 0.8em; text-align: justify; }
.text9justify	{ font-size: 0.9em; text-align: justify; }
.text10justify	{ font-size: 1.0em; text-align: justify; }
.text11justify	{ font-size: 1.1em; text-align: justify; }
.text12justify	{ font-size: 1.2em; text-align: justify; }
.text8left	{ font-size: 0.8em; text-align: left; }
.text9left	{ font-size: 0.9em; text-align: left; }
.text10left	{ font-size: 1.0em; text-align: left; }
.text11left	{ font-size: 1.1em; text-align: left; }
.text12left	{ font-size: 1.2em; text-align: left; }

/* global body settings */
body.main { text-align: center; }
body { background-color: <%= mainSidesBg %>; margin: 10px; font-size: 100%; width: 98%; }
body,ul,ol,li,td,p,div,span,input,textarea,select {	font-family: <%= mainFontFamily %>; color: <%= contentFont %>; }

/* headlines */
h1 { font-size: 1.4em; color: <%= cms.getOptionalConfigValue("h1.color", contentFont) %>; <%= cms.getFontWeight("h1.bold", "true") %> }
h2 { font-size: 1.2em; color: <%= cms.getOptionalConfigValue("h2.color", contentFont) %>; <%= cms.getFontWeight("h2.bold", "true") %> }
h3 { font-size: 1.1em; color: <%= cms.getOptionalConfigValue("h3.color", contentFont) %>; <%= cms.getFontWeight("h3.bold", "true") %> }
h4 { font-size: 1.0em; color: <%= cms.getOptionalConfigValue("h4.color", contentFont) %>; <%= cms.getFontWeight("h4.bold", "true") %> }
h5 { font-size: 1.0em; color: <%= cms.getOptionalConfigValue("h5.color", contentFont) %>; <%= cms.getFontWeight("h5.bold", "true") %> }
h6 { font-size: 1.0em; color: <%= cms.getOptionalConfigValue("h6.color", contentFont) %>; <%= cms.getFontWeight("h6.bold", "true") %> }

/* common links */
a,a:link	{	color: <%= contentLink %>; <%= cms.getFontWeight("content.link.bold", "false") %> <%= cms.getFontUnderline("content.link.underline", "false") %> }
a:visited	{	color: <%= contentLinkVisited %>; <%= cms.getFontUnderline("content.link.underline", "false") %> }
a:hover		{	color: <%= contentLinkHover %>; <%= cms.getFontUnderline("content.link.underline", "false") %> }
a:active	{	color: <%= contentLinkActive %>; <%= cms.getFontUnderline("content.link.underline", "false") %> }

/* Head navigation */
a.navtop,a.navtop:visited,a.navtop:hover { 
	color: <%= headNavFont %>; 
	font-family: <%= navFontFamily %>; 
	font-size: 0.8em; 
	white-space: nowrap; 
	padding: 0px 2px 3px 2px; 
	font-weight: normal; 
	text-decoration: none;
	vertical-align: top;
	
}
.navspacer { 
	color: <%= headNavFont %>; 
	font-size: 0.8em; 
	vertical-align: top;
}

/* top navigation row */
div.navtop {
	width: 100%;
	margin: 0;
	padding: 3px 0px 0px 0px;
	background-color: <%= headNavBg %>;
	font-size: 0.8em;
	text-align: left;
	text-indent: 5px;	
	<%
	if (showMainBorder) {
		out.print("border-top: 1px solid " + mainBorder + ";");
		out.print("border-left: 1px solid " + mainBorder + ";");
		out.print("border-right: 1px solid " + mainBorder + ";");
	}
	%>	
}

/* Head navigation submenu */
div.menu, div.menu a.mI, div.menu a.mI span.mIText, div.menu a.mI span.mIArrow {
  font-family: <%= navFontFamily %>;
  font-size: 10px;
  font-style: normal;
  font-weight: normal;
}

div.menu {
  font-family: <%= navFontFamily %>;
  font-size: 0.7em;
  background-color: <%= headNavBg %>;
  border: 1px solid <%= headNavBorder %>;
  text-align: left;
  left: 0px;
  position: absolute;
  top: 0px;
  visibility: hidden;
  z-index: 101;
}

div.menu a.mI, div.menu a.mICurrent {
  color: <%= headNavFont %>;
  background-color: <%= headNavBg %>;
  cursor: pointer;
  display: block;
  padding: 3px 1em;
  text-decoration: none;
  white-space: nowrap;
}

div.menu a.mI:hover, div.menu a.mIHighlight, div.menu a.mICurrent, div.menu a.mI:hover span.mIText, div.menu a.mI:hover span.mIArrow {
  font-family: <%= navFontFamily %>;

  color: <%= headNavFontHover %>;
  background-color: <%= headNavBgHover %>;
}

div.menu a.mI span.mIText, div.menu a.mI span.mIArrow {
  font-family: <%= navFontFamily %>;
  
  color: <%= headNavFont %>;
}

div.menu a.mI span.mIArrow {
  margin-right: -.75em;
}

/* foot row links */
a.linksheadfoot,a.linksheadfoot:link { font-family: <%= navFontFamily %>; font-size: 0.85em; color: <%= footLinksFont %>; font-weight: normal; text-decoration: none; }
a.linksheadfoot:visited	{ color: <%= footLinksFontVisited %>; text-decoration: none; }
a.linksheadfoot:hover	{ color: <%= footLinksFontHover %>; text-decoration: none; }
a.linksheadfoot:active	{ color: <%= footLinksFontActive %>; text-decoration: none; }

/* head row links */
a.linkshead,a.linkshead:link { font-family: <%= navFontFamily %>; font-size: 0.85em; color: <%= footLinksFont %>; font-weight: normal; text-decoration: none; padding: 0px 0px 0px 0px; vertical-align: middle;  }
a.linkshead:visited	{ color: <%= footLinksFontVisited %>; text-decoration: none; }
a.linkshead:hover	{ color: <%= footLinksFontHover %>; text-decoration: none; }
a.linkshead:active	{ color: <%= footLinksFontActive %>; text-decoration: none; }
.headnavspacer { 
	color: <%= footLinksFont %>; 
	font-size: 0.85em;
	vertical-align: middle;
}

/* bread crumb navigation */
div.breadcrumb			{ margin: 4px 8px; text-align: left; }
span.breadcrumb			{ font-family: <%= navFontFamily %>; font-size: 0.85em; color: <%= contentFont %>; text-decoration: none; white-space: nowrap; }
a.breadcrumb,a.breadcrumb:visited,a.breadcrumb:hover { font-family: <%= navFontFamily %>; font-size: 0.85em; color: <%= contentFont %>; font-weight: normal; text-decoration: none; white-space: nowrap; }

/* head search input form */
.search { border: 1px solid <%= footLinksFont %>; color: <%= footLinksFont %>; font-family: <%= mainFontFamily %>; background-color: <%= headLinksBg %>; font-size: 0.9em; }
.searchlinks { text-align: center; width: 100%; }
.searchresult { margin-bottom: 10px; }
.formbutton { font-family: <%= mainFontFamily %>; font-size: 0.9em; height: 18px; background-color: <%= formButtonBg %>; color: <%= formButtonFont %>; border: 1px solid <%= formButtonBorder %>; }
/* border of the head navigation row */
div.linkshead {
	width: 100%;
	border-left: 1px solid <%= headLinksBorder %>;
	border-top: 1px solid <%= headLinksBorder %>;
	border-right: 1px solid <%= headLinksBorder %>;
	background-color: <%= headLinksBg %>;
	text-align: right;
	margin: 0 auto;
	padding: 1px 0px;
	font-size: 0.80em;
}

/* head image row & head editable element */
div.imagehead, div.edithead {
	width: 100%;
	background-color: <%= headImgBg %>;
	text-align: left;
	clear: both;
	margin: 0 auto;
	<% 
	if (showMainBorder) {
		out.print("border-top: 1px solid " + mainBorder + ";");
		out.print("border-left: 1px solid " + mainBorder + ";");
		out.print("border-right: 1px solid " + mainBorder + ";");
	} 	
	%>
}

/* image link block on top of background image */
span.imagelink {
	display: block;
	margin: 0; 
	padding: 0; 
	width: 175px; 
	cursor: pointer;
}

/* border of the foot navigation row */
div.linksfoot {
	width: 100%;
	border-left: 1px solid <%= footLinksBorder %>;
	border-right: 1px solid <%= footLinksBorder %>;
	border-bottom: 1px solid <%= footLinksBorder %>;
	background-color: <%= footLinksBg %>;
	margin: 0 auto;
	padding-top: 1px;
	padding-bottom: 1px;
	font-size: 0.8em;
	text-align: right;
	clear: both;
}

div.mainwrapper {
	margin: 0 auto;
}

/* block around main content row (left nav, content, infobox) */
div.main {
	width: 100%;
	background-color: <%= contentAccessibleBg %>;
	<% 
	if (showMainBorder) {
		out.print("border: 1px solid " + mainBorder + ";");
	} 	
	%>
}

/* content cell */
div.content {
	float: left;
	width: 60%;
	height: 100%;
	vertical-align: top;
	text-align: left;
	font-family: <%= mainFontFamily %>; 
	font-size: 0.8em;
	color: <%= contentFont %>;
	background-color: <%= contentAccessibleBg %>;
}

/* content styles */

/* a content element */
div.element {
	margin: 5px 5px 5px 5px; 
	padding: 5px; 
	text-align: justify; 
	clear: both;
	background-color: <%= contentBg %>;
	border: 1px solid <%= contentBorder %>;
}

div.element2 {
	font-size: 0.8em;
	margin: 5px 5px 5px 0px; 
	padding: 5px; 
	text-align: left; 
	clear: both;
	background-color: <%= sideBg %>;
	border: 1px solid <%= contentBorder %>; 
}

/* infobox column */
div.infobox {
	text-align: left;
	float: right;
	width: 18.6%;
	vertical-align: top;
	height: 100%;
}

/* left navigation column */
div.navleft {
	text-align: left;
	float: left;
	width: 21%;
	vertical-align: top;
	height: 100%;
	background-color: <%= navLeftBg %>; 
	background-image: url(<%= navLeftImgBgUri %>);
	background-repeat: repeat-y;
}

/* left navigation image row */
span.navleftimage {
	display: block;
	width: 175px;
	cursor: pointer;
}

/* left navigation list */
ul.navleft { 
	margin: 0 0 0 20px;
	padding: 2px;
} 

/* left navigation list item */
li.navleftactive { 
    list-style-image: url(<%= cms.getResourcePath() %>nav_a.gif); 
} 
 
li.navleft { 
    list-style-image: url(<%= cms.getResourcePath() %>nav_i.gif);
}

a.navleft,a.navleft:link,a.navleft:visited,a.navleft:active { font-family: <%= navFontFamily %>; font-size: 0.8em; color: <%= navLeftFont %>; font-weight: normal; text-decoration:none; }
a.navleft:hover { color: <%= navLeftFont %>; text-decoration: underline; }

a.navleftactive,a.navleftactive:link,a.navleftactive:visited,a.navleftactive:active { font-family: <%= navFontFamily %>; font-size: 0.8em; color: <%= navLeftActiveColor %>; <%= navLeftActiveWeight %> text-decoration:none; }
a.navleftactive:hover { color: <%= navLeftActiveColor %>; text-decoration: underline; }

/* Side element styles */
div.sidelist {
	margin: 5px 5px 5px 0px;
	border: 1px solid <%= contentBorder %>; 
	text-align: left; 
	clear: both;
	background-color: <%= sideBg %>;
}

p.sidelisthead {
	font-size: 0.8em;
	font-weight: bold;
	margin: 0px;
	padding-left: 3px;
	padding-right: 3px;
	background-color: <%= contentBorder %>;
}

p.sidelistitem {
	font-size: 0.70em;
	margin: 5px 3px 0px;
}

a.sidelistitemhead {
	font-size: 1.0em;
	font-weight: bold;
	margin-bottom: 3px;
}

/* popup window border */
div.popup { <% 
	
	if (showMainBorder) {
		out.print("border: 1px solid " + mainBorder + ";");
	} 
	
	%>
	margin-top: 10px;
	-moz-box-sizing: border-box;
	width: 100%;
}

h1.popup { font-size: 1.0em; padding: 2px; width: 100%; background-color: <%= headNavBg %>; color: <%= headNavFont %>; }
.popupform { border: 1px solid <%= contentFont %>; width: 450px; }
span.formerror { color: <%= headNavBg %>; font-weight: bold;}

/* imprint */
table.imprint {	width: 100%; }
td.imprint { vertical-align: top; font-size: 0.8em; }

/* default styles for the online forms */
input.onlineform, select.onlineform, textarea.onlineform { width: 300px; border: 1px solid <%= contentFont %>;  }
textarea.onlineform { height: 80px; }

/* default styles */
.nowrap { white-space: nowrap; }
.bold { font-weight: bold; }
<% 

if (cms.getCmsObject().existsResource(layoutPageCss)) {
	String layoutStyles = cms.getContent(layoutPageCss);
	out.print(layoutStyles);
}

if (cssUri != null && cms.getCmsObject().existsResource(cssUri)) { %>
/* optional additional styles */
<% 
	String additionalStyles = null;
	try {
		additionalStyles = cms.getContent(cssUri);
	} catch (Exception e) {}
	if (additionalStyles != null) {
		out.print(additionalStyles);
	}
} %>