/*
 * CSS for AJAX web access.
 * Copyright (C) 2010 Petr Kubanek <petr@kubanek.net>
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 */

#include "rts2json/libcss.h"
#include "utilsfunc.h"
#include "error.h"

using namespace rts2json;

static const char *calendarCss = 
"#CalendarControlIFrame {\n"
"  display: none;\n"
"  left: 0px;\n"
"  position: absolute;\n"
"  top: 0px;\n"
"  height: 250px;\n"
"  width: 250px;\n"
"  z-index: 99;\n"
"}\n"

"#CalendarControl {\n"
"  position:absolute;\n"
"  background-color:#FFF;\n"
"  margin:0;\n"
"  padding:0;\n"
"  display:none;\n"
"  z-index: 100;\n"
"}\n"

"#CalendarControl table {\n"
"  font-family: arial, verdana, helvetica, sans-serif;\n"
"  font-size: 8pt;\n"
"  border-left: 1px solid #336;\n"
"  border-right: 1px solid #336;\n"
"}\n"

"#CalendarControl th {\n"
"  font-weight: normal;\n"
"}\n"

"#CalendarControl th a {\n"
"  font-weight: normal;\n"
"  text-decoration: none;\n"
"  color: #FFF;\n"
"  padding: 1px;\n"
"}\n"

"#CalendarControl td {\n"
"  text-align: center;\n"
"}\n"

"#CalendarControl .header {\n"
"  background-color: #336;\n"
"}\n"

"#CalendarControl .weekday {\n"
"  background-color: #DDD;\n"
"  color: #000;\n"
"}\n"

"#CalendarControl .weekend {\n"
"  background-color: #FFC;\n"
"  color: #000;\n"
"}\n"

"#CalendarControl .current {\n"
"  border: 1px solid #339;\n"
"  background-color: #336;\n"
"  color: #FFF;\n"
"}\n"

"#CalendarControl .weekday,\n"
"#CalendarControl .weekend,\n"
"#CalendarControl .current {\n"
"  display: block;\n"
"  text-decoration: none;\n"
"  border: 1px solid #FFF;\n"
"  width: 2em;\n"
"}\n"

"#CalendarControl .weekday:hover,\n"
"#CalendarControl .weekend:hover,\n"
"#CalendarControl .current:hover {\n"
"  color: #FFF;\n"
"  background-color: #336;\n"
"  border: 1px solid #999;\n"
"}\n"

"#CalendarControl .previous {\n"
"  text-align: left;\n"
"}\n"

"#CalendarControl .next {\n"
"  text-align: right;\n"
"}\n"

"#CalendarControl .previous,\n"
"#CalendarControl .next {\n"
"  padding: 1px 3px 1px 3px;\n"
"  font-size: 1.4em;\n"
"}\n"

"#CalendarControl .previous a,\n"
"#CalendarControl .next a {\n"
"  color: #FFF;\n"
"  text-decoration: none;\n"
"  font-weight: bold;\n"
"}\n"

"#CalendarControl .title {\n"
"  text-align: center;\n"
"  font-weight: bold;\n"
"  color: #FFF;\n"
"}\n"

"#CalendarControl .empty {\n"
"  background-color: #CCC;\n"
"  border: 1px solid #FFF;\n"
"}\n";

const char *tableCss =
".time {\n"
  "text-align:right;\n"
"}\n"
".deg {\n"
  "text-align:right;\n"
"}\n"  
".TableHead {\n"
  "background-color: #CCC;\n"
  "border: 1px solid #000;\n"
  "-moz-border-radius: 10px;\n"
  "-webkit-border-radius: 10px;\n"
  "border-radius: 10px;\n"
  "cursor: pointer;\n"
"}\n";

const char *datatablesCss = 
".dataTables_wrapper {\n"
	"position: relative;\n"
	"clear: both;\n"
	"zoom: 1; /* Feeling sorry for IE */\n"
"}\n"

".dataTables_processing {\n"
	"position: absolute;\n"
	"top: 50%;\n"
	"left: 50%;\n"
	"width: 250px;\n"
	"height: 30px;\n"
	"margin-left: -125px;\n"
	"margin-top: -15px;\n"
	"padding: 14px 0 2px 0;\n"
	"border: 1px solid #ddd;\n"
	"text-align: center;\n"
	"color: #999;\n"
	"font-size: 14px;\n"
	"background-color: white;\n"
"}\n"

".dataTables_length {\n"
	"width: 40%;\n"
	"float: left;\n"
"}\n"

".dataTables_filter {\n"
	"width: 50%;\n"
	"float: right;\n"
	"text-align: right;\n"
"}\n"

".dataTables_info {\n"
	"width: 60%;\n"
	"float: left;\n"
"}\n"

".dataTables_paginate {\n"
	"float: right;\n"
	"text-align: right;\n"
"}\n"

"/* Pagination nested */\n"
".paginate_disabled_previous, .paginate_enabled_previous,\n"
".paginate_disabled_next, .paginate_enabled_next {\n"
	"height: 19px;\n"
	"float: left;\n"
	"cursor: pointer;\n"
	"*cursor: hand;\n"
	"color: #111 !important;\n"
"}\n"
".paginate_disabled_previous:hover, .paginate_enabled_previous:hover,\n"
".paginate_disabled_next:hover, .paginate_enabled_next:hover {\n"
	"text-decoration: none !important;\n"
"}\n"
".paginate_disabled_previous:active, .paginate_enabled_previous:active,\n"
".paginate_disabled_next:active, .paginate_enabled_next:active {\n"
	"outline: none;\n"
"}\n"

".paginate_disabled_previous,\n"
".paginate_disabled_next {\n"
	"color: #666 !important;\n"
"}\n"
".paginate_disabled_previous, .paginate_enabled_previous {\n"
	"padding-left: 23px;\n"
"}\n"
".paginate_disabled_next, .paginate_enabled_next {\n"
	"padding-right: 23px;\n"
	"margin-left: 10px;\n"
"}\n"

".paginate_disabled_previous {\n"
	"background: url('../images/back_disabled.png') no-repeat top left;\n"
"}\n"

".paginate_enabled_previous {\n"
	"background: url('../images/back_enabled.png') no-repeat top left;\n"
"}\n"
".paginate_enabled_previous:hover {\n"
	"background: url('../images/back_enabled_hover.png') no-repeat top left;\n"
"}\n"

".paginate_disabled_next {\n"
	"background: url('../images/forward_disabled.png') no-repeat top right;\n"
"}\n"

".paginate_enabled_next {\n"
	"background: url('../images/forward_enabled.png') no-repeat top right;\n"
"}\n"
".paginate_enabled_next:hover {\n"
	"background: url('../images/forward_enabled_hover.png') no-repeat top right;\n"
"}\n"
"table.display {\n"
	"margin: 0 auto;\n"
	"clear: both;\n"
	"width: 100%;\n"
"}\n"

"table.display thead th {\n"
	"padding: 3px 18px 3px 10px;\n"
	"border-bottom: 1px solid black;\n"
	"font-weight: bold;\n"
	"cursor: pointer;\n"
	"* cursor: hand;\n"
"}\n"

"table.display tfoot th {\n"
	"padding: 3px 18px 3px 10px;\n"
	"border-top: 1px solid black;\n"
	"font-weight: bold;\n"
"}\n"

"table.display tr.heading2 td {\n"
	"border-bottom: 1px solid #aaa;\n"
"}\n"

"table.display td {\n"
	"padding: 3px 10px;\n"
"}\n"

"table.display td.center {\n"
	"text-align: center;\n"
"}\n"

".sorting_asc {\n"
	"background: url('../images/sort_asc.png') no-repeat center right;\n"
"}\n"

".sorting_desc {\n"
	"background: url('../images/sort_desc.png') no-repeat center right;\n"
"}\n"

".sorting {\n"
	"background: url('../images/sort_both.png') no-repeat center right;\n"
"}\n"

