Merge branch 'shf_rename' of github.com:webnotes/erpnext into shf_rename

Conflicts:
	css/all-app.css
	version.num
diff --git a/.gitignore b/.gitignore
index 28fcc88..95255be 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,10 @@
 *.pyc
 *.comp.js
 .DS_Store
-server_tools
-services
 user_files
 patch.log
 lib
-versions-local.db
+conf.py
+version.num
 user_files
 *.sql*
diff --git a/build.json b/build.json
index dc66138..79813e3 100644
--- a/build.json
+++ b/build.json
@@ -1,181 +1,19 @@
-[
-	{
-		"lib/js/core.min.js": [
-			"lib/js/wn/class.js",
-			"lib/js/wn/provide.js",
-			"lib/js/wn/versions.js",
-			"lib/js/wn/assets.js",
-			"lib/js/wn/require.js",
-			"lib/js/wn/dom.js",
-			"lib/js/wn/model.js",
-			"lib/js/wn/misc/tools.js",
-			"lib/js/wn/misc/user.js",
-			"lib/js/lib/json2.js",
-			"lib/js/wn/router.js",
-			"lib/js/wn/ui/listing.js",
-			"lib/js/wn/views/container.js",
-			"lib/js/wn/views/doclistview.js",
-			"lib/js/wn/views/pageview.js",
-			"lib/js/wn/views/formview.js",
-			"lib/js/wn/views/reportview.js",
-			"lib/js/wn/request.js",
-			"lib/js/core.js"
-		]
-	},
-
-	{
-		"lib/js/wn/ui/toolbar.min.js": [
-			"lib/js/wn/ui/toolbar/selector_dialog.js",
-			"lib/js/wn/ui/toolbar/new.js",
-			"lib/js/wn/ui/toolbar/search.js",
-			"lib/js/wn/ui/toolbar/report.js",
-			"lib/js/wn/ui/toolbar/recent.js",
-			"lib/js/wn/ui/toolbar/toolbar.js"
-		]	
-	},
-	
-	{
-		"lib/js/legacy/report.compressed.js": [
-			"lib/js/legacy/widgets/report_builder/report_builder.js",
-			"lib/js/legacy/widgets/report_builder/datatable.js",
-			"lib/js/legacy/widgets/report_builder/calculator.js"
-		]
-	},
-
-	{
-		"css/all-web.css": [
-			"lib/css/legacy/body.css",
-			"lib/css/legacy/messages.css",
-			"lib/css/legacy/dialog.css",
-			"lib/css/bootstrap/headings.css",
-			"lib/css/bootstrap/buttons.css",
-			"lib/css/bootstrap/navbar.css",
-			"lib/css/bootstrap/dropdown.css",
-			"lib/css/bootstrap/tooltip.css",
-			"lib/css/ui/fonts.css",
-			"lib/css/ui/list.css",
-			"erpnext/startup/startup.css",
-			"erpnext/website/css/website.css"	
-		]
-	},
-	
-	{
-		"css/all-app.css": [
-			"lib/css/legacy/body.css",
-			"lib/css/legacy/messages.css",
-			"lib/css/legacy/forms.css",
-			"lib/css/legacy/grid.css",
-			"lib/css/legacy/listing.css",
-			"lib/css/legacy/report.css",
-			"lib/css/legacy/dialog.css",
-			"lib/css/legacy/tabs.css",
-			"lib/css/legacy/sidebar.css",
-			"lib/css/Aristo/aristo.selected.css",
-			"lib/css/ui/list.css",
-			"lib/css/ui/views.css",
-			"lib/css/ui/fonts.css",
-			"lib/css/bootstrap/headings.css",
-			"lib/css/bootstrap/buttons.css",
-			"lib/css/bootstrap/navbar.css",
-			"lib/css/bootstrap/dropdown.css",
-			"lib/css/bootstrap/tooltip.css",
-			"lib/css/bootstrap/label.css",
-			"lib/css/bootstrap/icons.css",
-			"lib/css/bootstrap/popover.css",
-			"erpnext/startup/startup.css"
-		]
-	},
-
-	{
-		"js/all-web.js": [
-			"lib/js/lib/history/history.min.js:concat",
-			"lib/js/lib/bootstrap.min.js:concat",
-			"lib/js/core.min.js:concat",
-			"lib/js/legacy/globals.js",
-			"lib/js/legacy/utils/datatype.js",
-			"lib/js/legacy/utils/datetime.js",
-			"lib/js/legacy/utils/dom.js",
-			"lib/js/legacy/utils/handler.js",
-			"lib/js/legacy/utils/msgprint.js",
-			"lib/js/wn/ui/appframe.js",
-			"lib/js/wn/ui/dialog.js",
-			"lib/js/legacy/widgets/dialog.js",
-			"lib/js/wn/ui/listing.js",
-			"lib/js/legacy/webpage/page_header.js",
-			"lib/js/legacy/webpage/spinner.js",
-			"lib/js/legacy/webpage/loaders.js",
-			"lib/js/legacy/wn/widgets/footer.js",
-			"lib/js/legacy/model/local_data.js",
-			"lib/js/legacy/model/doclist.js",
-			"lib/js/legacy/app.js",
-			"js/app.js",
-			"erpnext/startup/startup.js",
-			"erpnext/website/js/topbar.js"
-		]
-	},
-	
-	{
-		"js/all-app.js": [
-			"lib/js/lib/history/history.min.js:concat",
-			"lib/js/lib/jquery/jquery.ui.core.js:concat",
-			"lib/js/lib/jquery/jquery.ui.datepicker.js:concat",
-			"lib/js/lib/jquery/jquery.ui.autocomplete.js:concat",
-			"lib/js/lib/tiny_mce_33/jquery.tinymce.js:concat",
-			"lib/js/lib/bootstrap.min.js:concat",
-			"lib/js/lib/sprintf.js",
-			"lib/js/core.min.js:concat",
-			"lib/js/legacy/globals.js",
-			"lib/js/legacy/utils/datatype.js",
-			"lib/js/legacy/utils/datetime.js",
-			"lib/js/legacy/utils/dom.js",
-			"lib/js/legacy/utils/handler.js",
-			"lib/js/legacy/utils/msgprint.js",
-			"lib/js/legacy/utils/printElement.js",
-			"lib/js/legacy/widgets/form/fields.js",
-			"lib/js/wn/ui/appframe.js",
-			"lib/js/wn/ui/dialog.js",
-			"lib/js/wn/ui/button.js",
-			"lib/js/legacy/widgets/dialog.js",
-			"lib/js/legacy/widgets/layout.js",
-			"lib/js/legacy/widgets/tabbedpage.js",
-			"lib/js/legacy/webpage/page_header.js",
-			"lib/js/legacy/widgets/tags.js",
-			"lib/js/legacy/widgets/export_query.js",
-			"lib/js/legacy/webpage/search.js",
-			"lib/js/legacy/webpage/spinner.js",
-			"lib/js/legacy/webpage/error_console.js",
-			"lib/js/legacy/webpage/loaders.js",
-			"lib/js/legacy/webpage/uploader.js",
-			"lib/js/legacy/wn/page_layout.js",
-			"lib/js/legacy/wn/widgets/page_sidebar.js",
-			"lib/js/legacy/wn/widgets/footer.js",
-			"lib/js/legacy/model/local_data.js",
-			"lib/js/legacy/model/doclist.js",
-			"lib/js/wn/ui/toolbar.min.js:concat",
-			"lib/js/wn/views/breadcrumbs.js",
-			"lib/js/legacy/widgets/form/fields.js",
-			"lib/js/legacy/widgets/form/form_dialog.js",
-			"lib/js/legacy/widgets/form/form_header.js",
-			"lib/js/legacy/widgets/form/form.js",
-			"lib/js/legacy/widgets/form/form_fields.js",
-			"lib/js/legacy/widgets/form/grid.js",
-			"lib/js/legacy/widgets/form/form_grid.js",
-			"lib/js/legacy/widgets/form/print_format.js",
-			"lib/js/legacy/widgets/form/email.js",
-			"lib/js/legacy/widgets/form/clientscriptAPI.js",
-			"lib/js/legacy/widgets/form/form_comments.js",
-			"lib/js/legacy/wn/widgets/form/sidebar.js",
-			"lib/js/legacy/wn/widgets/form/comments.js",
-			"lib/js/legacy/wn/widgets/form/attachments.js",
-			"lib/js/legacy/wn/widgets/form/assign_to.js",
-			"lib/js/legacy/app.js",
-			"js/app.js",
-			"erpnext/startup/startup.js",
-			"erpnext/startup/js/modules.js",
-			"erpnext/startup/js/toolbar.js",
-			"erpnext/startup/js/feature_setup.js"
-		]
-	}
-	
-]
-
+{
+	"css/all-web.css": [
+		"erpnext/startup/startup.css",
+		"erpnext/website/css/website.css"	
+	],
+	"css/all-app.css": [
+		"erpnext/startup/startup.css"
+	],
+	"js/all-web.js": [
+		"erpnext/startup/startup.js",
+		"erpnext/website/js/topbar.js"
+	],
+	"js/all-app.js": [
+		"erpnext/startup/startup.js",
+		"erpnext/startup/js/modules.js",
+		"erpnext/startup/js/toolbar.js",
+		"erpnext/startup/js/feature_setup.js"
+	]
+}
\ No newline at end of file
diff --git a/css/all-app.css b/css/all-app.css
index f13ef93..033ca6e 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -1,1813 +1,5 @@
 
 /*
- *	lib/css/legacy/body.css
- */
-html { 
-	margin: 0px;
-	padding: 0px;
-}
-
-body {	
-	margin: 0px;
-	padding: 0px;
-	font-family: Arial, Helvetica, Sans;
-	font-size: 14px;
-	color: #000;
-	background-color: #e2e2e2;
-}
-
-pre { margin: 0px; padding: 0px; }
-
-button { margin: 2px; margin-left: 0px; }
-
-label {
-	padding-top: 15px;
-	color: #404040;
-}
-
-select, input, textarea { 
-	border: 1px solid #ccc; 
-	-moz-border-radius: 4px;
-	-webkit-border-radius: 4px;
-	font-size: inherit;
-	padding: 4px;
-	color: #444;
-	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-	-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-textarea { 
-	font-family: inherit; 
-	height: 120px; 
-	width: 90%; 
-	font-size: inherit; 
-	white-space: normal;
-}
-
-table { padding: 0px; border-collapse: 'collapse'}
-
-td { 
-	padding:0px; 
-	margin: 0px; 
-	vertical-align: top; 
-}
-
-p {
-	margin: 0px 0px 9px 0px;
-	line-height: 1.5em;
-}
-
-li {
-	line-height: 1.5em;
-}
-
-hr {
-  margin: 18px 0;
-  border: 0;
-  border-top: 1px solid #e5e5e5;
-  border-bottom: 1px solid #ffffff;
-}
-
-/* links */
-
-a:active { outline:none; }
-
-a {
-  color: #0088cc;
-  text-decoration: none;
-}
-a:hover {
-  color: #005580;
-  text-decoration: underline;
-}
-
-.link_type {
-	padding:2px;
-	color: #0088cc;
-	cursor: pointer;
-}
-
-.link_type:hover {
-	color: #005580;
-	text-decoration: underline;
-}
-
-:focus { -moz-outline-style:none; }
-
-table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
-table.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }
-
-div.fix_ff_cursor { overflow: auto; }
-
-/* --- Layout --- */
-
-div.comment { color: #444; }
-
-.small {
-	font-size: 11px;
-}
-
-.help {
-	margin-bottom: 3px;
-	color: #888;
-}
-
-div#body_div {
-	display: none;
-	padding-right: 7px;
-	width: 900px;
-	margin: auto;
-	margin-top: 56px;
-}
-
-.content {
-	width: 900px;
-}
-
-.background-fade-in {
-	-webkit-transition: background 1s ease-in; /* property duration timing-function delay */
-    -moz-transition: background 1s ease-in;
-    -o-transition: background 1s ease-in;
-    transition: background 1s ease-in;
-}
-
-footer {
-	width: 900px;
-	margin: auto;
-}
-header .container {
-	width: 900px;
-	margin: auto;
-}
-
-@media (max-width: 1200px) {
-	div#body_div, header .container, .content, #opened-page-selector, footer {
-		width: 900px;
-	}
-}
-
-@media (min-width: 1200px) {
-	div#body_div, header .container, .content, #opened-page-selector, footer {
-		width: 1100px;
-	}
-}
-
-div.no_script {
-	display: none;
-}
-
-div.loading_div {
-	background-color: #FFFFCC;
-	z-index: 1999;
-	right: 5px;
-	width: 90px;
-	display: none;
-	text-align: center;
-	padding: 2px;
-	border: 1px solid #FF4;
-}
-
-div.std-footer {
-	margin: 13px -15px;
-	border-top: 1px solid #AAA;
-	padding: 13px;
-}
-
-div.std-footer-item {
-	margin: 0px 13px 13px 0px;
-}
-
-.shadow {
-	-moz-box-shadow: 0px 2px 2px #888;
-	-webkit-box-shadow: 0px 2px 2px #888;
- 	box-shadow: 0px 2px 2px #888;
-}
-
-.round {
-	-webkit-border-radius: 5px;
-	-moz-border-radius: 5px;
-	border-radius: 5px;	
-}
-
-.layout_wrapper, .layout-wrapper {
-	-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
-	-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
-	box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
-	background-color: #fff;
-	padding: 15px;
-	-webkit-border-radius: 5px;
-	-moz-border-radius: 5px;
-	border-radius: 5px;	
-	margin-bottom: 30px;
-	overflow: hidden;
-}
-
-.layout-wrapper-appframe {
-	padding: 0px;
-}
-
-.layout-wrapper-background {
-	background-color: #fafafa !important;
-	padding: 0px;
-}
-
-.layout-main-section {
-	width: 71%;
-	float: left;
-	padding: 15px;
-	background-color: #FFF;
-	min-height: 600px;
-	-moz-box-shadow:    2px 0px 1px #ddd;
-	-webkit-box-shadow: 2px 0px 1px #ddd;
-	box-shadow:         2px 0px 1px #ddd;
-}
-
-.layout-side-section {
-	width: 22%;
-	/*float: right;*/
-	color: #606060; 
-	overflow-x: hidden;
-	padding: 15px;
-	min-height: 600px;
-}
-
-/* from bootstrap */
-.container {
-  margin-left: auto;
-  margin-right: auto;
-  zoom: 1;
-}
-.container:before, .container:after {
-  display: table;
-  content: "";
-  zoom: 1;
-}
-.container:after {
-  clear: both;
-}
-
-.well {
-  min-height: 20px;
-  padding: 19px;
-  margin-bottom: 20px;
-  background-color: #f5f5f5;
-  border: 1px solid #eee;
-  border: 1px solid rgba(0, 0, 0, 0.05);
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-}
-
-.avatar-small {
-	display: inline-block; 
-	width: 24px;
-	height: 20px;
-	vertical-align: middle;
-	overflow: hidden;
-	margin: 0px 3px;
-}
-.avatar-small img {
-	width: 24px; 
-}
-
-/*
- *	lib/css/legacy/messages.css
- */
-
-/* FLOATING MESSAGE */
-
-.btn-img { cursor: pointer; }
-
-div.fetching { color: #888; text-align:right; }
-
-div.notice {
-	postion: absolute;
-	background-color: #000;
-	-moz-border-radius: 5px; -webkit-border-radius: 5px;
-	opacity: 0.6;
-	right: 0;
-	top: 0;
-	margin-top: 8px;
-	z-index: -1;
-	padding: 8px;
-}
-
-/** help **/
-
-.info-box {
-    background-color: #F8F8F8;
-    border: 1px solid #CCCCCC;
-    border-radius: 3px 3px 3px 3px;
-    line-height: 1.6em;
-    overflow: auto;
-    padding: 6px 10px;
-	margin-bottom: 9px;
-}
-
-.help_box, .help-box {
-	background-color:#FFC;
-	font-size: 13px;
-	color: #864;
-	padding: 7px;
-	margin: 11px 0px;
-	border: 1px solid #EEB;
-}
-
-.help_box_big {
-	background-color:#FFC;
-	color: #864;
-	padding: 7px;
-	margin: 7px 0px;
-	border: 1px solid #EEB;
-	text-align: center;
-	font-size: 14px;
-}
-
-/*
- *	lib/css/legacy/forms.css
- */
-/* FORMS */
-
-div.form-title {
-	/*background-color: #e0eeff;*/
-	padding: 5px 19px 15px 19px;
-	margin: -15px -15px 0px -15px;
-	border-bottom: 1px solid #eee;
-}
-
-div.form-section-head {
-	margin: 11px -15px 3px -15px;
-	border-top: 1px solid #ccc;
-	padding: 11px 23px 0px 23px;
-}
-
-div.form-layout-row:first-child .form-section-head {
-	border-top: 0px solid #ccc !important;
-	margin-top: 0px;
-	padding-top: 15px;
-}
-
-div.form-section-head h3 {
-	line-height: 20px;
-}
-
-div.form-section-head hr {
-	margin: 9px 0px;
-}
-
-
-div.frm_print_wrapper {
-	background-color:#FFF;
-	border:1px solid #444;
-	padding: 40px;
-
-	box-shadow:1px 1px 8px #229;
-	-moz-box-shadow: 1px 1px 8px #229;
-	-webkit-box-shadow: 1px 1px 8px #229;
-}
-
-div.page_break {
-	margin: 24px 0px;
-	border-top: 1px dashed #888;
-}
-
-div.grid_tbarlinks {
-	border-bottom: 0px;
-	background-color: #CCC;
-	padding: 4px 4px 2px 4px;
-	width: 190px;
-	float: right;
-
-	-moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px;
-	-webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px;
-}
-
-
-div.dialog_frm {
-	position: relative;
-	margin: 10px;
-}
-
-
-
-/*------------------*/
-
-.top_cell {
-	height: 50px;
-}
-
-div.attach_area {
-	padding: 8px;
-	margin: 8px;
-	background-color: #EEE;
-}
-
-div.attach_area table {
-	width: 100%;
-}
-
-.tablabel_normal {
-	margin: 0 4px 0 0;
-	padding: 3px 5px;
-	line-height: 1.3em;
-	display: inline;
-	cursor: pointer;
-}
-
-.tablabel_selected {
-	margin: 0 4px 0 0;
-	padding: 3px 5px;
-	line-height: 1.3em;
-	font-weight: bold;
-	display: inline;
-	cursor: pointer;
-	color: #000;
-}
-
-.scrollhead_wrapper {
-	position: absolute;
-	z-index: 1;
-	height: 30px;
-}
-
-.treeimg {
-	cursor: pointer;
-	margin-right: 3px;
-}
-
-
-.sectionCell {
-	padding: 5px;
-	vertical-align: top;
-}
-
-.code_area {
-	width: 80%;
-	margin: 8px;
-	padding: 4px;
-	background-color: #F8F8F8;
-	border: 1px solid #CCC;
-	overflow-x: auto;
-}
-
-.code_text {
-	width: 100%;
-	height: 360px;
-	margin-top: 3px;
-	font-family: Courier, Fixed;
-	font-size: 12px;
-}
-
-div.time_field select{
-	display: inline;
-	margin: 2px;
-	width: 45px;
-}
-
-/* Documents */
-
-.frm_field_table {
-        width: 100%;
-        border-collapse: collapse;
-}
-
-.datalabelcell { 
-        padding: 2px 0px; 
-        width: 160px; 
-        vertical-align: top; 
-}
-.datainputcell { padding: 2px 0px; }
-
-
-.help ol {
-	padding-left: 19px;
-}
-
-.field_description_top {
-	margin-bottom: 3px;
-}
-
-.input_area input, select, textarea { 
-	font-size: 14px;
-	padding: 2px;
-}
-
-.input_area input { 
-	width: 80%; 
-	margin: 0px; 
-}
-.input_area select { 
-	width: 80%; 
-}
-.input_area textarea { 
-	width: 90%; 
-}
-
-.disp_area { 
-	width: 80%; 
-	padding: 2px 0px; 
-	font-size: 12px; 
-}
-.disp_area_no_val { 
-	height: 14px; 
-}
-
-.no_img {
-	padding: 40px;
-	width: 100px;
-	height: 20px;
-	color: #888;
-	text-align: center;
-	border: 1px solid #AAA;
-}
-
-.input-mandatory {
-	font-size: 14px !important;
-	font-weight: bold;
-}
-
-.field-to-update {
-	background-color:#FEE;
-}
-
-/* sidebar */
-
-div.sidebar-comment-wrapper input {
-	width: 50%;
-}
-div.sidebar-comment-message {
-	margin-top: 8px;
-	color: #777;
-}
-
-div.sidebar-comment-text {
-	font-size: 12px;
-	font-weight: bold;
-	margin-top: 8px;
-	color: #444;
-}
-div.sidebar-comment-info {
-	color: #777;
-}
-
-/*
- *	lib/css/legacy/grid.css
- */
-
-
-/* Grid */
-
-
-/* --- Simple --- */
-.grid_wrapper_simple {
-	width: 100%;
-	margin-bottom: 8px;
-	border: 1px solid #AA9;
-}
-
-.grid_head_wrapper_simple {
-	padding: 0px;
-	border-bottom: 2px solid #AAA;
-}
-
-.grid_head_wrapper_simple td {
-	border-right: 1px solid #AA9;
-}
-
-.grid_head_wrapper_simple td div {
-	padding: 2px;
-}
-
-.grid_tab_wrapper_simple {
-}
-
-.grid_cell_simple {
-	padding: 2px;
-	background-color: #fff;
-	border-right: 1px solid #AA9;
-}
-
-
-/* --- Normal --- */
-.grid_wrapper {
-	position: relative;
-	overflow: auto;
-	border: 1px solid #AAA;
-	width: 100%;
-	margin-bottom: 8px;
-	background-color: #fff;	
-}
-
-.grid_tab_wrapper {
-	position: absolute;
-	top: 40px;
-	border-bottom: 1px solid #DDD;
-}
-
-.grid_table, .grid_head_table  {
-	table-layout: fixed;
-	border-collapse: collapse;
-	/*width: 100%;*/
-}
-
-.grid_cell {
-	border-right: 1px solid #ddd;
-	padding: 0px;
-	background-color: #fff;
-}
-
-.grid_head_wrapper {
-	position: absolute;
-	z-index: 1;
-	height: 40px;
-	padding: 0px;
-	overflow: hidden;
-	/*background-color: #fff;*/
-}
-
-.grid_head_table td {
-	background-color: #EEE;
-	border-right: 1px solid #AAA;
-	border-bottom: 1px solid #AAA;
-	height: 40px;
-	padding: 0px;
-}
-
-.grid_head_table td div {
-	color: #222;
-	font-weight: bold;
-	overflow: hidden;
-	padding: 2px 0px;
-	text-align: center;	
-}
-
-.grid_selector {
-	padding: 1px;
-	border-right: 1px solid #DDD;
-	width: 20px;
-	background-color: #fff;
-}
-
-.grid_cell_div {
-	padding: 2px;
-	cursor: pointer;
-	overflow: hidden;
-	border: 2px solid #FFF;
-}
-
-.grid_cell_div_selected {
-	border: 2px solid #88f;
-}
-
-.grid_cell_div input, .grid_cell_div select, .grid_cell_div div input {
-	margin: 0px;
-	border: 0px;
-	width: 100%;
- 	margin: 0px;
- }
-
-.grid_cell_div textarea {
-	border: 3px solid #abf;
-	height:200px;
-	width: 300px;
-	z-index: 10;
-	position:absolute;
-}
-
-.gridDivSelected option { border: 0px; }
-
-/*
- *	lib/css/legacy/listing.css
- */
-
-
-/* SRS */
-
-table.srs_result_tab {
-	border: 2px solid #AAA;
-	border-collapse: collapse;
-}
-
-/* firefox bug fix for disappering borders */
-table.srs_result_tab td, table.srs_result_tab tr, table.srs_result_tab tbody, table.srs_result_tab div {
-	position: static;
-}
-
-table.srs_result_tab td {
-	padding: 3px 2px;
-	position: static;
-}
-
-div.srs_body_area {
-}
-
-div.srs_results_area {
-}
-
-div.srs_filter_wrapper {
-	border: 1px solid #CCF;
-	
-	background-color: #EEF;
-	margin:0px 0px 8px 0px;
-
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;
-	border-radius: 5px;
-}
-
-div.srs_filter_area {
-	padding: 8px;
-}
-
-div.srs_filter_area td {
-	vertical-align: middle;
-}
-
-/*
- *	lib/css/legacy/report.css
- */
-
-/* Reports */
-
-div.report_grid_area {
-	position: relative;
-	padding: 8px;
-}
-
-
-div.report_tab { 
-	border: 1px solid #AAA; 
-	position: relative; 
-	overflow: auto; 
-}
-
-div.report_no_data {
-	padding: 8px;
-	background-color: #EEE;
-	border: 1px solid #DDD;
-	position: absolute;
-	margin-left: 40%;
-	margin-top: 50px;
-	display: none;	
-}
-
-div.report_htitle {
-	float: left;
-	padding: 2px;
-	font-size: 14px;
-	font-weight: bold;
-	margin-left: 4px;
-	color: #665;
-	/*font-weight: bold;*/
-}
-
-div.report_tbar {
-	background-color: #EEF;
-	border: 1px solid #CCF;
-	border-bottom: 0px;
-	height: 28px;
-}
-
-div.report_tbar table{
-	width: 100%;
-}
-div.report_tbar table td {
-	
-}
-div.report_tbar table td div {
-	position: relative;
-}
-div.report_tbar button, div.report_tbar select, div.report_tbar img {
-	font-size: 11px;
-	margin: 0px;
-}
-
-div.report_head_wrapper {
-	position: absolute;
-	height: 24px;
-	top: 0px;
-	z-index: 1;
-}
-
-div.report_tab_wrapper {
-	position: absolute;
-	border-bottom: 1px solid #AAA;
-	border-top: 1px solid #AAA;
-}
-
-div.report_tab_wrapper table, div.report_head_wrapper table {
-	table-layout: fixed;
-	border-collapse: collapse;
-	/*width: 100%;*/
-}
-
-div.report_tab_wrapper table td, div.report_head_wrapper table td {
-	border-left: 1px solid #AAA;
-	border-right: 1px solid #AAA;
-	border-bottom: 1px solid #AAA;
-	overflow: hidden;
-	padding: 0px;
-}
-
-div.report_tab_wrapper table td div, div.report_head_wrapper table td div {
-	padding: 3px;
-	overflow: hidden;
-}
-
-.report_head_cell {
-	background-color: #EEE;
-	border-bottom: 1px solid #AA9;
-	text-align: center;
-	font-weight: bold;
-}
-.report_head_cell div {
-	color:#222; 
-	height: 18px;
-}
-
-
-/* FINDER */
-
-div.finder_wrapper {
-}
-
-div.finder_body_area {
-	margin: 16px;
-}
-
-div.finder_body {
-	display: none;
-}
-
-div.finder_advanced_area table {
-	width: 80%;
-}
-
-div.finder_advanced_area textarea {
-	width: 80%;
-}
-
-div.finder_filter_area {
-	position: relative;
-}
-
-div.filter_head {
-	font-size: 14px;
-	margin-bottom: 2px;
-}
-div.filter_dt_head {
-	font-size: 14px;
-	font-weight: bold;
-	margin-bottom: 2px;
-}
-table.filter_tab {
-	width: 96%;
-	border-collapse: collapse;
-}
-
-table.filter_tab td {
-	width: 50%;
-}
-
-div.finder_picker_area {
-	
-}
-div.builder_field {
-	margin: 0px;
-}
-div.builder_dt_head {
-	font-size: 14px;
-	font-weight: bold;
-	margin-bottom: 2px;
-}
-
-div.builder_field table {
-	width: 90%;
-	border-collapse: collapse;
-}
-
-div.builder_label {
-	height: 20px;
-}
-
-div.builder_head {
-	font-size: 16px;
-	font-weight: bold;
-	color: #AB6;
-}
-
-table.builder_tab {
-	width: 96%;
-	border-collapse: collapse;
-}
-
-table.builder_tab td {
-	width: 33%;
-	padding: 2px;
-}
-
-/*
- *	lib/css/legacy/dialog.css
- */
-/***** Dialogs *******/
-
-div.dialog_wrapper {
-	position: absolute;
-	width: 440px;
-	display: none;
-	z-index: 90;
-	background-color: #FFF;
-	box-shadow:1px 1px 8px #444;
-	-moz-box-shadow: 1px 1px 8px #444;
-	-webkit-box-shadow: 1px 1px 8px #444;
-	
-	border-radius: 5px;
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;
-	
-	overflow: hidden;
-}
-
-div.dialog_head {
-	height: 22px;
-	padding: 4px;
-	background-color: #222;
-	color: #FFF;
-}
-
-div.dialog_body {
-	padding: 8px 8px 16px;
-	border-radius: 5px;
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;	
-}
-
-div.dialog_back {
-	position: fixed;
-	display: none;
-	top: 0px;
-	left: 0px;
-	bottom: 0px;
-	right: 0px;
-	background-color: #aaa;
-	opacity: 0.6;
-	z-index: 50;
-	text-align: center;
-}
-
-div.dialog_message {
-	display: none;
-	position: absolute;
-	width: 250px;
-	font-size: 12px;
-	z-index: 91;
-	background-color:#FFF;
-	padding: 12px;
-	border: 1px solid #444;
-}
-
-div.dialog_row {
-	padding: 8px 8px 0px 8px;
-}
-
-div.dialog_row table {
-	width: 100%;
-}
-
-div.dialog_row table td {
-}
-
-div.dialog_row input[type="text"], div.dialog_row input[type="password"], div.dialog_row textarea, div.dialog_row select {
-	width: 80%;
-	font-size: 14px;
-}
-
-div.dialog_row table td textarea {
-	width: 80%;
-	height: 200px;
-	font-size: 12px;
-}
-
-
-/*
- *	lib/css/legacy/tabs.css
- */
-
-/******* TABS ********/
-
-div.box_label_wrapper {
-	border-bottom: 6px solid #777;
-}
-
-div.box_label_body {
-	height: 22px;
-}
-
-ul.box_tabs {
-	margin: 0px;
-	padding: 0px;
-	list-style: none;
-}
-
-ul.box_tabs li {
-	height: 22px;
-	float:left;
-	font-size: 12px;
-	text-decoration: underline;
-	
-	background-color: #DDD;
-	
-	margin:0;
-	margin-left: 4px;
-	padding:0 0 0 9px;
-	cursor: pointer;
-}
-
-ul.box_tabs li a {
-	display:block;
-	padding:3px 15px 3px 6px;
-	text-decoration: none;
-}
-
-ul.box_tabs li.box_tab_mouseover {
-	background-color: #BBB;
-}
-
-ul.box_tabs li.box_tab_selected {	
-	background-color: #777;
-	
-	background: -webkit-gradient(linear, left top, left bottom, from(#999), to(#777));
-	background: -moz-linear-gradient(top, #999, #777);
-		
-	color: #FFF;
-	font-weight:bold;
-	
-}
-ul.box_tabs li.box_tab_selected a {
-	color: #fff;
-}
-
-/*
- *	lib/css/legacy/sidebar.css
- */
-div.psidebar {
-}
-
-div.psidebar div.head {
-	font-size: 14px;
-	font-weight: bold;
-	color: #555;
-	margin-bottom: 12px;
-}
-
-div.psidebar div.section {
-	margin-bottom: 11px;
-	overflow: hidden;
-}
-
-div.psidebar div.section-head {
-	padding: 5px 11px;
-	border-bottom: 1px solid #aaa;
-}
-
-div.psidebar div.section-body {
-	margin: 7px 11px 11px 11px;
-}
-
-div.psidebar div.section-item {
-	margin-bottom: 7px;
-}
-
-div.psidebar div.section-item, div.psidebar .section-link {
-	color: #666;
-}
-
-/*
- *	lib/css/Aristo/aristo.selected.css
- */
-/*
- * jQuery UI CSS Framework 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
-.ui-widget-content a { color: #4F4F4F; }
-.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
-.ui-widget-header {
-	background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
-		background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
-		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
-		background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
-		background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
-		background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
-		background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
-}
-.ui-widget-header a { color: #4F4F4F; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { 
-	background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
-		background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
-		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
-		background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
-		background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
-		background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
-		background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
-	-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
-	-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
-	box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
-}
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { 
-	outline: none;
-	color: #1c4257; border: 1px solid #7096ab;
-	background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
-		background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
-		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
-		background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
-		background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
-		background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
-		background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
-	-webkit-box-shadow: none;
-	-moz-box-shadow: none;
-	box-shadow: none;
-}
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(../lib/css/Aristo/images/icon_sprite.png) -16px 0 no-repeat !important; }
-.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background: url(../lib/css/Aristo/images/icon_sprite.png) 0 0 no-repeat !important; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
-.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
-.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
-.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
-.ui-corner-right {  -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
-.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
-.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
-.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
-
-/*
- * jQuery UI Autocomplete 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete {
-	position: absolute; cursor: default; z-index: 3;
-		-moz-border-radius: 0; 
-		-webkit-border-radius: 0;
-		border-radius: 0;
-			-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
-			-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
-			box-shadow: 0 1px 5px rgba(0,0,0,0.3);
-}	
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
-	list-style:none;
-	padding: 2px;
-	margin: 0;
-	display:block;
-	float: left;
-}
-.ui-menu .ui-menu {
-	margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
-	margin:0;
-	padding: 0;
-	zoom: 1;
-	float: left;
-	clear: left;
-	width: 100%;
-}
-.ui-menu .ui-menu-item a {
-	text-decoration:none;
-	display:block;
-	padding:.2em .4em;
-	line-height:1.5;
-	zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
-	font-weight: normal;
-	margin: -1px;
-	background: #5f83b9;
-	color: #FFFFFF;
-	border-color: #466086;
-		-moz-border-radius: 0; 
-		-webkit-border-radius: 0;
-		border-radius: 0;
-}
-
-/*
- * jQuery UI Datepicker 1.8.7
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Datepicker#theming
- */
-.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
-.ui-datepicker {
-	-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
-	-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
-	box-shadow: 0 4px 8px rgba(0,0,0,0.5);
-}
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
-.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
-.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
-.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(../lib/css/Aristo/images/icon_sprite.png) no-repeat; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month, 
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
-.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
-.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
-.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
-    display: none; /*sorry for IE5*/
-    display/**/: block; /*sorry for IE5*/
-    position: absolute; /*must have*/
-    z-index: -1; /*must have*/
-    filter: mask(); /*must have*/
-    top: -4px; /*must have*/
-    left: -4px; /*must have*/
-    width: 200px; /*must have*/
-    height: 200px; /*must have*/
-}
-
-
-
-/*
- *	lib/css/ui/list.css
- */
-.hide {
-	display: none;
-}
-
-.list-filters {
-	margin: 7px 0px;
-}
-
-.wnlist .img-load {
-	display: none;
-	float: left;
-	margin-bottom: 8px;
-}
-
-/* list-row */
-div.list-row {
-	border-bottom: 1px solid #eee;
-	padding: 5px 0px;
-}
-div.list-row:hover {
-	background-color: #eef
-}
-
-div.list-row .label {
-	margin-right: 4px;
-}
-
-div.list-row table {
-	table-layout: fixed;
-	border-collapse: collapse;
-	width: 100%;
-}
-
-div.list-row table td {
-	overflow: hidden;
-	/*padding-right: 3px;*/
-	padding: 0px 3px;
-	vertical-align: middle;
-	height: 24px;
-	max-height: 24px;
-	word-wrap: break-word;
-}
-
-div.paging-button {
-	text-align: center;
-	padding: 11px 0px;
-}
-
-div.show_filters {
-	display: none;
-}
-
-div.filter_list {
-	padding: 13px;
-}
-
-div.show_filters.well {
-	margin-top: 11px;
-	margin-bottom: 11px;
-}
-
-div.filter_list .run_btn {
-	text-align: right;
-}
-
-div.filter_list .add_filter {
-	margin: 3px 0px;
-}
-
-div.list_filter {
-	margin: 7px 0px;
-}
-
-div.list_filter input, div.list_filter select {
-	width: 130px;
-	margin-right: 7px;
-}
-
-/* bar */
-
-span.bar-outer {
-	display: inline-block;
-	margin: 0px 7px;
-	margin-top: 3px;
-	background-color: #fff;
-	border: 1px solid #aaa;
-	height: 10px;
-}
-
-span.bar-inner {
-	display: inline-block;
-	background-color: #bdf;
-	height: 100%;
-	margin-bottom: 2px;
-	float: left;
-}
-span.bar-complete {
-	background-color: #009900;
-}
-span.bar-empty {
-	background-color: #990000;
-}
-
-
-/* stats */
-
-div.stat-wrapper {
-	margin-bottom: 19px;	
-}
-
-div.stat-grid {
-	border: 2px solid #bbb;
-	background-color: white;
-	border-radius: 5px;
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;
-	overflow: hidden;
-}
-
-div.stat-label {
-	position: relative;
-	padding: 3px;
-	text-align: center;
-}
-div.stat-label, div.stat-label a {
-	z-index: 5;
-}
-
-div.stat-item {
-	position: relative;
-	border-bottom: 1px solid #ddd;
-}
-div.stat-item:last-child {
-	border-bottom: 0px solid #ddd;	
-}
-
-div.stat-bar {
-	position: absolute;
-	left: 0px;
-	background-color: #def;
-	height: 100%;
-	z-index: 0;
-}
-
-
-
-
-
-/*
- *	lib/css/ui/views.css
- */
-.breadcrumbs {
-	color: #000000;
-}
-
-.breadcrumbs a {
-	color: #000000;
-}
-
-div.appframe-titlebar {
-	padding: 6px;
-	background: #eeeeee; /* Old browsers */
-	background: -moz-linear-gradient(top,  #eeeeee 0%, #cccccc 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */
-	background: -ms-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* IE10+ */
-	background: linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* W3C */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
-	border-bottom: 1px solid #ccc;
-	min-height: 1.2em;
-}
-
-div.appframe-toolbar {
-	padding: 4px;
-	background: #eeeeee;
-	border-top: 1px solid #f8f8f8;
-	border-bottom: 1px solid #ccc;
-}
-
-/*
- *	lib/css/ui/fonts.css
- */
-@font-face {
-  font-family: 'Pontano Sans';
-  font-style: normal;
-  font-weight: 800;
-  src: url('../lib/css/fonts/pontanosans.woff') format('woff');
-}
-
-@font-face {
-  font-family: 'Droid Sans';
-  font-style: normal;
-  font-weight: normal;
-  src: local('Droid Sans'), local('DroidSans'), url('../lib/css/fonts/droidsans.woff') format('woff');
-}
-
-@font-face {
-  font-family: 'PT Sans';
-  font-style: normal;
-  font-weight: normal;
-  src: local('PT Sans'), local('PTSans-Regular'), url('../lib/css/fonts/ptsans.woff') format('woff');
-}
-
-@font-face {
-  font-family: 'Open Sans';
-  font-style: normal;
-  font-weight: 400;
-  src: local('Open Sans'), local('OpenSans'), url('../lib/css/fonts/opensans.woff') format('woff');
-}
-
-@font-face {
-  font-family: 'Lato';
-  font-style: normal;
-  font-weight: 400;
-  src: local('Lato Regular'), local('Lato-Regular'), url('../lib/css/fonts/lato.woff') format('woff');
-}
-
-@font-face {
-  font-family: 'Cabin';
-  font-style: normal;
-  font-weight: 400;
-  src: local('Cabin Regular'), local('Cabin-Regular'), url('../lib/css/fonts/cabin.woff') format('woff');
-}
-
-@font-face {
-  font-family: 'Pacifico';
-  font-style: normal;
-  font-weight: normal;
-  src: local('Pacifico Regular'), local('Pacifico-Regular'), url('../lib/css/fonts/pacifico.woff') format('woff');
-}
-
-
-
-/*
  *	lib/css/bootstrap/headings.css
  */
 /* heading from bootstrap */
@@ -3524,16 +1716,1867 @@
 }
 
 /*
- *	erpnext/startup/startup.css
+ *	lib/css/legacy/body.css
  */
+html { 
+	margin: 0px;
+	padding: 0px;
+}
+
+body {	
+	margin: 0px;
+	padding: 0px;
+	font-size: 14px;
+	color: #000;
+	background-color: #e2e2e2;
+}
+
+/* font settings */
+
 h1, h2, h3, h4, h5 {
-	font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
+	font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif;
 	font-weight: normal;
 	margin-top: 0.2em;
 }
 
 body {
-	font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
+	font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif;
+	font-size: 13px;
+}
+
+span, div, td, input, textarea, button, select {
+	font-family: inherit;
+}
+
+
+pre { margin: 0px; padding: 0px; }
+
+button { margin: 2px; margin-left: 0px; }
+
+label {
+	padding-top: 15px;
+	color: #404040;
+}
+
+select, input, textarea { 
+	border: 1px solid #ccc; 
+	-moz-border-radius: 4px;
+	-webkit-border-radius: 4px;
+	font-size: inherit;
+	padding: 4px;
+	color: #444;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+	-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+textarea { 
+	font-family: inherit; 
+	height: 120px; 
+	width: 90%; 
+	font-size: inherit; 
+	white-space: normal;
+}
+
+table { padding: 0px; border-collapse: 'collapse'}
+
+td { 
+	padding:0px; 
+	margin: 0px; 
+	vertical-align: top; 
+}
+
+p {
+	margin: 0px 0px 9px 0px;
+	line-height: 1.5em;
+}
+
+li {
+	line-height: 1.5em;
+}
+
+hr {
+  margin: 18px 0;
+  border: 0;
+  border-top: 1px solid #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+}
+
+/* links */
+
+a:active { outline:none; }
+
+a {
+  color: #0088cc;
+  text-decoration: none;
+}
+a:hover {
+  color: #005580;
+  text-decoration: underline;
+}
+
+.link_type {
+	padding:2px;
+	color: #0088cc;
+	cursor: pointer;
+}
+
+.link_type:hover {
+	color: #005580;
+	text-decoration: underline;
+}
+
+:focus { -moz-outline-style:none; }
+
+table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
+table.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }
+
+div.fix_ff_cursor { overflow: auto; }
+
+/* --- Layout --- */
+
+div.comment { color: #444; }
+
+.small {
+	font-size: 11px;
+}
+
+.help {
+	margin-bottom: 3px;
+	color: #888;
+}
+
+div#body_div {
+	display: none;
+	padding-right: 7px;
+	width: 900px;
+	margin: auto;
+	margin-top: 56px;
+}
+
+.content {
+	width: 900px;
+}
+
+.background-fade-in {
+	-webkit-transition: background 1s ease-in; /* property duration timing-function delay */
+    -moz-transition: background 1s ease-in;
+    -o-transition: background 1s ease-in;
+    transition: background 1s ease-in;
+}
+
+footer {
+	width: 900px;
+	margin: auto;
+}
+header .container {
+	width: 900px;
+	margin: auto;
+}
+
+@media (max-width: 1200px) {
+	div#body_div, header .container, .content, #opened-page-selector, footer {
+		width: 900px;
+	}
+}
+
+@media (min-width: 1200px) {
+	div#body_div, header .container, .content, #opened-page-selector, footer {
+		width: 1100px;
+	}
+}
+
+div.no_script {
+	display: none;
+}
+
+div.loading_div {
+	background-color: #FFFFCC;
+	z-index: 1999;
+	right: 5px;
+	width: 90px;
+	display: none;
+	text-align: center;
+	padding: 2px;
+	border: 1px solid #FF4;
+}
+
+div.std-footer {
+	margin: 13px -15px;
+	border-top: 1px solid #AAA;
+	padding: 13px;
+}
+
+div.std-footer-item {
+	margin: 0px 13px 13px 0px;
+}
+
+.shadow {
+	-moz-box-shadow: 0px 2px 2px #888;
+	-webkit-box-shadow: 0px 2px 2px #888;
+ 	box-shadow: 0px 2px 2px #888;
+}
+
+.round {
+	-webkit-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;	
+}
+
+.layout_wrapper, .layout-wrapper {
+	-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+	-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+	box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+	background-color: #fff;
+	padding: 15px;
+	-webkit-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;	
+	margin-bottom: 30px;
+	overflow: hidden;
+}
+
+.layout-wrapper-appframe {
+	padding: 0px;
+}
+
+.layout-wrapper-background {
+	background-color: #fafafa !important;
+	padding: 0px;
+}
+
+.layout-section {
+	padding: 15px;	
+}
+
+.layout-main-section {
+	width: 71%;
+	float: left;
+	padding: 15px;
+	background-color: #FFF;
+	min-height: 600px;
+	-moz-box-shadow:    2px 0px 1px #ddd;
+	-webkit-box-shadow: 2px 0px 1px #ddd;
+	box-shadow:         2px 0px 1px #ddd;
+}
+
+.layout-side-section {
+	width: 22%;
+	/*float: right;*/
+	color: #606060; 
+	overflow-x: hidden;
+	padding: 15px;
+	min-height: 600px;
+}
+
+/* from bootstrap */
+.container {
+  margin-left: auto;
+  margin-right: auto;
+  zoom: 1;
+}
+.container:before, .container:after {
+  display: table;
+  content: "";
+  zoom: 1;
+}
+.container:after {
+  clear: both;
+}
+
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #eee;
+  border: 1px solid rgba(0, 0, 0, 0.05);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.avatar-small {
+	display: inline-block; 
+	width: 24px;
+	height: 20px;
+	vertical-align: middle;
+	overflow: hidden;
+	margin: 0px 3px;
+}
+.avatar-small img {
+	width: 24px; 
+}
+
+/*
+ *	lib/css/legacy/messages.css
+ */
+
+/* FLOATING MESSAGE */
+
+.btn-img { cursor: pointer; }
+
+div.fetching { color: #888; text-align:right; }
+
+div.notice {
+	postion: absolute;
+	background-color: #000;
+	-moz-border-radius: 5px; -webkit-border-radius: 5px;
+	opacity: 0.6;
+	right: 0;
+	top: 0;
+	margin-top: 8px;
+	z-index: -1;
+	padding: 8px;
+}
+
+/** help **/
+
+.info-box {
+    background-color: #F8F8F8;
+    border: 1px solid #CCCCCC;
+    border-radius: 3px 3px 3px 3px;
+    line-height: 1.6em;
+    overflow: auto;
+    padding: 6px 10px;
+	margin-bottom: 9px;
+}
+
+.help_box, .help-box {
+	background-color:#FFC;
+	font-size: 13px;
+	color: #864;
+	padding: 7px;
+	margin: 11px 0px;
+	border: 1px solid #EEB;
+}
+
+.help_box_big {
+	background-color:#FFC;
+	color: #864;
+	padding: 7px;
+	margin: 7px 0px;
+	border: 1px solid #EEB;
+	text-align: center;
+	font-size: 14px;
+}
+
+/*
+ *	lib/css/legacy/forms.css
+ */
+/* FORMS */
+
+div.form-title {
+	/*background-color: #e0eeff;*/
+	padding: 5px 19px 15px 19px;
+	margin: -15px -15px 0px -15px;
+	border-bottom: 1px solid #eee;
+}
+
+div.form-section-head {
+	margin: 11px -15px 3px -15px;
+	border-top: 1px solid #ccc;
+	padding: 11px 23px 0px 23px;
+}
+
+div.form-layout-row:first-child .form-section-head {
+	border-top: 0px solid #ccc !important;
+	margin-top: 0px;
+	padding-top: 15px;
+}
+
+div.form-section-head h3 {
+	line-height: 20px;
+}
+
+div.form-section-head hr {
+	margin: 9px 0px;
+}
+
+
+div.frm_print_wrapper {
+	background-color:#FFF;
+	border:1px solid #444;
+	padding: 40px;
+
+	box-shadow:1px 1px 8px #229;
+	-moz-box-shadow: 1px 1px 8px #229;
+	-webkit-box-shadow: 1px 1px 8px #229;
+}
+
+div.page_break {
+	margin: 24px 0px;
+	border-top: 1px dashed #888;
+}
+
+div.grid_tbarlinks {
+	border-bottom: 0px;
+	background-color: #CCC;
+	padding: 4px 4px 2px 4px;
+	width: 190px;
+	float: right;
+
+	-moz-border-radius-topleft: 5px; -moz-border-radius-topright: 5px;
+	-webkit-border-top-left-radius: 5px; -webkit-border-top-right-radius: 5px;
+}
+
+
+div.dialog_frm {
+	position: relative;
+	margin: 10px;
+}
+
+
+
+/*------------------*/
+
+.top_cell {
+	height: 50px;
+}
+
+div.attach_area {
+	padding: 8px;
+	margin: 8px;
+	background-color: #EEE;
+}
+
+div.attach_area table {
+	width: 100%;
+}
+
+.tablabel_normal {
+	margin: 0 4px 0 0;
+	padding: 3px 5px;
+	line-height: 1.3em;
+	display: inline;
+	cursor: pointer;
+}
+
+.tablabel_selected {
+	margin: 0 4px 0 0;
+	padding: 3px 5px;
+	line-height: 1.3em;
+	font-weight: bold;
+	display: inline;
+	cursor: pointer;
+	color: #000;
+}
+
+.scrollhead_wrapper {
+	position: absolute;
+	z-index: 1;
+	height: 30px;
+}
+
+.treeimg {
+	cursor: pointer;
+	margin-right: 3px;
+}
+
+
+.sectionCell {
+	padding: 5px;
+	vertical-align: top;
+}
+
+.code_area {
+	width: 80%;
+	margin: 8px;
+	padding: 4px;
+	background-color: #F8F8F8;
+	border: 1px solid #CCC;
+	overflow-x: auto;
+}
+
+.code_text {
+	width: 100%;
+	height: 360px;
+	margin-top: 3px;
+	font-family: Courier, Fixed;
+	font-size: 12px;
+}
+
+div.time_field select{
+	display: inline;
+	margin: 2px;
+	width: 45px;
+}
+
+/* sidebar */
+
+div.sidebar-comment-wrapper input {
+	width: 50%;
+}
+div.sidebar-comment-message {
+	margin-top: 8px;
+	color: #777;
+}
+
+div.sidebar-comment-text {
+	font-size: 12px;
+	font-weight: bold;
+	margin-top: 8px;
+	color: #444;
+}
+div.sidebar-comment-info {
+	color: #777;
+}
+
+/*
+ *	lib/css/legacy/fields.css
+ */
+/* Documents */
+
+.frm_field_table {
+        width: 100%;
+        border-collapse: collapse;
+}
+
+.datalabelcell { 
+        padding: 2px 0px; 
+        width: 160px; 
+        vertical-align: top; 
+}
+.datainputcell { padding: 2px 0px; }
+
+
+.help ol {
+	padding-left: 19px;
+}
+
+.field_description_top {
+	margin-bottom: 3px;
+}
+
+.input_area input, select, textarea { 
+	font-size: 14px;
+	padding: 2px;
+}
+
+.input_area input { 
+	width: 80%; 
+	margin: 0px; 
+}
+.input_area select { 
+	width: 80%; 
+}
+.input_area textarea { 
+	width: 90%; 
+}
+
+.disp_area { 
+	width: 80%; 
+	padding: 2px 0px; 
+	font-size: 12px; 
+}
+.disp_area_no_val { 
+	height: 14px; 
+}
+
+.no_img {
+	padding: 40px;
+	width: 100px;
+	height: 20px;
+	color: #888;
+	text-align: center;
+	border: 1px solid #AAA;
+}
+
+.input-mandatory {
+	font-size: 14px !important;
+	font-weight: bold;
+}
+
+.field-to-update {
+	background-color:#FEE;
+}
+
+/*
+ *	lib/css/legacy/grid.css
+ */
+
+
+/* Grid */
+
+
+/* --- Simple --- */
+.grid_wrapper_simple {
+	width: 100%;
+	margin-bottom: 8px;
+	border: 1px solid #AA9;
+}
+
+.grid_head_wrapper_simple {
+	padding: 0px;
+	border-bottom: 2px solid #AAA;
+}
+
+.grid_head_wrapper_simple td {
+	border-right: 1px solid #AA9;
+}
+
+.grid_head_wrapper_simple td div {
+	padding: 2px;
+}
+
+.grid_tab_wrapper_simple {
+}
+
+.grid_cell_simple {
+	padding: 2px;
+	background-color: #fff;
+	border-right: 1px solid #AA9;
+}
+
+
+/* --- Normal --- */
+.grid_wrapper {
+	position: relative;
+	overflow: auto;
+	border: 1px solid #AAA;
+	width: 100%;
+	margin-bottom: 8px;
+	background-color: #fff;	
+}
+
+.grid_tab_wrapper {
+	position: absolute;
+	top: 40px;
+	border-bottom: 1px solid #DDD;
+}
+
+.grid_table, .grid_head_table  {
+	table-layout: fixed;
+	border-collapse: collapse;
+	/*width: 100%;*/
+}
+
+.grid_cell {
+	border-right: 1px solid #ddd;
+	padding: 0px;
+	background-color: #fff;
+}
+
+.grid_head_wrapper {
+	position: absolute;
+	z-index: 1;
+	height: 40px;
+	padding: 0px;
+	overflow: hidden;
+	/*background-color: #fff;*/
+}
+
+.grid_head_table td {
+	background-color: #EEE;
+	border-right: 1px solid #AAA;
+	border-bottom: 1px solid #AAA;
+	height: 40px;
+	padding: 0px;
+}
+
+.grid_head_table td div {
+	color: #222;
+	font-weight: bold;
+	overflow: hidden;
+	padding: 2px 0px;
+	text-align: center;	
+}
+
+.grid_selector {
+	padding: 1px;
+	border-right: 1px solid #DDD;
+	width: 20px;
+	background-color: #fff;
+}
+
+.grid_cell_div {
+	padding: 2px;
+	cursor: pointer;
+	overflow: hidden;
+	border: 2px solid #FFF;
+}
+
+.grid_cell_div_selected {
+	border: 2px solid #88f;
+}
+
+.grid_cell_div input, .grid_cell_div select, .grid_cell_div div input {
+	margin: 0px;
+	border: 0px;
+	width: 100%;
+ 	margin: 0px;
+ }
+
+.grid_cell_div textarea {
+	border: 3px solid #abf;
+	height:200px;
+	width: 300px;
+	z-index: 10;
+	position:absolute;
+}
+
+.gridDivSelected option { border: 0px; }
+
+/*
+ *	lib/css/legacy/listing.css
+ */
+
+
+/* SRS */
+
+table.srs_result_tab {
+	border: 2px solid #AAA;
+	border-collapse: collapse;
+}
+
+/* firefox bug fix for disappering borders */
+table.srs_result_tab td, table.srs_result_tab tr, table.srs_result_tab tbody, table.srs_result_tab div {
+	position: static;
+}
+
+table.srs_result_tab td {
+	padding: 3px 2px;
+	position: static;
+}
+
+div.srs_body_area {
+}
+
+div.srs_results_area {
+}
+
+div.srs_filter_wrapper {
+	border: 1px solid #CCF;
+	
+	background-color: #EEF;
+	margin:0px 0px 8px 0px;
+
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;
+	border-radius: 5px;
+}
+
+div.srs_filter_area {
+	padding: 8px;
+}
+
+div.srs_filter_area td {
+	vertical-align: middle;
+}
+
+/*
+ *	lib/css/legacy/report.css
+ */
+
+/* Reports */
+
+div.report_grid_area {
+	position: relative;
+	padding: 8px;
+}
+
+
+div.report_tab { 
+	border: 1px solid #AAA; 
+	position: relative; 
+	overflow: auto; 
+}
+
+div.report_no_data {
+	padding: 8px;
+	background-color: #EEE;
+	border: 1px solid #DDD;
+	position: absolute;
+	margin-left: 40%;
+	margin-top: 50px;
+	display: none;	
+}
+
+div.report_htitle {
+	float: left;
+	padding: 2px;
+	font-size: 14px;
+	font-weight: bold;
+	margin-left: 4px;
+	color: #665;
+	/*font-weight: bold;*/
+}
+
+div.report_tbar {
+	background-color: #EEF;
+	border: 1px solid #CCF;
+	border-bottom: 0px;
+	height: 28px;
+}
+
+div.report_tbar table{
+	width: 100%;
+}
+div.report_tbar table td {
+	
+}
+div.report_tbar table td div {
+	position: relative;
+}
+div.report_tbar button, div.report_tbar select, div.report_tbar img {
+	font-size: 11px;
+	margin: 0px;
+}
+
+div.report_head_wrapper {
+	position: absolute;
+	height: 24px;
+	top: 0px;
+	z-index: 1;
+}
+
+div.report_tab_wrapper {
+	position: absolute;
+	border-bottom: 1px solid #AAA;
+	border-top: 1px solid #AAA;
+}
+
+div.report_tab_wrapper table, div.report_head_wrapper table {
+	table-layout: fixed;
+	border-collapse: collapse;
+	/*width: 100%;*/
+}
+
+div.report_tab_wrapper table td, div.report_head_wrapper table td {
+	border-left: 1px solid #AAA;
+	border-right: 1px solid #AAA;
+	border-bottom: 1px solid #AAA;
+	overflow: hidden;
+	padding: 0px;
+}
+
+div.report_tab_wrapper table td div, div.report_head_wrapper table td div {
+	padding: 3px;
+	overflow: hidden;
+}
+
+.report_head_cell {
+	background-color: #EEE;
+	border-bottom: 1px solid #AA9;
+	text-align: center;
+	font-weight: bold;
+}
+.report_head_cell div {
+	color:#222; 
+	height: 18px;
+}
+
+
+/* FINDER */
+
+div.finder_wrapper {
+}
+
+div.finder_body_area {
+	margin: 16px;
+}
+
+div.finder_body {
+	display: none;
+}
+
+div.finder_advanced_area table {
+	width: 80%;
+}
+
+div.finder_advanced_area textarea {
+	width: 80%;
+}
+
+div.finder_filter_area {
+	position: relative;
+}
+
+div.filter_head {
+	font-size: 14px;
+	margin-bottom: 2px;
+}
+div.filter_dt_head {
+	font-size: 14px;
+	font-weight: bold;
+	margin-bottom: 2px;
+}
+table.filter_tab {
+	width: 96%;
+	border-collapse: collapse;
+}
+
+table.filter_tab td {
+	width: 50%;
+}
+
+div.finder_picker_area {
+	
+}
+div.builder_field {
+	margin: 0px;
+}
+div.builder_dt_head {
+	font-size: 14px;
+	font-weight: bold;
+	margin-bottom: 2px;
+}
+
+div.builder_field table {
+	width: 90%;
+	border-collapse: collapse;
+}
+
+div.builder_label {
+	height: 20px;
+}
+
+div.builder_head {
+	font-size: 16px;
+	font-weight: bold;
+	color: #AB6;
+}
+
+table.builder_tab {
+	width: 96%;
+	border-collapse: collapse;
+}
+
+table.builder_tab td {
+	width: 33%;
+	padding: 2px;
+}
+
+/*
+ *	lib/css/legacy/dialog.css
+ */
+/***** Dialogs *******/
+
+div.dialog_wrapper {
+	position: absolute;
+	width: 440px;
+	display: none;
+	z-index: 90;
+	background-color: #FFF;
+	box-shadow:1px 1px 8px #444;
+	-moz-box-shadow: 1px 1px 8px #444;
+	-webkit-box-shadow: 1px 1px 8px #444;
+	
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;
+	
+	overflow: hidden;
+}
+
+div.dialog_head {
+	height: 22px;
+	padding: 4px;
+	background-color: #222;
+	color: #FFF;
+}
+
+div.dialog_body {
+	padding: 8px 8px 16px;
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;	
+}
+
+div.dialog_back {
+	position: fixed;
+	display: none;
+	top: 0px;
+	left: 0px;
+	bottom: 0px;
+	right: 0px;
+	background-color: #aaa;
+	opacity: 0.6;
+	z-index: 50;
+	text-align: center;
+}
+
+div.dialog_message {
+	display: none;
+	position: absolute;
+	width: 250px;
+	font-size: 12px;
+	z-index: 91;
+	background-color:#FFF;
+	padding: 12px;
+	border: 1px solid #444;
+}
+
+div.dialog_row {
+	padding: 8px 8px 0px 8px;
+}
+
+div.dialog_row table {
+	width: 100%;
+}
+
+div.dialog_row table td {
+}
+
+div.dialog_row input[type="text"], div.dialog_row input[type="password"], div.dialog_row textarea, div.dialog_row select {
+	width: 80%;
+	font-size: 14px;
+}
+
+div.dialog_row table td textarea {
+	width: 80%;
+	height: 200px;
+	font-size: 12px;
+}
+
+
+/*
+ *	lib/css/legacy/tabs.css
+ */
+
+/******* TABS ********/
+
+div.box_label_wrapper {
+	border-bottom: 6px solid #777;
+}
+
+div.box_label_body {
+	height: 22px;
+}
+
+ul.box_tabs {
+	margin: 0px;
+	padding: 0px;
+	list-style: none;
+}
+
+ul.box_tabs li {
+	height: 22px;
+	float:left;
+	font-size: 12px;
+	text-decoration: underline;
+	
+	background-color: #DDD;
+	
+	margin:0;
+	margin-left: 4px;
+	padding:0 0 0 9px;
+	cursor: pointer;
+}
+
+ul.box_tabs li a {
+	display:block;
+	padding:3px 15px 3px 6px;
+	text-decoration: none;
+}
+
+ul.box_tabs li.box_tab_mouseover {
+	background-color: #BBB;
+}
+
+ul.box_tabs li.box_tab_selected {	
+	background-color: #777;
+	
+	background: -webkit-gradient(linear, left top, left bottom, from(#999), to(#777));
+	background: -moz-linear-gradient(top, #999, #777);
+		
+	color: #FFF;
+	font-weight:bold;
+	
+}
+ul.box_tabs li.box_tab_selected a {
+	color: #fff;
+}
+
+/*
+ *	lib/css/legacy/sidebar.css
+ */
+div.psidebar {
+}
+
+div.psidebar div.head {
+	font-size: 14px;
+	font-weight: bold;
+	color: #555;
+	margin-bottom: 12px;
+}
+
+div.psidebar div.section {
+	margin-bottom: 11px;
+	overflow: hidden;
+}
+
+div.psidebar div.section-head {
+	padding: 5px 11px;
+	border-bottom: 1px solid #aaa;
+}
+
+div.psidebar div.section-body {
+	margin: 7px 11px 11px 11px;
+}
+
+div.psidebar div.section-item {
+	margin-bottom: 7px;
+}
+
+div.psidebar div.section-item, div.psidebar .section-link {
+	color: #666;
+}
+
+/*
+ *	lib/css/Aristo/aristo.selected.css
+ */
+/*
+ * jQuery UI CSS Framework 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ctl=themeroller
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Arial,sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Arial,sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #B6B6B6; background: #ffffff; color: #4F4F4F; }
+.ui-widget-content a { color: #4F4F4F; }
+.ui-widget-header { border: 1px solid #B6B6B6; color: #4F4F4F; font-weight: bold; }
+.ui-widget-header {
+	background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
+		background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
+		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
+		background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
+		background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
+		background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
+		background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
+}
+.ui-widget-header a { color: #4F4F4F; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #B6B6B6; font-weight: normal; color: #4F4F4F; }
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { 
+	background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 0 repeat-x; /* Old browsers */
+		background: -moz-linear-gradient(top, #ededed 0%, #c4c4c4 100%); /* FF3.6+ */
+		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ededed), color-stop(100%,#c4c4c4)); /* Chrome,Safari4+ */
+		background: -webkit-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Chrome10+,Safari5.1+ */
+		background: -o-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* Opera11.10+ */
+		background: -ms-linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* IE10+ */
+		background: linear-gradient(top, #ededed 0%,#c4c4c4 100%); /* W3C */
+	-webkit-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+	-moz-box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+	box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
+}
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #4F4F4F; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #9D9D9D; font-weight: normal; color: #313131; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #313131; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { 
+	outline: none;
+	color: #1c4257; border: 1px solid #7096ab;
+	background: #ededed url(../lib/css/Aristo/images/bg_fallback.png) 0 -50px repeat-x; /* Old browsers */
+		background: -moz-linear-gradient(top, #b9e0f5 0%, #92bdd6 100%); /* FF3.6+ */
+		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#b9e0f5), color-stop(100%,#92bdd6)); /* Chrome,Safari4+ */
+		background: -webkit-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Chrome10+,Safari5.1+ */
+		background: -o-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* Opera11.10+ */
+		background: -ms-linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* IE10+ */
+		background: linear-gradient(top, #b9e0f5 0%,#92bdd6 100%); /* W3C */
+	-webkit-box-shadow: none;
+	-moz-box-shadow: none;
+	box-shadow: none;
+}
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #313131; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight  { border: 1px solid #d2dbf4; background: #f4f8fd; color: #0d2054; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error { border: 1px solid #e2d0d0; background: #fcf0f0; color: #280b0b; -moz-border-radius: 0 !important; -webkit-border-radius: 0 !important; border-radius: 0 !important; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary,  .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_222222_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(../lib/css/Aristo/images/ui-icons_454545_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon { background: url(../lib/css/Aristo/images/icon_sprite.png) -16px 0 no-repeat !important; }
+.ui-state-highlight .ui-icon, .ui-state-error .ui-icon { margin-top: -1px; }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background: url(../lib/css/Aristo/images/icon_sprite.png) 0 0 no-repeat !important; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; }
+.ui-corner-tr { -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
+.ui-corner-br { -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-top { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-right {  -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; border-top-right-radius: 3px; -moz-border-radius-bottomright: 3px; -webkit-border-bottom-right-radius: 3px; border-bottom-right-radius: 3px; }
+.ui-corner-left { -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; border-top-left-radius: 3px; -moz-border-radius-bottomleft: 3px; -webkit-border-bottom-left-radius: 3px; border-bottom-left-radius: 3px; }
+.ui-corner-all { -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #262b33; opacity: .70;filter:Alpha(Opacity=70); }
+.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #000000; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }
+
+/*
+ * jQuery UI Autocomplete 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete {
+	position: absolute; cursor: default; z-index: 3;
+		-moz-border-radius: 0; 
+		-webkit-border-radius: 0;
+		border-radius: 0;
+			-moz-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+			-webkit-box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+			box-shadow: 0 1px 5px rgba(0,0,0,0.3);
+}	
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+	list-style:none;
+	padding: 2px;
+	margin: 0;
+	display:block;
+	float: left;
+}
+.ui-menu .ui-menu {
+	margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+	margin:0;
+	padding: 0;
+	zoom: 1;
+	float: left;
+	clear: left;
+	width: 100%;
+}
+.ui-menu .ui-menu-item a {
+	text-decoration:none;
+	display:block;
+	padding:.2em .4em;
+	line-height:1.5;
+	zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+	font-weight: normal;
+	margin: -1px;
+	background: #5f83b9;
+	color: #FFFFFF;
+	border-color: #466086;
+		-moz-border-radius: 0; 
+		-webkit-border-radius: 0;
+		border-radius: 0;
+}
+
+/*
+ * jQuery UI Datepicker 1.8.7
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: 0; display: none; border-color: #DDDDDD; }
+.ui-datepicker {
+	-moz-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+	-webkit-box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+	box-shadow: 0 4px 8px rgba(0,0,0,0.5);
+}
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.35em 0; border: none; border-bottom: 1px solid #B6B6B6; -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 6px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { border: 1px none; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev span { background-position: 0px -32px !important; }
+.ui-datepicker .ui-datepicker-next span { background-position: -16px -32px !important; }
+.ui-datepicker .ui-datepicker-prev-hover span { background-position: 0px -48px !important; }
+.ui-datepicker .ui-datepicker-next-hover span { background-position: -16px -48px !important; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; background: url(../lib/css/Aristo/images/icon_sprite.png) no-repeat; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; font-size: 12px; text-shadow: 0 1px 0 rgba(255,255,255,0.6); }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month, 
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0;  }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+.ui-datepicker table .ui-state-highlight { border-color: #5F83B9; }
+.ui-datepicker table .ui-state-hover { background: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; -webkit-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; -moz-box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; box-shadow: 0 0px 0 rgba(255,255,255,0.6) inset; border-color: #5F83B9; }
+.ui-datepicker-calendar .ui-state-default { background: transparent; border-color: #FFF; }
+.ui-datepicker-calendar .ui-state-active { background: #5F83B9; border-color: #5F83B9; color: #FFF; font-weight: bold; text-shadow: 0 1px 1px #234386; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+    display: none; /*sorry for IE5*/
+    display/**/: block; /*sorry for IE5*/
+    position: absolute; /*must have*/
+    z-index: -1; /*must have*/
+    filter: mask(); /*must have*/
+    top: -4px; /*must have*/
+    left: -4px; /*must have*/
+    width: 200px; /*must have*/
+    height: 200px; /*must have*/
+}
+
+
+
+/*
+ *	lib/css/ui/common.css
+ */
+.navbar-icon-home {
+	vertical-align: middle;
+	opacity: 0.4;
+	Filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+
+.navbar-icon-home:hover,
+.navbar-icon-home:focus,
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
+	opacity:1;
+	Filter:alpha(opacity=100); /* For IE8 and earlier */
+}
+
+
+/*
+ *	lib/css/ui/list.css
+ */
+.hide {
+	display: none;
+}
+
+.list-filters {
+	margin: 7px 0px;
+}
+
+.wnlist .img-load {
+	display: none;
+	float: left;
+	margin-bottom: 8px;
+}
+
+/* list-row */
+div.list-row {
+	border-bottom: 1px solid #eee;
+	padding: 5px 0px;
+}
+div.list-row:hover {
+	background-color: #eef
+}
+
+div.list-row .label {
+	margin-right: 4px;
+}
+
+div.list-row table {
+	table-layout: fixed;
+	border-collapse: collapse;
+	width: 100%;
+}
+
+div.list-row table td {
+	overflow: hidden;
+	/*padding-right: 3px;*/
+	padding: 0px 3px;
+	vertical-align: middle;
+	height: 24px;
+	max-height: 24px;
+	word-wrap: break-word;
+}
+
+div.paging-button {
+	text-align: center;
+	padding: 11px 0px;
+}
+
+div.show_filters {
+	display: none;
+}
+
+div.filter_list {
+	padding: 13px;
+}
+
+div.show_filters.well {
+	margin-top: 11px;
+	margin-bottom: 11px;
+}
+
+div.filter_list .run_btn {
+	text-align: right;
+}
+
+div.filter_list .add_filter {
+	margin: 3px 0px;
+}
+
+div.list_filter {
+	margin: 7px 0px;
+}
+
+div.list_filter input, div.list_filter select {
+	width: 130px;
+	margin-right: 7px;
+}
+
+/* bar */
+
+span.bar-outer {
+	display: inline-block;
+	margin: 0px 7px;
+	margin-top: 3px;
+	background-color: #fff;
+	border: 1px solid #aaa;
+	height: 10px;
+}
+
+span.bar-inner {
+	display: inline-block;
+	background-color: #bdf;
+	height: 100%;
+	margin-bottom: 2px;
+	float: left;
+}
+span.bar-complete {
+	background-color: #009900;
+}
+span.bar-empty {
+	background-color: #990000;
+}
+
+
+/* stats */
+
+div.stat-wrapper {
+	margin-bottom: 19px;	
+}
+
+div.stat-grid {
+	border: 2px solid #bbb;
+	background-color: white;
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;
+	overflow: hidden;
+}
+
+div.stat-label {
+	position: relative;
+	padding: 3px;
+	text-align: center;
+}
+div.stat-label, div.stat-label a {
+	z-index: 5;
+}
+
+div.stat-item {
+	position: relative;
+	border-bottom: 1px solid #ddd;
+}
+div.stat-item:last-child {
+	border-bottom: 0px solid #ddd;	
+}
+
+div.stat-bar {
+	position: absolute;
+	left: 0px;
+	background-color: #def;
+	height: 100%;
+	z-index: 0;
+}
+
+
+
+
+
+/*
+ *	lib/css/ui/views.css
+ */
+
+.breadcrumbs {
+	color: #000000;
+}
+
+.breadcrumbs a {
+	color: #000000;
+}
+
+div.appframe-titlebar {
+	padding: 6px;
+	background: #eeeeee; /* Old browsers */
+	background: -moz-linear-gradient(top,  #eeeeee 0%, #cccccc 100%); /* FF3.6+ */
+	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
+	background: -webkit-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
+	background: -o-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */
+	background: -ms-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* IE10+ */
+	background: linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* W3C */
+	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
+	border-bottom: 1px solid #aaa;
+	min-height: 1.2em;
+}
+
+div.appframe-toolbar {
+	padding: 4px;
+	background: #eeeeee;
+	border-top: 1px solid #f8f8f8;
+	border-bottom: 1px solid #ccc;
+}
+
+/*
+ *	lib/css/ui/fonts.css
+ */
+@font-face {
+  font-family: 'Pontano Sans';
+  font-style: normal;
+  font-weight: 800;
+  src: url('../lib/css/fonts/pontanosans.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Droid Sans';
+  font-style: normal;
+  font-weight: normal;
+  src: local('Droid Sans'), local('DroidSans'), url('../lib/css/fonts/droidsans.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'PT Sans';
+  font-style: normal;
+  font-weight: normal;
+  src: local('PT Sans'), local('PTSans-Regular'), url('../lib/css/fonts/ptsans.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Open Sans';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Open Sans'), local('OpenSans'), url('../lib/css/fonts/opensans.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Lato';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Lato Regular'), local('Lato-Regular'), url('../lib/css/fonts/lato.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Cabin';
+  font-style: normal;
+  font-weight: 400;
+  src: local('Cabin Regular'), local('Cabin-Regular'), url('../lib/css/fonts/cabin.woff') format('woff');
+}
+
+@font-face {
+  font-family: 'Pacifico';
+  font-style: normal;
+  font-weight: normal;
+  src: local('Pacifico Regular'), local('Pacifico-Regular'), url('../lib/css/fonts/pacifico.woff') format('woff');
+}
+
+
+
+/*
+ *	erpnext/startup/startup.css
+ */
+h1, h2, h3, h4, h5 {
+	font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
+	font-weight: normal;
+	margin-top: 0.2em;
+}
+
+body {
+	font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
 	font-size: 13px;
 }
 
@@ -3572,26 +3615,11 @@
 	color: #fff;
 }
 
-
 .navbar-new-comments-true {
 	color: #fff;
 	background-color: #B00D07;
 }
 
-.navbar-icon-home {
-	vertical-align: middle;
-	opacity:0.4;
-	Filter:alpha(opacity=40); /* For IE8 and earlier */
-}
-
-.navbar-icon-home:hover,
-.navbar-icon-home:focus,
-.navbar-icon-home:active,
-.navbar-icon-home-hover{
-	opacity:1;
-	Filter:alpha(opacity=100); /* For IE8 and earlier */
-}
-
 /*extra size menus for recent*/
 .dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
 	min-width: 160px !important;
diff --git a/css/all-web.css b/css/all-web.css
index c1f10d7..53eb733 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -1,416 +1,5 @@
 
 /*
- *	lib/css/legacy/body.css
- */
-html { 
-	margin: 0px;
-	padding: 0px;
-}
-
-body {	
-	margin: 0px;
-	padding: 0px;
-	font-family: Arial, Helvetica, Sans;
-	font-size: 14px;
-	color: #000;
-	background-color: #e2e2e2;
-}
-
-pre { margin: 0px; padding: 0px; }
-
-button { margin: 2px; margin-left: 0px; }
-
-label {
-	padding-top: 15px;
-	color: #404040;
-}
-
-select, input, textarea { 
-	border: 1px solid #ccc; 
-	-moz-border-radius: 4px;
-	-webkit-border-radius: 4px;
-	font-size: inherit;
-	padding: 4px;
-	color: #444;
-	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-	-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-}
-
-textarea { 
-	font-family: inherit; 
-	height: 120px; 
-	width: 90%; 
-	font-size: inherit; 
-	white-space: normal;
-}
-
-table { padding: 0px; border-collapse: 'collapse'}
-
-td { 
-	padding:0px; 
-	margin: 0px; 
-	vertical-align: top; 
-}
-
-p {
-	margin: 0px 0px 9px 0px;
-	line-height: 1.5em;
-}
-
-li {
-	line-height: 1.5em;
-}
-
-hr {
-  margin: 18px 0;
-  border: 0;
-  border-top: 1px solid #e5e5e5;
-  border-bottom: 1px solid #ffffff;
-}
-
-/* links */
-
-a:active { outline:none; }
-
-a {
-  color: #0088cc;
-  text-decoration: none;
-}
-a:hover {
-  color: #005580;
-  text-decoration: underline;
-}
-
-.link_type {
-	padding:2px;
-	color: #0088cc;
-	cursor: pointer;
-}
-
-.link_type:hover {
-	color: #005580;
-	text-decoration: underline;
-}
-
-:focus { -moz-outline-style:none; }
-
-table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
-table.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }
-
-div.fix_ff_cursor { overflow: auto; }
-
-/* --- Layout --- */
-
-div.comment { color: #444; }
-
-.small {
-	font-size: 11px;
-}
-
-.help {
-	margin-bottom: 3px;
-	color: #888;
-}
-
-div#body_div {
-	display: none;
-	padding-right: 7px;
-	width: 900px;
-	margin: auto;
-	margin-top: 56px;
-}
-
-.content {
-	width: 900px;
-}
-
-.background-fade-in {
-	-webkit-transition: background 1s ease-in; /* property duration timing-function delay */
-    -moz-transition: background 1s ease-in;
-    -o-transition: background 1s ease-in;
-    transition: background 1s ease-in;
-}
-
-footer {
-	width: 900px;
-	margin: auto;
-}
-header .container {
-	width: 900px;
-	margin: auto;
-}
-
-@media (max-width: 1200px) {
-	div#body_div, header .container, .content, #opened-page-selector, footer {
-		width: 900px;
-	}
-}
-
-@media (min-width: 1200px) {
-	div#body_div, header .container, .content, #opened-page-selector, footer {
-		width: 1100px;
-	}
-}
-
-div.no_script {
-	display: none;
-}
-
-div.loading_div {
-	background-color: #FFFFCC;
-	z-index: 1999;
-	right: 5px;
-	width: 90px;
-	display: none;
-	text-align: center;
-	padding: 2px;
-	border: 1px solid #FF4;
-}
-
-div.std-footer {
-	margin: 13px -15px;
-	border-top: 1px solid #AAA;
-	padding: 13px;
-}
-
-div.std-footer-item {
-	margin: 0px 13px 13px 0px;
-}
-
-.shadow {
-	-moz-box-shadow: 0px 2px 2px #888;
-	-webkit-box-shadow: 0px 2px 2px #888;
- 	box-shadow: 0px 2px 2px #888;
-}
-
-.round {
-	-webkit-border-radius: 5px;
-	-moz-border-radius: 5px;
-	border-radius: 5px;	
-}
-
-.layout_wrapper, .layout-wrapper {
-	-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
-	-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
-	box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
-	background-color: #fff;
-	padding: 15px;
-	-webkit-border-radius: 5px;
-	-moz-border-radius: 5px;
-	border-radius: 5px;	
-	margin-bottom: 30px;
-	overflow: hidden;
-}
-
-.layout-wrapper-appframe {
-	padding: 0px;
-}
-
-.layout-wrapper-background {
-	background-color: #fafafa !important;
-	padding: 0px;
-}
-
-.layout-main-section {
-	width: 71%;
-	float: left;
-	padding: 15px;
-	background-color: #FFF;
-	min-height: 600px;
-	-moz-box-shadow:    2px 0px 1px #ddd;
-	-webkit-box-shadow: 2px 0px 1px #ddd;
-	box-shadow:         2px 0px 1px #ddd;
-}
-
-.layout-side-section {
-	width: 22%;
-	/*float: right;*/
-	color: #606060; 
-	overflow-x: hidden;
-	padding: 15px;
-	min-height: 600px;
-}
-
-/* from bootstrap */
-.container {
-  margin-left: auto;
-  margin-right: auto;
-  zoom: 1;
-}
-.container:before, .container:after {
-  display: table;
-  content: "";
-  zoom: 1;
-}
-.container:after {
-  clear: both;
-}
-
-.well {
-  min-height: 20px;
-  padding: 19px;
-  margin-bottom: 20px;
-  background-color: #f5f5f5;
-  border: 1px solid #eee;
-  border: 1px solid rgba(0, 0, 0, 0.05);
-  -webkit-border-radius: 4px;
-  -moz-border-radius: 4px;
-  border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
-}
-
-.avatar-small {
-	display: inline-block; 
-	width: 24px;
-	height: 20px;
-	vertical-align: middle;
-	overflow: hidden;
-	margin: 0px 3px;
-}
-.avatar-small img {
-	width: 24px; 
-}
-
-/*
- *	lib/css/legacy/messages.css
- */
-
-/* FLOATING MESSAGE */
-
-.btn-img { cursor: pointer; }
-
-div.fetching { color: #888; text-align:right; }
-
-div.notice {
-	postion: absolute;
-	background-color: #000;
-	-moz-border-radius: 5px; -webkit-border-radius: 5px;
-	opacity: 0.6;
-	right: 0;
-	top: 0;
-	margin-top: 8px;
-	z-index: -1;
-	padding: 8px;
-}
-
-/** help **/
-
-.info-box {
-    background-color: #F8F8F8;
-    border: 1px solid #CCCCCC;
-    border-radius: 3px 3px 3px 3px;
-    line-height: 1.6em;
-    overflow: auto;
-    padding: 6px 10px;
-	margin-bottom: 9px;
-}
-
-.help_box, .help-box {
-	background-color:#FFC;
-	font-size: 13px;
-	color: #864;
-	padding: 7px;
-	margin: 11px 0px;
-	border: 1px solid #EEB;
-}
-
-.help_box_big {
-	background-color:#FFC;
-	color: #864;
-	padding: 7px;
-	margin: 7px 0px;
-	border: 1px solid #EEB;
-	text-align: center;
-	font-size: 14px;
-}
-
-/*
- *	lib/css/legacy/dialog.css
- */
-/***** Dialogs *******/
-
-div.dialog_wrapper {
-	position: absolute;
-	width: 440px;
-	display: none;
-	z-index: 90;
-	background-color: #FFF;
-	box-shadow:1px 1px 8px #444;
-	-moz-box-shadow: 1px 1px 8px #444;
-	-webkit-box-shadow: 1px 1px 8px #444;
-	
-	border-radius: 5px;
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;
-	
-	overflow: hidden;
-}
-
-div.dialog_head {
-	height: 22px;
-	padding: 4px;
-	background-color: #222;
-	color: #FFF;
-}
-
-div.dialog_body {
-	padding: 8px 8px 16px;
-	border-radius: 5px;
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;	
-}
-
-div.dialog_back {
-	position: fixed;
-	display: none;
-	top: 0px;
-	left: 0px;
-	bottom: 0px;
-	right: 0px;
-	background-color: #aaa;
-	opacity: 0.6;
-	z-index: 50;
-	text-align: center;
-}
-
-div.dialog_message {
-	display: none;
-	position: absolute;
-	width: 250px;
-	font-size: 12px;
-	z-index: 91;
-	background-color:#FFF;
-	padding: 12px;
-	border: 1px solid #444;
-}
-
-div.dialog_row {
-	padding: 8px 8px 0px 8px;
-}
-
-div.dialog_row table {
-	width: 100%;
-}
-
-div.dialog_row table td {
-}
-
-div.dialog_row input[type="text"], div.dialog_row input[type="password"], div.dialog_row textarea, div.dialog_row select {
-	width: 80%;
-	font-size: 14px;
-}
-
-div.dialog_row table td textarea {
-	width: 80%;
-	height: 200px;
-	font-size: 12px;
-}
-
-
-/*
  *	lib/css/bootstrap/headings.css
  */
 /* heading from bootstrap */
@@ -1607,6 +1196,456 @@
 }
 
 /*
+ *	lib/css/legacy/body.css
+ */
+html { 
+	margin: 0px;
+	padding: 0px;
+}
+
+body {	
+	margin: 0px;
+	padding: 0px;
+	font-size: 14px;
+	color: #000;
+	background-color: #e2e2e2;
+}
+
+/* font settings */
+
+h1, h2, h3, h4, h5 {
+	font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif;
+	font-weight: normal;
+	margin-top: 0.2em;
+}
+
+body {
+	font-family: "Helvetica Neue", Helvetica, "Helvetica Neue", sans-serif;
+	font-size: 13px;
+}
+
+span, div, td, input, textarea, button, select {
+	font-family: inherit;
+}
+
+
+pre { margin: 0px; padding: 0px; }
+
+button { margin: 2px; margin-left: 0px; }
+
+label {
+	padding-top: 15px;
+	color: #404040;
+}
+
+select, input, textarea { 
+	border: 1px solid #ccc; 
+	-moz-border-radius: 4px;
+	-webkit-border-radius: 4px;
+	font-size: inherit;
+	padding: 4px;
+	color: #444;
+	-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+	-moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+
+textarea { 
+	font-family: inherit; 
+	height: 120px; 
+	width: 90%; 
+	font-size: inherit; 
+	white-space: normal;
+}
+
+table { padding: 0px; border-collapse: 'collapse'}
+
+td { 
+	padding:0px; 
+	margin: 0px; 
+	vertical-align: top; 
+}
+
+p {
+	margin: 0px 0px 9px 0px;
+	line-height: 1.5em;
+}
+
+li {
+	line-height: 1.5em;
+}
+
+hr {
+  margin: 18px 0;
+  border: 0;
+  border-top: 1px solid #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+}
+
+/* links */
+
+a:active { outline:none; }
+
+a {
+  color: #0088cc;
+  text-decoration: none;
+}
+a:hover {
+  color: #005580;
+  text-decoration: underline;
+}
+
+.link_type {
+	padding:2px;
+	color: #0088cc;
+	cursor: pointer;
+}
+
+.link_type:hover {
+	color: #005580;
+	text-decoration: underline;
+}
+
+:focus { -moz-outline-style:none; }
+
+table.simpletable { border-collapse: collapse; margin-bottom: 10px;}
+table.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }
+
+div.fix_ff_cursor { overflow: auto; }
+
+/* --- Layout --- */
+
+div.comment { color: #444; }
+
+.small {
+	font-size: 11px;
+}
+
+.help {
+	margin-bottom: 3px;
+	color: #888;
+}
+
+div#body_div {
+	display: none;
+	padding-right: 7px;
+	width: 900px;
+	margin: auto;
+	margin-top: 56px;
+}
+
+.content {
+	width: 900px;
+}
+
+.background-fade-in {
+	-webkit-transition: background 1s ease-in; /* property duration timing-function delay */
+    -moz-transition: background 1s ease-in;
+    -o-transition: background 1s ease-in;
+    transition: background 1s ease-in;
+}
+
+footer {
+	width: 900px;
+	margin: auto;
+}
+header .container {
+	width: 900px;
+	margin: auto;
+}
+
+@media (max-width: 1200px) {
+	div#body_div, header .container, .content, #opened-page-selector, footer {
+		width: 900px;
+	}
+}
+
+@media (min-width: 1200px) {
+	div#body_div, header .container, .content, #opened-page-selector, footer {
+		width: 1100px;
+	}
+}
+
+div.no_script {
+	display: none;
+}
+
+div.loading_div {
+	background-color: #FFFFCC;
+	z-index: 1999;
+	right: 5px;
+	width: 90px;
+	display: none;
+	text-align: center;
+	padding: 2px;
+	border: 1px solid #FF4;
+}
+
+div.std-footer {
+	margin: 13px -15px;
+	border-top: 1px solid #AAA;
+	padding: 13px;
+}
+
+div.std-footer-item {
+	margin: 0px 13px 13px 0px;
+}
+
+.shadow {
+	-moz-box-shadow: 0px 2px 2px #888;
+	-webkit-box-shadow: 0px 2px 2px #888;
+ 	box-shadow: 0px 2px 2px #888;
+}
+
+.round {
+	-webkit-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;	
+}
+
+.layout_wrapper, .layout-wrapper {
+	-moz-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+	-webkit-box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+	box-shadow: 0px 0px 6px rgba(0,0,0,0.3);
+	background-color: #fff;
+	padding: 15px;
+	-webkit-border-radius: 5px;
+	-moz-border-radius: 5px;
+	border-radius: 5px;	
+	margin-bottom: 30px;
+	overflow: hidden;
+}
+
+.layout-wrapper-appframe {
+	padding: 0px;
+}
+
+.layout-wrapper-background {
+	background-color: #fafafa !important;
+	padding: 0px;
+}
+
+.layout-section {
+	padding: 15px;	
+}
+
+.layout-main-section {
+	width: 71%;
+	float: left;
+	padding: 15px;
+	background-color: #FFF;
+	min-height: 600px;
+	-moz-box-shadow:    2px 0px 1px #ddd;
+	-webkit-box-shadow: 2px 0px 1px #ddd;
+	box-shadow:         2px 0px 1px #ddd;
+}
+
+.layout-side-section {
+	width: 22%;
+	/*float: right;*/
+	color: #606060; 
+	overflow-x: hidden;
+	padding: 15px;
+	min-height: 600px;
+}
+
+/* from bootstrap */
+.container {
+  margin-left: auto;
+  margin-right: auto;
+  zoom: 1;
+}
+.container:before, .container:after {
+  display: table;
+  content: "";
+  zoom: 1;
+}
+.container:after {
+  clear: both;
+}
+
+.well {
+  min-height: 20px;
+  padding: 19px;
+  margin-bottom: 20px;
+  background-color: #f5f5f5;
+  border: 1px solid #eee;
+  border: 1px solid rgba(0, 0, 0, 0.05);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
+}
+
+.avatar-small {
+	display: inline-block; 
+	width: 24px;
+	height: 20px;
+	vertical-align: middle;
+	overflow: hidden;
+	margin: 0px 3px;
+}
+.avatar-small img {
+	width: 24px; 
+}
+
+/*
+ *	lib/css/legacy/messages.css
+ */
+
+/* FLOATING MESSAGE */
+
+.btn-img { cursor: pointer; }
+
+div.fetching { color: #888; text-align:right; }
+
+div.notice {
+	postion: absolute;
+	background-color: #000;
+	-moz-border-radius: 5px; -webkit-border-radius: 5px;
+	opacity: 0.6;
+	right: 0;
+	top: 0;
+	margin-top: 8px;
+	z-index: -1;
+	padding: 8px;
+}
+
+/** help **/
+
+.info-box {
+    background-color: #F8F8F8;
+    border: 1px solid #CCCCCC;
+    border-radius: 3px 3px 3px 3px;
+    line-height: 1.6em;
+    overflow: auto;
+    padding: 6px 10px;
+	margin-bottom: 9px;
+}
+
+.help_box, .help-box {
+	background-color:#FFC;
+	font-size: 13px;
+	color: #864;
+	padding: 7px;
+	margin: 11px 0px;
+	border: 1px solid #EEB;
+}
+
+.help_box_big {
+	background-color:#FFC;
+	color: #864;
+	padding: 7px;
+	margin: 7px 0px;
+	border: 1px solid #EEB;
+	text-align: center;
+	font-size: 14px;
+}
+
+/*
+ *	lib/css/legacy/dialog.css
+ */
+/***** Dialogs *******/
+
+div.dialog_wrapper {
+	position: absolute;
+	width: 440px;
+	display: none;
+	z-index: 90;
+	background-color: #FFF;
+	box-shadow:1px 1px 8px #444;
+	-moz-box-shadow: 1px 1px 8px #444;
+	-webkit-box-shadow: 1px 1px 8px #444;
+	
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;
+	
+	overflow: hidden;
+}
+
+div.dialog_head {
+	height: 22px;
+	padding: 4px;
+	background-color: #222;
+	color: #FFF;
+}
+
+div.dialog_body {
+	padding: 8px 8px 16px;
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;	
+}
+
+div.dialog_back {
+	position: fixed;
+	display: none;
+	top: 0px;
+	left: 0px;
+	bottom: 0px;
+	right: 0px;
+	background-color: #aaa;
+	opacity: 0.6;
+	z-index: 50;
+	text-align: center;
+}
+
+div.dialog_message {
+	display: none;
+	position: absolute;
+	width: 250px;
+	font-size: 12px;
+	z-index: 91;
+	background-color:#FFF;
+	padding: 12px;
+	border: 1px solid #444;
+}
+
+div.dialog_row {
+	padding: 8px 8px 0px 8px;
+}
+
+div.dialog_row table {
+	width: 100%;
+}
+
+div.dialog_row table td {
+}
+
+div.dialog_row input[type="text"], div.dialog_row input[type="password"], div.dialog_row textarea, div.dialog_row select {
+	width: 80%;
+	font-size: 14px;
+}
+
+div.dialog_row table td textarea {
+	width: 80%;
+	height: 200px;
+	font-size: 12px;
+}
+
+
+/*
+ *	lib/css/ui/common.css
+ */
+.navbar-icon-home {
+	vertical-align: middle;
+	opacity: 0.4;
+	Filter:alpha(opacity=40); /* For IE8 and earlier */
+}
+
+.navbar-icon-home:hover,
+.navbar-icon-home:focus,
+.navbar-icon-home:active,
+.navbar-icon-home-hover{
+	opacity:1;
+	Filter:alpha(opacity=100); /* For IE8 and earlier */
+}
+
+
+/*
  *	lib/css/ui/fonts.css
  */
 @font-face {
@@ -1812,16 +1851,49 @@
 
 
 /*
+ *	lib/css/ui/views.css
+ */
+
+.breadcrumbs {
+	color: #000000;
+}
+
+.breadcrumbs a {
+	color: #000000;
+}
+
+div.appframe-titlebar {
+	padding: 6px;
+	background: #eeeeee; /* Old browsers */
+	background: -moz-linear-gradient(top,  #eeeeee 0%, #cccccc 100%); /* FF3.6+ */
+	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#eeeeee), color-stop(100%,#cccccc)); /* Chrome,Safari4+ */
+	background: -webkit-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* Chrome10+,Safari5.1+ */
+	background: -o-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* Opera 11.10+ */
+	background: -ms-linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* IE10+ */
+	background: linear-gradient(top,  #eeeeee 0%,#cccccc 100%); /* W3C */
+	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#cccccc',GradientType=0 ); /* IE6-9 */
+	border-bottom: 1px solid #aaa;
+	min-height: 1.2em;
+}
+
+div.appframe-toolbar {
+	padding: 4px;
+	background: #eeeeee;
+	border-top: 1px solid #f8f8f8;
+	border-bottom: 1px solid #ccc;
+}
+
+/*
  *	erpnext/startup/startup.css
  */
 h1, h2, h3, h4, h5 {
-	font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
+	font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
 	font-weight: normal;
 	margin-top: 0.2em;
 }
 
 body {
-	font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
+	font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
 	font-size: 13px;
 }
 
@@ -1860,26 +1932,11 @@
 	color: #fff;
 }
 
-
 .navbar-new-comments-true {
 	color: #fff;
 	background-color: #B00D07;
 }
 
-.navbar-icon-home {
-	vertical-align: middle;
-	opacity:0.4;
-	Filter:alpha(opacity=40); /* For IE8 and earlier */
-}
-
-.navbar-icon-home:hover,
-.navbar-icon-home:focus,
-.navbar-icon-home:active,
-.navbar-icon-home-hover{
-	opacity:1;
-	Filter:alpha(opacity=100); /* For IE8 and earlier */
-}
-
 /*extra size menus for recent*/
 .dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
 	min-width: 160px !important;
diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 5be3809..84fea75 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -35,12 +35,6 @@
 		self.doc, self.doclist = d, dl
 		self.entries = []
 
-	# Get Company List
-	# ----------------
-	def get_companies(self,arg=''):
-		ret = webnotes.conn.sql("select name, abbr from tabCompany where docstatus != 2")
-		return {'cl':[r[0] for r in ret]}
-
 	def get_company_currency(self,arg=''):
 		dcc = TransactionBase().get_company_currency(arg)
 		return dcc
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.css b/erpnext/accounts/page/accounts_browser/accounts_browser.css
index 4a55dd3..1e3904f 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.css
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.css
@@ -1,9 +1,20 @@
-h1 { padding: 8px 0px; margin: 0px; }
-#ledger_area { padding: 16px;}
-.ac_head { display: none; }
-.ac_head div { padding: 2px; }
-.ac_ledger { display: none; padding: 8px; margin-top: 8px; border-top: 1px solid #DDD; }
-.ac_balance { margin-left: 4px; font-size: 16px; font-weight: bold; background-color: #FFFAB0; }
+select.accbrowser-company-select {
+	width: 200px;
+	margin-top: 2px;
+	margin-left: 10px;
+}
 
-.ac_page_sel_tab { width:90%; background-color: #EEE; margin-bottom: 8px }
-.ac_page_sel_tab td { vertical-align: middle; padding: 3px; }
\ No newline at end of file
+span.accbrowser-node-toolbar {
+	padding: 2px;
+	margin-left: 15px;
+	border-radius: 3px;
+	-moz-border-radius: 3px;
+	-webkit-border-radius: 3px;
+	border-radius: 3px;
+	background-color: #ddd;
+}
+
+.tree-area a.selected {
+	font-weight: bold;
+	text-decoration: underline;
+}
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.html b/erpnext/accounts/page/accounts_browser/accounts_browser.html
index cb44cec..de55f08 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.html
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.html
@@ -1,7 +1,12 @@
-<div class="layout-wrapper layout-wrapper-appframe">
+<div class="layout-wrapper layout-wrapper-background">
 	<div class="appframe-area"></div>
-	<div style="padding: 15px;">
-		<div id="ab_header"></div>
-		<div id="ab_body" style="margin: 16px;"></div>
+	<div class="layout-main-section">
+		<div class="tree-area"></div>
 	</div>
+	<div class="layout-side-section">
+		<div class="help">1. To add child nodes, explore tree and click on the node under which you want to add more nodes.<br><br>
+			2. Please do NOT create accounts (ledgers) for Customers and Suppliers. They are created directly from the Customer / Supplier masters.<br>
+		</div>
+	</div>
+	<div class="clear"></div>
 </div>
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 28e55ab..9be45ea 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -14,37 +14,235 @@
 // You should have received a copy of the GNU General Public License
 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-pscript['onshow_Accounts Browser'] = function(wrapper){
-	wn.require('lib/js/legacy/widgets/tree.js');
+// tree of chart of accounts / cost centers
+// multiple companies
+// add node
+// edit node
+// see ledger
 
+pscript['onload_Accounts Browser'] = function(wrapper){
+	wn.require('lib/js/wn/ui/tree.js');
 	wrapper.appframe = new wn.ui.AppFrame($(wrapper).find('.appframe-area'));
 	wrapper.appframe.add_button('New Company', function() { newdoc('Company'); }, 'icon-plus');
+	wrapper.appframe.add_button('Refresh', function() {  
+			wrapper.$company_select.change();
+		}, 'icon-refresh');
 
-	var route = decodeURIComponent(location.hash);
-	if(route.indexOf('/')!=-1) {
-		var chart_type = route.split('/')[1];
-		pscript.make_chart(chart_type);
-		return;
+	// company-select
+	wrapper.$company_select = $('<select class="accbrowser-company-select"></select>')
+		.change(function() {
+			var ctype = wn.get_route()[1] || 'Account';
+			erpnext.account_chart = new erpnext.AccountsChart(ctype, $(this).val(), wrapper);
+		})
+		.appendTo(wrapper.appframe.$w.find('.appframe-toolbar'));
+		
+	// default company
+	if(sys_defaults.company) {
+		$('<option>')
+			.html(sys_defaults.company)
+			.attr('value', sys_defaults.company)
+			.appendTo(wrapper.$company_select);
+
+		wrapper.$company_select
+			.val(sys_defaults.company).change();
 	}
-	
-	// if the user directly loads the page, ask to select the chart
-	var parent = $i('ab_body');
-	parent.innerHTML = 'Please select your chart: '
-	var sel = $a(parent,'select');
-	add_sel_options(sel, ['Account', 'Cost Center'], 'Account');
-	var btn = $btn(parent, 'Go', function() { pscript.make_chart(sel_val(sel)); }, {marginTop:'8px'});
+
+	// load up companies
+	wn.call({
+		method:'accounts.page.accounts_browser.accounts_browser.get_companies',
+		callback: function(r) {
+			wrapper.$company_select.empty();
+			$.each(r.message, function(i, v) {
+				$('<option>').html(v).attr('value', v).appendTo(wrapper.$company_select);
+			});
+			wrapper.$company_select.val(sys_defaults.company || r[0]);
+		}
+	});
 }
 
-pscript.make_chart = function(b) {
-  pscript.chart_type = b;
-  $i('ab_header').innerHTML ='';
-  $i('ab_body').innerHTML ='';
+pscript['onshow_Accounts Browser'] = function(wrapper){
+	// set route
+	var ctype = wn.get_route()[1] || 'Account';
+	wrapper.appframe.title('Chart of '+ctype+'s');  
 
-  //===============comment area========================================
-  var comment = $a($i('ab_body'),'div','comment',{marginBottom:"8px"});
-  comment.innerHTML = "Note: Explore and click on the tree node to add a new child";
-  
-  var select_area = $a('ab_body', 'div', '', {margin:'8px 0px'});
+	if(erpnext.account_chart && erpnext.account_chart.ctype != ctype) {
+		wrapper.$company_select.change();
+	} 
+
+}
+
+erpnext.AccountsChart = Class.extend({
+	init: function(ctype, company, wrapper) {
+		$(wrapper).find('.tree-area').empty();
+		var me = this;
+		me.ctype = ctype;
+		me.company = company;
+		this.tree = new wn.ui.Tree({
+			parent: $(wrapper).find('.tree-area'), 
+			label: company,
+			args: {ctype: ctype},
+			method: 'accounts.page.accounts_browser.accounts_browser.get_children',
+			click: function(link) {
+				if(me.cur_toolbar) 
+					$(me.cur_toolbar).toggle(false);
+
+				if(!link.toolbar) 
+					me.make_link_toolbar(link);
+
+				if(link.toolbar) {
+					me.cur_toolbar = link.toolbar;
+					$(me.cur_toolbar).toggle(true);					
+				}
+			
+			}
+		});
+		this.tree.rootnode.$a.click();		
+	},
+	make_link_toolbar: function(link) {
+		var data = $(link).data('node-data');
+		if(!data) return;
+
+		link.toolbar = $('<span class="accbrowser-node-toolbar"></span>').insertAfter(link);
+		
+		// edit
+		$('<a href="#!Form/'+encodeURIComponent(this.ctype)+'/'
+			+encodeURIComponent(data.value)+'">Edit</a>').appendTo(link.toolbar);
+
+		if(data.expandable) {
+			link.toolbar.append(' | <a onclick="erpnext.account_chart.new_node();">Add Child</a>');
+		} else if(this.ctype=='Account') {
+			link.toolbar.append(' | <a onclick="erpnext.account_chart.show_ledger();">View Ledger</a>');
+		}		
+	},
+	show_ledger: function() {
+		var me = this;
+		var node = me.selected_node();
+		wn.set_route('Report', 'GL Entry', 'General Ledger', 
+			this.ctype + '=' + node.data('label'));
+	},
+	new_node: function() {
+		if(this.ctype=='Account') {
+			this.new_account();
+		} else {
+			this.new_cost_center();
+		}
+	},
+	selected_node: function() {
+		return this.tree.$w.find('.tree-link.selected');
+	},
+	new_account: function() {
+		var me = this;
+		
+		// the dialog
+		var d = new wn.ui.Dialog({
+			title:'New Account',
+			fields: [
+				{fieldtype:'Data', fieldname:'account_name', label:'New Account Name', reqd:true},
+				{fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger',
+					options:'Group\nLedger'},
+				{fieldtype:'Select', fieldname:'account_type', label:'Account Type',
+					options: ['', 'Fixed Asset Account', 'Bank or Cash', 'Expense Account', 'Tax',
+						'Income Account', 'Chargeable'].join('\n') },
+				{fieldtype:'Float', fieldname:'tax_rate', label:'Tax Rate'},
+				{fieldtype:'Select', fieldname:'master_type', label:'Master Type',
+					options: ['NA', 'Supplier', 'Customer', 'Employee'].join('\n') },
+				{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
+			]
+		})
+
+		var fd = d.fields_dict;
+		
+		// account type if ledger
+		$(fd.group_or_ledger.input).change(function() {
+			if($(this).val()=='Group') {
+				$(fd.account_type.wrapper).toggle(false);
+				$(fd.master_type.wrapper).toggle(false);
+				$(fd.tax_rate.wrapper).toggle(false);
+			} else {
+				$(fd.account_type.wrapper).toggle(true);
+				$(fd.master_type.wrapper).toggle(true);
+				if(fd.account_type.get_value()=='Tax') {
+					$(fd.tax_rate.wrapper).toggle(true);
+				}
+			}
+		});
+		
+		// tax rate if tax
+		$(fd.account_type.input).change(function() {
+			if($(this).val()=='Tax') {
+				$(fd.tax_rate.wrapper).toggle(true);				
+			} else {
+				$(fd.tax_rate.wrapper).toggle(false);				
+			}
+		})
+		
+		// create
+		$(fd.create_new.input).click(function() {
+			var btn = this;
+			$(btn).set_working();
+			var v = d.get_values();
+			if(!v) return;
+					
+			var node = me.selected_node();
+			v.parent_account = node.data('label');
+			v.company = me.company;
+			
+		    $c_obj('GL Control', 'add_ac', v, 
+				function(r,rt) { 
+					$(btn).done_working();
+					d.hide();
+					node.trigger('reload'); 	
+				});
+		});
+		
+		// show
+		d.onshow = function() {
+			$(fd.group_or_ledger.input).change();
+		}
+		d.show();
+	},
+	
+	new_cost_center: function(){
+		var me = this;
+		// the dialog
+		var d = new wn.ui.Dialog({
+			title:'New Cost Center',
+			fields: [
+				{fieldtype:'Data', fieldname:'cost_center_name', label:'New Cost Center Name', reqd:true},
+				{fieldtype:'Select', fieldname:'group_or_ledger', label:'Group or Ledger',
+					options:'Group\nLedger'},
+				{fieldtype:'Button', fieldname:'create_new', label:'Create New' }
+			]
+		})		
+	
+		// create
+		$(d.fields_dict.create_new.input).click(function() {
+			var btn = this;
+			$(btn).set_working();
+			var v = d.get_values();
+			if(!v) return;
+			
+			var node = me.selected_node();
+			
+			v.parent_cost_center = node.data('label');
+			v.company_name = me.company;
+			
+		    $c_obj('GL Control', 'add_cc', v, 
+				function(r,rt) { 
+					$(btn).done_working();
+					d.hide();
+					node.trigger('reload'); 	
+				});
+		});
+		d.show();
+	}
+});
+
+/*
+pscript.make_chart = function(b, wrapper) {
+	pscript.ctype = b;
+	$(wrapper).find('.tree-area').empty()
+	$(wrapper).find('.layout-sidesection').empty()
   
   //================== table body======================================  
   var ac_main_grid = make_table($i('ab_body'),1,2,'100%',['60%','40%'],{border:"0px", padding:"4px",tableLayout: "fixed", borderCollapse: "collapse"});
@@ -55,7 +253,7 @@
   pscript.acc_period_bal = $a($td(ac_main_grid,0,1),'div');
   
   //=====================footer area ==================================
-  if (pscript.chart_type == 'Account') {
+  if (pscript.ctype == 'Account') {
     var footer = $a($i('ab_body'),'div','',{backgroundColor: "#FFD", padding: "8px", color: "#444", fontSize: "12px", marginTop: "14px"});
     
     var help1 = $a(footer,'span');
@@ -65,12 +263,7 @@
 
   // header and toolbar
   // ------------------
-  
-  var h1 = 'Chart of '+pscript.chart_type+'s';
-  if(pscript.chart_type == 'Account') var d = 'accounting';
-  else var d = 'cost center';
-  var desc = 'Manage multiple companies and the '+d+' structures of each company.';
-  $i('ab_body').page_head = new PageHeader('ab_header',h1,desc);
+  wrapper.appframe.$titlebar.find('.appframe-title').html('Chart of '+pscript.ctype+'s');  
 
   // select company
   // --------------
@@ -115,8 +308,8 @@
 }
 
 pscript.make_ac_tree = function() {
-  //var type= sel_val($i('chart_type'))
-  var type= pscript.chart_type;
+  //var type= sel_val($i('ctype'))
+  var type= pscript.ctype;
   var tree = new Tree(pscript.account_tree, '90%');
   pscript.ac_tree = tree;
 
@@ -171,9 +364,9 @@
     }
 
     if (type=='Account'){
-      var arg = [node.rec.name, node.rec.account_name, sel_val(pscript.ab_company_sel), pscript.chart_type];
+      var arg = [node.rec.name, node.rec.account_name, sel_val(pscript.ab_company_sel), pscript.ctype];
     } else{
-        var arg = [node.rec.name, node.rec.cost_center_name,sel_val(pscript.ab_company_sel), pscript.chart_type];
+        var arg = [node.rec.name, node.rec.cost_center_name,sel_val(pscript.ab_company_sel), pscript.ctype];
     }
 
     $c_obj('GL Control','get_cl',arg.join(','),callback);
@@ -338,10 +531,6 @@
   pscript.gl_rep.innerHTML = '<img src="lib/images/icons/report.png" style="margin-right: 8px"><span class="link_type">Open Ledger</span>';
   pscript.gl_rep.onclick = function(){ pscript.make_report('gl'); }
 
-  //Budget report link
-  /*pscript.cc_rep = $a(pscript.ledger_area, 'div','', {fontSize: '14px',marginBottom: '8px', fontWeight: 'bold'});
-  pscript.cc_rep.innerHTML = '<img src="images/icons/report.png" style="margin-right: 8px"><span class="link_type">Budget vs Actual Analysis Report</span>';
-  pscript.cc_rep.onclick = function(){ pscript.make_report('budget'); }*/
 }
 
 pscript.make_report = function(flag){
@@ -352,12 +541,6 @@
     }
     loadreport('GL Entry','General Ledger',callback);
   }
-  /*else {
-    loadreport('Budget Detail','Periodical Budget Report',function(f){
-      f.set_filter('Cost Center','ID',pscript.cur_node.rec.name);
-      f.dt.run();
-    });
-  }*/
 }
 
 // New Account
@@ -435,3 +618,4 @@
 
   pscript.new_cost_center_dialog = pscript.cc_dialog;
 }
+*/
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.py b/erpnext/accounts/page/accounts_browser/accounts_browser.py
new file mode 100644
index 0000000..ee4ec55
--- /dev/null
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.py
@@ -0,0 +1,31 @@
+import webnotes
+
+@webnotes.whitelist()
+def get_companies():
+	return [r[0] for r in webnotes.conn.sql("""select name from tabCompany where docstatus!=2""")]
+	
+@webnotes.whitelist()
+def get_children():
+	args = webnotes.form_dict
+	ctype = args['ctype']
+	company_field = ctype=='Account' and 'company' or 'company_name'
+	
+	# root
+	if args['parent'] in get_companies():
+		return webnotes.conn.sql("""select 
+			name as value, if(group_or_ledger='Group', 1, 0) as expandable
+			from `tab%s`
+			where ifnull(parent_%s,'') = ''
+			and %s = %s
+			and docstatus<2 
+			order by name""" % (ctype, ctype.lower().replace(' ','_'), company_field, '%s'),
+				args['parent'], as_dict=1)
+	
+	# other
+	return webnotes.conn.sql("""select 
+		name as value, if(group_or_ledger='Group', 1, 0) as expandable
+	 	from `tab%s` 
+		where ifnull(parent_%s,'') = %s
+		and docstatus<2 
+		order by name""" % (ctype, ctype.lower().replace(' ','_'), '%s'),
+			args['parent'], as_dict=1)
\ No newline at end of file
diff --git a/erpnext/home/doctype/company_control/company_control.py b/erpnext/home/doctype/company_control/company_control.py
index 567f9f6..567d015 100644
--- a/erpnext/home/doctype/company_control/company_control.py
+++ b/erpnext/home/doctype/company_control/company_control.py
@@ -71,15 +71,7 @@
 			pr.save(1)
 		
 		# Update Membership Type at Gateway
-		import webnotes.defs
 		from webnotes.utils import cint
-		if hasattr(webnotes.defs, 'sync_with_gateway') and \
-				cint(webnotes.defs.sync_with_gateway) or 0:		
-			if 'System Manager' in role_list : membership_type = 'Administrator'
-			else : membership_type = 'Member'
-
-			import server_tools.gateway_utils
-			server_tools.gateway_utils.update_membership_type(cstr(arg['usr']), membership_type)
 
 		sql("delete from __SessionCache where user=%s", cstr(arg['usr']))
 
diff --git a/erpnext/home/page/profile_settings/profile_settings.py b/erpnext/home/page/profile_settings/profile_settings.py
index 9b9f890..dc82812 100644
--- a/erpnext/home/page/profile_settings/profile_settings.py
+++ b/erpnext/home/page/profile_settings/profile_settings.py
@@ -28,13 +28,6 @@
 	if not webnotes.conn.sql('select name from tabProfile where name=%s and password=password(%s)', (webnotes.session['user'], arg['old_password'])):
 		webnotes.msgprint('Old password is not correct', raise_exception=1)
 	
-	import webnotes.defs
-	from webnotes.utils import cint
-	if hasattr(webnotes.defs, 'sync_with_gateway') and \
-			cint(webnotes.defs.sync_with_gateway) or 0:	
-		import server_tools.gateway_utils
-		webnotes.msgprint(server_tools.gateway_utils.change_password(arg['old_password'], arg['new_password'])['message'])
-
 	from webnotes.utils import nowdate
 	webnotes.conn.sql("update tabProfile set password=password(%s), modified=%s where name=%s",(arg['new_password'], nowdate(), webnotes.session['user']))
 	webnotes.msgprint('Password Updated');
diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py
index 0d0c23c..ba06995 100644
--- a/erpnext/hr/doctype/attendance/attendance.py
+++ b/erpnext/hr/doctype/attendance/attendance.py
@@ -59,48 +59,15 @@
       msgprint("Employee's attendance already marked.")
       raise Exception
       
-  #validation - leave_type is mandatory for status absent/ half day else not required to entered.
-  def validate_status(self):
-    if self.doc.status == 'Present' and self.doc.leave_type:
-      msgprint("You can not enter leave type for attendance status 'Present'")
-      raise Exception
-
-    elif (self.doc.status == 'Absent' or self.doc.status == 'Half Day') and not self.doc.leave_type:
-      msgprint("Please enter leave type for attendance status 'Absent'")
-      raise Exception
   
   #check for already record present in leave transaction for same date
   def check_leave_record(self):
     if self.doc.status == 'Present':
-      chk = sql("select name from `tabLeave Transaction` where employee=%s and (from_date <= %s and to_date >= %s) and status = 'Submitted' and leave_transaction_type = 'Deduction' and docstatus!=2", (self.doc.employee, self.doc.att_date, self.doc.att_date))
+      chk = sql("select name from `tabLeave Application` where employee=%s and (from_date <= %s and to_date >= %s) and docstatus!=2", (self.doc.employee, self.doc.att_date, self.doc.att_date))
       if chk:
         msgprint("Leave Application created for employee "+self.doc.employee+" whom you are trying to mark as 'Present' ")
         raise Exception
   
-  #For absent/ half day record - check for leave balances of the employees 
-  def validate_leave_type(self):
-    if not self.doc.status =='Present' and self.doc.leave_type not in ('Leave Without Pay','Compensatory Off'):
-      #check for leave allocated to employee from leave transaction
-      ret = sql("select name from `tabLeave Transaction` where employee = '%s' and leave_type = '%s' and leave_transaction_type = 'Allocation' and fiscal_year = '%s'"%(self.doc.employee,self.doc.leave_type,self.doc.fiscal_year))   
-      
-      #if leave allocation is present then calculate leave balance i.e. sum(allocation) - sum(deduction) 
-      if ret:
-        q1 = 'SUM(CASE WHEN leave_transaction_type = "Allocation" THEN total_leave ELSE 0 END)-SUM(CASE WHEN leave_transaction_type = "Deduction" THEN total_leave ELSE 0 END)'
-        q2 = "select %s from `tabLeave Transaction` where employee = '%s' and leave_type = '%s' and fiscal_year = '%s' and docstatus = 1"
-        
-        res = sql(q2%(q1,self.doc.employee,self.doc.leave_type,self.doc.fiscal_year))
-       
-        if res:
-          if self.doc.status == 'Absent' and flt(res[0][0]) < 1:
-            msgprint("%s balances are insufficient to cover a day absence, please select other leave type."%self.doc.leave_type)
-            raise Exception
-          if self.doc.status == 'Half Day' and flt(res[0][0]) < 0.5:
-            msgprint("%s balances are insufficient to cover a half day absence, please select other leave type."%self.doc.leave_type)
-            raise Exception
-
-      else:
-        msgprint("Leave Allocation for employee %s not done.\n You can allocate leaves from HR -> Leave Transaction OR HR -> Leave Control Panel."%self.doc.employee)
-        raise Exception
          
   def validate_fiscal_year(self):
     fy=sql("select year_start_date from `tabFiscal Year` where name='%s'"% self.doc.fiscal_year)
@@ -129,7 +96,6 @@
   def validate(self):
     self.validate_fiscal_year()
     self.validate_att_date()
-    #self.validate_leave_type()
     self.validate_duplicate_record()
     #self.validate_status()
     self.check_leave_record()
diff --git a/erpnext/hr/doctype/expense_claim/expense_claim.py b/erpnext/hr/doctype/expense_claim/expense_claim.py
index cd8b115..937ada7 100644
--- a/erpnext/hr/doctype/expense_claim/expense_claim.py
+++ b/erpnext/hr/doctype/expense_claim/expense_claim.py
@@ -8,11 +8,11 @@
 # 
 # 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
+# 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, see <http://www.gnu.org/licenses/>.
+# along with this program.	If not, see <http://www.gnu.org/licenses/>.
 
 # Please edit this list and import only required elements
 import webnotes
@@ -34,126 +34,126 @@
 
 
 class DocType:
-  def __init__(self, doc, doclist=[]):
-    self.doc = doc
-    self.doclist = doclist
+	def __init__(self, doc, doclist=[]):
+		self.doc = doc
+		self.doclist = doclist
 
-  def get_employee_name(self):
-    emp_dtl = sql("select employee_name,company_email from `tabEmployee` where name=%s", self.doc.employee)
-    emp_nm = emp_dtl and emp_dtl[0][0] or ''
-    self.doc.employee_name = emp_nm
-    self.doc.email_id = emp_dtl and emp_dtl[0][1] or ''
+	def get_employee_name(self):
+		emp_dtl = sql("select employee_name,company_email from `tabEmployee` where name=%s", self.doc.employee)
+		emp_nm = emp_dtl and emp_dtl[0][0] or ''
+		self.doc.employee_name = emp_nm
+		self.doc.email_id = emp_dtl and emp_dtl[0][1] or ''
 
-    return cstr(emp_nm)  
-  
-  def get_approver_lst(self):
-    approver_lst =[]
-    approver_lst1 = get_obj('Authorization Control').get_approver_name(self.doc.doctype,0,self)
-    if approver_lst1:
-      approver_lst=approver_lst1
-    else:
-      approver_lst = [x[0] for x in sql("select distinct name from `tabProfile` where enabled=1 and name!='Administrator' and name!='Guest' and docstatus!=2")]
-    return approver_lst
+		return cstr(emp_nm)	
+	
+	def get_approver_lst(self):
+		approver_lst =[]
+		approver_lst1 = get_obj('Authorization Control').get_approver_name(self.doc.doctype,0,self)
+		if approver_lst1:
+			approver_lst=approver_lst1
+		else:
+			approver_lst = [x[0] for x in sql("select distinct name from `tabProfile` where enabled=1 and name!='Administrator' and name!='Guest' and docstatus!=2")]
+		return approver_lst
 
-  def set_approver(self):
-    ret={}
-    approver_lst =[]
-    emp_nm = self.get_employee_name()
-    approver_lst = self.get_approver_lst()    
-    ret = {'app_lst':"\n" + "\n".join(approver_lst), 'emp_nm':cstr(emp_nm)}
-    return ret
+	def set_approver(self):
+		ret={}
+		approver_lst =[]
+		emp_nm = self.get_employee_name()
+		approver_lst = self.get_approver_lst()		
+		ret = {'app_lst':"\n" + "\n".join(approver_lst), 'emp_nm':cstr(emp_nm)}
+		return ret
 
-  def update_voucher(self):
-    sql("delete from `tabExpense Claim Detail` where parent = '%s'"%self.doc.name)
-    for d in getlist(self.doclist, 'expense_voucher_details'):
-      if not d.expense_type or not d.claim_amount:
-        msgprint("Please remove the extra blank row added")
-        raise Exception
-      d.save(1)
-    if self.doc.total_sanctioned_amount:
-      set(self.doc,'total_sanctioned_amount',self.doc.total_sanctioned_amount)
-    if self.doc.remark:
-      set(self.doc, 'remark', self.doc.remark)
-  
-  def approve_voucher(self):
-    for d in getlist(self.doclist, 'expense_voucher_details'):
-      if not d.sanctioned_amount:
-        msgprint("Please add 'Sanctioned Amount' for all expenses")
-        return cstr('Incomplete')
-    
-    if not self.doc.total_sanctioned_amount:
-      msgprint("Please calculate total sanctioned amount using button 'Calculate Total Amount'")
-      return cstr('No Amount')
-    self.update_voucher()
-    
-    set(self.doc, 'approval_status', 'Approved')    
-    # on approval notification
-    #get_obj('Notification Control').notify_contact('Expense Claim Approved', self.doc.doctype, self.doc.name, self.doc.email_id, self.doc.employee_name)
+	def update_voucher(self):
+		sql("delete from `tabExpense Claim Detail` where parent = '%s'"%self.doc.name)
+		for d in getlist(self.doclist, 'expense_voucher_details'):
+			if not d.expense_type or not d.claim_amount:
+				msgprint("Please remove the extra blank row added")
+				raise Exception
+			d.save(1)
+		if self.doc.total_sanctioned_amount:
+			set(self.doc,'total_sanctioned_amount',self.doc.total_sanctioned_amount)
+		if self.doc.remark:
+			set(self.doc, 'remark', self.doc.remark)
+	
+	def approve_voucher(self):
+		for d in getlist(self.doclist, 'expense_voucher_details'):
+			if not d.sanctioned_amount:
+				msgprint("Please add 'Sanctioned Amount' for all expenses")
+				return cstr('Incomplete')
+		
+		if not self.doc.total_sanctioned_amount:
+			msgprint("Please calculate total sanctioned amount using button 'Calculate Total Amount'")
+			return cstr('No Amount')
+		self.update_voucher()
+		
+		set(self.doc, 'approval_status', 'Approved')		
+		# on approval notification
+		#get_obj('Notification Control').notify_contact('Expense Claim Approved', self.doc.doctype, self.doc.name, self.doc.email_id, self.doc.employee_name)
 
-    return cstr('Approved')
-  
-  def reject_voucher(self):
-    
-    if self.doc.remark:
-      set(self.doc, 'remark', self.doc.remark)   
-    set(self.doc, 'approval_status', 'Rejected')    
+		return cstr('Approved')
+	
+	def reject_voucher(self):
+		
+		if self.doc.remark:
+			set(self.doc, 'remark', self.doc.remark)	 
+		set(self.doc, 'approval_status', 'Rejected')		
 
-    # on approval notification
-    #get_obj('Notification Control').notify_contact('Expense Claim Rejected', self.doc.doctype, self.doc.name, self.doc.email_id, self.doc.employee_name)
+		# on approval notification
+		#get_obj('Notification Control').notify_contact('Expense Claim Rejected', self.doc.doctype, self.doc.name, self.doc.email_id, self.doc.employee_name)
 
-    return cstr('Rejected')
-  
-  def validate_curr_exp(self):
-    for d in getlist(self.doclist, 'expense_voucher_details'):
-      if flt(d.sanctioned_amount) > 0:
-        if self.doc.approval_status == 'Draft':
-          msgprint("Sanctioned amount can be added by Approver person only for submitted Expense Claim")
-          raise Exception
-        elif self.doc.approval_status == 'Submitted' and session['user'] != self.doc.exp_approver:
-          msgprint("Sanctioned amount can be added only by expense voucher Approver")
-          raise Exception
-  
-  def validate_fiscal_year(self):
-    fy=sql("select year_start_date from `tabFiscal Year` where name='%s'"%self.doc.fiscal_year)
-    ysd=fy and fy[0][0] or ""
-    yed=add_days(str(ysd),365)
-    if str(self.doc.posting_date) < str(ysd) or str(self.doc.posting_date) > str(yed):
-      msgprint("Posting Date is not within the Fiscal Year selected")
-      raise Exception
-    
-  def validate(self):
-    self.validate_curr_exp()
-    self.validate_fiscal_year()
-  
-  def on_update(self):
-    set(self.doc, 'approval_status', 'Draft')
-  
-  def validate_exp_details(self):
-    if not getlist(self.doclist, 'expense_voucher_details'):
-      msgprint("Please add expense voucher details")
-      raise Exception
-    
-    if not self.doc.total_claimed_amount:
-      msgprint("Please calculate Total Claimed Amount")
-      raise Exception
-    
-    if not self.doc.exp_approver:
-      msgprint("Please select Expense Claim approver")
-      raise Exception
-  
-  def validate_approver(self):
-    app_lst = self.get_approver_lst()
-    if self.doc.exp_approver and self.doc.exp_approver not in app_lst:
-      msgprint("Approver "+self.doc.exp_approver+" is not authorized to approve this expense voucher. Please select another approver")
-      valid_app = 'No'
-    else:
-      valid_app = 'Yes'
-    ret = {'app_lst':("\n" + "\n".join(app_lst)), 'valid_approver':valid_app}
-    return ret
-  
-  def on_submit(self):
-    self.validate_exp_details()
-    set(self.doc, 'approval_status', 'Submitted')
-  
-  def on_cancel(self):
-    set(self.doc, 'approval_status', 'Cancelled')
+		return cstr('Rejected')
+	
+	def validate_curr_exp(self):
+		for d in getlist(self.doclist, 'expense_voucher_details'):
+			if flt(d.sanctioned_amount) > 0:
+				if self.doc.approval_status == 'Draft':
+					msgprint("Sanctioned amount can be added by Approver person only for submitted Expense Claim")
+					raise Exception
+				elif self.doc.approval_status == 'Submitted' and session['user'] != self.doc.exp_approver:
+					msgprint("Sanctioned amount can be added only by expense voucher Approver")
+					raise Exception
+	
+	def validate_fiscal_year(self):
+		fy=sql("select year_start_date from `tabFiscal Year` where name='%s'"%self.doc.fiscal_year)
+		ysd=fy and fy[0][0] or ""
+		yed=add_days(str(ysd),365)
+		if str(self.doc.posting_date) < str(ysd) or str(self.doc.posting_date) > str(yed):
+			msgprint("Posting Date is not within the Fiscal Year selected")
+			raise Exception
+		
+	def validate(self):
+		self.validate_curr_exp()
+		self.validate_fiscal_year()
+	
+	def on_update(self):
+		set(self.doc, 'approval_status', 'Draft')
+	
+	def validate_exp_details(self):
+		if not getlist(self.doclist, 'expense_voucher_details'):
+			msgprint("Please add expense voucher details")
+			raise Exception
+		
+		if not self.doc.total_claimed_amount:
+			msgprint("Please calculate Total Claimed Amount")
+			raise Exception
+		
+		if not self.doc.exp_approver:
+			msgprint("Please select Expense Claim approver")
+			raise Exception
+	
+	def validate_approver(self):
+		app_lst = self.get_approver_lst()
+		if self.doc.exp_approver and self.doc.exp_approver not in app_lst:
+			msgprint("Approver "+self.doc.exp_approver+" is not authorized to approve this expense voucher. Please select another approver")
+			valid_app = 'No'
+		else:
+			valid_app = 'Yes'
+		ret = {'app_lst':("\n" + "\n".join(app_lst)), 'valid_approver':valid_app}
+		return ret
+	
+	def on_submit(self):
+		self.validate_exp_details()
+		set(self.doc, 'approval_status', 'Submitted')
+	
+	def on_cancel(self):
+		set(self.doc, 'approval_status', 'Cancelled')
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index eaba16b..2cfab81 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -29,7 +29,6 @@
 //=======================================================================
 cur_frm.cscript.refresh = function(doc, dt, dn){
   if((!doc.__islocal) && (doc.is_active == 'Yes')){
-    cur_frm.add_custom_button('Make IT Checklist', cur_frm.cscript['Make IT Checklist']);
     cur_frm.add_custom_button('Make Salary Slip', cur_frm.cscript['Make Salary Slip']);
   
     get_field(doc.doctype, 'employee', doc.name).permlevel = 1;
@@ -37,16 +36,6 @@
   }
 }
 
-// Make IT checklist
-//=======================================================================
-cur_frm.cscript['Make IT Checklist']=function(){
-  var itc = LocalDB.create('IT Checklist');
-  itc = locals['IT Checklist'][itc];
-  itc.employee = cur_frm.doc.employee;
-  itc.fiscal_year = sys_defaults.fiscal_year;
-  itc.is_cheklist_active='Yes';
-  loaddoc('IT Checklist', itc.name);
-}
 
 // Make Salry Slip
 //=======================================================================
diff --git a/erpnext/hr/page/hr_home/hr_home.html b/erpnext/hr/page/hr_home/hr_home.html
index b49ce09..47e7e67 100644
--- a/erpnext/hr/page/hr_home/hr_home.html
+++ b/erpnext/hr/page/hr_home/hr_home.html
@@ -57,7 +57,7 @@
 					<div class="section-item">
 						<a class="section-link" 
 							title = "List of holidays"
-							href="#!List/Leave Allocation">Holiday List</a>
+							href="#!List/Holiday List">Holiday List</a>
 					</div>
 				</div>
 			</div>
diff --git a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
index 998b927..bbf6fb0 100644
--- a/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
+++ b/erpnext/hr/search_criteria/monthly_salary_register/monthly_salary_register.py
@@ -43,8 +43,8 @@
   for d1 in li:
     d2 = '%s'%d1
     
-    earn_ret=convert_to_lists(sql("select e_type,e_amount from `tabSS Earning Detail` where parent = '%s'"%r[col_idx['ID']]))
-    ded_ret=convert_to_lists(sql("select d_type,d_amount from `tabSS Deduction Detail` where parent = '%s'"%r[col_idx['ID']]))
+    earn_ret=convert_to_lists(sql("select e_type,e_amount from `tabSalary Slip Earning` where parent = '%s'"%r[col_idx['ID']]))
+    ded_ret=convert_to_lists(sql("select d_type,d_amount from `tabSalary Slip Deduction` where parent = '%s'"%r[col_idx['ID']]))
     
 
     for e in earn_ret:
@@ -78,7 +78,7 @@
   for r in res:
    
     lst0 = '%s'%lst[0]
-    total_ear += r[col_idx[lst0]]
+    total_ear += flt(r[col_idx[lst0]])
     
   total.append(total_ear) 
   
@@ -87,7 +87,7 @@
   total_ded = 0
   for r in res:
     lst0 = '%s'%lst[0]
-    total_ded += r[col_idx[lst0]]
+    total_ded += flt(r[col_idx[lst0]])
     
   total.append(total_ded) 
 
diff --git a/erpnext/patches/jan_mar_2012/rename_dt.py b/erpnext/patches/jan_mar_2012/rename_dt.py
index ffdeb7c..7847ee1 100644
--- a/erpnext/patches/jan_mar_2012/rename_dt.py
+++ b/erpnext/patches/jan_mar_2012/rename_dt.py
@@ -1,4 +1,5 @@
 import webnotes
+import conf
 from webnotes.model import rename, delete_doc
 from webnotes.model.code import get_obj
 from wnf import replace_code
@@ -54,7 +55,7 @@
 	#for d in  webnotes.conn.sql("""select name, module from
 	#		`tabSearch Criteria` where ifnull(standard, 'No') = 'Yes' and ifnull(disabled, 0) = 0"""):
 	#
-	for path, folders, files in os.walk(webnotes.defs.modules_path):
+	for path, folders, files in os.walk(conf.modules_path):
 		if not path.endswith('search_criteria'): continue
 		module = path.split(os.sep)[-2]
 		for sc in folders:
@@ -128,7 +129,8 @@
 			'periodic_sales_summary', 'monthly_despatched_trend', 'sales', 'sales_order',
 			'sales_order1', 'sales_agentwise_commission', 'test_report', 
 			'territory_wise_sales_-_target_vs_actual_', 
-			'pending_po_items_to_bill1', 'pending_po_items_to_receive1')""")
+			'pending_po_items_to_bill1', 'pending_po_items_to_receive1', 
+			'expense_vouchers', 'pending_expense_vouchers', 'shortage_to_indent')""")
 
 	webnotes.conn.sql("""
 		DELETE FROM `tabSearch Criteria`
@@ -142,7 +144,7 @@
 def change_report_module():
 	reports = {'itemwise_receipt_details': 'Stock'}
 	for k in reports:
-		sql("update `tabSearch Criteria` set module = %s where name = %s", (reports[k], k))
+		webnotes.conn.sql("update `tabSearch Criteria` set module = %s where name = %s", (reports[k], k))
 
 def rename_in_db(ren_data, data_type, is_doctype):
 	for d in ren_data:
@@ -420,7 +422,7 @@
 			modules_list = folders
 		for f in files:
 			if f.endswith(".txt"):
-				rel_path = os.path.relpath(path, webnotes.defs.modules_path)
+				rel_path = os.path.relpath(path, conf.modules_path)
 				path_tuple = rel_path.split(os.sep)
 				if (len(path_tuple)==3 and path_tuple[0] in modules_list and
 						path_tuple[1] == 'doctype'):
diff --git a/erpnext/production/doctype/bom/bom.py b/erpnext/production/doctype/bom/bom.py
index 0a1a0f8..89e4d4b 100644
--- a/erpnext/production/doctype/bom/bom.py
+++ b/erpnext/production/doctype/bom/bom.py
@@ -195,7 +195,7 @@
 		"""Update workstation rate and calculates totals"""
 		total_op_cost = 0
 		for d in getlist(self.doclist, 'bom_operations'):
-			hour_rate = sql("select hour_rate from `tabWorkstation` where name = %s", d.workstation)
+			hour_rate = sql("select hour_rate from `tabWorkstation` where name = %s", cstr(d.workstation))
 			d.hour_rate = hour_rate and flt(hour_rate[0][0]) or 0
 			d.operating_cost = flt(d.hour_rate) * flt(d.time_in_mins) / 60
 			total_op_cost += d.operating_cost
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index 801ba56..faa175f 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -52,4 +52,4 @@
 //--------- calculate gross profit --------------------------------
 cur_frm.cscript.est_material_cost = function(doc, cdt, cdn){
   get_server_fields('get_gross_profit','','',doc, cdt, cdn, 1);
-}
\ No newline at end of file
+}
diff --git a/erpnext/projects/doctype/task/task.js b/erpnext/projects/doctype/task/task.js
index c88382b..af4864b 100644
--- a/erpnext/projects/doctype/task/task.js
+++ b/erpnext/projects/doctype/task/task.js
@@ -119,4 +119,4 @@
       cur_frm.cscript.refresh(cur_frm.doc, cur_frm.doc.doctype, cur_frm.doc.name);
     }
   });  
-}
\ No newline at end of file
+}
diff --git a/erpnext/projects/doctype/task/task.py b/erpnext/projects/doctype/task/task.py
index 51a9875..9cca9a7 100644
--- a/erpnext/projects/doctype/task/task.py
+++ b/erpnext/projects/doctype/task/task.py
@@ -51,7 +51,7 @@
 	
 	def get_allocated_to_name(self):
 		as_em = sql("select first_name, last_name from `tabProfile` where name=%s",str(self.doc.allocated_to))
-		ret = { 'allocated_to_name' : as_em and (as_em[0][0] + ' ' + as_em[0][1]) or ''}
+		ret = { 'allocated_to_name' : as_em and (cstr(as_em[0][0]) + ' ' + cstr(as_em[0][1])) or ''}
 		return ret
 
 	# validate
@@ -95,7 +95,7 @@
 				sql("delete from tabEvent where ref_type='Task' and ref_name=%s", self.doc.name)
 				self.add_calendar_event()
 			else:
-				msgprint("An Expeted start date has not been set for this task.Please set a, 'Expected Start date'\
+				msgprint("An Expeted start date has not been set for this task.Please set 'Expected Start date'\
 				to add an event to allocated persons calender.You can save a task without this also.")
 			
 			
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index d33478f..e97aea5 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -47,7 +47,7 @@
   //---------------
   cur_frm.clear_custom_buttons()
   if(!doc.__islocal && !in_list(['Converted', 'Lead Lost'], doc.status)) {
-    cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']);
+	if (doc.source != 'Existing Customer') cur_frm.add_custom_button('Create Customer', cur_frm.cscript['Create Customer']);
     cur_frm.add_custom_button('Create Opportunity', cur_frm.cscript['Create Opportunity']);
     cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
   }
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index a18f079..91d3fd5 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -86,15 +86,10 @@
 			// stop
 			if(doc.per_delivered < 100 || doc.per_billed < 100)
 				cur_frm.add_custom_button('Stop!', cur_frm.cscript['Stop Sales Order']);
-	} else {
-		
+		} else {	
 			// un-stop
 			cur_frm.add_custom_button('Unstop', cur_frm.cscript['Unstop Sales Order']);
-	}
-		
-		unhide_field(['Send SMS', 'message', 'customer_mobile_no'])
-	} else {
-		hide_field(['Send SMS', 'message', 'customer_mobile_no'])
+		}
 	}
 }
 
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index e5846b5..27c34a1 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -15,25 +15,9 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 import webnotes
-import webnotes.defs
 from webnotes.utils import cint
 import home
 
-def on_login(login_manager):
-	"""
-		called from login manager, before login
-	"""
-	if login_manager.user not in ('Guest', None, '') and webnotes.conn.cur_db_name!='accounts' and webnotes.conn.get_value('Control Panel', 'Control Panel', 'account_id')!='s5u011':
-		try:
-			login_manager = login_as(login_manager)
-			if hasattr(webnotes.defs, 'sync_with_gateway') and \
-					cint(webnotes.defs.sync_with_gateway) or 0:
-				update_account_details()
-				import server_tools.gateway_utils
-				server_tools.gateway_utils.check_login(login_manager.user)
-			
-		except ImportError:
-			pass
 		
 def on_login_post_session(login_manager):
 	"""
@@ -99,6 +83,11 @@
 			
 		bootinfo['user_background'] = webnotes.conn.get_value("Profile", webnotes.session['user'], 'background_image') or ''
 
+		import conf
+		bootinfo['sync_with_gateway'] = hasattr(conf, 'sync_with_gateway') and \
+				cint(conf.sync_with_gateway) or 0
+
+
 def get_letter_heads():
 	"""load letter heads with startup"""
 	import webnotes
@@ -123,45 +112,9 @@
 
 		login_manager.user_fullname = (first_name and first_name or "") + (last_name and " " + last_name or "")
 
-		if hasattr(webnotes.defs, 'validate_ip'):
-			msg = getattr(webnotes.defs, 'validate_ip')()
-			if msg: webnotes.msgprint(msg, raise_exception=1)
-
 		# alisaing here... so check if the user is disabled
 		if not webnotes.conn.sql("select ifnull(enabled,0) from tabProfile where name=%s", user)[0][0]:
 			# throw execption
 			webnotes.msgprint("Authentication Failed", raise_exception=1)
 
-	return login_manager
-
-#
-# update account details
-#
-def update_account_details():
-	# additional details (if from gateway)
-	if webnotes.form_dict.get('is_trial'):
-		webnotes.conn.set_global('is_trial', cint(webnotes.form_dict.get('is_trial')))
-
-	if webnotes.form_dict.get('days_to_expiry'):
-		webnotes.conn.set_global('days_to_expiry', webnotes.form_dict.get('days_to_expiry'))
-
-	if webnotes.form_dict.get('first_name'):
-		from server_tools.gateway_utils import update_user_details
-		update_user_details()
-
-	if webnotes.form_dict.get('xpassword') and webnotes.form_dict.get('login_as')!='Administrator':
-		webnotes.conn.sql("""update tabProfile set password=password(%(xpassword)s) where name=%(login_as)s""", (webnotes.form_dict))
-
-	if webnotes.form_dict.get('url_name'):
-		from webnotes.utils import set_default
-		set_default('account_url', 'http://'+webnotes.form_dict.get('url_name'))
-
-#
-# logout the user from SSO
-#
-def on_logout(login_manager):
-	import webnotes.defs
-	if hasattr(webnotes.defs, 'sync_with_gateway') and \
-			cint(webnotes.defs.sync_with_gateway) or 0:
-		from server_tools.gateway_utils import logout_sso
-		logout_sso(user=login_manager.user)
+	return login_manager
\ No newline at end of file
diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css
index f59c082..79ce027 100644
--- a/erpnext/startup/startup.css
+++ b/erpnext/startup/startup.css
@@ -1,11 +1,11 @@
 h1, h2, h3, h4, h5 {
-	font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
+	font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
 	font-weight: normal;
 	margin-top: 0.2em;
 }
 
 body {
-	font-family: "Open Sans", Helvetica, "Helvetica Neue", sans-serif;
+	font-family: "Helvetica Neue", "Open Sans", Helvetica, sans-serif;
 	font-size: 13px;
 }
 
@@ -44,26 +44,11 @@
 	color: #fff;
 }
 
-
 .navbar-new-comments-true {
 	color: #fff;
 	background-color: #B00D07;
 }
 
-.navbar-icon-home {
-	vertical-align: middle;
-	opacity:0.4;
-	Filter:alpha(opacity=40); /* For IE8 and earlier */
-}
-
-.navbar-icon-home:hover,
-.navbar-icon-home:focus,
-.navbar-icon-home:active,
-.navbar-icon-home-hover{
-	opacity:1;
-	Filter:alpha(opacity=100); /* For IE8 and earlier */
-}
-
 /*extra size menus for recent*/
 .dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
 	min-width: 160px !important;
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index 3a51a84..e550b01 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -39,6 +39,7 @@
 }
 
 erpnext.startup.set_globals = function() {
+	wn.control_panel.sync_with_gateway = wn.boot.sync_with_gateway
 	pscript.is_erpnext_saas = cint(wn.control_panel.sync_with_gateway)
 	if(inList(user_roles,'System Manager')) is_system_manager = 1;
 }
diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py
index 2499f91..70a2cb9 100644
--- a/erpnext/stock/doctype/bin/bin.py
+++ b/erpnext/stock/doctype/bin/bin.py
@@ -78,10 +78,7 @@
 				msg = """Actual Qty(%s) in Bin is mismatched with total number(%s) of serial no in store 
 					for item: '%s' and warehouse: '%s'""" % \
 					(self.doc.actual_qty, sr_count, self.doc.item_code, self.doc.warehouse)
-					
-				if getattr(webnotes.defs,'admin_email_notification',1):
-					sendmail(['developers@iwebnotes.com'], sender='automail@webnotestech.com', \
-						subject='Serial No Count vs Bin Actual Qty', parts=[['text/plain', msg]])			
+
 				msgprint(msg, raise_exception=1)
 
 	# --------------------------------
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 99c0a73..e030fc1 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -63,12 +63,7 @@
 	
 	if(doc.per_installed < 100 && doc.docstatus==1) cur_frm.add_custom_button('Make Installation Note', cur_frm.cscript['Make Installation Note']);
 
-	if (doc.docstatus!=1) {
-		hide_field(['Send SMS', 'message', 'customer_mobile_no');
-	} else {
-		cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
-		unhide_field(['Send SMS', 'message', 'customer_mobile_no');
-	}
+	if (doc.docstatus==1) cur_frm.add_custom_button('Send SMS', cur_frm.cscript.send_sms);
 
 	if(doc.docstatus==0 && !doc.__islocal) {
 		cur_frm.add_custom_button('Make Packing Slip', cur_frm.cscript['Make Packing Slip']);
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.txt b/erpnext/stock/doctype/stock_entry/stock_entry.txt
index 54053b7..fd330e9 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.txt
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2009-05-12 16:46:45',
+		'creation': '2012-04-16 15:08:16',
 		'docstatus': 0,
-		'modified': '2012-04-13 14:12:02',
+		'modified': '2012-04-16 15:54:45',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -41,7 +41,7 @@
 		'subject': u'%(remarks)s',
 		'tag_fields': u'purpose',
 		'use_template': 0,
-		'version': 263
+		'version': 264
 	},
 
 	# These values are common for all DocField
@@ -76,18 +76,6 @@
 		'create': 1,
 		'doctype': u'DocPerm',
 		'permlevel': 0,
-		'role': u'Material User',
-		'submit': 1,
-		'write': 1
-	},
-
-	# DocPerm
-	{
-		'amend': 1,
-		'cancel': 1,
-		'create': 1,
-		'doctype': u'DocPerm',
-		'permlevel': 0,
 		'role': u'Material Manager',
 		'submit': 1,
 		'write': 1
@@ -95,42 +83,61 @@
 
 	# DocPerm
 	{
-		'amend': 1,
-		'cancel': 1,
-		'create': 1,
-		'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'Production User',
-		'submit': 1,
-		'write': 1
-	},
-
-	# DocPerm
-	{
-		'amend': 1,
-		'cancel': 1,
-		'create': 1,
-		'doctype': u'DocPerm',
-		'permlevel': 0,
-		'role': u'Production Manager',
-		'submit': 1,
-		'write': 1
-	},
-
-	# DocPerm
-	{
 		'amend': 0,
 		'cancel': 0,
 		'create': 0,
 		'doctype': u'DocPerm',
 		'permlevel': 1,
-		'role': u'All',
+		'role': u'Material Manager',
 		'submit': 0,
 		'write': 0
 	},
 
 	# DocPerm
 	{
+		'amend': 1,
+		'cancel': 1,
+		'create': 1,
+		'doctype': u'DocPerm',
+		'permlevel': 0,
+		'role': u'Material User',
+		'submit': 1,
+		'write': 1
+	},
+
+	# DocPerm
+	{
+		'amend': 0,
+		'cancel': 0,
+		'create': 0,
+		'doctype': u'DocPerm',
+		'permlevel': 1,
+		'role': u'Material User',
+		'submit': 0,
+		'write': 0
+	},
+
+	# DocPerm
+	{
+		'amend': 1,
+		'cancel': 1,
+		'create': 1,
+		'doctype': u'DocPerm',
+		'permlevel': 0,
+		'role': u'Production User',
+		'submit': 1,
+		'write': 1
+	},
+
+	# DocPerm
+	{
+		'doctype': u'DocPerm',
+		'permlevel': 1,
+		'role': u'Production User'
+	},
+
+	# DocPerm
+	{
 		'create': 0,
 		'doctype': u'DocPerm',
 		'permlevel': 2,
@@ -140,6 +147,25 @@
 
 	# DocPerm
 	{
+		'amend': 1,
+		'cancel': 1,
+		'create': 1,
+		'doctype': u'DocPerm',
+		'permlevel': 0,
+		'role': u'Production Manager',
+		'submit': 1,
+		'write': 1
+	},
+
+	# DocPerm
+	{
+		'doctype': u'DocPerm',
+		'permlevel': 1,
+		'role': u'Production Manager'
+	},
+
+	# DocPerm
+	{
 		'doctype': u'DocPerm',
 		'permlevel': 2,
 		'role': u'Production Manager',
@@ -149,6 +175,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'warehouse_section',
 		'fieldtype': u'Section Break',
 		'label': u'Warehouse',
 		'oldfieldtype': u'Section Break',
@@ -158,6 +185,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'col1',
 		'fieldtype': u'Column Break',
 		'oldfieldtype': u'Column Break',
 		'permlevel': 0,
@@ -498,6 +526,7 @@
 	{
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
+		'fieldname': u'warehouse_html',
 		'fieldtype': u'HTML',
 		'label': u'Warehouse HTML',
 		'no_copy': 0,
@@ -568,6 +597,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'col2',
 		'fieldtype': u'Column Break',
 		'oldfieldtype': u'Column Break',
 		'permlevel': 0,
@@ -773,6 +803,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'items_section',
 		'fieldtype': u'Section Break',
 		'label': u'Items',
 		'oldfieldtype': u'Section Break',
@@ -782,6 +813,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'get_stock_and_rate',
 		'fieldtype': u'Button',
 		'label': u'Get Stock and Rate',
 		'oldfieldtype': u'Button',
@@ -793,6 +825,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'col3',
 		'fieldtype': u'Column Break',
 		'oldfieldtype': u'Column Break',
 		'permlevel': 0
@@ -803,6 +836,7 @@
 		'allow_on_submit': 0,
 		'colour': u'White:FFF',
 		'doctype': u'DocField',
+		'fieldname': u'get_items',
 		'fieldtype': u'Button',
 		'hidden': 0,
 		'in_filter': 0,
@@ -820,6 +854,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'item_section',
 		'fieldtype': u'Section Break',
 		'oldfieldtype': u'Section Break',
 		'options': u'Simple',
@@ -869,6 +904,7 @@
 	# DocField
 	{
 		'doctype': u'DocField',
+		'fieldname': u'other_details_section',
 		'fieldtype': u'Section Break',
 		'label': u'Other Details',
 		'oldfieldtype': u'Section Break',
diff --git a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt
index d7ede00..cee810b 100644
--- a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt
+++ b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-04-03 12:49:53',
+		'creation': '2012-04-16 11:42:44',
 		'docstatus': 0,
-		'modified': '2012-04-03 12:49:53',
+		'modified': '2012-04-16 16:00:35',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -15,13 +15,16 @@
 		'add_col': u'`tabItem`.`item_name`\n`tabItem`.`description`',
 		'add_cond': u'`tabItem`.`name` = `tabStock Ledger Entry`.`item_code`',
 		'add_tab': u'`tabItem`',
-		'columns': u'Stock Ledger Entry\x01Item Code,Stock Ledger Entry\x01Warehouse,Stock Ledger Entry\x01Posting Date,Stock Ledger Entry\x01Voucher Detail No,Stock Ledger Entry\x01Actual Quantity,Stock Ledger Entry\x01Bin Actual Qty After Transaction',
+		'columns': u'Stock Ledger Entry\x01Item Code,Stock Ledger Entry\x01Warehouse,Stock Ledger Entry\x01Posting Date,Stock Ledger Entry\x01Posting Time,Stock Ledger Entry\x01Actual Quantity,Stock Ledger Entry\x01Bin Actual Qty After Transaction,Stock Ledger Entry\x01Voucher Type,Stock Ledger Entry\x01Voucher No',
 		'criteria_name': u'Stock Ledger',
 		'doc_type': u'Stock Ledger Entry',
 		'doctype': 'Search Criteria',
-		'filters': u"{'Stock Ledger Entry\x01Is Cancelled':'','Stock Ledger Entry\x01Is Stock Entry':''}",
+		'filters': u'{"Stock Ledger Entry\\u0001Warehouse Type":[""],"Stock Ledger Entry\\u0001Company":[""],"Stock Ledger Entry\\u0001Is Cancelled":[""],"Stock Ledger Entry\\u0001Is Stock Entry":[""]}',
 		'module': u'Stock',
 		'name': '__common__',
+		'page_len': 50,
+		'sort_by': u'`tabStock Ledger Entry`.`item_code`',
+		'sort_order': u'DESC',
 		'standard': u'Yes'
 	},
 
diff --git a/erpnext/utilities/doctype/todo/__init__.py b/erpnext/utilities/doctype/todo/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/utilities/doctype/todo/__init__.py
+++ /dev/null
diff --git a/erpnext/utilities/doctype/todo/todo.txt b/erpnext/utilities/doctype/todo/todo.txt
deleted file mode 100644
index 569e4be..0000000
--- a/erpnext/utilities/doctype/todo/todo.txt
+++ /dev/null
@@ -1,213 +0,0 @@
-# DocType, ToDo
-[
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2012-03-27 14:36:47',
-		'docstatus': 0,
-		'modified': '2012-03-27 14:36:47',
-		'modified_by': u'Administrator',
-		'owner': u'Administrator'
-	},
-
-	# These values are common for all DocType
-	{
-		'allow_attach': 0,
-		'allow_copy': 0,
-		'allow_email': 0,
-		'allow_print': 0,
-		'allow_rename': 0,
-		'allow_trash': 0,
-		'autoname': u'TDI.########',
-		'colour': u'White:FFF',
-		'doctype': 'DocType',
-		'hide_heading': 0,
-		'hide_toolbar': 0,
-		'in_create': 1,
-		'in_dialog': 0,
-		'is_transaction_doc': 0,
-		'issingle': 0,
-		'max_attachments': 0,
-		'module': u'Utilities',
-		'name': '__common__',
-		'read_only': 1,
-		'read_only_onload': 0,
-		'section_style': u'Simple',
-		'server_code_error': u' ',
-		'show_in_menu': 0,
-		'use_template': 0,
-		'version': 5
-	},
-
-	# These values are common for all DocField
-	{
-		'doctype': u'DocField',
-		'name': '__common__',
-		'parent': u'ToDo',
-		'parentfield': u'fields',
-		'parenttype': u'DocType',
-		'permlevel': 0
-	},
-
-	# These values are common for all DocPerm
-	{
-		'create': 1,
-		'doctype': u'DocPerm',
-		'name': '__common__',
-		'parent': u'ToDo',
-		'parentfield': u'permissions',
-		'parenttype': u'DocType',
-		'permlevel': 0,
-		'read': 1,
-		'role': u'All',
-		'write': 1
-	},
-
-	# DocType, ToDo
-	{
-		'doctype': 'DocType',
-		'name': u'ToDo'
-	},
-
-	# DocPerm
-	{
-		'doctype': u'DocPerm'
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'doctype': u'DocField',
-		'fieldname': u'description',
-		'fieldtype': u'Text',
-		'hidden': 0,
-		'in_filter': 0,
-		'label': u'Description',
-		'no_copy': 0,
-		'oldfieldname': u'description',
-		'oldfieldtype': u'Text',
-		'print_hide': 0,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0,
-		'width': u'300px'
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'doctype': u'DocField',
-		'fieldname': u'date',
-		'fieldtype': u'Date',
-		'hidden': 0,
-		'in_filter': 0,
-		'label': u'Date',
-		'no_copy': 0,
-		'oldfieldname': u'date',
-		'oldfieldtype': u'Date',
-		'print_hide': 0,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'doctype': u'DocField',
-		'fieldname': u'priority',
-		'fieldtype': u'Data',
-		'hidden': 0,
-		'in_filter': 0,
-		'label': u'Priority',
-		'no_copy': 0,
-		'oldfieldname': u'priority',
-		'oldfieldtype': u'Data',
-		'print_hide': 0,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'doctype': u'DocField',
-		'fieldname': u'reference_type',
-		'fieldtype': u'Data',
-		'hidden': 0,
-		'in_filter': 0,
-		'label': u'Reference Type',
-		'no_copy': 0,
-		'oldfieldname': u'reference_type',
-		'oldfieldtype': u'Data',
-		'print_hide': 0,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'doctype': u'DocField',
-		'fieldname': u'reference_name',
-		'fieldtype': u'Data',
-		'hidden': 0,
-		'in_filter': 0,
-		'label': u'Reference Name',
-		'no_copy': 0,
-		'oldfieldname': u'reference_name',
-		'oldfieldtype': u'Data',
-		'print_hide': 0,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'doctype': u'DocField',
-		'fieldname': u'checked',
-		'fieldtype': u'Check',
-		'hidden': 0,
-		'in_filter': 0,
-		'label': u'Checked',
-		'no_copy': 0,
-		'oldfieldname': u'checked',
-		'oldfieldtype': u'Check',
-		'print_hide': 0,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'allow_on_submit': 0,
-		'doctype': u'DocField',
-		'fieldname': u'role',
-		'fieldtype': u'Link',
-		'hidden': 0,
-		'in_filter': 0,
-		'label': u'Role',
-		'no_copy': 0,
-		'oldfieldname': u'role',
-		'oldfieldtype': u'Link',
-		'options': u'Role',
-		'print_hide': 0,
-		'report_hide': 0,
-		'reqd': 0,
-		'search_index': 0
-	},
-
-	# DocField
-	{
-		'doctype': u'DocField',
-		'fieldname': u'assigned_by',
-		'fieldtype': u'Link',
-		'label': u'Assigned By',
-		'options': u'Profile'
-	}
-]
\ No newline at end of file
diff --git a/erpnext/utilities/page/users/users.py b/erpnext/utilities/page/users/users.py
index ec01479..6735dc0 100644
--- a/erpnext/utilities/page/users/users.py
+++ b/erpnext/utilities/page/users/users.py
@@ -83,15 +83,7 @@
 	webnotes.conn.set_value('Profile', args['user'], 'enabled', int(args.get('enabled',0)) or 0)
 
 	if args.get('new_password') and args.get('sys_admin_pwd'):
-		import webnotes.defs
 		from webnotes.utils import cint
-		if hasattr(webnotes.defs, 'sync_with_gateway') and \
-				cint(webnotes.defs.sync_with_gateway) or 0:
-			import server_tools.gateway_utils
-			res = server_tools.gateway_utils.change_password('', args['new_password'], 
-				args['user'], args['sys_admin_pwd'])
-			if 'Traceback' not in res['message']:
-				webnotes.msgprint(res['message'])
 		webnotes.conn.sql("update tabProfile set password=password(%s) where name=%s", 
 			(args['new_password'], args['user']))
 	else: 
@@ -106,14 +98,6 @@
 @webnotes.whitelist()
 def add_user(args):
 	args = json.loads(args)
-	# erpnext-saas
-	import webnotes.defs
-	from webnotes.utils import cint
-	if hasattr(webnotes.defs, 'sync_with_gateway') and \
-			cint(webnotes.defs.sync_with_gateway) or 0:	
-		from server_tools.gateway_utils import add_user_gateway
-		add_user_gateway(args)
-	
 	add_profile(args)
 	
 @webnotes.whitelist()
@@ -174,14 +158,6 @@
 	"""delete user"""
 	webnotes.conn.sql("update tabProfile set enabled=0, docstatus=2 where name=%s", 
 		webnotes.form_dict['uid'])
-	# erpnext-saas
-	import webnotes.defs
-	from webnotes.utils import cint
-	if hasattr(webnotes.defs, 'sync_with_gateway') and \
-			cint(webnotes.defs.sync_with_gateway) or 0:
-		from server_tools.gateway_utils import remove_user_gateway
-		remove_user_gateway(webnotes.form_dict['uid'])
-
 	webnotes.login_manager.logout(user=webnotes.form_dict['uid'])
 	
 welcome_txt = """
diff --git a/erpnext/website/doctype/style_settings/style_settings.txt b/erpnext/website/doctype/style_settings/style_settings.txt
index 18a4d1a..b87a02c 100644
--- a/erpnext/website/doctype/style_settings/style_settings.txt
+++ b/erpnext/website/doctype/style_settings/style_settings.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-03-27 14:36:48',
+		'creation': '2012-04-02 16:02:43',
 		'docstatus': 0,
-		'modified': '2012-03-27 14:36:48',
+		'modified': '2012-04-16 13:36:48',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
@@ -23,7 +23,7 @@
 		'name': '__common__',
 		'section_style': u'Simple',
 		'show_in_menu': 0,
-		'version': 18
+		'version': 19
 	},
 
 	# These values are common for all DocField
@@ -95,7 +95,7 @@
 		'fieldname': u'font',
 		'fieldtype': u'Select',
 		'label': u'Font',
-		'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
+		'options': u'\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
 		'permlevel': 0
 	},
 
@@ -115,7 +115,7 @@
 		'fieldname': u'heading_font',
 		'fieldtype': u'Select',
 		'label': u'Heading Font',
-		'options': u'\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
+		'options': u'\nHelvetica Neue\nLucida Grande\nVerdana\nArial\nGeorgia\nTahoma\nLato\nOpen Sans',
 		'permlevel': 0
 	},
 
@@ -153,4 +153,4 @@
 		'permlevel': 0,
 		'print_hide': 1
 	}
-]
+]
\ No newline at end of file
diff --git a/index.cgi b/index.cgi
index ed766eb..31da310 100755
--- a/index.cgi
+++ b/index.cgi
@@ -1,33 +1,42 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
+# Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
 # 
-# 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 3 of the License, or
-# (at your option) any later version.
+# MIT License (MIT)
 # 
-# 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.
+# Permission is hereby granted, free of charge, to any person obtaining a 
+# copy of this software and associated documentation files (the "Software"), 
+# to deal in the Software without restriction, including without limitation 
+# the rights to use, copy, modify, merge, publish, distribute, sublicense, 
+# and/or sell copies of the Software, and to permit persons to whom the 
+# Software is furnished to do so, subject to the following conditions:
 # 
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+# The above copyright notice and this permission notice shall be included in 
+# all copies or substantial portions of the Software.
+# 
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 
+# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 
+# PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 
+# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF 
+# CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE 
+# OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+# 
 
 
 import cgi, cgitb, os, sys
 cgitb.enable()
 
 # import libs
+sys.path.append('.')
+
+import conf
+
 sys.path.append('lib/py')
-sys.path.append('erpnext')
+sys.path.append(conf.modules_path)
 
 import webnotes
 import webnotes.handler
 import webnotes.auth
-import webnotes.defs
 
 def init():
 	# make the form_dict
@@ -42,7 +51,7 @@
 	except webnotes.AuthenticationError, e:
 		return True
 	except webnotes.UnknownDomainError, e:
-		print "Location: " + (webnotes.defs.redirect_404)
+		print "Location: " + (conf.redirect_404)
 	except webnotes.SessionStopped, e:
 		if 'cmd' in webnotes.form_dict:
 			webnotes.handler.print_json()
diff --git a/js/all-app.js b/js/all-app.js
index 8a68431..d2a3c4b 100644
--- a/js/all-app.js
+++ b/js/all-app.js
@@ -188,7 +188,7 @@
 /*
  *	lib/js/wn/model.js
  */
-wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{if(name&&name.indexOf('New '+doctype)!=-1){name=LocalDB.create(doctype);callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name);}});}}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}}
+wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name);}});}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}}
 /*
  *	lib/js/wn/misc/tools.js
  */
@@ -236,11 +236,13 @@
 /*
  *	lib/js/wn/router.js
  */
-wn.route=function(){wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
+wn.re_route={}
+wn.route=function(){if(wn.re_route[window.location.hash]){window.location.hash=wn.re_route[window.location.hash];}
+wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
 wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
 wn.get_route=function(route){if(!route)
 route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return $.map(route.split('/'),function(r){return decodeURIComponent(r);});}
-wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;set_favicon();}
+wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;wn.app.set_favicon();}
 wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route)
 return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}});
 /*
@@ -262,7 +264,7 @@
      </div>\
     </div>\
     \
-    <div style="height: 37px; margin-bottom:9px" class="list-toolbar-wrapper">\
+    <div style="margin-bottom:9px" class="list-toolbar-wrapper">\
      <div class="list-toolbar" style="display:inline-block; margin-right: 10px;">\
      </div>\
      <div style="display:inline-block; width: 24px; margin-left: 4px">\
@@ -288,15 +290,16 @@
 if(icon){$('<i>').addClass(icon).appendTo($button);}
 $button.html(label).click(click);return $button}},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
 if(!(this.hide_refresh||this.no_refresh)){this.add_button('Refresh',function(){me.run();},'icon-refresh');}
-if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){newdoc(me.new_doctype)},'icon-plus');}
-if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
+if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){wn.views.formview.create(me.new_doctype)},'icon-plus');}
+if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}
+if(me.no_toolbar||me.hide_toolbar){me.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
 this.onrun=a0;if(a0&&a0.callback)
 this.onrun=a0.callback;if(!a1&&!(a0&&a0.append))
-this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
+this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(a0),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(opts){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
 args.simple_query=this.query;}else{var args={limit_start:this.start,limit_page_length:this.page_length}}
 if(this.args)
 $.extend(args,this.args)
-if(this.get_args){$.extend(args,this.get_args());}
+if(this.get_args){$.extend(args,this.get_args(opts));}
 return args;},render_results:function(r){if(this.start==0)this.clear();this.$w.find('.btn-more').toggle(false);if(r.message)r.values=r.message;if(r.values&&r.values.length){this.data=this.data.concat(r.values);this.render_list(r.values);}else{if(this.start==0){this.$w.find('.result').toggle(false);this.$w.find('.no-result').toggle(true);}}
 if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:function(values){var m=Math.min(values.length,this.page_length);for(var i=0;i<m;i++){this.render_row(this.add_row(),values[i],this,i);}
 this.start+=m;if(values.length>=this.page_length)
@@ -352,7 +355,7 @@
 /*
  *	lib/js/wn/views/doclistview.js
  */
-wn.provide('wn.views.doclistview');wn.provide('wn.doclistviews');wn.views.doclistview.pages={};wn.views.doclistview.show=function(doctype){var pagename=doctype+' List';var doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){var page=wn.views.doclistview.pages[pagename];if(!page){var page=wn.container.add_page(pagename);page.doclistview=new wn.views.DocListView(doctype,page);wn.views.doclistview.pages[pagename]=page;}
+wn.provide('wn.views.doclistview');wn.provide('wn.doclistviews');wn.views.doclistview.pages={};wn.views.doclistview.show=function(doctype){var pagename=doctype+' List';var doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(r){if(r&&r['403'])return;var page=wn.views.doclistview.pages[pagename];if(!page){var page=wn.container.add_page(pagename);page.doclistview=new wn.views.DocListView(doctype,page);wn.views.doclistview.pages[pagename]=page;}
 document.title=page.doclistview.label;wn.container.change_to(pagename);})}
 wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doctype=doctype;this.$page=$(page);this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;this.$page.html(repl('<div class="layout-wrapper layout-wrapper-background">\
    <div class="appframe-area"></div>\
@@ -424,21 +427,30 @@
 /*
  *	lib/js/wn/views/pageview.js
  */
-wn.provide('wn.views.pageview');wn.views.pageview={pages:{},with_page:function(name,callback){if(!locals.Page[name]){wn.call({method:'webnotes.widgets.page.getpage',args:{'name':name},callback:callback});}else{callback();}},show:function(name){wn.views.pageview.with_page(name,function(){if(!wn.pages[name]){wn.views.pageview.pages[name]=new wn.views.Page(name);}
+wn.provide('wn.views.pageview');wn.views.pageview={pages:{},with_page:function(name,callback){if(!locals.Page[name]){wn.call({method:'webnotes.widgets.page.getpage',args:{'name':name},callback:callback});}else{callback();}},show:function(name){if(!name)name=wn.boot.home_page;wn.views.pageview.with_page(name,function(r){if(r&&r.exc){if(!r['403'])wn.container.change_to('404');}else if(!wn.pages[name]){wn.views.pageview.pages[name]=new wn.views.Page(name);}
 wn.container.change_to(name);});}}
 wn.views.Page=Class.extend({init:function(name){this.name=name;var me=this;this.pagedoc=locals.Page[this.name];this.wrapper=wn.container.add_page(this.name);this.wrapper.label=this.pagedoc.title||this.pagedoc.name;this.wrapper.innerHTML=this.pagedoc.content;wn.dom.eval(this.pagedoc.__script||this.pagedoc.script||'');wn.dom.set_style(this.pagedoc.style);this.trigger('onload');$(this.wrapper).bind('show',function(){cur_frm=null;me.trigger('onshow');me.trigger('refresh');});},trigger:function(eventname){var me=this;try{if(pscript[eventname+'_'+this.name]){pscript[eventname+'_'+this.name](me.wrapper);}else if(me.wrapper[eventname]){me.wrapper[eventname](me.wrapper);}}catch(e){console.log(e);}}})
+wn.views.make_404=function(){var page=wn.container.add_page('404');$(page).html('<div class="layout-wrapper">\
+  <h1>Not Found</h1><br>\
+  <p>Sorry we were unable to find what you were looking for.</p>\
+  <p><a href="#">Go back to home</a></p>\
+  </div>').toggle(false);};wn.views.make_403=function(){var page=wn.container.add_page('403');$(page).html('<div class="layout-wrapper">\
+  <h1>Not Permitted</h1><br>\
+  <p>Sorry you are not permitted to view this page.</p>\
+  <p><a href="#">Go back to home</a></p>\
+  </div>').toggle(false);};
 /*
  *	lib/js/wn/views/formview.js
  */
 wn.provide('wn.views.formview');wn.views.formview={show:function(dt,dn){if(wn.model.new_names[dn])
-dn=wn.model.new_names[dn];wn.model.with_doctype(dt,function(){wn.model.with_doc(dt,dn,function(dn){if(!wn.views.formview[dt]){wn.views.formview[dt]=wn.container.add_page('Form - '+dt);wn.views.formview[dt].frm=new _f.Frm(dt,wn.views.formview[dt]);}
-wn.container.change_to('Form - '+dt);wn.views.formview[dt].frm.refresh(dn);});})}}
+dn=wn.model.new_names[dn];wn.model.with_doctype(dt,function(){wn.model.with_doc(dt,dn,function(dn){if(!(locals[dt]&&locals[dt][dn])){wn.container.change_to('404');return;}
+if(!wn.views.formview[dt]){wn.views.formview[dt]=wn.container.add_page('Form - '+dt);wn.views.formview[dt].frm=new _f.Frm(dt,wn.views.formview[dt]);}
+wn.container.change_to('Form - '+dt);wn.views.formview[dt].frm.refresh(dn);});})},create:function(dt){var new_name=LocalDB.create(dt);wn.set_route('Form',dt,new_name);}}
 /*
  *	lib/js/wn/views/reportview.js
  */
 wn.views.reportview={show:function(dt,rep_name){wn.require('lib/js/legacy/report.compressed.js');dt=get_label_doctype(dt);if(!_r.rb_con){_r.rb_con=new _r.ReportContainer();}
-_r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if(onload)
-onload(rb);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t))
+_r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t))
 rb.dt.run();}
 if(!rb.forbidden){wn.container.change_to('Report Builder');}});}}
 /*
@@ -446,9 +458,10 @@
  */
 wn.provide('wn.request');wn.request.url='index.cgi';wn.request.prepare=function(opts){if(opts.btn)$(opts.btn).set_working();if(opts.show_spinner)set_loading();if(opts.freeze)freeze();if(!opts.args.cmd){console.log(opts)
 throw"Incomplete Request";}}
-wn.request.cleanup=function(opts,r){if(opts.btn)$(opts.btn).done_working();if(opts.show_spinner)hide_loading();if(opts.freeze)unfreeze();if(wn.boot.sid&&wn.get_cookie('sid')!=wn.boot.sid){msgprint('Session expired');setTimeout('redirect_to_login()',3000);return;}
+wn.request.cleanup=function(opts,r){if(opts.btn)$(opts.btn).done_working();if(opts.show_spinner)hide_loading();if(opts.freeze)unfreeze();if(wn.boot.sid&&wn.get_cookie('sid')!=wn.boot.sid){msgprint('Session expired');setTimeout('wn.app.redirect_to_login()',3000);return;}
 if(r.server_messages)msgprint(r.server_messages)
-if(r.exc){errprint(r.exc);console.log(r.exc);};if(r.docs)LocalDB.sync(r.docs);}
+if(r.exc){console.log(r.exc);};if(r['403']){wn.container.change_to('403');}
+if(r.docs)LocalDB.sync(r.docs);}
 wn.request.call=function(opts){wn.request.prepare(opts);$.ajax({url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});show_alert('Unable to complete request: '+textStatus)
 if(opts.error)opts.error(xhr)}})}
 wn.call=function(opts){var args=$.extend({},opts.args)
@@ -458,14 +471,14 @@
 /*
  *	lib/js/core.js
  */
-if(!console){var console={log:function(txt){errprint(txt);}}}
-wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
+if(!console){var console={log:function(txt){alert(txt);}}}
+wn.versions.check();$(document).bind('ready',function(){wn.app=new wn.Application();});
 
 /*
  *	lib/js/legacy/globals.js
  */
 wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
-wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;
+wn.settings.no_history=1;var NEWLINE='\n';var profile=null;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;
 /*
  *	lib/js/legacy/utils/datatype.js
  */
@@ -677,7 +690,8 @@
 if(!msg_dialog.display)msg_dialog.show();var has_msg=msg_dialog.msg_area.innerHTML?1:0;var m=$a(msg_dialog.msg_area,'div','');if(has_msg)$y(m,{marginTop:'4px'});$dh(msg_dialog.msg_icon);if(msg.substr(0,6).toLowerCase()=='error:'){msg_dialog.msg_icon.src='lib/images/icons/error.gif';$di(msg_dialog.msg_icon);msg=msg.substr(6);}else if(msg.substr(0,8).toLowerCase()=='message:'){msg_dialog.msg_icon.src='lib/images/icons/application.gif';$di(msg_dialog.msg_icon);msg=msg.substr(8);}else if(msg.substr(0,3).toLowerCase()=='ok:'){msg_dialog.msg_icon.src='lib/images/icons/accept.gif';$di(msg_dialog.msg_icon);msg=msg.substr(3);}
 m.innerHTML=replace_newlines(msg);if(m.offsetHeight>200){$y(m,{height:'200px',width:'400px',overflow:'auto'})}
 msg_dialog.custom_onhide=callback;}
-var growl_area;function show_alert(txt,id){if(!growl_area){growl_area=$a(popup_cont,'div','',{position:'fixed',bottom:'8px',right:'8px',width:'320px',zIndex:10});}
+var growl_area;function show_alert(txt,id){if(!growl_area){if(!$('#dialog-container').length){$('<div id="dialog-container">').appendTo('body');}
+growl_area=$a($i('dialog-container'),'div','',{position:'fixed',bottom:'8px',right:'8px',width:'320px',zIndex:10});}
 var wrapper=$a(growl_area,'div','',{position:'relative'});var body=$a(wrapper,'div','notice');var c=$a(body,'i','icon-remove-sign',{cssFloat:'right',cursor:'pointer'});$(c).click(function(){$dh(this.wrapper)});c.wrapper=wrapper;var t=$a(body,'div','',{color:'#FFF'});$(t).html(txt);if(id){$(t).attr('id',id);}
 $(wrapper).hide().fadeIn(1000);}
 /*
@@ -913,14 +927,15 @@
 wn.ui.AppFrame=Class.extend({init:function(parent){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
    <span class="appframe-title"></span>\
    <span class="close">&times;</span>\
-  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
+  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},title:function(txt){this.$titlebar.find('.appframe-title').text(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
 this.$w.append('<div class="appframe-toolbar"></div>');args={label:label,icon:''};if(icon){args.icon='<i class="'+icon+'"></i>';}
 this.buttons[label]=$(repl('<button class="btn btn-small">\
    %(icon)s %(label)s</button>',args)).click(click).appendTo(this.$w.find('.appframe-toolbar'));return this.buttons[label];},clear_buttons:function(){this.$w.find('.appframe-toolbar').empty();}})
 /*
  *	lib/js/wn/ui/dialog.js
  */
-wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
+wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){if(!window.make_field){wn.require('lib/css/legacy/fields.css');wn.require('lib/js/legacy/widgets/form/fields.js');wn.require('lib/js/wn/ui/button.js');}
+$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
 f=make_field(df,null,div,null);f.not_in_form=1;this.fields_dict[df.fieldname]=f
 f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-info');this.first_button=true;}}}
 this.get_values=function(){var ret={};var errors=[];for(var key in this.fields_dict){var f=this.fields_dict[key];var v=f.get_value?f.get_value():null;if(f.df.reqd&&!v)
@@ -931,7 +946,8 @@
 this.set_values=function(dict){for(var key in dict){if(this.fields_dict[key]){this.set_value(key,dict[key]);}}}
 this.clear=function(){for(key in this.fields_dict){var f=this.fields_dict[key];if(f){f.set_input(f.df['default']||'');}}}}
 wn.widgets.Dialog=function(opts){this.opts=opts;this.display=false;this.make=function(opts){if(opts)
-this.opts=opts;if(!this.opts.width)this.opts.width=480;this.wrapper=$a(popup_cont,'div','dialog_wrapper');if(this.opts.width)
+this.opts=opts;if(!this.opts.width)this.opts.width=480;if(!$('#dialog-container').length){$('<div id="dialog-container">').appendTo('body');}
+this.wrapper=$('<div class="dialog_wrapper">').appendTo('#dialog-container').get(0);if(this.opts.width)
 this.wrapper.style.width=this.opts.width+'px';this.make_head();this.body=$a(this.wrapper,'div','dialog_body');if(this.opts.fields)
 this.make_fields(this.body,this.opts.fields);}
 this.make_head=function(){var me=this;this.appframe=new wn.ui.AppFrame(this.wrapper);this.appframe.$titlebar.find('.close').unbind('click').click(function(){if(me.oncancel)me.oncancel();me.hide();});this.set_title(this.opts.title);}
@@ -942,7 +958,8 @@
 this.hide=function(){if(this.onhide)this.onhide();unfreeze();$dh(this.wrapper);this.display=false;cur_dialog=null;}
 this.no_cancel=function(){this.appframe.$titlebar.find('.close').toggle(false);}
 if(opts)this.make();}
-wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
+wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();wn.provide('wn.ui');wn.ui.Dialog=wn.widgets.Dialog
+$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
 /*
  *	lib/js/wn/ui/button.js
  */
@@ -1158,7 +1175,7 @@
 wn.set_route('Report',dt,rep_name);else
 wn.set_route('Report',dt);}
 function loaddoc(doctype,name,onload){wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,name);}else{wn.set_route('Form',doctype,name);}})}
-var load_doc=loaddoc;function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,'New '+doctype);}else{wn.set_route('Form',doctype,'New '+doctype);}})}
+var load_doc=loaddoc;function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){var new_name=LocalDB.create(doctype);_f.edit_record(doctype,new_name);}else{wn.views.formview.create(doctype);}})}
 var newdoc=new_doc;var pscript={};function loadpage(page_name,call_back,no_history){wn.set_route(page_name);}
 function loaddocbrowser(dt){wn.set_route('List',dt);}
 /*
@@ -1257,14 +1274,8 @@
 Meta.get_field=function(dt,fn,dn){if(dn&&local_dt[dt]&&local_dt[dt][dn]){return local_dt[dt][dn][fn];}else{if(fields[dt])var d=fields[dt][fn];if(d)return d;}
 return{};}
 Meta.set_field_property=function(fn,key,val,doc){if(!doc&&(cur_frm.doc))doc=cur_frm.doc;try{local_dt[doc.doctype][doc.name][fn][key]=val;refresh_field(fn);}catch(e){alert("Client Script Error: Unknown values for "+doc.name+','+fn+'.'+key+'='+val);}}
-function get_doctype_label(dt){if(session.dt_labels&&session.dt_labels[dt])
-return session.dt_labels[dt]
-else
-return dt}
-function get_label_doctype(label){if(session.rev_dt_labels&&session.rev_dt_labels[label])
-return session.rev_dt_labels[label]
-else
-return label}
+function get_doctype_label(dt){return dt}
+function get_label_doctype(label){return label}
 var getchildren=LocalDB.getchildren;var get_field=Meta.get_field;var createLocal=LocalDB.create;
 /*
  *	lib/js/legacy/model/doclist.js
@@ -1278,8 +1289,10 @@
 l[l.length]=zip(docs._kl[docs._vl[i][0]],docs._vl[i]);return l;}
 function zip(k,v){var obj={};for(var i=0;i<k.length;i++){obj[k[i]]=v[i];}
 return obj;}
-function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_clear=true;if(save_action!='Cancel'){for(var n in doclist){var tmp=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_clear)
-all_clear=tmp;}}
+function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_reqd_ok=true;if(save_action!='Cancel'){for(var n in doclist){var reqd_ok=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_reqd_ok)
+all_reqd_ok=reqd_ok;}}
+if(!all_reqd_ok){onerr()
+return;}
 var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
 if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));}
 if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}}
@@ -1343,7 +1356,7 @@
     </ul>\
    </div>\
    </div>\
-   </div>');},make_home:function(){$('.navbar .brand').attr('href',"#!"+home_page);},make_document:function(){wn.ui.toolbar.new_dialog=new wn.ui.toolbar.NewDialog();wn.ui.toolbar.search=new wn.ui.toolbar.Search();wn.ui.toolbar.report=new wn.ui.toolbar.Report();$('.navbar .nav:first').append('<li class="dropdown">\
+   </div>');},make_home:function(){$('.navbar .brand').attr('href',"#");},make_document:function(){wn.ui.toolbar.new_dialog=new wn.ui.toolbar.NewDialog();wn.ui.toolbar.search=new wn.ui.toolbar.Search();wn.ui.toolbar.report=new wn.ui.toolbar.Report();$('.navbar .nav:first').append('<li class="dropdown">\
    <a class="dropdown-toggle" href="#"  data-toggle="dropdown"\
     onclick="return false;">Document<b class="caret"></b></a>\
    <ul class="dropdown-menu" id="toolbar-document">\
@@ -1364,7 +1377,7 @@
    </ul>\
   </li>');if(has_common(user_roles,['Administrator','System Manager'])){$('#toolbar-tools').append('<li><a href="#" \
     onclick="return wn.ui.toolbar.download_backup();">\
-    Download Backup</a></li>');}},set_user_name:function(){var fn=user_fullname;if(fn.length>15)fn=fn.substr(0,12)+'...';$('#toolbar-user-link').html(fn+'<b class="caret"></b>');},make_logout:function(){$('#toolbar-user').append('<li><a href="#" onclick="return logout();">Logout</a></li>');}});wn.ui.toolbar.clear_cache=function(){localStorage&&localStorage.clear();$c('webnotes.session_cache.clear',{},function(r,rt){show_alert(r.message);});return false;}
+    Download Backup</a></li>');}},set_user_name:function(){var fn=user_fullname;if(fn.length>15)fn=fn.substr(0,12)+'...';$('#toolbar-user-link').html(fn+'<b class="caret"></b>');},make_logout:function(){$('#toolbar-user').append('<li><a href="#" onclick="return wn.app.logout();">Logout</a></li>');}});wn.ui.toolbar.clear_cache=function(){localStorage&&localStorage.clear();$c('webnotes.session_cache.clear',{},function(r,rt){show_alert(r.message);});return false;}
 wn.ui.toolbar.download_backup=function(){$c('webnotes.utils.backups.get_backup',{},function(r,rt){});return false;}
 wn.ui.toolbar.show_about=function(){try{wn.require('lib/js/wn/misc/about.js');wn.ui.misc.about();}catch(e){console.log(e);}
 return false;}
@@ -1647,7 +1660,7 @@
 _e.dialog.widgets['Subject'].value=get_doctype_label(this.meta.name)+': '+this.docname;_e.dialog.show();}
 _f.Frm.prototype.rename_notify=function(dt,old,name){this.is_editable[name]=this.is_editable[old];delete this.is_editable[old];if(this.docname==old)
 this.docname=name;if(this&&this.opendocs[old]){local_dt[dt][name]=local_dt[dt][old];local_dt[dt][old]=null;}
-delete this.opendocs[old];this.opendocs[name]=true;}
+delete this.opendocs[old];this.opendocs[name]=true;wn.re_route[window.location.hash]='Form/'+encodeURIComponent(this.doctype)+'/'+encodeURIComponent(name);wn.set_route('Form',this.doctype,name);}
 _f.Frm.prototype.setup_meta=function(){this.meta=get_local('DocType',this.doctype);this.perm=get_perm(this.doctype);if(this.meta.istable){this.meta.in_dialog=1}
 this.setup_print();}
 _f.Frm.prototype.setup_sidebar=function(){this.sidebar=new wn.widgets.form.sidebar.Sidebar(this);}
@@ -1750,7 +1763,7 @@
 _f.get_value=function(dt,dn,fn){if(locals[dt]&&locals[dt][dn])
 return locals[dt][dn][fn];}
 _f.set_value=function(dt,dn,fn,v){var d=locals[dt][dn];if(!d){console.log('_f.set_value - '+fn+': "'+dt+','+dn+'" not found');return;}
-var changed=d[fn]!=v;if(changed&&(d[fn]==null||v==null)&&(cstr(d[fn])==cstr(v)))changed=0;if(changed){d[fn]=v;d.__unsaved=1;if(d.parent&&d.parenttype){locals[d.parenttype][d.parent].__unsaved=1;var frm=wn.views.formview[d.parenttype].frm;}else{locals[d.doctype][d.name].__unsaved=1;var frm=wn.views.formview[d.doctype].frm;}
+var changed=d[fn]!=v;if(changed&&(d[fn]==null||v==null)&&(cstr(d[fn])==cstr(v)))changed=0;if(changed){d[fn]=v;d.__unsaved=1;if(d.parent&&d.parenttype){locals[d.parenttype][d.parent].__unsaved=1;var frm=wn.views.formview[d.parenttype].frm;}else{locals[d.doctype][d.name].__unsaved=1;var frm=wn.views.formview[d.doctype]&&wn.views.formview[d.doctype].frm;}
 if(frm&&frm==cur_frm&&frm.frm_head){frm.frm_head.refresh_labels();}}}
 _f.Frm.prototype.show_comments=function(){if(!cur_frm.comments){cur_frm.comments=new Dialog(540,400,'Comments');cur_frm.comments.comment_body=$a(cur_frm.comments.body,'div','dialog_frm');$y(cur_frm.comments.body,{backgroundColor:'#EEE'});cur_frm.comments.list=new CommentList(cur_frm.comments.comment_body);}
 cur_frm.comments.list.dt=cur_frm.doctype;cur_frm.comments.list.dn=cur_frm.docname;cur_frm.comments.show();cur_frm.comments.list.run();}
@@ -1909,6 +1922,15 @@
 /*
  *	lib/js/legacy/widgets/form/print_format.js
  */
+_p.def_print_style_body="html, body, div, span, td { font-family: Arial, Helvetica; font-size: 12px; }"+"\npre { margin:0; padding:0;}"
+_p.def_print_style_other="\n.simpletable, .noborder { border-collapse: collapse; margin-bottom: 10px;}"
++"\n.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }"
++"\n.noborder td { vertical-align: top; }"
+_p.go=function(html){var d=document.createElement('div')
+d.innerHTML=html
+$(d).printElement();}
+_p.preview=function(html){var w=window.open('');w.document.write(html)
+w.document.close();}
 $.extend(_p,{show_dialog:function(){if(!_p.dialog){_p.make_dialog();}
 _p.dialog.show();},make_dialog:function(){var d=new Dialog(360,140,'Print Formats',[['HTML','Select'],['Check','No Letterhead'],['HTML','Buttons']]);$btn(d.widgets.Buttons,'Print',function(){_p.build(sel_val(cur_frm.print_sel),_p.go,d.widgets['No Letterhead'].checked);},{cssFloat:'right',marginBottom:'16px',marginLeft:'7px'},'green');$btn(d.widgets.Buttons,'Preview',function(){_p.build(sel_val(cur_frm.print_sel),_p.preview,d.widgets['No Letterhead'].checked);},{cssFloat:'right',marginBottom:'16px'},'');d.onshow=function(){var c=_p.dialog.widgets['Select'];if(c.cur_sel&&c.cur_sel.parentNode==c){c.removeChild(c.cur_sel);}
 c.appendChild(cur_frm.print_sel);c.cur_sel=cur_frm.print_sel;}
@@ -1942,7 +1964,7 @@
 var finished=header
 +stat
 +container.innerHTML.replace(/<div/g,'\n<div').replace(/<td/g,'\n<td')
-+footer;return finished;},get_letter_head:function(){var cp=wn.control_panel;var lh='';if(cur_frm.doc.letter_head){lh=cstr(_p.letter_heads[cur_frm.doc.letter_head]);}else if(cp.letter_head){lh=cp.letter_head;}
++footer;return finished;},get_letter_head:function(){var cp=wn.control_panel;var lh='';if(cur_frm.doc.letter_head){lh=cstr(wn.boot.letter_heads[cur_frm.doc.letter_head]);}else if(cp.letter_head){lh=cp.letter_head;}
 return lh;},print_style:"\
   .datalabelcell { \
    padding: 2px 0px; \
@@ -2120,57 +2142,28 @@
 $(this.body).find('a.close').click(function(){$c('webnotes.widgets.form.assign_to.remove',{doctype:me.doctype,name:me.name,assign_to:$(this).attr('data-owner')},function(r,rt){me.render(r.message);});return false;});},add:function(){var me=this;if(!me.dialog){me.dialog=new wn.widgets.Dialog({title:'Add to To Do',width:350,fields:[{fieldtype:'Link',fieldname:'assign_to',options:'Profile',label:'Assign To',description:'Add to To Do List of',reqd:true},{fieldtype:'Data',fieldname:'description',label:'Comment'},{fieldtype:'Date',fieldname:'date',label:'Complete By'},{fieldtype:'Select',fieldname:'priority',label:'Priority',options:'Low\nMedium\nHigh','default':'Medium'},{fieldtype:'Check',fieldname:'notify',label:'Notify By Email'},{fieldtype:'Button',label:'Add',fieldname:'add_btn'}]});me.dialog.fields_dict.add_btn.input.onclick=function(){var assign_to=me.dialog.fields_dict.assign_to.get_value();if(assign_to){$c('webnotes.widgets.form.assign_to.add',{doctype:me.doctype,name:me.name,assign_to:assign_to,description:me.dialog.fields_dict.description.get_value(),priority:me.dialog.fields_dict.priority.get_value(),date:me.dialog.fields_dict.date.get_value(),notify:me.dialog.fields_dict.notify.get_value()},function(r,rt){me.render(r.message);});}}}
 me.dialog.clear();me.dialog.show();}});
 /*
- *	lib/js/legacy/app.js
+ *	lib/js/wn/app.js
  */
-var popup_cont;var session={};if(!wn)var wn={};function startup(){popup_cont=$a(document.getElementsByTagName('body')[0],'div');var setup_globals=function(r){wn.boot=r;profile=r.profile;user=r.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;home_page=r.home_page;_p.letter_heads=r.letter_heads;sys_defaults=r.sysdefaults;session.rt=profile.can_read;if(r.ipinfo)session.ipinfo=r.ipinfo;session.dt_labels=r.dt_labels;session.rev_dt_labels={}
-if(r.dt_labels){for(key in r.dt_labels)session.rev_dt_labels[r.dt_labels[key]]=key;}
-wn.control_panel=r.control_panel;}
-var setup_viewport=function(){wn.container=new wn.views.Container();if(user=='Guest')
-user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}
-$(document).trigger('startup');try{if(wn.control_panel.custom_startup_code)
-eval(wn.control_panel.custom_startup_code);}catch(e){errprint(e);}
-var t=to_open();if(t){window.location.hash=t;set_favicon();}else if(home_page){loadpage(home_page);}
-wn.route();$dh('startup_div');$ds('body_div');}
-var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_viewport();}
-if(wn.boot){LocalDB.sync(wn.boot.docs);callback(wn.boot,'');if(wn.boot.error_messages)
+wn.Application=Class.extend({init:function(){this.load_bootinfo();this.make_page_container();this.make_nav_bar();this.set_favicon();$(document).trigger('startup');wn.route();},load_bootinfo:function(){LocalDB.sync(wn.boot.docs);wn.user=wn.boot.profile.name;wn.control_panel=wn.boot.control_panel;if(wn.boot.error_messages)
 console.log(wn.boot.error_messages)
 if(wn.boot.server_messages)
-msgprint(wn.boot.server_messages);}else{if($i('startup_div'))
-$c('startup',{},callback,null,1);}}
-function to_open(){if(get_url_arg('page'))
-return get_url_arg('page');var h=location.hash;if(h){return h.substr(1);}}
-function logout(){$c('logout',args={},function(r,rt){if(r.exc){msgprint(r.exc);return;}
-redirect_to_login();});}
-function redirect_to_login(){if(login_file)
-window.location.href=login_file;else{window.location.reload();}}
-_p.def_print_style_body="html, body, div, span, td { font-family: Arial, Helvetica; font-size: 12px; }"+"\npre { margin:0; padding:0;}"
-_p.def_print_style_other="\n.simpletable, .noborder { border-collapse: collapse; margin-bottom: 10px;}"
-+"\n.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }"
-+"\n.noborder td { vertical-align: top; }"
-_p.go=function(html){var d=document.createElement('div')
-d.innerHTML=html
-$(d).printElement();}
-_p.preview=function(html){var w=window.open('');w.document.write(html)
-w.document.close();}
-var resize_observers=[]
-function set_resize_observer(fn){if(resize_observers.indexOf(fn)==-1)resize_observers.push(fn);}
-window.onresize=function(){return;var ht=get_window_height();for(var i=0;i<resize_observers.length;i++){resize_observers[i](ht);}}
-get_window_height=function(){var ht=window.innerHeight?window.innerHeight:document.documentElement.offsetHeight?document.documentElement.offsetHeight:document.body.offsetHeight;return ht;}
-function set_favicon(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\
-  <link rel="shortcut icon" href="'+link+'" type="image/x-icon"> \
-  <link rel="icon" href="'+link+'" type="image/x-icon">'
-$(favicon).appendTo('head');}
+msgprint(wn.boot.server_messages);this.set_globals();},set_globals:function(){profile=wn.boot.profile;user=wn.boot.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;sys_defaults=wn.boot.sysdefaults;},make_page_container:function(){wn.container=new wn.views.Container();wn.views.make_403();wn.views.make_404();$('#startup_div').toggle(false);$('#body_div').toggle(true);},make_nav_bar:function(){if(wn.user!='Guest'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}},logout:function(){var me=this;wn.call({method:'logout',callback:function(r){if(r.exc){console.log(r.exc);return;}
+me.redirect_to_login();}})},redirect_to_login:function(){window.location.hash='';window.location.reload();},set_favicon:function(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\
+   <link rel="shortcut icon" href="'+link+'" type="image/x-icon"> \
+   <link rel="icon" href="'+link+'" type="image/x-icon">'
+$(favicon).appendTo('head');}})
 /*
  *	js/app.js
  */
 wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'&copy; Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number}
-wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
+wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
   <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
 /*
  *	erpnext/startup/startup.js
  */
 var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'activity','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions','Dashboard':'dashboard'}
-erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
+erpnext.startup.set_globals=function(){wn.control_panel.sync_with_gateway=wn.boot.sync_with_gateway
+pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
 if(inList(user_roles,'System Manager'))is_system_manager=1;}
 erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
 if(user=='Guest'){if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
diff --git a/js/all-web.js b/js/all-web.js
index 740cbb2..8a39b46 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -75,7 +75,7 @@
 /*
  *	lib/js/wn/model.js
  */
-wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{if(name&&name.indexOf('New '+doctype)!=-1){name=LocalDB.create(doctype);callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name);}});}}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}}
+wn.provide('wn.model');wn.model={no_value_type:['Section Break','Column Break','HTML','Table','Button','Image'],new_names:{},with_doctype:function(doctype,callback){if(locals.DocType[doctype]){callback();}else{wn.call({method:'webnotes.widgets.form.load.getdoctype',args:{doctype:doctype},callback:callback});}},with_doc:function(doctype,name,callback){if(!name)name=doctype;if(locals[doctype]&&locals[doctype][name]){callback(name);}else{wn.call({method:'webnotes.widgets.form.load.getdoc',args:{doctype:doctype,name:name},callback:function(r){callback(name);}});}},can_delete:function(doctype){if(!doctype)return false;return locals.DocType[doctype].allow_trash&&wn.boot.profile.can_cancel.indexOf(doctype)!=-1;}}
 /*
  *	lib/js/wn/misc/tools.js
  */
@@ -123,11 +123,13 @@
 /*
  *	lib/js/wn/router.js
  */
-wn.route=function(){wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
+wn.re_route={}
+wn.route=function(){if(wn.re_route[window.location.hash]){window.location.hash=wn.re_route[window.location.hash];}
+wn._cur_route=window.location.hash;route=wn.get_route();switch(route[0]){case"List":wn.views.doclistview.show(route[1]);break;case"Form":if(route.length>3){route[2]=route.splice(2).join('/');}
 wn.views.formview.show(route[1],route[2]);break;case"Report":wn.views.reportview.show(route[1],route[2]);break;default:wn.views.pageview.show(route[0]);}}
 wn.get_route=function(route){if(!route)
 route=window.location.hash;if(route.substr(0,1)=='#')route=route.substr(1);if(route.substr(0,1)=='!')route=route.substr(1);return $.map(route.split('/'),function(r){return decodeURIComponent(r);});}
-wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;set_favicon();}
+wn.set_route=function(){route=$.map(arguments,function(a){return encodeURIComponent(a)}).join('/');window.location.hash=route;wn.app.set_favicon();}
 wn._cur_route=null;$(window).bind('hashchange',function(){if(location.hash==wn._cur_route)
 return;wn.route();if(wn.boot.analytics_code){try{eval(wn.boot.analytics_code);}catch(e){console.log(e);}}});
 /*
@@ -149,7 +151,7 @@
      </div>\
     </div>\
     \
-    <div style="height: 37px; margin-bottom:9px" class="list-toolbar-wrapper">\
+    <div style="margin-bottom:9px" class="list-toolbar-wrapper">\
      <div class="list-toolbar" style="display:inline-block; margin-right: 10px;">\
      </div>\
      <div style="display:inline-block; width: 24px; margin-left: 4px">\
@@ -175,15 +177,16 @@
 if(icon){$('<i>').addClass(icon).appendTo($button);}
 $button.html(label).click(click);return $button}},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
 if(!(this.hide_refresh||this.no_refresh)){this.add_button('Refresh',function(){me.run();},'icon-refresh');}
-if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){newdoc(me.new_doctype)},'icon-plus');}
-if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
+if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){wn.views.formview.create(me.new_doctype)},'icon-plus');}
+if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}
+if(me.no_toolbar||me.hide_toolbar){me.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
 this.onrun=a0;if(a0&&a0.callback)
 this.onrun=a0.callback;if(!a1&&!(a0&&a0.append))
-this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
+this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(a0),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(opts){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
 args.simple_query=this.query;}else{var args={limit_start:this.start,limit_page_length:this.page_length}}
 if(this.args)
 $.extend(args,this.args)
-if(this.get_args){$.extend(args,this.get_args());}
+if(this.get_args){$.extend(args,this.get_args(opts));}
 return args;},render_results:function(r){if(this.start==0)this.clear();this.$w.find('.btn-more').toggle(false);if(r.message)r.values=r.message;if(r.values&&r.values.length){this.data=this.data.concat(r.values);this.render_list(r.values);}else{if(this.start==0){this.$w.find('.result').toggle(false);this.$w.find('.no-result').toggle(true);}}
 if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:function(values){var m=Math.min(values.length,this.page_length);for(var i=0;i<m;i++){this.render_row(this.add_row(),values[i],this,i);}
 this.start+=m;if(values.length>=this.page_length)
@@ -239,7 +242,7 @@
 /*
  *	lib/js/wn/views/doclistview.js
  */
-wn.provide('wn.views.doclistview');wn.provide('wn.doclistviews');wn.views.doclistview.pages={};wn.views.doclistview.show=function(doctype){var pagename=doctype+' List';var doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){var page=wn.views.doclistview.pages[pagename];if(!page){var page=wn.container.add_page(pagename);page.doclistview=new wn.views.DocListView(doctype,page);wn.views.doclistview.pages[pagename]=page;}
+wn.provide('wn.views.doclistview');wn.provide('wn.doclistviews');wn.views.doclistview.pages={};wn.views.doclistview.show=function(doctype){var pagename=doctype+' List';var doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(r){if(r&&r['403'])return;var page=wn.views.doclistview.pages[pagename];if(!page){var page=wn.container.add_page(pagename);page.doclistview=new wn.views.DocListView(doctype,page);wn.views.doclistview.pages[pagename]=page;}
 document.title=page.doclistview.label;wn.container.change_to(pagename);})}
 wn.views.DocListView=wn.ui.Listing.extend({init:function(doctype,page){this.doctype=doctype;this.$page=$(page);this.label=get_doctype_label(doctype);this.label=(this.label.toLowerCase().substr(-4)=='list')?this.label:(this.label+' List');this.make_page();this.setup();},make_page:function(){var me=this;this.$page.html(repl('<div class="layout-wrapper layout-wrapper-background">\
    <div class="appframe-area"></div>\
@@ -311,21 +314,30 @@
 /*
  *	lib/js/wn/views/pageview.js
  */
-wn.provide('wn.views.pageview');wn.views.pageview={pages:{},with_page:function(name,callback){if(!locals.Page[name]){wn.call({method:'webnotes.widgets.page.getpage',args:{'name':name},callback:callback});}else{callback();}},show:function(name){wn.views.pageview.with_page(name,function(){if(!wn.pages[name]){wn.views.pageview.pages[name]=new wn.views.Page(name);}
+wn.provide('wn.views.pageview');wn.views.pageview={pages:{},with_page:function(name,callback){if(!locals.Page[name]){wn.call({method:'webnotes.widgets.page.getpage',args:{'name':name},callback:callback});}else{callback();}},show:function(name){if(!name)name=wn.boot.home_page;wn.views.pageview.with_page(name,function(r){if(r&&r.exc){if(!r['403'])wn.container.change_to('404');}else if(!wn.pages[name]){wn.views.pageview.pages[name]=new wn.views.Page(name);}
 wn.container.change_to(name);});}}
 wn.views.Page=Class.extend({init:function(name){this.name=name;var me=this;this.pagedoc=locals.Page[this.name];this.wrapper=wn.container.add_page(this.name);this.wrapper.label=this.pagedoc.title||this.pagedoc.name;this.wrapper.innerHTML=this.pagedoc.content;wn.dom.eval(this.pagedoc.__script||this.pagedoc.script||'');wn.dom.set_style(this.pagedoc.style);this.trigger('onload');$(this.wrapper).bind('show',function(){cur_frm=null;me.trigger('onshow');me.trigger('refresh');});},trigger:function(eventname){var me=this;try{if(pscript[eventname+'_'+this.name]){pscript[eventname+'_'+this.name](me.wrapper);}else if(me.wrapper[eventname]){me.wrapper[eventname](me.wrapper);}}catch(e){console.log(e);}}})
+wn.views.make_404=function(){var page=wn.container.add_page('404');$(page).html('<div class="layout-wrapper">\
+  <h1>Not Found</h1><br>\
+  <p>Sorry we were unable to find what you were looking for.</p>\
+  <p><a href="#">Go back to home</a></p>\
+  </div>').toggle(false);};wn.views.make_403=function(){var page=wn.container.add_page('403');$(page).html('<div class="layout-wrapper">\
+  <h1>Not Permitted</h1><br>\
+  <p>Sorry you are not permitted to view this page.</p>\
+  <p><a href="#">Go back to home</a></p>\
+  </div>').toggle(false);};
 /*
  *	lib/js/wn/views/formview.js
  */
 wn.provide('wn.views.formview');wn.views.formview={show:function(dt,dn){if(wn.model.new_names[dn])
-dn=wn.model.new_names[dn];wn.model.with_doctype(dt,function(){wn.model.with_doc(dt,dn,function(dn){if(!wn.views.formview[dt]){wn.views.formview[dt]=wn.container.add_page('Form - '+dt);wn.views.formview[dt].frm=new _f.Frm(dt,wn.views.formview[dt]);}
-wn.container.change_to('Form - '+dt);wn.views.formview[dt].frm.refresh(dn);});})}}
+dn=wn.model.new_names[dn];wn.model.with_doctype(dt,function(){wn.model.with_doc(dt,dn,function(dn){if(!(locals[dt]&&locals[dt][dn])){wn.container.change_to('404');return;}
+if(!wn.views.formview[dt]){wn.views.formview[dt]=wn.container.add_page('Form - '+dt);wn.views.formview[dt].frm=new _f.Frm(dt,wn.views.formview[dt]);}
+wn.container.change_to('Form - '+dt);wn.views.formview[dt].frm.refresh(dn);});})},create:function(dt){var new_name=LocalDB.create(dt);wn.set_route('Form',dt,new_name);}}
 /*
  *	lib/js/wn/views/reportview.js
  */
 wn.views.reportview={show:function(dt,rep_name){wn.require('lib/js/legacy/report.compressed.js');dt=get_label_doctype(dt);if(!_r.rb_con){_r.rb_con=new _r.ReportContainer();}
-_r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if(onload)
-onload(rb);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t))
+_r.rb_con.set_dt(dt,function(rb){if(rep_name){var t=rb.current_loaded;rb.load_criteria(rep_name);if((rb.dt)&&(!rb.dt.has_data()||rb.current_loaded!=t))
 rb.dt.run();}
 if(!rb.forbidden){wn.container.change_to('Report Builder');}});}}
 /*
@@ -333,9 +345,10 @@
  */
 wn.provide('wn.request');wn.request.url='index.cgi';wn.request.prepare=function(opts){if(opts.btn)$(opts.btn).set_working();if(opts.show_spinner)set_loading();if(opts.freeze)freeze();if(!opts.args.cmd){console.log(opts)
 throw"Incomplete Request";}}
-wn.request.cleanup=function(opts,r){if(opts.btn)$(opts.btn).done_working();if(opts.show_spinner)hide_loading();if(opts.freeze)unfreeze();if(wn.boot.sid&&wn.get_cookie('sid')!=wn.boot.sid){msgprint('Session expired');setTimeout('redirect_to_login()',3000);return;}
+wn.request.cleanup=function(opts,r){if(opts.btn)$(opts.btn).done_working();if(opts.show_spinner)hide_loading();if(opts.freeze)unfreeze();if(wn.boot.sid&&wn.get_cookie('sid')!=wn.boot.sid){msgprint('Session expired');setTimeout('wn.app.redirect_to_login()',3000);return;}
 if(r.server_messages)msgprint(r.server_messages)
-if(r.exc){errprint(r.exc);console.log(r.exc);};if(r.docs)LocalDB.sync(r.docs);}
+if(r.exc){console.log(r.exc);};if(r['403']){wn.container.change_to('403');}
+if(r.docs)LocalDB.sync(r.docs);}
 wn.request.call=function(opts){wn.request.prepare(opts);$.ajax({url:opts.url||wn.request.url,data:opts.args,type:opts.type||'POST',dataType:opts.dataType||'json',success:function(r,xhr){wn.request.cleanup(opts,r);opts.success(r,xhr.responseText);},error:function(xhr,textStatus){wn.request.cleanup(opts,{});show_alert('Unable to complete request: '+textStatus)
 if(opts.error)opts.error(xhr)}})}
 wn.call=function(opts){var args=$.extend({},opts.args)
@@ -345,14 +358,14 @@
 /*
  *	lib/js/core.js
  */
-if(!console){var console={log:function(txt){errprint(txt);}}}
-wn.versions.check();$(document).bind('ready',function(){var base=window.location.href.split('#')[0];$.each($('a[softlink!="false"]'),function(i,v){if(v.href.substr(0,base.length)==base){var path=(v.href.substr(base.length));if(path.substr(0,1)!='#'){v.href=base+'#'+path;}}});if(!wn.settings.no_history&&window.location.hash){wn.page.set(window.location.hash.substr(1));}});
+if(!console){var console={log:function(txt){alert(txt);}}}
+wn.versions.check();$(document).bind('ready',function(){wn.app=new wn.Application();});
 
 /*
  *	lib/js/legacy/globals.js
  */
 wn.provide('wn.widgets.form');wn.provide('wn.widgets.report');wn.provide('wn.utils');wn.provide('wn.model');wn.provide('wn.profile');wn.provide('wn.session');wn.provide('_f');wn.provide('_p');wn.provide('_r');wn.provide('_c');wn.provide('_e');wn.provide('_startup_data')
-wn.settings.no_history=1;var NEWLINE='\n';var login_file='';var version='v170';var profile=null;var session={};var is_testing=false;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var home_page=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;
+wn.settings.no_history=1;var NEWLINE='\n';var profile=null;var user=null;var user_defaults=null;var user_roles=null;var user_fullname=null;var user_email=null;var user_img={};var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;
 /*
  *	lib/js/legacy/utils/datatype.js
  */
@@ -564,7 +577,8 @@
 if(!msg_dialog.display)msg_dialog.show();var has_msg=msg_dialog.msg_area.innerHTML?1:0;var m=$a(msg_dialog.msg_area,'div','');if(has_msg)$y(m,{marginTop:'4px'});$dh(msg_dialog.msg_icon);if(msg.substr(0,6).toLowerCase()=='error:'){msg_dialog.msg_icon.src='lib/images/icons/error.gif';$di(msg_dialog.msg_icon);msg=msg.substr(6);}else if(msg.substr(0,8).toLowerCase()=='message:'){msg_dialog.msg_icon.src='lib/images/icons/application.gif';$di(msg_dialog.msg_icon);msg=msg.substr(8);}else if(msg.substr(0,3).toLowerCase()=='ok:'){msg_dialog.msg_icon.src='lib/images/icons/accept.gif';$di(msg_dialog.msg_icon);msg=msg.substr(3);}
 m.innerHTML=replace_newlines(msg);if(m.offsetHeight>200){$y(m,{height:'200px',width:'400px',overflow:'auto'})}
 msg_dialog.custom_onhide=callback;}
-var growl_area;function show_alert(txt,id){if(!growl_area){growl_area=$a(popup_cont,'div','',{position:'fixed',bottom:'8px',right:'8px',width:'320px',zIndex:10});}
+var growl_area;function show_alert(txt,id){if(!growl_area){if(!$('#dialog-container').length){$('<div id="dialog-container">').appendTo('body');}
+growl_area=$a($i('dialog-container'),'div','',{position:'fixed',bottom:'8px',right:'8px',width:'320px',zIndex:10});}
 var wrapper=$a(growl_area,'div','',{position:'relative'});var body=$a(wrapper,'div','notice');var c=$a(body,'i','icon-remove-sign',{cssFloat:'right',cursor:'pointer'});$(c).click(function(){$dh(this.wrapper)});c.wrapper=wrapper;var t=$a(body,'div','',{color:'#FFF'});$(t).html(txt);if(id){$(t).attr('id',id);}
 $(wrapper).hide().fadeIn(1000);}
 /*
@@ -573,14 +587,15 @@
 wn.ui.AppFrame=Class.extend({init:function(parent){this.buttons={};this.$w=$('<div></div>').appendTo(parent);this.$titlebar=$('<div class="appframe-titlebar">\
    <span class="appframe-title"></span>\
    <span class="close">&times;</span>\
-  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
+  </div>').appendTo(this.$w);this.$w.find('.close').click(function(){window.history.back();})},title:function(txt){this.$titlebar.find('.appframe-title').text(txt);},add_button:function(label,click,icon){if(!this.$w.find('.appframe-toolbar').length)
 this.$w.append('<div class="appframe-toolbar"></div>');args={label:label,icon:''};if(icon){args.icon='<i class="'+icon+'"></i>';}
 this.buttons[label]=$(repl('<button class="btn btn-small">\
    %(icon)s %(label)s</button>',args)).click(click).appendTo(this.$w.find('.appframe-toolbar'));return this.buttons[label];},clear_buttons:function(){this.$w.find('.appframe-toolbar').empty();}})
 /*
  *	lib/js/wn/ui/dialog.js
  */
-wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
+wn.widgets.FieldGroup=function(){this.first_button=false;this.make_fields=function(body,fl){if(!window.make_field){wn.require('lib/css/legacy/fields.css');wn.require('lib/js/legacy/widgets/form/fields.js');wn.require('lib/js/wn/ui/button.js');}
+$y(this.body,{padding:'11px'});this.fields_dict={};for(var i=0;i<fl.length;i++){var df=fl[i];var div=$a(body,'div','',{margin:'6px 0px'})
 f=make_field(df,null,div,null);f.not_in_form=1;this.fields_dict[df.fieldname]=f
 f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-info');this.first_button=true;}}}
 this.get_values=function(){var ret={};var errors=[];for(var key in this.fields_dict){var f=this.fields_dict[key];var v=f.get_value?f.get_value():null;if(f.df.reqd&&!v)
@@ -591,7 +606,8 @@
 this.set_values=function(dict){for(var key in dict){if(this.fields_dict[key]){this.set_value(key,dict[key]);}}}
 this.clear=function(){for(key in this.fields_dict){var f=this.fields_dict[key];if(f){f.set_input(f.df['default']||'');}}}}
 wn.widgets.Dialog=function(opts){this.opts=opts;this.display=false;this.make=function(opts){if(opts)
-this.opts=opts;if(!this.opts.width)this.opts.width=480;this.wrapper=$a(popup_cont,'div','dialog_wrapper');if(this.opts.width)
+this.opts=opts;if(!this.opts.width)this.opts.width=480;if(!$('#dialog-container').length){$('<div id="dialog-container">').appendTo('body');}
+this.wrapper=$('<div class="dialog_wrapper">').appendTo('#dialog-container').get(0);if(this.opts.width)
 this.wrapper.style.width=this.opts.width+'px';this.make_head();this.body=$a(this.wrapper,'div','dialog_body');if(this.opts.fields)
 this.make_fields(this.body,this.opts.fields);}
 this.make_head=function(){var me=this;this.appframe=new wn.ui.AppFrame(this.wrapper);this.appframe.$titlebar.find('.close').unbind('click').click(function(){if(me.oncancel)me.oncancel();me.hide();});this.set_title(this.opts.title);}
@@ -602,7 +618,8 @@
 this.hide=function(){if(this.onhide)this.onhide();unfreeze();$dh(this.wrapper);this.display=false;cur_dialog=null;}
 this.no_cancel=function(){this.appframe.$titlebar.find('.close').toggle(false);}
 if(opts)this.make();}
-wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
+wn.widgets.Dialog.prototype=new wn.widgets.FieldGroup();wn.provide('wn.ui');wn.ui.Dialog=wn.widgets.Dialog
+$(document).bind('keydown',function(e){if(cur_dialog&&!cur_dialog.no_cancel_flag&&e.which==27){cur_dialog.hide();}});
 /*
  *	lib/js/legacy/widgets/dialog.js
  */
@@ -643,7 +660,7 @@
      </div>\
     </div>\
     \
-    <div style="height: 37px; margin-bottom:9px" class="list-toolbar-wrapper">\
+    <div style="margin-bottom:9px" class="list-toolbar-wrapper">\
      <div class="list-toolbar" style="display:inline-block; margin-right: 10px;">\
      </div>\
      <div style="display:inline-block; width: 24px; margin-left: 4px">\
@@ -669,15 +686,16 @@
 if(icon){$('<i>').addClass(icon).appendTo($button);}
 $button.html(label).click(click);return $button}},show_view:function($btn,$div,$btn_unsel,$div_unsel){$btn_unsel.removeClass('btn-info');$btn_unsel.find('i').removeClass('icon-white');$div_unsel.toggle(false);$btn.addClass('btn-info');$btn.find('i').addClass('icon-white');$div.toggle(true);},set_events:function(){var me=this;this.$w.find('.btn-more').click(function(){me.run({append:true});});if(this.title){this.$w.find('h3').html(this.title).toggle(true);}
 if(!(this.hide_refresh||this.no_refresh)){this.add_button('Refresh',function(){me.run();},'icon-refresh');}
-if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){newdoc(me.new_doctype)},'icon-plus');}
-if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
+if(this.new_doctype){this.add_button('New '+this.new_doctype,function(){wn.views.formview.create(me.new_doctype)},'icon-plus');}
+if(me.show_filters){this.add_button('Show Filters',function(){me.filter_list.show_filters();},'icon-search').addClass('btn-filter');}
+if(me.no_toolbar||me.hide_toolbar){me.$w.find('.list-toolbar-wrapper').toggle(false);}},make_filters:function(){this.filter_list=new wn.ui.FilterList({listobj:this,$parent:this.$w.find('.list-filters').toggle(true),doctype:this.doctype,filter_fields:this.filter_fields});},clear:function(){this.data=[];this.$w.find('.result-list').empty();this.$w.find('.result').toggle(true);this.$w.find('.no-result').toggle(false);this.start=0;},run:function(){var me=this;var a0=arguments[0];var a1=arguments[1];if(a0&&typeof a0=='function')
 this.onrun=a0;if(a0&&a0.callback)
 this.onrun=a0.callback;if(!a1&&!(a0&&a0.append))
-this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
+this.start=0;me.set_working(true);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:this.get_call_args(a0),callback:function(r){me.set_working(false);me.render_results(r)},no_spinner:this.opts.no_loading});},set_working:function(flag){this.$w.find('.img-load').toggle(flag);},get_call_args:function(opts){if(!this.method){this.query=this.get_query?this.get_query():this.query;this.add_limits();var args={query_max:this.query_max,as_dict:1}
 args.simple_query=this.query;}else{var args={limit_start:this.start,limit_page_length:this.page_length}}
 if(this.args)
 $.extend(args,this.args)
-if(this.get_args){$.extend(args,this.get_args());}
+if(this.get_args){$.extend(args,this.get_args(opts));}
 return args;},render_results:function(r){if(this.start==0)this.clear();this.$w.find('.btn-more').toggle(false);if(r.message)r.values=r.message;if(r.values&&r.values.length){this.data=this.data.concat(r.values);this.render_list(r.values);}else{if(this.start==0){this.$w.find('.result').toggle(false);this.$w.find('.no-result').toggle(true);}}
 if(this.onrun)this.onrun();if(this.callback)this.callback(r);},render_list:function(values){var m=Math.min(values.length,this.page_length);for(var i=0;i<m;i++){this.render_row(this.add_row(),values[i],this,i);}
 this.start+=m;if(values.length>=this.page_length)
@@ -737,7 +755,7 @@
 wn.set_route('Report',dt,rep_name);else
 wn.set_route('Report',dt);}
 function loaddoc(doctype,name,onload){wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,name);}else{wn.set_route('Form',doctype,name);}})}
-var load_doc=loaddoc;function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){_f.edit_record(doctype,'New '+doctype);}else{wn.set_route('Form',doctype,'New '+doctype);}})}
+var load_doc=loaddoc;function new_doc(doctype,onload,in_dialog,on_save_callback,cdt,cdn,cnic){doctype=get_label_doctype(doctype);wn.model.with_doctype(doctype,function(){if(locals.DocType[doctype].in_dialog){var new_name=LocalDB.create(doctype);_f.edit_record(doctype,new_name);}else{wn.views.formview.create(doctype);}})}
 var newdoc=new_doc;var pscript={};function loadpage(page_name,call_back,no_history){wn.set_route(page_name);}
 function loaddocbrowser(dt){wn.set_route('List',dt);}
 /*
@@ -797,14 +815,8 @@
 Meta.get_field=function(dt,fn,dn){if(dn&&local_dt[dt]&&local_dt[dt][dn]){return local_dt[dt][dn][fn];}else{if(fields[dt])var d=fields[dt][fn];if(d)return d;}
 return{};}
 Meta.set_field_property=function(fn,key,val,doc){if(!doc&&(cur_frm.doc))doc=cur_frm.doc;try{local_dt[doc.doctype][doc.name][fn][key]=val;refresh_field(fn);}catch(e){alert("Client Script Error: Unknown values for "+doc.name+','+fn+'.'+key+'='+val);}}
-function get_doctype_label(dt){if(session.dt_labels&&session.dt_labels[dt])
-return session.dt_labels[dt]
-else
-return dt}
-function get_label_doctype(label){if(session.rev_dt_labels&&session.rev_dt_labels[label])
-return session.rev_dt_labels[label]
-else
-return label}
+function get_doctype_label(dt){return dt}
+function get_label_doctype(label){return label}
 var getchildren=LocalDB.getchildren;var get_field=Meta.get_field;var createLocal=LocalDB.create;
 /*
  *	lib/js/legacy/model/doclist.js
@@ -818,8 +830,10 @@
 l[l.length]=zip(docs._kl[docs._vl[i][0]],docs._vl[i]);return l;}
 function zip(k,v){var obj={};for(var i=0;i<k.length;i++){obj[k[i]]=v[i];}
 return obj;}
-function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_clear=true;if(save_action!='Cancel'){for(var n in doclist){var tmp=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_clear)
-all_clear=tmp;}}
+function save_doclist(dt,dn,save_action,onsave,onerr){var doc=locals[dt][dn];var doctype=locals['DocType'][dt];var tmplist=[];var doclist=make_doclist(dt,dn,1);var all_reqd_ok=true;if(save_action!='Cancel'){for(var n in doclist){var reqd_ok=check_required(doclist[n].doctype,doclist[n].name,doclist[0].doctype);if(doclist[n].docstatus+''!='2'&&all_reqd_ok)
+all_reqd_ok=reqd_ok;}}
+if(!all_reqd_ok){onerr()
+return;}
 var _save=function(){$c('webnotes.widgets.form.save.savedocs',{'docs':compress_doclist(doclist),'docname':dn,'action':save_action,'user':user},function(r,rtxt){if(f){f.savingflag=false;}
 if(r.saved){if(onsave)onsave(r);}else{if(onerr)onerr(r);}},function(){if(f){f.savingflag=false;}},0,(f?'Saving...':''));}
 if(doc.__islocal&&(doctype&&doctype.autoname&&doctype.autoname.toLowerCase()=='prompt')){var newname=prompt('Enter the name of the new '+dt,'');if(newname){doc.__newname=strip(newname);_save();}else{msgprint('Not Saved');onerr();}}else{_save();}}
@@ -828,57 +842,28 @@
 if(errfld.length)msgprint('<b>Mandatory fields required in '+
 (doc.parenttype?(fields[doc.parenttype][doc.parentfield].label+' (Table)'):get_doctype_label(doc.doctype))+':</b>\n'+errfld.join('\n'));return all_clear;}
 /*
- *	lib/js/legacy/app.js
+ *	lib/js/wn/app.js
  */
-var popup_cont;var session={};if(!wn)var wn={};function startup(){popup_cont=$a(document.getElementsByTagName('body')[0],'div');var setup_globals=function(r){wn.boot=r;profile=r.profile;user=r.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;home_page=r.home_page;_p.letter_heads=r.letter_heads;sys_defaults=r.sysdefaults;session.rt=profile.can_read;if(r.ipinfo)session.ipinfo=r.ipinfo;session.dt_labels=r.dt_labels;session.rev_dt_labels={}
-if(r.dt_labels){for(key in r.dt_labels)session.rev_dt_labels[r.dt_labels[key]]=key;}
-wn.control_panel=r.control_panel;}
-var setup_viewport=function(){wn.container=new wn.views.Container();if(user=='Guest')
-user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}
-$(document).trigger('startup');try{if(wn.control_panel.custom_startup_code)
-eval(wn.control_panel.custom_startup_code);}catch(e){errprint(e);}
-var t=to_open();if(t){window.location.hash=t;set_favicon();}else if(home_page){loadpage(home_page);}
-wn.route();$dh('startup_div');$ds('body_div');}
-var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_viewport();}
-if(wn.boot){LocalDB.sync(wn.boot.docs);callback(wn.boot,'');if(wn.boot.error_messages)
+wn.Application=Class.extend({init:function(){this.load_bootinfo();this.make_page_container();this.make_nav_bar();this.set_favicon();$(document).trigger('startup');wn.route();},load_bootinfo:function(){LocalDB.sync(wn.boot.docs);wn.user=wn.boot.profile.name;wn.control_panel=wn.boot.control_panel;if(wn.boot.error_messages)
 console.log(wn.boot.error_messages)
 if(wn.boot.server_messages)
-msgprint(wn.boot.server_messages);}else{if($i('startup_div'))
-$c('startup',{},callback,null,1);}}
-function to_open(){if(get_url_arg('page'))
-return get_url_arg('page');var h=location.hash;if(h){return h.substr(1);}}
-function logout(){$c('logout',args={},function(r,rt){if(r.exc){msgprint(r.exc);return;}
-redirect_to_login();});}
-function redirect_to_login(){if(login_file)
-window.location.href=login_file;else{window.location.reload();}}
-_p.def_print_style_body="html, body, div, span, td { font-family: Arial, Helvetica; font-size: 12px; }"+"\npre { margin:0; padding:0;}"
-_p.def_print_style_other="\n.simpletable, .noborder { border-collapse: collapse; margin-bottom: 10px;}"
-+"\n.simpletable td {border: 1pt solid #000; vertical-align: top; padding: 2px; }"
-+"\n.noborder td { vertical-align: top; }"
-_p.go=function(html){var d=document.createElement('div')
-d.innerHTML=html
-$(d).printElement();}
-_p.preview=function(html){var w=window.open('');w.document.write(html)
-w.document.close();}
-var resize_observers=[]
-function set_resize_observer(fn){if(resize_observers.indexOf(fn)==-1)resize_observers.push(fn);}
-window.onresize=function(){return;var ht=get_window_height();for(var i=0;i<resize_observers.length;i++){resize_observers[i](ht);}}
-get_window_height=function(){var ht=window.innerHeight?window.innerHeight:document.documentElement.offsetHeight?document.documentElement.offsetHeight:document.body.offsetHeight;return ht;}
-function set_favicon(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\
-  <link rel="shortcut icon" href="'+link+'" type="image/x-icon"> \
-  <link rel="icon" href="'+link+'" type="image/x-icon">'
-$(favicon).appendTo('head');}
+msgprint(wn.boot.server_messages);this.set_globals();},set_globals:function(){profile=wn.boot.profile;user=wn.boot.profile.name;user_fullname=wn.user_info(user).fullname;user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;sys_defaults=wn.boot.sysdefaults;},make_page_container:function(){wn.container=new wn.views.Container();wn.views.make_403();wn.views.make_404();$('#startup_div').toggle(false);$('#body_div').toggle(true);},make_nav_bar:function(){if(wn.user!='Guest'){wn.container.wntoolbar=new wn.ui.toolbar.Toolbar();}},logout:function(){var me=this;wn.call({method:'logout',callback:function(r){if(r.exc){console.log(r.exc);return;}
+me.redirect_to_login();}})},redirect_to_login:function(){window.location.hash='';window.location.reload();},set_favicon:function(){var link=$('link[type="image/x-icon"]').remove().attr("href");var favicon='\
+   <link rel="shortcut icon" href="'+link+'" type="image/x-icon"> \
+   <link rel="icon" href="'+link+'" type="image/x-icon">'
+$(favicon).appendTo('head');}})
 /*
  *	js/app.js
  */
 wn.app={name:'ERPNext',license:'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',source:'https://github.com/webnotes/erpnext',publisher:'Web Notes Technologies Pvt Ltd, Mumbai',copyright:'&copy; Web Notes Technologies Pvt Ltd',version:'2.'+window._version_number}
-wn.modules_path='erpnext';wn.settings.no_history=true;$(document).bind('ready',function(){startup();});$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
+wn.modules_path='erpnext';$(document).bind('toolbar_setup',function(){$('.brand').html('<b>erp</b>next\
   <i class="icon-home icon-white navbar-icon-home" ></i>').hover(function(){$(this).find('.icon-home').addClass('navbar-icon-home-hover');},function(){$(this).find('.icon-home').removeClass('navbar-icon-home-hover');});});
 /*
  *	erpnext/startup/startup.js
  */
 var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.modules={'Selling':'selling-home','Accounts':'accounts-home','Stock':'stock-home','Buying':'buying-home','Support':'support-home','Projects':'projects-home','Production':'production-home','Website':'website-home','HR':'hr-home','Setup':'Setup','Activity':'activity','To Do':'todo','Calendar':'calendar','Messages':'messages','Knowledge Base':'questions','Dashboard':'dashboard'}
-erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
+erpnext.startup.set_globals=function(){wn.control_panel.sync_with_gateway=wn.boot.sync_with_gateway
+pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
 if(inList(user_roles,'System Manager'))is_system_manager=1;}
 erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.user_background){erpnext.set_user_background(wn.boot.user_background);}
 if(user=='Guest'){if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
diff --git a/js/app.js b/js/app.js
index 6555de0..e0716ec 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1,19 +1,3 @@
-// ERPNext - web based ERP (http://erpnext.com)
-// Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-// 
-// 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 3 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, see <http://www.gnu.org/licenses/>.
-
 wn.app = {
 	name: 'ERPNext',
 	license: 'GNU/GPL - Usage Condition: All "erpnext" branding must be kept as it is',
@@ -24,11 +8,6 @@
 }
 
 wn.modules_path = 'erpnext';
-wn.settings.no_history = true;
-
-$(document).bind('ready', function() {
-	startup();
-});
 
 $(document).bind('toolbar_setup', function() {
 	$('.brand').html('<b>erp</b>next\
diff --git a/version.num b/version.num
deleted file mode 100644
index 1291917..0000000
--- a/version.num
+++ /dev/null
@@ -1 +0,0 @@
-1694
\ No newline at end of file
diff --git a/wnf.py b/wnf.py
deleted file mode 100755
index 94450d8..0000000
--- a/wnf.py
+++ /dev/null
@@ -1,256 +0,0 @@
-#!/usr/bin/env python
-
-# ERPNext - web based ERP (http://erpnext.com)
-# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
-# 
-# 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 3 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, see <http://www.gnu.org/licenses/>.
-
-import os, sys
-
-def replace_code(start, txt1, txt2, extn, search=None):
-	"""replace all txt1 by txt2 in files with extension (extn)"""
-	import webnotes.utils
-	import os, re
-	esc = webnotes.utils.make_esc('[]')
-	if not search: search = esc(txt1)
-	for wt in os.walk(start, followlinks=1):
-		for fn in wt[2]:
-			if fn.split('.')[-1]==extn:
-				fpath = os.path.join(wt[0], fn)
-				if fpath != '/var/www/erpnext/erpnext/patches/jan_mar_2012/rename_dt.py': # temporary
-					with open(fpath, 'r') as f:
-						content = f.read()
-				
-					if re.search(search, content):
-						res = search_replace_with_prompt(fpath, txt1, txt2)
-						if res == 'skip':
-							return 'skip'
-
-
-
-def search_replace_with_prompt(fpath, txt1, txt2):
-	""" Search and replace all txt1 by txt2 in the file with confirmation"""
-
-	from termcolor import colored
-	with open(fpath, 'r') as f:
-		content = f.readlines()
-
-	tmp = []
-	for c in content:
-		if c.find(txt1) != -1:
-			print '\n', fpath
-			print  colored(txt1, 'red').join(c[:-1].split(txt1))
-			a = ''
-			while a.lower() not in ['y', 'n', 'skip']:
-				a = raw_input('Do you want to Change [y/n/skip]?')
-			if a.lower() == 'y':
-				c = c.replace(txt1, txt2)
-			elif a.lower() == 'skip':
-				return 'skip'
-		tmp.append(c)
-
-	with open(fpath, 'w') as f:
-		f.write(''.join(tmp))
-	print colored('Updated', 'green')
-	
-
-def setup_options():
-	from optparse import OptionParser
-	parser = OptionParser()
-
-	parser.add_option("-d", "--db",
-						dest="db_name",
-						help="Apply the patches on given db")
-
-	# build
-	parser.add_option("-b", "--build", default=False, action="store_true",
-						help="minify + concat js files")
-	parser.add_option("-c", "--clear", default=False, action="store_true",
-						help="increment version")
-
-	# git
-	parser.add_option("--status", default=False, action="store_true",
-						help="git status")
-	parser.add_option("--pull", nargs=2, default=False,
-						metavar = "remote branch",
-						help="git pull (both repos)")
-	parser.add_option("--push", nargs=3, default=False, 
-						metavar = "remote branch comment",
-						help="git commit + push (both repos) [remote] [branch] [comment]")
-	parser.add_option("-l", "--latest",
-						action="store_true", dest="run_latest", default=False,
-						help="Apply the latest patches")
-
-	# patch
-	parser.add_option("-p", "--patch", nargs=1, dest="patch_list", metavar='patch_module',
-						action="append",
-						help="Apply patch")
-	parser.add_option("-f", "--force",
-						action="store_true", dest="force", default=False,
-						help="Force Apply all patches specified using option -p or --patch")
-	parser.add_option('--reload_doc', nargs=3, metavar = "module doctype docname",
-						help="reload doc")
-	parser.add_option('--export_doc', nargs=2, metavar = "doctype docname",
-						help="export doc")
-
-	# install
-	parser.add_option('--install', nargs=3, metavar = "rootpassword dbname source",
-						help="install fresh db")
-	
-	# diff
-	parser.add_option('--diff_ref_file', nargs=0, \
-						help="Get missing database records and mismatch properties, with file as reference")
-	parser.add_option('--diff_ref_db', nargs=0, \
-						help="Get missing .txt files and mismatch properties, with database as reference")
-
-	# scheduler
-	parser.add_option('--run_scheduler', default=False, action="store_true",
-						help="Trigger scheduler")
-	parser.add_option('--run_scheduler_event', nargs=1, metavar="[all|daily|weekly|monthly]",
-						help="Run scheduler event")
-
-	# misc
-	parser.add_option("--replace", nargs=3, default=False, 
-						metavar = "search replace_by extension",
-						help="file search-replace")
-
-	parser.add_option("--cci", nargs=1, metavar="CacheItem Key or all",
-		help="Clear Cache Item")
-	
-	parser.add_option("--sync_all", help="Synchronize all DocTypes using txt files",
-			nargs=0)
-	
-	parser.add_option("--sync", help="Synchronize given DocType using txt file",
-			nargs=2, metavar="module doctype (use their folder names)")
-
-	return parser.parse_args()
-	
-def run():
-	sys.path.append('lib')
-	sys.path.append('lib/py')
-	import webnotes
-	import webnotes.defs
-	sys.path.append(webnotes.defs.modules_path)
-
-	(options, args) = setup_options()
-
-
-	from webnotes.db import Database
-	import webnotes.modules.patch_handler
-
-	# connect
-	if options.db_name is not None:
-		webnotes.connect(options.db_name)
-
-	# build
-	if options.build:
-		import build.project
-		build.project.build()		
-
-	elif options.clear:
-		from build.project import increment_version
-		print "Version:" + str(increment_version())
-	
-	# code replace
-	elif options.replace:
-		replace_code('.', options.replace[0], options.replace[1], options.replace[2])
-	
-	# git
-	elif options.status:
-		os.system('git status')
-		os.chdir('lib')
-		os.system('git status')
-	
-	elif options.pull:
-		os.system('git pull %s %s' % (options.pull[0], options.pull[1]))
-		os.chdir('lib')
-		os.system('git pull %s %s' % (options.pull[0], options.pull[1]))
-
-	elif options.push:
-		os.system('git commit -a -m "%s"' % options.push[2])
-		os.system('git push %s %s' % (options.push[0], options.push[1]))
-		os.chdir('lib')
-		os.system('git commit -a -m "%s"' % options.push[2])
-		os.system('git push %s %s' % (options.push[0], options.push[1]))
-	
-	# patch
-	elif options.patch_list:
-		# clear log
-		webnotes.modules.patch_handler.log_list = []
-		
-		# run individual patches
-		for patch in options.patch_list:
-			webnotes.modules.patch_handler.run_single(\
-				patchmodule = patch, force = options.force)
-		
-		print '\n'.join(webnotes.modules.patch_handler.log_list)
-	
-		# reload
-	elif options.reload_doc:
-		webnotes.modules.patch_handler.reload_doc(\
-			{"module":options.reload_doc[0], "dt":options.reload_doc[1], "dn":options.reload_doc[2]})		
-		print '\n'.join(webnotes.modules.patch_handler.log_list)
-
-	elif options.export_doc:
-		from webnotes.modules import export_doc
-		export_doc(options.export_doc[0], options.export_doc[1])
-
-	# run all pending
-	elif options.run_latest:
-		webnotes.modules.patch_handler.run_all()
-		print '\n'.join(webnotes.modules.patch_handler.log_list)
-	
-	elif options.install:
-		from webnotes.install_lib.install import Installer
-		inst = Installer('root', options.install[0])
-		inst.import_from_db(options.install[1], source_path=options.install[2], \
-			password='admin', verbose = 1)
-	
-	elif options.diff_ref_file is not None:
-		import webnotes.modules.diff
-		webnotes.modules.diff.diff_ref_file()
-
-	elif options.diff_ref_db is not None:
-		import webnotes.modules.diff
-		webnotes.modules.diff.diff_ref_db()
-	
-	elif options.run_scheduler:
-		import webnotes.utils.scheduler
-		print webnotes.utils.scheduler.execute()
-	
-	elif options.run_scheduler_event is not None:
-		import webnotes.utils.scheduler
-		print webnotes.utils.scheduler.trigger('execute_' + options.run_scheduler_event)
-	
-	elif options.cci is not None:
-		if options.cci=='all':
-			webnotes.conn.sql("DELETE FROM __CacheItem")
-		else:
-			from webnotes.utils.cache import CacheItem
-			CacheItem(options.cci).clear()
-	
-	elif options.sync_all is not None:
-		import webnotes.model.sync
-		webnotes.model.sync.sync_all(options.force or 0)
-
-	elif options.sync is not None:
-		import webnotes.model.sync
-		webnotes.model.sync.sync(options.sync[0], options.sync[1], options.force or 0)
-
-	# print messages
-	if webnotes.message_log:
-		print '\n'.join(webnotes.message_log)
-
-if __name__=='__main__':
-	run()