".sorting_asc_disabled {\n"
	"background: url('./images/sort_asc_disabled.png') no-repeat center right;\n"
"}\n"

".sorting_desc_disabled {\n"
	"background: url('../images/sort_desc_disabled.png') no-repeat center right;\n"
"}\n"
" \n"
"table.display thead th:active,\n"
"table.display thead td:active {\n"
	"outline: none;\n"
"}\n"

"table.display tr.odd.gradeA {\n"
	"background-color: #ddffdd;\n"
"}\n"

"table.display tr.even.gradeA {\n"
	"background-color: #eeffee;\n"
"}\n"

"table.display tr.odd.gradeC {\n"
	"background-color: #ddddff;\n"
"}\n"

"table.display tr.even.gradeC {\n"
	"background-color: #eeeeff;\n"
"}\n"

"table.display tr.odd.gradeX {\n"
	"background-color: #ffdddd;\n"
"}\n"

"table.display tr.even.gradeX {\n"
	"background-color: #ffeeee;\n"
"}\n"

"table.display tr.odd.gradeU {\n"
	"background-color: #ddd;\n"
"}\n"

"table.display tr.even.gradeU {\n"
	"background-color: #eee;\n"
"}\n"


"tr.odd {\n"
	"background-color: #E2E4FF;\n"
"}\n"

"tr.even {\n"
	"background-color: white;\n"
"}\n"

".dataTables_scroll {\n"
	"clear: both;\n"
"}\n"

".dataTables_scrollBody {\n"
	"*margin-top: -1px;\n"
	"-webkit-overflow-scrolling: touch;\n"
"}\n"

".top, .bottom {\n"
	"padding: 15px;\n"
	"background-color: #F5F5F5;\n"
	"border: 1px solid #CCCCCC;\n"
"}\n"

".top .dataTables_info {\n"
	"float: none;\n"
"}\n"

".clear {\n"
	"clear: both;\n"
"}\n"

".dataTables_empty {\n"
	"text-align: center;\n"
"}\n"

"tfoot input {\n"
	"margin: 0.5em 0;\n"
	"width: 100%;\n"
	"color: #444;\n"
"}\n"

"tfoot input.search_init {\n"
	"color: #999;\n"
"}\n"

"td.group {\n"
	"background-color: #d1cfd0;\n"
	"border-bottom: 2px solid #A19B9E;\n"
	"border-top: 2px solid #A19B9E;\n"
"}\n"

"td.details {\n"
	"background-color: #d1cfd0;\n"
	"border: 2px solid #A19B9E;\n"
"}\n"


".example_alt_pagination div.dataTables_info {\n"
	"width: 40%;\n"
"}\n"

".paging_full_numbers {\n"
	"width: 400px;\n"
	"height: 22px;\n"
	"line-height: 22px;\n"
"}\n"

".paging_full_numbers a:active {\n"
	"outline: none\n"
"}\n"

".paging_full_numbers a:hover {\n"
	"text-decoration: none;\n"
"}\n"

".paging_full_numbers a.paginate_button,\n"
" 	.paging_full_numbers a.paginate_active {\n"
	"border: 1px solid #aaa;\n"
	"-webkit-border-radius: 5px;\n"
	"-moz-border-radius: 5px;\n"
	"padding: 2px 5px;\n"
	"margin: 0 3px;\n"
	"cursor: pointer;\n"
	"*cursor: hand;\n"
	"color: #333 !important;\n"
"}\n"

".paging_full_numbers a.paginate_button {\n"
	"background-color: #ddd;\n"
"}\n"

".paging_full_numbers a.paginate_button:hover {\n"
	"background-color: #ccc;\n"
	"text-decoration: none !important;\n"
"}\n"

".paging_full_numbers a.paginate_active {\n"
	"background-color: #99B3FF;\n"
"}\n"

"table.display tr.even.row_selected td {\n"
	"background-color: #B0BED9;\n"
"}\n"

"table.display tr.odd.row_selected td {\n"
	"background-color: #9FAFD1;\n"
"}\n"


"tr.odd td.sorting_1 {\n"
	"background-color: #D3D6FF;\n"
"}\n"

"tr.odd td.sorting_2 {\n"
	"background-color: #DADCFF;\n"
"}\n"

"tr.odd td.sorting_3 {\n"
	"background-color: #E0E2FF;\n"
"}\n"

"tr.even td.sorting_1 {\n"
	"background-color: #EAEBFF;\n"
"}\n"

"tr.even td.sorting_2 {\n"
	"background-color: #F2F3FF;\n"
"}\n"

"tr.even td.sorting_3 {\n"
	"background-color: #F9F9FF;\n"
"}\n"

"tr.odd.gradeA td.sorting_1 {\n"
	"background-color: #c4ffc4;\n"
"}\n"

"tr.odd.gradeA td.sorting_2 {\n"
	"background-color: #d1ffd1;\n"
"}\n"

"tr.odd.gradeA td.sorting_3 {\n"
	"background-color: #d1ffd1;\n"
"}\n"

"tr.even.gradeA td.sorting_1 {\n"
	"background-color: #d5ffd5;\n"
"}\n"

"tr.even.gradeA td.sorting_2 {\n"
	"background-color: #e2ffe2;\n"
"}\n"

"tr.even.gradeA td.sorting_3 {\n"
	"background-color: #e2ffe2;\n"
"}\n"

"tr.odd.gradeC td.sorting_1 {\n"
	"background-color: #c4c4ff;\n"
"}\n"

"tr.odd.gradeC td.sorting_2 {\n"
	"background-color: #d1d1ff;\n"
"}\n"

"tr.odd.gradeC td.sorting_3 {\n"
	"background-color: #d1d1ff;\n"
"}\n"

"tr.even.gradeC td.sorting_1 {\n"
	"background-color: #d5d5ff;\n"
"}\n"

"tr.even.gradeC td.sorting_2 {\n"
	"background-color: #e2e2ff;\n"
"}\n"

"tr.even.gradeC td.sorting_3 {\n"
	"background-color: #e2e2ff;\n"
"}\n"

"tr.odd.gradeX td.sorting_1 {\n"
	"background-color: #ffc4c4;\n"
"}\n"

"tr.odd.gradeX td.sorting_2 {\n"
	"background-color: #ffd1d1;\n"
"}\n"

"tr.odd.gradeX td.sorting_3 {\n"
	"background-color: #ffd1d1;\n"
"}\n"

"tr.even.gradeX td.sorting_1 {\n"
	"background-color: #ffd5d5;\n"
"}\n"

"tr.even.gradeX td.sorting_2 {\n"
	"background-color: #ffe2e2;\n"
"}\n"

"tr.even.gradeX td.sorting_3 {\n"
	"background-color: #ffe2e2;\n"
"}\n"

"tr.odd.gradeU td.sorting_1 {\n"
	"background-color: #c4c4c4;\n"
"}\n"

"tr.odd.gradeU td.sorting_2 {\n"
	"background-color: #d1d1d1;\n"
"}\n"

"tr.odd.gradeU td.sorting_3 {\n"
	"background-color: #d1d1d1;\n"
"}\n"

"tr.even.gradeU td.sorting_1 {\n"
	"background-color: #d5d5d5;\n"
"}\n"

"tr.even.gradeU td.sorting_2 {\n"
	"background-color: #e2e2e2;\n"
"}\n"

"tr.even.gradeU td.sorting_3 {\n"
	"background-color: #e2e2e2;\n"
"}\n"

".ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted {\n"
	"background-color: #ECFFB3;\n"
"}\n"

".ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted {\n"
	"background-color: #E6FF99;\n"
"}\n"

".ex_highlight_row #example tr.even:hover {\n"
	"background-color: #ECFFB3;\n"
"}\n"

".ex_highlight_row #example tr.even:hover td.sorting_1 {\n"
	"background-color: #DDFF75;\n"
"}\n"

".ex_highlight_row #example tr.even:hover td.sorting_2 {\n"
	"background-color: #E7FF9E;\n"
"}\n"

".ex_highlight_row #example tr.even:hover td.sorting_3 {\n"
	"background-color: #E2FF89;\n"
"}\n"

".ex_highlight_row #example tr.odd:hover {\n"
	"background-color: #E6FF99;\n"
"}\n"

".ex_highlight_row #example tr.odd:hover td.sorting_1 {\n"
	"background-color: #D6FF5C;\n"
"}\n"

".ex_highlight_row #example tr.odd:hover td.sorting_2 {\n"
	"background-color: #E0FF84;\n"
"}\n"

".ex_highlight_row #example tr.odd:hover td.sorting_3 {\n"
	"background-color: #DBFF70;\n"
"}\n"

"table.KeyTable td {\n"
	"border: 3px solid transparent;\n"
"}\n"

"table.KeyTable td.focus {\n"
	"border: 3px solid #3366FF;\n"
"}\n"

"table.display tr.gradeA {\n"
	"background-color: #eeffee;\n"
"}\n"

"table.display tr.gradeC {\n"
	"background-color: #ddddff;\n"
"}\n"

"table.display tr.gradeX {\n"
	"background-color: #ffdddd;\n"
"}\n"

"table.display tr.gradeU {\n"
	"background-color: #ddd;\n"
"}\n"

"div.box {\n"
	"height: 100px;\n"
	"padding: 10px;\n"
	"overflow: auto;\n"
	"border: 1px solid #8080FF;\n"
	"background-color: #E5E5FF;\n"
"}\n";

const char *jqueryUICss = 
"/*! jQuery UI - v1.10.3 - 2013-05-03\n"
"* Copyright 2013 jQuery Foundation and other contributors Licensed MIT */\n"
".ui-helper-hidden {\n"
	"display: none;\n"
"}\n"
".ui-helper-hidden-accessible {\n"
	"border: 0;\n"
	"clip: rect(0 0 0 0);\n"
	"height: 1px;\n"
	"margin: -1px;\n"
	"overflow: hidden;\n"
	"padding: 0;\n"
	"position: absolute;\n"
	"width: 1px;\n"
"}\n"
".ui-helper-reset {\n"
	"margin: 0;\n"
	"padding: 0;\n"
	"border: 0;\n"
	"outline: 0;\n"
	"line-height: 1.3;\n"
	"text-decoration: none;\n"
	"font-size: 100%;\n"
	"list-style: none;\n"
"}\n"
".ui-helper-clearfix:before,\n"
".ui-helper-clearfix:after {\n"
	"content: \"\";\n"
	"display: table;\n"
	"border-collapse: collapse;\n"
"}\n"
".ui-helper-clearfix:after {\n"
	"clear: both;\n"
"}\n"
".ui-helper-clearfix {\n"
	"min-height: 0; /* support: IE7 */\n"
"}\n"
".ui-helper-zfix {\n"
	"width: 100%;\n"
	"height: 100%;\n"
	"top: 0;\n"
	"left: 0;\n"
	"position: absolute;\n"
	"opacity: 0;\n"
	"filter:Alpha(Opacity=0);\n"
"}\n"
".ui-front {\n"
	"z-index: 100;\n"
"}\n"
"/* Interaction Cues\n"
"----------------------------------*/\n"
".ui-state-disabled {\n"
	"cursor: default !important;\n"
"}\n"
"/* Icons\n"
"----------------------------------*/\n"
"/* states and images */\n"
".ui-icon {\n"
	"display: block;\n"
	"text-indent: -99999px;\n"
	"overflow: hidden;\n"
	"background-repeat: no-repeat;\n"
"}\n"
"/* Misc visuals\n"
"----------------------------------*/\n"
"/* Overlays */\n"
".ui-widget-overlay {\n"
	"position: fixed;\n"
	"top: 0;\n"
	"left: 0;\n"
	"width: 100%;\n"
	"height: 100%;\n"
"}\n"
".ui-accordion .ui-accordion-header {\n"
	"display: block;\n"
	"cursor: pointer;\n"
	"position: relative;\n"
	"margin-top: 2px;\n"
	"padding: .5em .5em .5em .7em;\n"
	"min-height: 0; /* support: IE7 */\n"
"}\n"
".ui-accordion .ui-accordion-icons {\n"
	"padding-left: 2.2em;\n"
"}\n"
".ui-accordion .ui-accordion-noicons {\n"
	"padding-left: .7em;\n"
"}\n"
".ui-accordion .ui-accordion-icons .ui-accordion-icons {\n"
	"padding-left: 2.2em;\n"
"}\n"
".ui-accordion .ui-accordion-header .ui-accordion-header-icon {\n"
	"position: absolute;\n"
	"left: .5em;\n"
	"top: 50%;\n"
	"margin-top: -8px;\n"
"}\n"
".ui-accordion .ui-accordion-content {\n"
	"padding: 1em 2.2em;\n"
	"border-top: 0;\n"
	"overflow: auto;\n"
"}\n"
".ui-autocomplete {\n"
	"position: absolute;\n"
	"top: 0;\n"
	"left: 0;\n"
	"cursor: default;\n"
"}\n"
".ui-button {\n"
	"display: inline-block;\n"
	"position: relative;\n"
	"padding: 0;\n"
	"line-height: normal;\n"
	"margin-right: .1em;\n"
	"cursor: pointer;\n"
	"vertical-align: middle;\n"
	"text-align: center;\n"
	"overflow: visible; /* removes extra width in IE */\n"
"}\n"
".ui-button,\n"
".ui-button:link,\n"
".ui-button:visited,\n"
".ui-button:hover,\n"
".ui-button:active {\n"
	"text-decoration: none;\n"
"}\n"
"/* to make room for the icon, a width needs to be set here */\n"
".ui-button-icon-only {\n"
	"width: 2.2em;\n"
"}\n"
"/* button elements seem to need a little more width */\n"
"button.ui-button-icon-only {\n"
	"width: 2.4em;\n"
"}\n"
".ui-button-icons-only {\n"
	"width: 3.4em;\n"
"}\n"
"button.ui-button-icons-only {\n"
	"width: 3.7em;\n"
"}\n"
"/* button text element */\n"
".ui-button .ui-button-text {\n"
	"display: block;\n"
	"line-height: normal;\n"
"}\n"
".ui-button-text-only .ui-button-text {\n"
	"padding: .4em 1em;\n"
"}\n"
".ui-button-icon-only .ui-button-text,\n"
".ui-button-icons-only .ui-button-text {\n"
	"padding: .4em;\n"
	"text-indent: -9999999px;\n"
"}\n"
".ui-button-text-icon-primary .ui-button-text,\n"
".ui-button-text-icons .ui-button-text {\n"
	"padding: .4em 1em .4em 2.1em;\n"
"}\n"
".ui-button-text-icon-secondary .ui-button-text,\n"
".ui-button-text-icons .ui-button-text {\n"
	"padding: .4em 2.1em .4em 1em;\n"
"}\n"
".ui-button-text-icons .ui-button-text {\n"
	"padding-left: 2.1em;\n"
	"padding-right: 2.1em;\n"
"}\n"
"/* no icon support for input elements, provide padding by default */\n"
"input.ui-button {\n"
	"padding: .4em 1em;\n"
"}\n"
"/* button icon element(s) */\n"
".ui-button-icon-only .ui-icon,\n"
".ui-button-text-icon-primary .ui-icon,\n"
".ui-button-text-icon-secondary .ui-icon,\n"
".ui-button-text-icons .ui-icon,\n"
".ui-button-icons-only .ui-icon {\n"
	"position: absolute;\n"
	"top: 50%;\n"
	"margin-top: -8px;\n"
"}\n"
".ui-button-icon-only .ui-icon {\n"
	"left: 50%;\n"
	"margin-left: -8px;\n"
"}\n"
".ui-button-text-icon-primary .ui-button-icon-primary,\n"
".ui-button-text-icons .ui-button-icon-primary,\n"
".ui-button-icons-only .ui-button-icon-primary {\n"
	"left: .5em;\n"
"}\n"
".ui-button-text-icon-secondary .ui-button-icon-secondary,\n"
".ui-button-text-icons .ui-button-icon-secondary,\n"
".ui-button-icons-only .ui-button-icon-secondary {\n"
	"right: .5em;\n"
"}\n"
"\n"
"/* button sets */\n"
".ui-buttonset {\n"
	"margin-right: 7px;\n"
"}\n"
".ui-buttonset .ui-button {\n"
	"margin-left: 0;\n"
	"margin-right: -.3em;\n"
"}\n"
"\n"
"/* workarounds */\n"
"/* reset extra padding in Firefox, see h5bp.com/l */\n"
"input.ui-button::-moz-focus-inner,\n"
"button.ui-button::-moz-focus-inner {\n"
	"border: 0;\n"
	"padding: 0;\n"
"}\n"
".ui-datepicker {\n"
	"width: 17em;\n"
	"padding: .2em .2em 0;\n"
	"display: none;\n"
"}\n"
".ui-datepicker .ui-datepicker-header {\n"
	"position: relative;\n"
	"padding: .2em 0;\n"
"}\n"
".ui-datepicker .ui-datepicker-prev,\n"
".ui-datepicker .ui-datepicker-next {\n"
	"position: absolute;\n"
	"top: 2px;\n"
	"width: 1.8em;\n"
	"height: 1.8em;\n"
"}\n"
".ui-datepicker .ui-datepicker-prev-hover,\n"
".ui-datepicker .ui-datepicker-next-hover {\n"
	"top: 1px;\n"
"}\n"
".ui-datepicker .ui-datepicker-prev {\n"
	"left: 2px;\n"
"}\n"
".ui-datepicker .ui-datepicker-next {\n"
	"right: 2px;\n"
"}\n"
".ui-datepicker .ui-datepicker-prev-hover {\n"
	"left: 1px;\n"
"}\n"
".ui-datepicker .ui-datepicker-next-hover {\n"
	"right: 1px;\n"
"}\n"
".ui-datepicker .ui-datepicker-prev span,\n"
".ui-datepicker .ui-datepicker-next span {\n"
	"display: block;\n"
	"position: absolute;\n"
	"left: 50%;\n"
	"margin-left: -8px;\n"
	"top: 50%;\n"
	"margin-top: -8px;\n"
"}\n"
".ui-datepicker .ui-datepicker-title {\n"
	"margin: 0 2.3em;\n"
	"line-height: 1.8em;\n"
	"text-align: center;\n"
"}\n"
".ui-datepicker .ui-datepicker-title select {\n"
	"font-size: 1em;\n"
	"margin: 1px 0;\n"
"}\n"
".ui-datepicker select.ui-datepicker-month-year {\n"
	"width: 100%;\n"
"}\n"
".ui-datepicker select.ui-datepicker-month,\n"
".ui-datepicker select.ui-datepicker-year {\n"
	"width: 49%;\n"
"}\n"
".ui-datepicker table {\n"
	"width: 100%;\n"
	"font-size: .9em;\n"
	"border-collapse: collapse;\n"
	"margin: 0 0 .4em;\n"
"}\n"
".ui-datepicker th {\n"
	"padding: .7em .3em;\n"
	"text-align: center;\n"
	"font-weight: bold;\n"
	"border: 0;\n"
"}\n"
".ui-datepicker td {\n"
	"border: 0;\n"
	"padding: 1px;\n"
"}\n"
".ui-datepicker td span,\n"
".ui-datepicker td a {\n"
	"display: block;\n"
	"padding: .2em;\n"
	"text-align: right;\n"
	"text-decoration: none;\n"
"}\n"
".ui-datepicker .ui-datepicker-buttonpane {\n"
	"background-image: none;\n"
	"margin: .7em 0 0 0;\n"
	"padding: 0 .2em;\n"
	"border-left: 0;\n"
	"border-right: 0;\n"
	"border-bottom: 0;\n"
"}\n"
".ui-datepicker .ui-datepicker-buttonpane button {\n"
	"float: right;\n"
	"margin: .5em .2em .4em;\n"
	"cursor: pointer;\n"
	"padding: .2em .6em .3em .6em;\n"
	"width: auto;\n"
	"overflow: visible;\n"
"}\n"
".ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {\n"
	"float: left;\n"
"}\n"
"\n"
"/* with multiple calendars */\n"
".ui-datepicker.ui-datepicker-multi {\n"
	"width: auto;\n"
"}\n"
".ui-datepicker-multi .ui-datepicker-group {\n"
	"float: left;\n"
"}\n"
".ui-datepicker-multi .ui-datepicker-group table {\n"
	"width: 95%;\n"
	"margin: 0 auto .4em;\n"
"}\n"
".ui-datepicker-multi-2 .ui-datepicker-group {\n"
	"width: 50%;\n"
"}\n"
".ui-datepicker-multi-3 .ui-datepicker-group {\n"
	"width: 33.3%;\n"
"}\n"
".ui-datepicker-multi-4 .ui-datepicker-group {\n"
	"width: 25%;\n"
"}\n"
".ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,\n"
".ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {\n"
	"border-left-width: 0;\n"
"}\n"
".ui-datepicker-multi .ui-datepicker-buttonpane {\n"
	"clear: left;\n"
"}\n"
".ui-datepicker-row-break {\n"
	"clear: both;\n"
	"width: 100%;\n"
	"font-size: 0;\n"
"}\n"
"\n"
"/* RTL support */\n"
".ui-datepicker-rtl {\n"
	"direction: rtl;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-prev {\n"
	"right: 2px;\n"
	"left: auto;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-next {\n"
	"left: 2px;\n"
	"right: auto;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-prev:hover {\n"
	"right: 1px;\n"
	"left: auto;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-next:hover {\n"
	"left: 1px;\n"
	"right: auto;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-buttonpane {\n"
	"clear: right;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-buttonpane button {\n"
	"float: left;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,\n"
".ui-datepicker-rtl .ui-datepicker-group {\n"
	"float: right;\n"
"}\n"
".ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,\n"
".ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {\n"
	"border-right-width: 0;\n"
	"border-left-width: 1px;\n"
"}\n"
".ui-dialog {\n"
	"position: absolute;\n"
	"top: 0;\n"
	"left: 0;\n"
	"padding: .2em;\n"
	"outline: 0;\n"
"}\n"
".ui-dialog .ui-dialog-titlebar {\n"
	"padding: .4em 1em;\n"
	"position: relative;\n"
"}\n"
".ui-dialog .ui-dialog-title {\n"
	"float: left;\n"
	"margin: .1em 0;\n"
	"white-space: nowrap;\n"
	"width: 90%;\n"
	"overflow: hidden;\n"
	"text-overflow: ellipsis;\n"
"}\n"
".ui-dialog .ui-dialog-titlebar-close {\n"
	"position: absolute;\n"
	"right: .3em;\n"
	"top: 50%;\n"
	"width: 21px;\n"
	"margin: -10px 0 0 0;\n"
	"padding: 1px;\n"
	"height: 20px;\n"
"}\n"
".ui-dialog .ui-dialog-content {\n"
	"position: relative;\n"
	"border: 0;\n"
	"padding: .5em 1em;\n"
	"background: none;\n"
	"overflow: auto;\n"
"}\n"
".ui-dialog .ui-dialog-buttonpane {\n"
	"text-align: left;\n"
	"border-width: 1px 0 0 0;\n"
	"background-image: none;\n"
	"margin-top: .5em;\n"
	"padding: .3em 1em .5em .4em;\n"
"}\n"
".ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {\n"
	"float: right;\n"
"}\n"
".ui-dialog .ui-dialog-buttonpane button {\n"
	"margin: .5em .4em .5em 0;\n"
	"cursor: pointer;\n"
"}\n"
".ui-dialog .ui-resizable-se {\n"
	"width: 12px;\n"
	"height: 12px;\n"
	"right: -5px;\n"
	"bottom: -5px;\n"
	"background-position: 16px 16px;\n"
"}\n"
".ui-draggable .ui-dialog-titlebar {\n"
	"cursor: move;\n"
"}\n"
".ui-menu {\n"
	"list-style: none;\n"
	"padding: 2px;\n"
	"margin: 0;\n"
	"display: block;\n"
	"outline: none;\n"
"}\n"
".ui-menu .ui-menu {\n"
	"margin-top: -3px;\n"
	"position: absolute;\n"
"}\n"
".ui-menu .ui-menu-item {\n"
	"margin: 0;\n"
	"padding: 0;\n"
	"width: 100%;\n"
	"/* support: IE10, see #8844 */\n"
	"list-style-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);\n"
"}\n"
".ui-menu .ui-menu-divider {\n"
	"margin: 5px -2px 5px -2px;\n"
	"height: 0;\n"
	"font-size: 0;\n"
	"line-height: 0;\n"
	"border-width: 1px 0 0 0;\n"
"}\n"
".ui-menu .ui-menu-item a {\n"
	"text-decoration: none;\n"
	"display: block;\n"
	"padding: 2px .4em;\n"
	"line-height: 1.5;\n"
	"min-height: 0; /* support: IE7 */\n"
	"font-weight: normal;\n"
"}\n"
".ui-menu .ui-menu-item a.ui-state-focus,\n"
".ui-menu .ui-menu-item a.ui-state-active {\n"
	"font-weight: normal;\n"
	"margin: -1px;\n"
"}\n"
"\n"
".ui-menu .ui-state-disabled {\n"
	"font-weight: normal;\n"
	"margin: .4em 0 .2em;\n"
	"line-height: 1.5;\n"
"}\n"
".ui-menu .ui-state-disabled a {\n"
	"cursor: default;\n"
"}\n"
"\n"
"/* icon support */\n"
".ui-menu-icons {\n"
	"position: relative;\n"
"}\n"
".ui-menu-icons .ui-menu-item a {\n"
	"position: relative;\n"
	"padding-left: 2em;\n"
"}\n"
"\n"
"/* left-aligned */\n"
".ui-menu .ui-icon {\n"
	"position: absolute;\n"
	"top: .2em;\n"
	"left: .2em;\n"
"}\n"
"\n"
"/* right-aligned */\n"
".ui-menu .ui-menu-icon {\n"
	"position: static;\n"
	"float: right;\n"
"}\n"
".ui-progressbar {\n"
	"height: 2em;\n"
	"text-align: left;\n"
	"overflow: hidden;\n"
"}\n"
".ui-progressbar .ui-progressbar-value {\n"
	"margin: -1px;\n"
	"height: 100%;\n"
"}\n"
".ui-progressbar .ui-progressbar-overlay {\n"
	"background: url(\"images/animated-overlay.gif\");\n"
	"height: 100%;\n"
	"filter: alpha(opacity=25);\n"
	"opacity: 0.25;\n"
"}\n"
".ui-progressbar-indeterminate .ui-progressbar-value {\n"
	"background-image: none;\n"
"}\n"
".ui-resizable {\n"
	"position: relative;\n"
"}\n"
".ui-resizable-handle {\n"
	"position: absolute;\n"
	"font-size: 0.1px;\n"
	"display: block;\n"
"}\n"
".ui-resizable-disabled .ui-resizable-handle,\n"
".ui-resizable-autohide .ui-resizable-handle {\n"
	"display: none;\n"
"}\n"
".ui-resizable-n {\n"
	"cursor: n-resize;\n"
	"height: 7px;\n"
	"width: 100%;\n"
	"top: -5px;\n"
	"left: 0;\n"
"}\n"
".ui-resizable-s {\n"
	"cursor: s-resize;\n"
	"height: 7px;\n"
	"width: 100%;\n"
	"bottom: -5px;\n"
	"left: 0;\n"
"}\n"
".ui-resizable-e {\n"
	"cursor: e-resize;\n"
	"width: 7px;\n"
	"right: -5px;\n"
	"top: 0;\n"
	"height: 100%;\n"
"}\n"
".ui-resizable-w {\n"
	"cursor: w-resize;\n"
	"width: 7px;\n"
	"left: -5px;\n"
	"top: 0;\n"
	"height: 100%;\n"
"}\n"
".ui-resizable-se {\n"
	"cursor: se-resize;\n"
	"width: 12px;\n"
	"height: 12px;\n"
	"right: 1px;\n"
	"bottom: 1px;\n"
"}\n"
".ui-resizable-sw {\n"
	"cursor: sw-resize;\n"
	"width: 9px;\n"
	"height: 9px;\n"
	"left: -5px;\n"
	"bottom: -5px;\n"
"}\n"
".ui-resizable-nw {\n"
	"cursor: nw-resize;\n"
	"width: 9px;\n"
	"height: 9px;\n"
	"left: -5px;\n"
	"top: -5px;\n"
"}\n"
".ui-resizable-ne {\n"
	"cursor: ne-resize;\n"
	"width: 9px;\n"
	"height: 9px;\n"
	"right: -5px;\n"
	"top: -5px;\n"
"}\n"
".ui-selectable-helper {\n"
	"position: absolute;\n"
	"z-index: 100;\n"
	"border: 1px dotted black;\n"
"}\n"
".ui-slider {\n"
	"position: relative;\n"
	"text-align: left;\n"
"}\n"
".ui-slider .ui-slider-handle {\n"
	"position: absolute;\n"
	"z-index: 2;\n"
	"width: 1.2em;\n"
	"height: 1.2em;\n"
	"cursor: default;\n"
"}\n"
".ui-slider .ui-slider-range {\n"
	"position: absolute;\n"
	"z-index: 1;\n"
	"font-size: .7em;\n"
	"display: block;\n"
	"border: 0;\n"
	"background-position: 0 0;\n"
"}\n"
"/* For IE8 - See #6727 */\n"
".ui-slider.ui-state-disabled .ui-slider-handle,\n"
".ui-slider.ui-state-disabled .ui-slider-range {\n"
	"filter: inherit;\n"
"}\n"
".ui-slider-horizontal {\n"
	"height: .8em;\n"
"}\n"
".ui-slider-horizontal .ui-slider-handle {\n"
	"top: -.3em;\n"
	"margin-left: -.6em;\n"
"}\n"
".ui-slider-horizontal .ui-slider-range {\n"
	"top: 0;\n"
	"height: 100%;\n"
"}\n"
".ui-slider-horizontal .ui-slider-range-min {\n"
	"left: 0;\n"
"}\n"
".ui-slider-horizontal .ui-slider-range-max {\n"
	"right: 0;\n"
"}\n"
".ui-slider-vertical {\n"
	"width: .8em;\n"
	"height: 100px;\n"
"}\n"
".ui-slider-vertical .ui-slider-handle {\n"
	"left: -.3em;\n"
	"margin-left: 0;\n"
	"margin-bottom: -.6em;\n"
"}\n"
".ui-slider-vertical .ui-slider-range {\n"
	"left: 0;\n"
	"width: 100%;\n"
"}\n"
".ui-slider-vertical .ui-slider-range-min {\n"
	"bottom: 0;\n"
"}\n"
".ui-slider-vertical .ui-slider-range-max {\n"
	"top: 0;\n"
"}\n"
".ui-spinner {\n"
	"position: relative;\n"
	"display: inline-block;\n"
	"overflow: hidden;\n"
	"padding: 0;\n"
	"vertical-align: middle;\n"
"}\n"
".ui-spinner-input {\n"
	"border: none;\n"
	"background: none;\n"
	"color: inherit;\n"
	"padding: 0;\n"
	"margin: .2em 0;\n"
	"vertical-align: middle;\n"
	"margin-left: .4em;\n"
	"margin-right: 22px;\n"
"}\n"
".ui-spinner-button {\n"
	"width: 16px;\n"
	"height: 50%;\n"
	"font-size: .5em;\n"
	"padding: 0;\n"
	"margin: 0;\n"
	"text-align: center;\n"
	"position: absolute;\n"
	"cursor: default;\n"
	"display: block;\n"
	"overflow: hidden;\n"
	"right: 0;\n"
"}\n"
"/* more specificity required here to overide default borders */\n"
".ui-spinner a.ui-spinner-button {\n"
	"border-top: none;\n"
	"border-bottom: none;\n"
	"border-right: none;\n"
"}\n"
"/* vertical centre icon */\n"
".ui-spinner .ui-icon {\n"
	"position: absolute;\n"
	"margin-top: -8px;\n"
	"top: 50%;\n"
	"left: 0;\n"
"}\n"
".ui-spinner-up {\n"
	"top: 0;\n"
"}\n"
".ui-spinner-down {\n"
	"bottom: 0;\n"
"}\n"
"/* TR overrides */\n"
".ui-spinner .ui-icon-triangle-1-s {\n"
	"/* need to fix icons sprite */\n"
	"background-position: -65px -16px;\n"
"}\n"
".ui-tabs {\n"
	"position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as \"fixed\") */\n"
	"padding: .2em;\n"
"}\n"
".ui-tabs .ui-tabs-nav {\n"
	"margin: 0;\n"
	"padding: .2em .2em 0;\n"
"}\n"
".ui-tabs .ui-tabs-nav li {\n"
	"list-style: none;\n"
	"float: left;\n"
	"position: relative;\n"
	"top: 0;\n"
	"margin: 1px .2em 0 0;\n"
	"border-bottom-width: 0;\n"
	"padding: 0;\n"
	"white-space: nowrap;\n"
"}\n"
".ui-tabs .ui-tabs-nav li a {\n"
	"float: left;\n"
	"padding: .5em 1em;\n"
	"text-decoration: none;\n"
"}\n"
".ui-tabs .ui-tabs-nav li.ui-tabs-active {\n"
	"margin-bottom: -1px;\n"
	"padding-bottom: 1px;\n"
"}\n"
".ui-tabs .ui-tabs-nav li.ui-tabs-active a,\n"
".ui-tabs .ui-tabs-nav li.ui-state-disabled a,\n"
".ui-tabs .ui-tabs-nav li.ui-tabs-loading a {\n"
	"cursor: text;\n"
"}\n"
".ui-tabs .ui-tabs-nav li a, /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */\n"
".ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active a {\n"
	"cursor: pointer;\n"
"}\n"
".ui-tabs .ui-tabs-panel {\n"
	"display: block;\n"
	"border-width: 0;\n"
	"padding: 1em 1.4em;\n"
	"background: none;\n"
"}\n"
".ui-tooltip {\n"
	"padding: 8px;\n"
	"position: absolute;\n"
	"z-index: 9999;\n"
	"max-width: 300px;\n"
	"-webkit-box-shadow: 0 0 5px #aaa;\n"
	"box-shadow: 0 0 5px #aaa;\n"
"}\n"
"body .ui-tooltip {\n"
	"border-width: 2px;\n"
"}\n"
"/* Component containers\n"
"----------------------------------*/\n"
".ui-widget {\n"
	"font-family: Verdana,Arial,sans-serif;\n"
	"font-size: 1.1em;\n"
"}\n"
".ui-widget .ui-widget {\n"
	"font-size: 1em;\n"
"}\n"
".ui-widget input,\n"
".ui-widget select,\n"
".ui-widget textarea,\n"
".ui-widget button {\n"
	"font-family: Verdana,Arial,sans-serif;\n"
	"font-size: 1em;\n"
"}\n"
".ui-widget-content {\n"
	"border: 1px solid #aaaaaa;\n"
	"background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;\n"
	"color: #222222;\n"
"}\n"
".ui-widget-content a {\n"
	"color: #222222;\n"
"}\n"
".ui-widget-header {\n"
	"border: 1px solid #aaaaaa;\n"
	"background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;\n"
	"color: #222222;\n"
	"font-weight: bold;\n"
"}\n"
".ui-widget-header a {\n"
	"color: #222222;\n"
"}\n"
"/* Interaction states\n"
"----------------------------------*/\n"
".ui-state-default,\n"
".ui-widget-content .ui-state-default,\n"
".ui-widget-header .ui-state-default {\n"
	"border: 1px solid #d3d3d3;\n"
	"background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;\n"
	"font-weight: normal;\n"
	"color: #555555;\n"
"}\n"
".ui-state-default a,\n"
".ui-state-default a:link,\n"
".ui-state-default a:visited {\n"
	"color: #555555;\n"
	"text-decoration: none;\n"
"}\n"
".ui-state-hover,\n"
".ui-widget-content .ui-state-hover,\n"
".ui-widget-header .ui-state-hover,\n"
".ui-state-focus,\n"
".ui-widget-content .ui-state-focus,\n"
".ui-widget-header .ui-state-focus {\n"
	"border: 1px solid #999999;\n"
	"background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;\n"
	"font-weight: normal;\n"
	"color: #212121;\n"
"}\n"
".ui-state-hover a,\n"
".ui-state-hover a:hover,\n"
".ui-state-hover a:link,\n"
".ui-state-hover a:visited {\n"
	"color: #212121;\n"
	"text-decoration: none;\n"
"}\n"
".ui-state-active,\n"
".ui-widget-content .ui-state-active,\n"
".ui-widget-header .ui-state-active {\n"
	"border: 1px solid #aaaaaa;\n"
	"background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;\n"
	"font-weight: normal;\n"
	"color: #212121;\n"
"}\n"
".ui-state-active a,\n"
".ui-state-active a:link,\n"
".ui-state-active a:visited {\n"
	"color: #212121;\n"
	"text-decoration: none;\n"
"}\n"
"/* Interaction Cues\n"
"----------------------------------*/\n"
".ui-state-highlight,\n"
".ui-widget-content .ui-state-highlight,\n"
".ui-widget-header .ui-state-highlight {\n"
	"border: 1px solid #fcefa1;\n"
	"background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;\n"
	"color: #363636;\n"
"}\n"
".ui-state-highlight a,\n"
".ui-widget-content .ui-state-highlight a,\n"
".ui-widget-header .ui-state-highlight a {\n"
	"color: #363636;\n"
"}\n"
".ui-state-error,\n"
".ui-widget-content .ui-state-error,\n"
".ui-widget-header .ui-state-error {\n"
	"border: 1px solid #cd0a0a;\n"
	"background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;\n"
	"color: #cd0a0a;\n"
"}\n"
".ui-state-error a,\n"
".ui-widget-content .ui-state-error a,\n"
".ui-widget-header .ui-state-error a {\n"
	"color: #cd0a0a;\n"
"}\n"
".ui-state-error-text,\n"
".ui-widget-content .ui-state-error-text,\n"
".ui-widget-header .ui-state-error-text {\n"
	"color: #cd0a0a;\n"
"}\n"
".ui-priority-primary,\n"
".ui-widget-content .ui-priority-primary,\n"
".ui-widget-header .ui-priority-primary {\n"
	"font-weight: bold;\n"
"}\n"
".ui-priority-secondary,\n"
".ui-widget-content .ui-priority-secondary,\n"
".ui-widget-header .ui-priority-secondary {\n"
	"opacity: .7;\n"
	"filter:Alpha(Opacity=70);\n"
	"font-weight: normal;\n"
"}\n"
".ui-state-disabled,\n"
".ui-widget-content .ui-state-disabled,\n"
".ui-widget-header .ui-state-disabled {\n"
	"opacity: .35;\n"
	"filter:Alpha(Opacity=35);\n"
	"background-image: none;\n"
"}\n"
".ui-state-disabled .ui-icon {\n"
	"filter:Alpha(Opacity=35); /* For IE8 - See #6059 */\n"
"}\n"
"/* Icons\n"
"----------------------------------*/\n"
"/* states and images */\n"
".ui-icon {\n"
	"width: 16px;\n"
	"height: 16px;\n"
"}\n"
".ui-icon,\n"
".ui-widget-content .ui-icon {\n"
	"background-image: url(images/ui-icons_222222_256x240.png);\n"
"}\n"
".ui-widget-header .ui-icon {\n"
	"background-image: url(images/ui-icons_222222_256x240.png);\n"
"}\n"
".ui-state-default .ui-icon {\n"
	"background-image: url(images/ui-icons_888888_256x240.png);\n"
"}\n"
".ui-state-hover .ui-icon,\n"
".ui-state-focus .ui-icon {\n"
	"background-image: url(images/ui-icons_454545_256x240.png);\n"
"}\n"
".ui-state-active .ui-icon {\n"
	"background-image: url(images/ui-icons_454545_256x240.png);\n"
"}\n"
".ui-state-highlight .ui-icon {\n"
	"background-image: url(images/ui-icons_2e83ff_256x240.png);\n"
"}\n"
".ui-state-error .ui-icon,\n"
".ui-state-error-text .ui-icon {\n"
	"background-image: url(images/ui-icons_cd0a0a_256x240.png);\n"
"}\n"
"/* positioning */\n"
".ui-icon-blank { background-position: 16px 16px; }\n"
".ui-icon-carat-1-n { background-position: 0 0; }\n"
".ui-icon-carat-1-ne { background-position: -16px 0; }\n"
".ui-icon-carat-1-e { background-position: -32px 0; }\n"
".ui-icon-carat-1-se { background-position: -48px 0; }\n"
".ui-icon-carat-1-s { background-position: -64px 0; }\n"
".ui-icon-carat-1-sw { background-position: -80px 0; }\n"
".ui-icon-carat-1-w { background-position: -96px 0; }\n"
".ui-icon-carat-1-nw { background-position: -112px 0; }\n"
".ui-icon-carat-2-n-s { background-position: -128px 0; }\n"
".ui-icon-carat-2-e-w { background-position: -144px 0; }\n"
".ui-icon-triangle-1-n { background-position: 0 -16px; }\n"
".ui-icon-triangle-1-ne { background-position: -16px -16px; }\n"
".ui-icon-triangle-1-e { background-position: -32px -16px; }\n"
".ui-icon-triangle-1-se { background-position: -48px -16px; }\n"
".ui-icon-triangle-1-s { background-position: -64px -16px; }\n"
".ui-icon-triangle-1-sw { background-position: -80px -16px; }\n"
".ui-icon-triangle-1-w { background-position: -96px -16px; }\n"
".ui-icon-triangle-1-nw { background-position: -112px -16px; }\n"
".ui-icon-triangle-2-n-s { background-position: -128px -16px; }\n"
".ui-icon-triangle-2-e-w { background-position: -144px -16px; }\n"
".ui-icon-arrow-1-n { background-position: 0 -32px; }\n"
".ui-icon-arrow-1-ne { background-position: -16px -32px; }\n"
".ui-icon-arrow-1-e { background-position: -32px -32px; }\n"
".ui-icon-arrow-1-se { background-position: -48px -32px; }\n"
".ui-icon-arrow-1-s { background-position: -64px -32px; }\n"
".ui-icon-arrow-1-sw { background-position: -80px -32px; }\n"
".ui-icon-arrow-1-w { background-position: -96px -32px; }\n"
".ui-icon-arrow-1-nw { background-position: -112px -32px; }\n"
".ui-icon-arrow-2-n-s { background-position: -128px -32px; }\n"
".ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }\n"
".ui-icon-arrow-2-e-w { background-position: -160px -32px; }\n"
".ui-icon-arrow-2-se-nw { background-position: -176px -32px; }\n"
".ui-icon-arrowstop-1-n { background-position: -192px -32px; }\n"
".ui-icon-arrowstop-1-e { background-position: -208px -32px; }\n"
".ui-icon-arrowstop-1-s { background-position: -224px -32px; }\n"
".ui-icon-arrowstop-1-w { background-position: -240px -32px; }\n"
".ui-icon-arrowthick-1-n { background-position: 0 -48px; }\n"
".ui-icon-arrowthick-1-ne { background-position: -16px -48px; }\n"
".ui-icon-arrowthick-1-e { background-position: -32px -48px; }\n"
".ui-icon-arrowthick-1-se { background-position: -48px -48px; }\n"
".ui-icon-arrowthick-1-s { background-position: -64px -48px; }\n"
".ui-icon-arrowthick-1-sw { background-position: -80px -48px; }\n"
".ui-icon-arrowthick-1-w { background-position: -96px -48px; }\n"
".ui-icon-arrowthick-1-nw { background-position: -112px -48px; }\n"
".ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }\n"
".ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }\n"
".ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }\n"
".ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }\n"
".ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }\n"
".ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }\n"
".ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }\n"
".ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }\n"
".ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }\n"
".ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }\n"
".ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }\n"
".ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }\n"
".ui-icon-arrowreturn-1-w { background-position: -64px -64px; }\n"
".ui-icon-arrowreturn-1-n { background-position: -80px -64px; }\n"
".ui-icon-arrowreturn-1-e { background-position: -96px -64px; }\n"
".ui-icon-arrowreturn-1-s { background-position: -112px -64px; }\n"
".ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }\n"
".ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }\n"
".ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }\n"
".ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }\n"
".ui-icon-arrow-4 { background-position: 0 -80px; }\n"
".ui-icon-arrow-4-diag { background-position: -16px -80px; }\n"
".ui-icon-extlink { background-position: -32px -80px; }\n"
".ui-icon-newwin { background-position: -48px -80px; }\n"
".ui-icon-refresh { background-position: -64px -80px; }\n"
".ui-icon-shuffle { background-position: -80px -80px; }\n"
".ui-icon-transfer-e-w { background-position: -96px -80px; }\n"
".ui-icon-transferthick-e-w { background-position: -112px -80px; }\n"
".ui-icon-folder-collapsed { background-position: 0 -96px; }\n"
".ui-icon-folder-open { background-position: -16px -96px; }\n"
".ui-icon-document { background-position: -32px -96px; }\n"
".ui-icon-document-b { background-position: -48px -96px; }\n"
".ui-icon-note { background-position: -64px -96px; }\n"
".ui-icon-mail-closed { background-position: -80px -96px; }\n"
".ui-icon-mail-open { background-position: -96px -96px; }\n"
".ui-icon-suitcase { background-position: -112px -96px; }\n"
".ui-icon-comment { background-position: -128px -96px; }\n"
".ui-icon-person { background-position: -144px -96px; }\n"
".ui-icon-print { background-position: -160px -96px; }\n"
".ui-icon-trash { background-position: -176px -96px; }\n"
".ui-icon-locked { background-position: -192px -96px; }\n"
".ui-icon-unlocked { background-position: -208px -96px; }\n"
".ui-icon-bookmark { background-position: -224px -96px; }\n"
".ui-icon-tag { background-position: -240px -96px; }\n"
".ui-icon-home { background-position: 0 -112px; }\n"
".ui-icon-flag { background-position: -16px -112px; }\n"
".ui-icon-calendar { background-position: -32px -112px; }\n"
".ui-icon-cart { background-position: -48px -112px; }\n"
".ui-icon-pencil { background-position: -64px -112px; }\n"
".ui-icon-clock { background-position: -80px -112px; }\n"
".ui-icon-disk { background-position: -96px -112px; }\n"
".ui-icon-calculator { background-position: -112px -112px; }\n"
".ui-icon-zoomin { background-position: -128px -112px; }\n"
".ui-icon-zoomout { background-position: -144px -112px; }\n"
".ui-icon-search { background-position: -160px -112px; }\n"
".ui-icon-wrench { background-position: -176px -112px; }\n"
".ui-icon-gear { background-position: -192px -112px; }\n"
".ui-icon-heart { background-position: -208px -112px; }\n"
".ui-icon-star { background-position: -224px -112px; }\n"
".ui-icon-link { background-position: -240px -112px; }\n"
".ui-icon-cancel { background-position: 0 -128px; }\n"
".ui-icon-plus { background-position: -16px -128px; }\n"
".ui-icon-plusthick { background-position: -32px -128px; }\n"
".ui-icon-minus { background-position: -48px -128px; }\n"
".ui-icon-minusthick { background-position: -64px -128px; }\n"
".ui-icon-close { background-position: -80px -128px; }\n"
".ui-icon-closethick { background-position: -96px -128px; }\n"
".ui-icon-key { background-position: -112px -128px; }\n"
".ui-icon-lightbulb { background-position: -128px -128px; }\n"
".ui-icon-scissors { background-position: -144px -128px; }\n"
".ui-icon-clipboard { background-position: -160px -128px; }\n"
".ui-icon-copy { background-position: -176px -128px; }\n"
".ui-icon-contact { background-position: -192px -128px; }\n"
".ui-icon-image { background-position: -208px -128px; }\n"
".ui-icon-video { background-position: -224px -128px; }\n"
".ui-icon-script { background-position: -240px -128px; }\n"
".ui-icon-alert { background-position: 0 -144px; }\n"
".ui-icon-info { background-position: -16px -144px; }\n"
".ui-icon-notice { background-position: -32px -144px; }\n"
".ui-icon-help { background-position: -48px -144px; }\n"
".ui-icon-check { background-position: -64px -144px; }\n"
".ui-icon-bullet { background-position: -80px -144px; }\n"
".ui-icon-radio-on { background-position: -96px -144px; }\n"
".ui-icon-radio-off { background-position: -112px -144px; }\n"
".ui-icon-pin-w { background-position: -128px -144px; }\n"
".ui-icon-pin-s { background-position: -144px -144px; }\n"
".ui-icon-play { background-position: 0 -160px; }\n"
".ui-icon-pause { background-position: -16px -160px; }\n"
".ui-icon-seek-next { background-position: -32px -160px; }\n"
".ui-icon-seek-prev { background-position: -48px -160px; }\n"
".ui-icon-seek-end { background-position: -64px -160px; }\n"
".ui-icon-seek-start { background-position: -80px -160px; }\n"
"/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */\n"
".ui-icon-seek-first { background-position: -80px -160px; }\n"
".ui-icon-stop { background-position: -96px -160px; }\n"
".ui-icon-eject { background-position: -112px -160px; }\n"
".ui-icon-volume-off { background-position: -128px -160px; }\n"
".ui-icon-volume-on { background-position: -144px -160px; }\n"
".ui-icon-power { background-position: 0 -176px; }\n"
".ui-icon-signal-diag { background-position: -16px -176px; }\n"
".ui-icon-signal { background-position: -32px -176px; }\n"
".ui-icon-battery-0 { background-position: -48px -176px; }\n"
".ui-icon-battery-1 { background-position: -64px -176px; }\n"
".ui-icon-battery-2 { background-position: -80px -176px; }\n"
".ui-icon-battery-3 { background-position: -96px -176px; }\n"
".ui-icon-circle-plus { background-position: 0 -192px; }\n"
".ui-icon-circle-minus { background-position: -16px -192px; }\n"
".ui-icon-circle-close { background-position: -32px -192px; }\n"
".ui-icon-circle-triangle-e { background-position: -48px -192px; }\n"
".ui-icon-circle-triangle-s { background-position: -64px -192px; }\n"
".ui-icon-circle-triangle-w { background-position: -80px -192px; }\n"
".ui-icon-circle-triangle-n { background-position: -96px -192px; }\n"
".ui-icon-circle-arrow-e { background-position: -112px -192px; }\n"
".ui-icon-circle-arrow-s { background-position: -128px -192px; }\n"
".ui-icon-circle-arrow-w { background-position: -144px -192px; }\n"
".ui-icon-circle-arrow-n { background-position: -160px -192px; }\n"
".ui-icon-circle-zoomin { background-position: -176px -192px; }\n"
".ui-icon-circle-zoomout { background-position: -192px -192px; }\n"
".ui-icon-circle-check { background-position: -208px -192px; }\n"
".ui-icon-circlesmall-plus { background-position: 0 -208px; }\n"
".ui-icon-circlesmall-minus { background-position: -16px -208px; }\n"
".ui-icon-circlesmall-close { background-position: -32px -208px; }\n"
".ui-icon-squaresmall-plus { background-position: -48px -208px; }\n"
".ui-icon-squaresmall-minus { background-position: -64px -208px; }\n"
".ui-icon-squaresmall-close { background-position: -80px -208px; }\n"
".ui-icon-grip-dotted-vertical { background-position: 0 -224px; }\n"
".ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }\n"
".ui-icon-grip-solid-vertical { background-position: -32px -224px; }\n"
".ui-icon-grip-solid-horizontal { background-position: -48px -224px; }\n"
".ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }\n"
".ui-icon-grip-diagonal-se { background-position: -80px -224px; }\n"
"/* Misc visuals\n"
"----------------------------------*/\n"
"/* Corner radius */\n"
".ui-corner-all,\n"
".ui-corner-top,\n"
".ui-corner-left,\n"
".ui-corner-tl {\n"
	"border-top-left-radius: 4px;\n"
"}\n"
".ui-corner-all,\n"
".ui-corner-top,\n"
".ui-corner-right,\n"
".ui-corner-tr {\n"
	"border-top-right-radius: 4px;\n"
"}\n"
".ui-corner-all,\n"
".ui-corner-bottom,\n"
".ui-corner-left,\n"
".ui-corner-bl {\n"
	"border-bottom-left-radius: 4px;\n"
"}\n"
".ui-corner-all,\n"
".ui-corner-bottom,\n"
".ui-corner-right,\n"
".ui-corner-br {\n"
	"border-bottom-right-radius: 4px;\n"
"}\n"
"/* Overlays */\n"
".ui-widget-overlay {\n"
	"background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;\n"
	"opacity: .3;\n"
	"filter: Alpha(Opacity=30);\n"
"}\n"
".ui-widget-shadow {\n"
	"margin: -8px 0 0 -8px;\n"
	"padding: 8px;\n"
	"background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;\n"
	"opacity: .3;\n"
	"filter: Alpha(Opacity=30);\n"
	"border-radius: 8px;\n"
"}\n"
"body {\n"
	"font-family: \"Trebuchet MS\", \"Helvetica\", \"Arial\",  \"Verdana\", \"sans-serif\";\n"
	"font-size: 62.5%;\n"
"}\n"

"label, input { display:block; }\n"
"input.text { margin-bottom:12px; width:95%; padding: .4em; }\n"
"fieldset { padding:0; border:0; margin-top:25px; }\n"
"h1 { font-size: 1.2em; margin: .6em 0; }\n"
"div#users-contain { width: 350px; margin: 20px 0; }\n"
"div#users-contain table { margin: 1em 0; border-collapse: collapse; width: 100%; }\n"
"div#users-contain table td, div#users-contain table th { border: 1px solid #eee; padding: .6em 10px; text-align: left; }\n"
".ui-dialog .ui-state-error { padding: .3em; }\n"
".validateTips { border: 1px solid transparent; padding: 0.3em; }\n";

void LibCSS::authorizedExecute (XmlRpc::XmlRpcSource *source, std::string path, XmlRpc::HttpParams *params, const char* &response_type, char* &response, size_t &response_length)
{
	const char *reply = NULL;
	
	std::vector <std::string> vals = SplitStr (path, std::string ("/"));
	if (vals.size () != 1)
		throw rts2core::Error ("File not found");

	if (vals[0] == "calendar.css")
		reply = calendarCss;
	else if (vals[0] == "table.css")
		reply = tableCss;
	else if (vals[0] == "datatables.css")
		reply = datatablesCss;
	else if (vals[0] == "jquery-ui.css")
		reply = jqueryUICss;
	else 
		throw rts2core::Error ("CSS not found");

	response_length = strlen (reply);
	response = new char[response_length];
	response_type = "text/css";
	memcpy (response, reply, response_length);
}
