fixed confilct
diff --git a/build.json b/build.json
index 4d7fc0d..95a38d6 100644
--- a/build.json
+++ b/build.json
@@ -39,8 +39,11 @@
 			"lib/css/legacy/menus.css",
 			"lib/css/legacy/messages.css",
 			"lib/css/legacy/dialog.css",
-			"lib/css/legacy/bootstrap-buttons.css",
-			"lib/css/bootstrap/bootstrap-topbar.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",
 			"erpnext/startup/startup.css",
 			"erpnext/website/css/website.css"	
 		]
@@ -55,14 +58,17 @@
 			"lib/css/legacy/grid.css",
 			"lib/css/legacy/listing.css",
 			"lib/css/legacy/report.css",
-			"lib/css/legacy/calendar.css",
 			"lib/css/legacy/autosuggest.css",
 			"lib/css/legacy/dialog.css",
 			"lib/css/legacy/tabs.css",
-			"lib/css/legacy/bw-icons.css",
 			"lib/css/legacy/sidebar.css",
-			"lib/css/legacy/bootstrap-buttons.css",
-			"lib/css/bootstrap/bootstrap-topbar.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",
 			"erpnext/startup/startup.css"							
 		]
 	},
@@ -71,6 +77,7 @@
 		"js/all-web.js": [
 			"lib/js/lib/jquery.min.js:concat",
 			"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",
@@ -102,7 +109,6 @@
 			"lib/js/legacy/webpage/body.js",
 			"lib/js/legacy/app.js",
 			"js/app.js",
-			"lib/js/bootstrap/bootstrap-dropdown.js:concat",
 			"erpnext/startup/startup.js",
 			"erpnext/website/js/topbar.js"
 		]
@@ -114,6 +120,7 @@
 			"lib/js/lib/history/history.min.js:concat",
 			"lib/js/legacy/jquery/jquery-ui.min.js:concat",
 			"lib/js/legacy/tiny_mce_33/jquery.tinymce.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",
@@ -148,7 +155,6 @@
 			"lib/js/legacy/wn/widgets/footer.js",
 			"lib/js/legacy/model/local_data.js",
 			"lib/js/legacy/model/doclist.js",
-			"lib/js/bootstrap/bootstrap-dropdown.js:concat",
 			"lib/js/wn/ui/toolbar.min.js:concat",
 			"lib/js/legacy/webpage/body.js",
 			"lib/js/legacy/widgets/form/fields.js",
diff --git a/css/all-app.css b/css/all-app.css
index 5ee09bf..b2fd2e5 100644
--- a/css/all-app.css
+++ b/css/all-app.css
@@ -12,68 +12,7 @@
 	font-family: Arial, Helvetica, Sans;
 	font-size: 12px;
 	color: #000;
-}
-
-/* heading from bootstrap */
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-  margin: 0;
-  font-weight: bold;
-  color: #333333;
-  text-rendering: optimizelegibility;
-  margin-bottom: 0.3em;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
-  font-weight: normal;
-  color: #999999;
-}
-h1 {
-  font-size: 30px;
-  line-height: 36px;
-}
-h1 small {
-  font-size: 18px;
-}
-h2 {
-  font-size: 24px;
-  line-height: 36px;
-}
-h2 small {
-  font-size: 18px;
-}
-h3 {
-  line-height: 27px;
-  font-size: 18px;
-}
-h3 small {
-  font-size: 14px;
-}
-h4, h5, h6 {
-  line-height: 18px;
-}
-h4 {
-  font-size: 14px;
-}
-h4 small {
-  font-size: 12px;
-}
-h5 {
-  font-size: 12px;
-}
-h6 {
-  font-size: 11px;
-  color: #999999;
-  text-transform: uppercase;
+	background-color: #e2e2e2;
 }
 
 pre { margin: 0px; padding: 0px; }
@@ -126,8 +65,30 @@
   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;}
@@ -142,8 +103,19 @@
 div#body_div {
 	position: relative;
 	display: none;
-	margin-top: 56px;
 	padding-right: 7px;
+	width: 900px;
+	margin: auto;
+	margin-top: 56px;
+}
+
+footer {
+	width: 900px;
+	margin: auto;
+}
+header .container {
+	width: 900px;
+	margin: auto;
 }
 
 div.no_script {
@@ -163,24 +135,6 @@
 	border: 1px solid #FF4;
 }
 
-
-div#head_div { background-color: #FFF; }
-
-#head_banner { background-color: #FFF; }
-
-.link_type {
-	padding:2px;
-	color: #00b;
-	text-decoration: underline;
-	cursor: pointer;
-}
-
-.link_type:hover {
-	color: #fff !important; 
-	background-color: #07b;
-	text-decoration: none;
-}
-
 div.std-footer {
 	margin: 13px 0px;
 	border-top: 1px solid #AAA;
@@ -213,24 +167,37 @@
 	background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */	
 }
 
-.header-gradient {
-	background: #84827c; /* Old browsers */
-	background: -moz-linear-gradient(top, #84827c 0%, #27211c 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#84827c), color-stop(100%,#27211c)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #84827c 0%,#27211c 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #84827c 0%,#27211c 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #84827c 0%,#27211c 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#84827c', endColorstr='#27211c',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #84827c 0%,#27211c 100%); /* W3C */
-	color: #FFF;
+.layout_wrapper, .layout-wrapper {
+	-moz-box-shadow: 1px 1px 8px #555;
+	-webkit-box-shadow: 1px 1px 8px #555;
+	box-shadow: 1px 1px 8px #555;
+	background-color: #fff;
+	padding: 15px;
 }
 
-.layout_wrapper {
+.layout-wrapper-background {
+	background-color: #f2f2f2 !important;
+	padding: 0px;
+}
+
+.layout-main-section {
+	width: 71%;
+	float: left;
 	padding: 15px;
-	-moz-box-shadow: 1px 1px 6px #AAA;
-	-webkit-box-shadow: 1px 1px 6px #AAA;
-	box-shadow: 1px 1px 6px #AAA;
 	background-color: #FFF;
+	min-height: 450px;
+	-moz-box-shadow:    7px 0px 6px -2px #ddd;
+	-webkit-box-shadow: 7px 0px 6px -2px #ddd;
+	box-shadow:         7px 0px 6px -2px #ddd;
+}
+
+.layout-side-section {
+	width: 22%;
+	/*float: right;*/
+	color: #606060;
+	overflow-x: hidden;
+	padding: 15px;
+	min-height: 450px;
 }
 
 /* from bootstrap */
@@ -248,6 +215,21 @@
   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);
+}
+
 /*
  *	lib/css/legacy/menus.css
  */
@@ -940,180 +922,6 @@
 	padding: 2px;
 }
 /*
- *	lib/css/legacy/calendar.css
- *//**** CALENDAR ****/
-
-.caldiv {
-	position:absolute;
-	visibility:hidden;
-	background-color:white;
-	width: 144px;
-	z-index: 301; /* always on top(?) */
-}
-
-
-	
-div.cal_wrapper { }
-div.cal_body {
-	margin: 16px;
-	background-color: #DDD;
-	position: relative;
-	border-radius: 5px;
-	-moz-border-radius: 5px;
-	-webkit-border-radius: 5px;	
-}
-
-div.cal_head {
-	margin: 16px;
-	margin-bottom: 0px;
-}
-div.cal_head div {
-	font-size: 18px;
-	color: #666;
-	padding-top: 8px;
-}
-
-div.cal_view_body {
-	margin: 16px;
-}
-
-div.cal_view_body_plain {
-	margin: 16px;
-}
-
-div.cal_month_head {
-}
-
-div.cal_month_body {
-	border-top: 1px solid #888;
-}
-
-.cal_month_headtable {
-	/*table-layout:fixed;*/
-	width: 100%;
-}
-
-.cal_month_name {
-	width: 100%;
-	color: #888;
-	font-size: 14px;
-	font-weight: bold;
-	text-align: center;
-	padding: 4px;
-}
-
-.cal_month_headtable tr td{
-	font-size: 12px;
-	font-weight: bold;
-	text-align: center;
-	padding: 4px;
-}
-
-table.cal_month_table {
-	border-collapse: collapse;
-	/*table-layout:fixed;*/
-	height: 100%;
-	width: 100%;
-}
-
-table.cal_month_table td {
-	width: 14.29%;
-	height: 20%;
-	/*overflow:hidden;*/
-	padding:0px;
-}
-
-div.cal_month_date {
-	width:100%;
-	height:25%;
-	font-size: 10px;
-	overflow:hidden;
-	/*background-color: #EEF;*/
-}
-
-div.cal_month_date_holiday {
-	/*background-color: #FFF;*/
-}
-
-div.cal_month_unit {
-	width:100%;
-	height:75%;
-	overflow:hidden;
-	cursor:pointer;
-	/*background-color:#FFF;*/
-}
-	
-div.cal_vu_disabled {
-	background-color:#FFF;
-	cursor:default;
-}
-
-table.cal_day_table {
-	border-collapse: collapse;
-	width: 100%;
-}
-
-table.cal_day_table td {
-}
-
-div.cal_day_body {
-	width: 100%;
-	height: 80%;
-	overflow-y: auto;
-	overflow-x: hidden;
-	border-top: 1px solid #AAA;
-}
-
-div.cal_day_unit{
-	width:100%;
-	cursor:pointer;
-}
-
-table.cal_week_table {
-	border-collapse: collapse;
-	width: 100%;
-}
-
-table.cal_week_table td {
-	width: 12.5%;
-}
-
-div.cal_week_body {
-	width: 100%;
-	height: 80%;
-	overflow-y: auto;
-	overflow-x: hidden;
-	border-top: 1px solid #888;
-}
-
-div.cal_week_unit{
-	width: 100%;
-	cursor:pointer;
-}
-
-div.cal_event {
-	width: 100%;
-	height: 12px;
-	overflow: hidden;
-	font-size: 11px;
-	color: #00B;
-	margin-bottom: 2px;
-	text-decoration: underline;
-}
-
-div.cal_event_Public {
-	color: GREEN;
-}
-
-div.cal_event_Private {
-	color: BLUE;
-}
-
-div.cal_event_hover {
-	text-decoration: underline;
-}
-
-/*
  *	lib/css/legacy/autosuggest.css
  *//* 
 ================================================
@@ -1320,17 +1128,16 @@
 	cursor: pointer;
 }
 
-ul.box_tabs a {
+ul.box_tabs li a {
 	display:block;
 	padding:3px 15px 3px 6px;
-	text-decoration:none;
+	text-decoration: none;
 }
 
 ul.box_tabs li.box_tab_mouseover {
 	background-color: #BBB;
 }
 
-
 ul.box_tabs li.box_tab_selected {	
 	background-color: #777;
 	
@@ -1342,402 +1149,142 @@
 	
 }
 ul.box_tabs li.box_tab_selected a {
-
+	color: #fff;
 }
-
-/*
- *	lib/css/legacy/bw-icons.css
- */
-/** general icons **/
-
-.wn-icon { background: url('../lib/images/icons/icons.png'); width: 16px; height: 16px; cursor: pointer; }
-.ic-2x2_grid { background-position: 0 0;  } 
-.ic-3x3_grid { background-position: 0 -36px;  } 
-.ic-3x3_grid_2 { background-position: 0 -72px;  } 
-.ic-air_signal { background-position: 0 -108px;  } 
-.ic-align_center { background-position: 0 -144px;  } 
-.ic-align_just { background-position: 0 -180px;  } 
-.ic-align_left { background-position: 0 -216px;  } 
-.ic-align_right { background-position: 0 -252px;  } 
-.ic-app_window { background-position: 0 -288px;  } 
-.ic-arrow_bottom { background-position: 0 -324px;  } 
-.ic-arrow_bottom_left { background-position: 0 -360px;  } 
-.ic-arrow_bottom_right { background-position: 0 -396px;  } 
-.ic-arrow_l { background-position: 0 -432px;  } 
-.ic-arrow_left { background-position: 0 -468px;  } 
-.ic-arrow_r { background-position: 0 -504px;  } 
-.ic-arrow_right { background-position: 0 -540px;  } 
-.ic-arrow_top { background-position: 0 -576px;  } 
-.ic-arrow_top_left { background-position: 0 -612px;  } 
-.ic-arrow_top_right { background-position: 0 -648px;  } 
-.ic-arrow_two_head { background-position: 0 -684px;  } 
-.ic-arrow_two_head_2 { background-position: 0 -720px;  } 
-.ic-attention { background-position: 0 -756px;  } 
-.ic-battery { background-position: 0 -792px;  } 
-.ic-bell { background-position: 0 -828px;  } 
-.ic-book { background-position: 0 -864px;  } 
-.ic-bookmark_1 { background-position: 0 -900px;  } 
-.ic-bookmark_2 { background-position: 0 -936px;  } 
-.ic-box { background-position: 0 -972px;  } 
-.ic-br_down { background-position: 0 -1008px;  } 
-.ic-br_next { background-position: 0 -1044px;  } 
-.ic-br_prev { background-position: 0 -1080px;  } 
-.ic-br_up { background-position: 0 -1116px;  } 
-.ic-brackets { background-position: 0 -1152px;  } 
-.ic-browser { background-position: 0 -1188px;  } 
-.ic-brush { background-position: 0 -1224px;  } 
-.ic-bug { background-position: 0 -1260px;  } 
-.ic-burst { background-position: 0 -1296px;  } 
-.ic-calc { background-position: 0 -1332px;  } 
-.ic-calendar_1 { background-position: 0 -1368px;  } 
-.ic-calendar_2 { background-position: 0 -1404px;  } 
-.ic-cancel { background-position: 0 -1440px;  } 
-.ic-case { background-position: 0 -1476px;  } 
-.ic-cc { background-position: 0 -1512px;  } 
-.ic-cert { background-position: 0 -1548px;  } 
-.ic-chart_bar { background-position: 0 -1584px;  } 
-.ic-chart_line { background-position: 0 -1620px;  } 
-.ic-chart_line_2 { background-position: 0 -1656px;  } 
-.ic-chart_pie { background-position: 0 -1692px;  } 
-.ic-checkbox_checked { background-position: 0 -1728px;  } 
-.ic-checkbox_unchecked { background-position: 0 -1764px;  } 
-.ic-checkmark { background-position: 0 -1800px;  } 
-.ic-clip { background-position: 0 -1836px;  } 
-.ic-clipboard_copy { background-position: 0 -1872px;  } 
-.ic-clipboard_cut { background-position: 0 -1908px;  } 
-.ic-clipboard_past { background-position: 0 -1944px;  } 
-.ic-clock { background-position: -36px 0;  } 
-.ic-cloud { background-position: -36px -36px;  } 
-.ic-cloud_rain { background-position: -36px -72px;  } 
-.ic-cog { background-position: -36px -108px;  } 
-.ic-comp { background-position: -36px -144px;  } 
-.ic-compass { background-position: -36px -180px;  } 
-.ic-contact_card { background-position: -36px -216px;  } 
-.ic-cube { background-position: -36px -252px;  } 
-.ic-cur_bp { background-position: -36px -288px;  } 
-.ic-cur_dollar { background-position: -36px -324px;  } 
-.ic-cur_euro { background-position: -36px -360px;  } 
-.ic-cur_yen { background-position: -36px -396px;  } 
-.ic-cursor_H_split { background-position: -36px -432px;  } 
-.ic-cursor_V_split { background-position: -36px -468px;  } 
-.ic-cursor_arrow { background-position: -36px -504px;  } 
-.ic-cursor_drag_arrow { background-position: -36px -540px;  } 
-.ic-cursor_drag_arrow_2 { background-position: -36px -576px;  } 
-.ic-cursor_drag_hand { background-position: -36px -612px;  } 
-.ic-cursor_hand { background-position: -36px -648px;  } 
-.ic-db { background-position: -36px -684px;  } 
-.ic-delete { background-position: -36px -720px;  } 
-.ic-doc_delete { background-position: -36px -756px;  } 
-.ic-doc_edit { background-position: -36px -792px;  } 
-.ic-doc_empty { background-position: -36px -828px;  } 
-.ic-doc_export { background-position: -36px -864px;  } 
-.ic-doc_import { background-position: -36px -900px;  } 
-.ic-doc_lines { background-position: -36px -936px;  } 
-.ic-doc_lines_stright { background-position: -36px -972px;  } 
-.ic-doc_minus { background-position: -36px -1008px;  } 
-.ic-doc_new { background-position: -36px -1044px;  } 
-.ic-doc_plus { background-position: -36px -1080px;  } 
-.ic-document { background-position: -36px -1116px;  } 
-.ic-download { background-position: -36px -1152px;  } 
-.ic-emotion_sad { background-position: -36px -1188px;  } 
-.ic-emotion_smile { background-position: -36px -1224px;  } 
-.ic-expand { background-position: -36px -1260px;  } 
-.ic-eye { background-position: -36px -1296px;  } 
-.ic-eye_inv { background-position: -36px -1332px;  } 
-.ic-facebook { background-position: -36px -1368px;  } 
-.ic-filter { background-position: -36px -1404px;  } 
-.ic-fire { background-position: -36px -1440px;  } 
-.ic-flag { background-position: -36px -1476px;  } 
-.ic-folder { background-position: -36px -1512px;  } 
-.ic-folder_arrow { background-position: -36px -1548px;  } 
-.ic-folder_delete { background-position: -36px -1584px;  } 
-.ic-folder_minus { background-position: -36px -1620px;  } 
-.ic-folder_open { background-position: -36px -1656px;  } 
-.ic-folder_plus { background-position: -36px -1692px;  } 
-.ic-font_bold { background-position: -36px -1728px;  } 
-.ic-font_italic { background-position: -36px -1764px;  } 
-.ic-font_size { background-position: -36px -1800px;  } 
-.ic-font_strokethrough { background-position: -36px -1836px;  } 
-.ic-font_underline { background-position: -36px -1872px;  } 
-.ic-game_pad { background-position: -36px -1908px;  } 
-.ic-globe_1 { background-position: -36px -1944px;  } 
-.ic-globe_2 { background-position: -72px 0;  } 
-.ic-globe_3 { background-position: -72px -36px;  } 
-.ic-google { background-position: -72px -72px;  } 
-.ic-hand_1 { background-position: -72px -108px;  } 
-.ic-hand_2 { background-position: -72px -144px;  } 
-.ic-hand_contra { background-position: -72px -180px;  } 
-.ic-hand_pro { background-position: -72px -216px;  } 
-.ic-headphones { background-position: -72px -252px;  } 
-.ic-heart { background-position: -72px -288px;  } 
-.ic-heart_empty { background-position: -72px -324px;  } 
-.ic-home { background-position: -72px -360px;  } 
-.ic-image_text { background-position: -72px -396px;  } 
-.ic-inbox { background-position: -72px -432px;  } 
-.ic-indent_decrease { background-position: -72px -468px;  } 
-.ic-indent_increase { background-position: -72px -504px;  } 
-.ic-info { background-position: -72px -540px;  } 
-.ic-iphone { background-position: -72px -576px;  } 
-.ic-key { background-position: -72px -612px;  } 
-.ic-layers_1 { background-position: -72px -648px;  } 
-.ic-layers_2 { background-position: -72px -684px;  } 
-.ic-lightbulb { background-position: -72px -720px;  } 
-.ic-lighting { background-position: -72px -756px;  } 
-.ic-link { background-position: -72px -792px;  } 
-.ic-list_bullets { background-position: -72px -828px;  } 
-.ic-list_num { background-position: -72px -864px;  } 
-.ic-magic_wand { background-position: -72px -900px;  } 
-.ic-mail { background-position: -72px -936px;  } 
-.ic-mail_2 { background-position: -72px -972px;  } 
-.ic-mic { background-position: -72px -1008px;  } 
-.ic-monitor { background-position: -72px -1044px;  } 
-.ic-movie { background-position: -72px -1080px;  } 
-.ic-music { background-position: -72px -1116px;  } 
-.ic-net_comp { background-position: -72px -1152px;  } 
-.ic-network { background-position: -72px -1188px;  } 
-.ic-notepad { background-position: -72px -1224px;  } 
-.ic-notepad_2 { background-position: -72px -1260px;  } 
-.ic-on-off { background-position: -72px -1296px;  } 
-.ic-openid { background-position: -72px -1332px;  } 
-.ic-padlock_closed { background-position: -72px -1368px;  } 
-.ic-padlock_open { background-position: -72px -1404px;  } 
-.ic-page_layout { background-position: -72px -1440px;  } 
-.ic-paragraph { background-position: -72px -1476px;  } 
-.ic-pencil { background-position: -72px -1512px;  } 
-.ic-phone { background-position: -72px -1548px;  } 
-.ic-phone_1 { background-position: -72px -1584px;  } 
-.ic-phone_2 { background-position: -72px -1620px;  } 
-.ic-phone_touch { background-position: -72px -1656px;  } 
-.ic-photo { background-position: -72px -1692px;  } 
-.ic-picture { background-position: -72px -1728px;  } 
-.ic-pin { background-position: -72px -1764px;  } 
-.ic-pin_2 { background-position: -72px -1800px;  } 
-.ic-pin_map { background-position: -72px -1836px;  } 
-.ic-pin_map_down { background-position: -72px -1872px;  } 
-.ic-pin_map_left { background-position: -72px -1908px;  } 
-.ic-pin_map_right { background-position: -72px -1944px;  } 
-.ic-pin_map_top { background-position: -108px 0;  } 
-.ic-pin_sq_down { background-position: -108px -36px;  } 
-.ic-pin_sq_left { background-position: -108px -72px;  } 
-.ic-pin_sq_right { background-position: -108px -108px;  } 
-.ic-pin_sq_top { background-position: -108px -144px;  } 
-.ic-playback_ff { background-position: -108px -180px;  } 
-.ic-playback_next { background-position: -108px -216px;  } 
-.ic-playback_pause { background-position: -108px -252px;  } 
-.ic-playback_play { background-position: -108px -288px;  } 
-.ic-playback_prev { background-position: -108px -324px;  } 
-.ic-playback_rec { background-position: -108px -360px;  } 
-.ic-playback_reload { background-position: -108px -396px;  } 
-.ic-playback_rew { background-position: -108px -432px;  } 
-.ic-playback_stop { background-position: -108px -468px;  } 
-.ic-preso { background-position: -108px -504px;  } 
-.ic-print { background-position: -108px -540px;  } 
-.ic-question { background-position: -108px -576px;  } 
-.ic-redo { background-position: -108px -612px;  } 
-.ic-rnd_br_down { background-position: -108px -648px;  } 
-.ic-rnd_br_first { background-position: -108px -684px;  } 
-.ic-rnd_br_last { background-position: -108px -720px;  } 
-.ic-rnd_br_next { background-position: -108px -756px;  } 
-.ic-rnd_br_prev { background-position: -108px -792px;  } 
-.ic-rnd_br_up { background-position: -108px -828px;  } 
-.ic-round { background-position: -108px -864px;  } 
-.ic-round_and_up { background-position: -108px -900px;  } 
-.ic-round_arrow_left { background-position: -108px -936px;  } 
-.ic-round_arrow_right { background-position: -108px -972px;  } 
-.ic-round_checkmark { background-position: -108px -1008px;  } 
-.ic-round_delete { background-position: -108px -1044px;  } 
-.ic-round_minus { background-position: -108px -1080px;  } 
-.ic-round_plus { background-position: -108px -1116px;  } 
-.ic-rss { background-position: -108px -1152px;  } 
-.ic-rss_sq { background-position: -108px -1188px;  } 
-.ic-sand { background-position: -108px -1224px;  } 
-.ic-sat_dish { background-position: -108px -1260px;  } 
-.ic-save { background-position: -108px -1296px;  } 
-.ic-server { background-position: -108px -1332px;  } 
-.ic-share { background-position: -108px -1368px;  } 
-.ic-shop_cart { background-position: -108px -1404px;  } 
-.ic-sound_high { background-position: -108px -1440px;  } 
-.ic-sound_low { background-position: -108px -1476px;  } 
-.ic-sound_mute { background-position: -108px -1512px;  } 
-.ic-spechbubble { background-position: -108px -1548px;  } 
-.ic-spechbubble_2 { background-position: -108px -1584px;  } 
-.ic-spechbubble_sq { background-position: -108px -1620px;  } 
-.ic-spechbubble_sq_line { background-position: -108px -1656px;  } 
-.ic-sq_br_down { background-position: -108px -1692px;  } 
-.ic-sq_br_first { background-position: -108px -1728px;  } 
-.ic-sq_br_last { background-position: -108px -1764px;  } 
-.ic-sq_br_next { background-position: -108px -1800px;  } 
-.ic-sq_br_prev { background-position: -108px -1836px;  } 
-.ic-sq_br_up { background-position: -108px -1872px;  } 
-.ic-sq_down { background-position: -108px -1908px;  } 
-.ic-sq_minus { background-position: -108px -1944px;  } 
-.ic-sq_next { background-position: -144px 0;  } 
-.ic-sq_plus { background-position: -144px -36px;  } 
-.ic-sq_prev { background-position: -144px -72px;  } 
-.ic-sq_up { background-position: -144px -108px;  } 
-.ic-square_shape { background-position: -144px -144px;  } 
-.ic-star { background-position: -144px -180px;  } 
-.ic-star_fav { background-position: -144px -216px;  } 
-.ic-star_fav_empty { background-position: -144px -252px;  } 
-.ic-sun { background-position: -144px -288px;  } 
-.ic-tag { background-position: -144px -324px;  } 
-.ic-tape { background-position: -144px -360px;  } 
-.ic-target { background-position: -144px -396px;  } 
-.ic-text_curstor { background-position: -144px -432px;  } 
-.ic-text_letter_t { background-position: -144px -468px;  } 
-.ic-top_right_expand { background-position: -144px -504px;  } 
-.ic-trash { background-position: -144px -540px;  } 
-.ic-twitter { background-position: -144px -576px;  } 
-.ic-twitter_2 { background-position: -144px -612px;  } 
-.ic-undo { background-position: -144px -648px;  } 
-.ic-user { background-position: -144px -684px;  } 
-.ic-users { background-position: -144px -720px;  } 
-.ic-wrench { background-position: -144px -756px;  } 
-.ic-wrench_plus { background-position: -144px -792px;  } 
-.ic-wrench_plus_2 { background-position: -144px -828px;  } 
-.ic-zoom { background-position: -144px -864px;  } 
-
-
 /*
  *	lib/css/legacy/sidebar.css
- */div.psidebar-wrapper {
-	margin: 0px 8px;
+ */div.psidebar {
 }
 
-div.psidebar-head {
+div.psidebar div.head {
 	font-size: 14px;
 	font-weight: bold;
 	color: #555;
 	margin-bottom: 12px;
 }
 
-div.psidebar-section {
-	background-color: #fff;
-	border: 1px solid #b2b2b7;
+div.psidebar div.section {
 	margin-bottom: 11px;
 	overflow: hidden;
 }
 
-div.psidebar-section-head {
+div.psidebar div.section-head {
 	font-size: 12px;
 	padding: 5px 11px;
-	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: 2px solid #444;
 }
 
-div.psidebar-section-body {
+div.psidebar div.section-body {
 	margin: 7px 11px 11px 11px;
 }
 
-div.psidebar-section-item {
+div.psidebar div.section-item {
 	margin-bottom: 7px;
 }
 
-.psidebar-section-link {
+div.psidebar div.section-item, div.psidebar .section-link {
 	font-size: 11px;
 	color: #666;
 }
-
-div.follower-list {
-	color: #666;
-	margin-top: 7px;
-	font-size: 11px;
-}
 /*
- *	lib/css/legacy/bootstrap-buttons.css
- */.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover {
-  color: #ffffff;
+ *	lib/css/bootstrap/headings.css
+ *//* heading from bootstrap */
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin: 0;
+  font-weight: bold;
+  color: #333333;
+  text-rendering: optimizelegibility;
+  margin-bottom: 0.3em;
 }
-.btn .close, .alert-message .close {
-  font-family: Arial, sans-serif;
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+  font-weight: normal;
+  color: #999999;
+}
+h1 {
+  font-size: 30px;
+  line-height: 36px;
+}
+h1 small {
+  font-size: 18px;
+}
+h2 {
+  font-size: 24px;
+  line-height: 36px;
+}
+h2 small {
+  font-size: 18px;
+}
+h3 {
+  line-height: 27px;
+  font-size: 18px;
+}
+h3 small {
+  font-size: 14px;
+}
+h4, h5, h6 {
   line-height: 18px;
 }
-.btn.danger,
-.alert-message.danger,
-.btn.error,
-.alert-message.error {
-  background-color: #c43c35;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
-  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
-  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: linear-gradient(top, #ee5f5b, #c43c35);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #c43c35 #c43c35 #882a25;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 {
+  font-size: 14px;
 }
-.btn.success, .alert-message.success {
-  background-color: #57a957;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
-  background-image: -moz-linear-gradient(top, #62c462, #57a957);
-  background-image: -ms-linear-gradient(top, #62c462, #57a957);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
-  background-image: -webkit-linear-gradient(top, #62c462, #57a957);
-  background-image: -o-linear-gradient(top, #62c462, #57a957);
-  background-image: linear-gradient(top, #62c462, #57a957);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #57a957 #57a957 #3d773d;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 small {
+  font-size: 12px;
 }
-.btn.info, .alert-message.info {
-  background-color: #339bb9;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
-  background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
-  background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: linear-gradient(top, #5bc0de, #339bb9);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #339bb9 #339bb9 #22697d;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h5 {
+  font-size: 12px;
+}
+h6 {
+  font-size: 11px;
+  color: #999999;
+  text-transform: uppercase;
+}
+/*
+ *	lib/css/bootstrap/buttons.css
+ */.close {
+  float: right;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 18px;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+.close:hover {
+  color: #000000;
+  text-decoration: none;
+  opacity: 0.4;
+  filter: alpha(opacity=40);
+  cursor: pointer;
 }
 .btn {
-  cursor: pointer;
   display: inline-block;
-  background-color: #e6e6e6;
-  background-repeat: no-repeat;
+  padding: 4px 10px 4px;
+  font-size: 13px;
+  line-height: 18px;
+  color: #333333;
+  text-align: center;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  background-color: #fafafa;
   background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
   background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
   background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
   background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
   background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
   background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-repeat: no-repeat;
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
-  padding: 5px 14px 6px;
-  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-  color: #333;
-  font-size: 11px;
-  line-height: normal;
   border: 1px solid #ccc;
   border-bottom-color: #bbb;
   -webkit-border-radius: 4px;
@@ -1746,454 +1293,803 @@
   -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
   -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-  -webkit-transition: 0.1s linear all;
-  -moz-transition: 0.1s linear all;
-  -ms-transition: 0.1s linear all;
-  -o-transition: 0.1s linear all;
-  transition: 0.1s linear all;
+  cursor: pointer;
+  *margin-left: .3em;
+}
+.btn:first-child {
+  *margin-left: 0;
 }
 .btn:hover {
-  background-position: 0 -15px;
-  color: #333;
+  color: #333333;
   text-decoration: none;
+  background-color: #e6e6e6;
+  background-position: 0 -15px;
+  -webkit-transition: background-position 0.1s linear;
+  -moz-transition: background-position 0.1s linear;
+  -ms-transition: background-position 0.1s linear;
+  -o-transition: background-position 0.1s linear;
+  transition: background-position 0.1s linear;
 }
 .btn:focus {
-  outline: 1px dotted #666;
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
 }
-.btn.primary {
-  color: #ffffff;
-  background-color: #0064cd;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
-  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
-  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
-  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
-  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
-  background-image: linear-gradient(top, #049cdb, #0064cd);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #0064cd #0064cd #003f81;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+.btn.active, .btn:active {
+  background-image: none;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  background-color: #e6e6e6;
+  background-color: #d9d9d9 \9;
+  color: rgba(0, 0, 0, 0.5);
+  outline: 0;
 }
-.btn.active, .btn :active {
-  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-.btn.disabled {
+.btn.disabled, .btn[disabled] {
   cursor: default;
   background-image: none;
-  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-  filter: alpha(opacity=65);
-  -khtml-opacity: 0.65;
-  -moz-opacity: 0.65;
+  background-color: #e6e6e6;
   opacity: 0.65;
+  filter: alpha(opacity=65);
   -webkit-box-shadow: none;
   -moz-box-shadow: none;
   box-shadow: none;
 }
-.btn[disabled] {
-  cursor: default;
-  background-image: none;
-  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-  filter: alpha(opacity=65);
-  -khtml-opacity: 0.65;
-  -moz-opacity: 0.65;
-  opacity: 0.65;
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-}
-.btn.large {
+.btn-large {
+  padding: 9px 14px;
   font-size: 15px;
   line-height: normal;
-  padding: 9px 14px 9px;
-  -webkit-border-radius: 6px;
-  -moz-border-radius: 6px;
-  border-radius: 6px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
 }
-.btn.small {
-  padding: 5px 7px 5px;
+.btn-large .icon {
+  margin-top: 1px;
+}
+.btn-small {
+  padding: 5px 9px;
   font-size: 11px;
+  line-height: 16px;
 }
-:root .alert-message, :root .btn {
-  border-radius: 0 \0;
+.btn-small .icon {
+  margin-top: -1px;
 }
-button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
+.btn-primary,
+.btn-primary:hover,
+.btn-warning,
+.btn-warning:hover,
+.btn-danger,
+.btn-danger:hover,
+.btn-success,
+.btn-success:hover,
+.btn-info,
+.btn-info:hover {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  color: #ffffff;
+}
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active {
+  color: rgba(255, 255, 255, 0.75);
+}
+.btn-primary {
+  background-color: #006dcc;
+  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+  background-image: linear-gradient(top, #0088cc, #0044cc);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
+  border-color: #0044cc #0044cc #002a80;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+  background-color: #0044cc;
+}
+.btn-primary:active, .btn-primary.active {
+  background-color: #003399 \9;
+}
+.btn-warning {
+  background-color: #faa732;
+  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+  background-image: -ms-linear-gradient(top, #fbb450, #f89406);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+  background-image: -o-linear-gradient(top, #fbb450, #f89406);
+  background-image: linear-gradient(top, #fbb450, #f89406);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
+  border-color: #f89406 #f89406 #ad6704;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+  background-color: #f89406;
+}
+.btn-warning:active, .btn-warning.active {
+  background-color: #c67605 \9;
+}
+.btn-danger {
+  background-color: #da4f49;
+  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: linear-gradient(top, #ee5f5b, #bd362f);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);
+  border-color: #bd362f #bd362f #802420;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+  background-color: #bd362f;
+}
+.btn-danger:active, .btn-danger.active {
+  background-color: #942a25 \9;
+}
+.btn-success {
+  background-color: #5bb75b;
+  background-image: -moz-linear-gradient(top, #62c462, #51a351);
+  background-image: -ms-linear-gradient(top, #62c462, #51a351);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+  background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+  background-image: -o-linear-gradient(top, #62c462, #51a351);
+  background-image: linear-gradient(top, #62c462, #51a351);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
+  border-color: #51a351 #51a351 #387038;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+  background-color: #51a351;
+}
+.btn-success:active, .btn-success.active {
+  background-color: #408140 \9;
+}
+.btn-info {
+  background-color: #49afcd;
+  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: linear-gradient(top, #5bc0de, #2f96b4);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);
+  border-color: #2f96b4 #2f96b4 #1f6377;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+  background-color: #2f96b4;
+}
+.btn-info:active, .btn-info.active {
+  background-color: #24748c \9;
+}
+button.btn, input[type="submit"].btn {
+  *padding-top: 2px;
+  *padding-bottom: 2px;
+}
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
   padding: 0;
   border: 0;
 }
-
-/* CLose */
-
-.close {
-  float: right;
-  color: #000000;
-  font-size: 15px;
-  font-weight: bold;
-  line-height: 13.5px;
-  margin-bottom: -2px;
-  text-shadow: 0 1px 0 #ffffff;
-  filter: alpha(opacity=25);
-  -khtml-opacity: 0.25;
-  -moz-opacity: 0.25;
-  opacity: 0.25;
-  text-decoration: none;
+button.btn.large, input[type="submit"].btn.large {
+  *padding-top: 7px;
+  *padding-bottom: 7px;
 }
-.close:hover {
-  color: #000000;
-  text-decoration: none;
-  filter: alpha(opacity=40);
-  -khtml-opacity: 0.4;
-  -moz-opacity: 0.4;
-  opacity: 0.4;
-  cursor: pointer;
-  font-weight: bold;
+button.btn.small, input[type="submit"].btn.small {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+.btn-group {
+  position: relative;
+  *zoom: 1;
+  *margin-left: .3em;
+}
+.btn-group:before, .btn-group:after {
+  display: table;
+  content: "";
+}
+.btn-group:after {
+  clear: both;
+}
+.btn-group:first-child {
+  *margin-left: 0;
+}
+.btn-group + .btn-group {
+  margin-left: 5px;
+}
+.btn-toolbar {
+  margin-top: 9px;
+  margin-bottom: 9px;
+}
+.btn-toolbar .btn-group {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+}
+.btn-group .btn {
+  position: relative;
+  float: left;
+  margin-left: -1px;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-group .btn:first-child {
+  margin-left: 0;
+  -webkit-border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+  border-top-left-radius: 4px;
+  -webkit-border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  border-bottom-left-radius: 4px;
+}
+.btn-group .btn:last-child, .btn-group .dropdown-toggle {
+  -webkit-border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+  border-bottom-right-radius: 4px;
+}
+.btn-group .btn.large:first-child {
+  margin-left: 0;
+  -webkit-border-top-left-radius: 6px;
+  -moz-border-radius-topleft: 6px;
+  border-top-left-radius: 6px;
+  -webkit-border-bottom-left-radius: 6px;
+  -moz-border-radius-bottomleft: 6px;
+  border-bottom-left-radius: 6px;
+}
+.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle {
+  -webkit-border-top-right-radius: 6px;
+  -moz-border-radius-topright: 6px;
+  border-top-right-radius: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+  -moz-border-radius-bottomright: 6px;
+  border-bottom-right-radius: 6px;
+}
+.btn-group .btn:hover,
+.btn-group .btn:focus,
+.btn-group .btn:active,
+.btn-group .btn.active {
+  z-index: 2;
+}
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+.btn-group .dropdown-toggle {
+  padding-left: 8px;
+  padding-right: 8px;
+  -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  *padding-top: 5px;
+  *padding-bottom: 5px;
+}
+.btn-group.open {
+  *z-index: 1000;
+}
+.btn-group.open .dropdown-menu {
+  display: block;
+  margin-top: 1px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.btn-group.open .dropdown-toggle {
+  background-image: none;
+  -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+.btn .caret {
+  margin-top: 7px;
+  margin-left: 0;
+}
+.btn:hover .caret, .open.btn-group .caret {
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+.btn-primary .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret {
+  border-top-color: #ffffff;
+  opacity: 0.75;
+  filter: alpha(opacity=75);
+}
+.btn-small .caret {
+  margin-top: 4px;
 }
 /*
- *	lib/css/bootstrap/bootstrap-topbar.css
- */.topbar {
-  height: 40px;
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  z-index: 10000;
-  overflow: visible;
+ *	lib/css/bootstrap/navbar.css
+ */.nav {
+  margin-left: 0;
+  margin-bottom: 18px;
+  list-style: none;
 }
-.topbar a {
-  color: #bfbfbf;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  text-decoration: none;
-}
-.topbar h3 a:hover, .topbar .brand:hover, .topbar ul .active > a {
-  background-color: #333;
-  background-color: rgba(255, 255, 255, 0.05);
-  color: #ffffff;
-  text-decoration: none;
-}
-.topbar h3 {
-  position: relative;
-}
-.topbar h3 a, .topbar .brand {
-  float: left;
+.nav > li > a {
   display: block;
-  padding: 8px 20px 12px;
-  margin-left: -20px;
+}
+.nav > li > a:hover {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+.nav-list {
+  padding-left: 14px;
+  padding-right: 14px;
+  margin-bottom: 0;
+}
+.nav-list > li > a, .nav-list .nav-header {
+  display: block;
+  padding: 3px 15px;
+  margin-left: -15px;
+  margin-right: -15px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+.nav-list .nav-header {
+  font-size: 11px;
+  font-weight: bold;
+  line-height: 18px;
+  color: #999999;
+  text-transform: uppercase;
+}
+.nav-list > li + .nav-header {
+  margin-top: 9px;
+}
+.nav-list .active > a, .nav-list .active > a:hover {
   color: #ffffff;
-  font-size: 20px;
-  font-weight: 200;
-  line-height: 1;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+  background-color: #0088cc;
 }
-.topbar p {
-  margin: 0;
-  line-height: 40px;
+.nav-list [class^="icon-"] {
+  margin-right: 2px;
 }
-.topbar p a:hover {
-  background-color: transparent;
-  color: #ffffff;
+.nav-tabs, .nav-pills {
+  *zoom: 1;
 }
-.topbar form {
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+  display: table;
+  content: "";
+}
+.nav-tabs:after, .nav-pills:after {
+  clear: both;
+}
+.nav-tabs > li, .nav-pills > li {
   float: left;
-  margin: 5px 0 0 0;
-  position: relative;
-  filter: alpha(opacity=100);
-  -khtml-opacity: 1;
-  -moz-opacity: 1;
-  opacity: 1;
 }
-.topbar form.pull-right {
-  float: right;
+.nav-tabs > li > a, .nav-pills > li > a {
+  padding-right: 12px;
+  padding-left: 12px;
+  margin-right: 2px;
+  line-height: 14px;
 }
-.topbar input {
-  background-color: #444;
-  background-color: rgba(255, 255, 255, 0.3);
-  font-family: inherit;
-  font-size: normal;
-  font-weight: 13px;
-  line-height: 1;
-  padding: 4px 9px;
+.nav-tabs {
+  border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+  margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+  padding-top: 9px;
+  padding-bottom: 9px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+  border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
+  color: #555555;
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent;
+  cursor: default;
+}
+.nav-pills > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  margin-top: 2px;
+  margin-bottom: 2px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.nav-pills .active > a, .nav-pills .active > a:hover {
   color: #ffffff;
-  color: rgba(255, 255, 255, 0.75);
-  border: 1px solid #111;
+  background-color: #0088cc;
+}
+.nav-stacked > li {
+  float: none;
+}
+.nav-stacked > li > a {
+  margin-right: 0;
+}
+.nav-tabs.nav-stacked {
+  border-bottom: 0;
+}
+.nav-tabs.nav-stacked > li > a {
+  border: 1px solid #ddd;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.nav-tabs.nav-stacked > li:first-child > a {
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs.nav-stacked > li:last-child > a {
+  -webkit-border-radius: 0 0 4px 4px;
+  -moz-border-radius: 0 0 4px 4px;
+  border-radius: 0 0 4px 4px;
+}
+.nav-tabs.nav-stacked > li > a:hover {
+  border-color: #ddd;
+  z-index: 2;
+}
+.nav-pills.nav-stacked > li > a {
+  margin-bottom: 3px;
+}
+.nav-pills.nav-stacked > li:last-child > a {
+  margin-bottom: 1px;
+}
+.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu {
+  margin-top: 1px;
+  border-width: 1px;
+}
+.nav-pills .dropdown-menu {
   -webkit-border-radius: 4px;
   -moz-border-radius: 4px;
   border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
-  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
+}
+.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret {
+  border-top-color: #0088cc;
+  margin-top: 6px;
+}
+.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret {
+  border-top-color: #005580;
+}
+.nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret {
+  border-top-color: #333333;
+}
+.nav > .dropdown.active > a:hover {
+  color: #000000;
+  cursor: pointer;
+}
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover {
+  color: #ffffff;
+  background-color: #999999;
+  border-color: #999999;
+}
+.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret {
+  border-top-color: #ffffff;
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+
+.navbar {
+  overflow: visible;
+  margin-bottom: 18px;
+}
+.navbar-inner {
+  padding-left: 20px;
+  padding-right: 20px;
+  background-color: #2c2c2c;
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.btn-navbar {
+  display: none;
+  float: right;
+  padding: 7px 10px;
+  margin-left: 5px;
+  margin-right: 5px;
+  background-color: #2c2c2c;
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  border-color: #222222 #222222 #000000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+.btn-navbar:hover,
+.btn-navbar:active,
+.btn-navbar.active,
+.btn-navbar.disabled,
+.btn-navbar[disabled] {
+  background-color: #222222;
+}
+.btn-navbar:active, .btn-navbar.active {
+  background-color: #080808 \9;
+}
+.btn-navbar .icon-bar {
+  display: block;
+  width: 18px;
+  height: 2px;
+  background-color: #f5f5f5;
+  -webkit-border-radius: 1px;
+  -moz-border-radius: 1px;
+  border-radius: 1px;
+  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+.btn-navbar .icon-bar + .icon-bar {
+  margin-top: 3px;
+}
+.nav-collapse.collapse {
+  height: auto;
+}
+.navbar .brand:hover {
+  text-decoration: none;
+}
+.navbar .brand {
+  float: left;
+  display: block;
+  padding: 8px 20px 12px;
+  font-size: 20px;
+  font-weight: 200;
+  line-height: 1;
+  color: #ffffff;
+}
+.navbar .navbar-text {
+  margin-bottom: 0;
+  line-height: 40px;
+  color: #999999;
+}
+.navbar .navbar-text a:hover {
+  color: #ffffff;
+  background-color: transparent;
+}
+.navbar .btn, .navbar .btn-group {
+  margin-top: 5px;
+}
+.navbar .btn-group .btn {
+  margin-top: 0;
+}
+.navbar-form {
+  margin-bottom: 0;
+  *zoom: 1;
+}
+.navbar-form:before, .navbar-form:after {
+  display: table;
+  content: "";
+}
+.navbar-form:after {
+  clear: both;
+}
+.navbar-form input, .navbar-form select {
+  display: inline-block;
+  margin-top: 5px;
+  margin-bottom: 0;
+}
+.navbar-form .radio, .navbar-form .checkbox {
+  margin-top: 5px;
+}
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+  margin-top: 3px;
+}
+.navbar-search {
+  position: relative;
+  float: left;
+  margin-top: 6px;
+  margin-bottom: 0;
+}
+.navbar-search .search-query {
+  padding: 4px 9px;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 1;
+  color: #ffffff;
+  color: rgba(255, 255, 255, 0.75);
+  background: #666;
+  background: rgba(255, 255, 255, 0.3);
+  border: 1px solid #111;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
   -webkit-transition: none;
   -moz-transition: none;
   -ms-transition: none;
   -o-transition: none;
   transition: none;
 }
-.topbar input:-moz-placeholder {
-  color: #e6e6e6;
+.navbar-search .search-query :-moz-placeholder {
+  color: #eeeeee;
 }
-.topbar input::-webkit-input-placeholder {
-  color: #e6e6e6;
+.navbar-search .search-query::-webkit-input-placeholder {
+  color: #eeeeee;
 }
-.topbar input:hover {
-  background-color: #bfbfbf;
-  background-color: rgba(255, 255, 255, 0.5);
+.navbar-search .search-query:hover {
   color: #ffffff;
+  background-color: #999999;
+  background-color: rgba(255, 255, 255, 0.5);
 }
-.topbar input:focus, .topbar input.focused {
-  outline: 0;
-  background-color: #ffffff;
-  color: #404040;
-  text-shadow: 0 1px 0 #ffffff;
-  border: 0;
+.navbar-search .search-query:focus, .navbar-search .search-query.focused {
   padding: 5px 10px;
+  color: #333333;
+  text-shadow: 0 1px 0 #ffffff;
+  background-color: #ffffff;
+  border: 0;
   -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
   -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
   box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+  outline: 0;
 }
-.topbar-inner, .topbar .fill {
-  background-color: #222;
-  background-color: #222222;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
-  background-image: -moz-linear-gradient(top, #333333, #222222);
-  background-image: -ms-linear-gradient(top, #333333, #222222);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
-  background-image: -webkit-linear-gradient(top, #333333, #222222);
-  background-image: -o-linear-gradient(top, #333333, #222222);
-  background-image: linear-gradient(top, #333333, #222222);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
-  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+.navbar-fixed-top {
+  position: fixed;
+  top: 0;
+  right: 0;
+  left: 0;
+  z-index: 1030;
 }
-.topbar div > ul, .nav {
+.navbar-fixed-top .navbar-inner {
+  padding-left: 0;
+  padding-right: 0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.navbar .nav {
+  position: relative;
+  left: 0;
   display: block;
   float: left;
   margin: 0 10px 0 0;
-  position: relative;
-  left: 0;
 }
-.topbar div > ul > li, .nav > li {
+.navbar .nav.pull-right {
+  float: right;
+}
+.navbar .nav > li {
   display: block;
   float: left;
 }
-.topbar div > ul a, .nav a {
-  display: block;
+.navbar .nav > li > a {
   float: none;
   padding: 10px 10px 11px;
   line-height: 19px;
+  color: #999999;
   text-decoration: none;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
 }
-.topbar div > ul a:hover, .nav a:hover {
+.navbar .nav > li > a:hover {
+  background-color: transparent;
   color: #ffffff;
   text-decoration: none;
 }
-.topbar div > ul .active > a, .nav .active > a {
-  background-color: #222;
+.navbar .nav .active > a, .navbar .nav .active > a:hover {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #222222;
   background-color: rgba(0, 0, 0, 0.5);
 }
-.topbar div > ul.secondary-nav, .nav.secondary-nav {
-  float: right;
+.navbar .divider-vertical {
+  height: 40px;
+  width: 1px;
+  margin: 0 9px;
+  overflow: hidden;
+  background-color: #222222;
+  border-right: 1px solid #333333;
+}
+.navbar .nav.pull-right {
   margin-left: 10px;
   margin-right: 0;
 }
-.topbar div > ul.secondary-nav .menu-dropdown,
-.nav.secondary-nav .menu-dropdown,
-.topbar div > ul.secondary-nav .dropdown-menu,
-.nav.secondary-nav .dropdown-menu {
-  right: 0;
-  border: 0;
+.navbar .dropdown-menu {
+  margin-top: 1px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
 }
-.topbar div > ul a.menu:hover,
-.nav a.menu:hover,
-.topbar div > ul li.open .menu,
-.nav li.open .menu,
-.topbar div > ul .dropdown-toggle:hover,
-.nav .dropdown-toggle:hover,
-.topbar div > ul .dropdown.open .dropdown-toggle,
-.nav .dropdown.open .dropdown-toggle {
-  background: #444;
-  background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown,
-.nav .menu-dropdown,
-.topbar div > ul .dropdown-menu,
-.nav .dropdown-menu {
-  background-color: #333;
-}
-.topbar div > ul .menu-dropdown a.menu,
-.nav .menu-dropdown a.menu,
-.topbar div > ul .dropdown-menu a.menu,
-.nav .dropdown-menu a.menu,
-.topbar div > ul .menu-dropdown .dropdown-toggle,
-.nav .menu-dropdown .dropdown-toggle,
-.topbar div > ul .dropdown-menu .dropdown-toggle,
-.nav .dropdown-menu .dropdown-toggle {
-  color: #ffffff;
-}
-.topbar div > ul .menu-dropdown a.menu.open,
-.nav .menu-dropdown a.menu.open,
-.topbar div > ul .dropdown-menu a.menu.open,
-.nav .dropdown-menu a.menu.open,
-.topbar div > ul .menu-dropdown .dropdown-toggle.open,
-.nav .menu-dropdown .dropdown-toggle.open,
-.topbar div > ul .dropdown-menu .dropdown-toggle.open,
-.nav .dropdown-menu .dropdown-toggle.open {
-  background: #444;
-  background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown li a,
-.nav .menu-dropdown li a,
-.topbar div > ul .dropdown-menu li a,
-.nav .dropdown-menu li a {
-  color: #999;
-  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
-}
-.topbar div > ul .menu-dropdown li a:hover,
-.nav .menu-dropdown li a:hover,
-.topbar div > ul .dropdown-menu li a:hover,
-.nav .dropdown-menu li a:hover {
-  background-color: #191919;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));
-  background-image: -moz-linear-gradient(top, #292929, #191919);
-  background-image: -ms-linear-gradient(top, #292929, #191919);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));
-  background-image: -webkit-linear-gradient(top, #292929, #191919);
-  background-image: -o-linear-gradient(top, #292929, #191919);
-  background-image: linear-gradient(top, #292929, #191919);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);
-  color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .active a,
-.nav .menu-dropdown .active a,
-.topbar div > ul .dropdown-menu .active a,
-.nav .dropdown-menu .active a {
-  color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .divider,
-.nav .menu-dropdown .divider,
-.topbar div > ul .dropdown-menu .divider,
-.nav .dropdown-menu .divider {
-  background-color: #222;
-  border-color: #444;
-}
-.topbar ul .menu-dropdown li a, .topbar ul .dropdown-menu li a {
-  padding: 4px 15px;
-}
-li.menu, .dropdown {
-  position: relative;
-}
-a.menu:after, .dropdown-toggle:after {
-  width: 0;
-  height: 0;
+.navbar .dropdown-menu:before {
+  content: '';
   display: inline-block;
-  content: "↓";
-  text-indent: -99999px;
-  vertical-align: top;
-  margin-top: 8px;
-  margin-left: 4px;
-  border-left: 4px solid transparent;
-  border-right: 4px solid transparent;
-  border-top: 4px solid #ffffff;
-  filter: alpha(opacity=50);
-  -khtml-opacity: 0.5;
-  -moz-opacity: 0.5;
-  opacity: 0.5;
-}
-.menu-dropdown, .dropdown-menu {
-  background-color: #ffffff;
-  float: left;
-  display: none;
+  border-left: 7px solid transparent;
+  border-right: 7px solid transparent;
+  border-bottom: 7px solid #ccc;
+  border-bottom-color: rgba(0, 0, 0, 0.2);
   position: absolute;
-  top: 40px;
-  z-index: 900;
-  min-width: 160px;
-  max-width: 220px;
-  _width: 160px;
-  margin-left: 0;
-  margin-right: 0;
-  padding: 6px 0;
-  zoom: 1;
-  border-color: #999;
-  border-color: rgba(0, 0, 0, 0.2);
-  border-style: solid;
-  border-width: 0 1px 1px;
-  -webkit-border-radius: 0 0 6px 6px;
-  -moz-border-radius: 0 0 6px 6px;
-  border-radius: 0 0 6px 6px;
-  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-  -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-  -webkit-background-clip: padding-box;
-  -moz-background-clip: padding-box;
-  background-clip: padding-box;
+  top: -7px;
+  left: 9px;
 }
-.menu-dropdown li, .dropdown-menu li {
-  float: none;
-  display: block;
-  background-color: none;
+.navbar .dropdown-menu:after {
+  content: '';
+  display: inline-block;
+  border-left: 6px solid transparent;
+  border-right: 6px solid transparent;
+  border-bottom: 6px solid #ffffff;
+  position: absolute;
+  top: -6px;
+  left: 10px;
 }
-.menu-dropdown .divider, .dropdown-menu .divider {
-  height: 1px;
-  margin: 5px 0;
-  overflow: hidden;
-  background-color: #eee;
-  border-bottom: 1px solid #ffffff;
+.navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret {
+  border-top-color: #ffffff;
 }
-.topbar .dropdown-menu a, .dropdown-menu a {
-  display: block;
-  padding: 4px 15px;
-  clear: both;
-  font-weight: normal;
-  line-height: 18px;
-  color: #808080;
-  text-shadow: 0 1px 0 #ffffff;
+.navbar .nav .active .caret {
+  opacity: 1;
+  filter: alpha(opacity=100);
 }
-.topbar .dropdown-menu a:hover,
-.dropdown-menu a:hover,
-.topbar .dropdown-menu a.hover,
-.dropdown-menu a.hover {
-  background-color: #dddddd;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));
-  background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: -ms-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));
-  background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: linear-gradient(top, #eeeeee, #dddddd);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);
-  color: #404040;
-  text-decoration: none;
-  -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
-  -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
-  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
+.navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle {
+  background-color: transparent;
 }
-.open .menu,
-.dropdown.open .menu,
-.open .dropdown-toggle,
-.dropdown.open .dropdown-toggle {
+.navbar .nav .active > .dropdown-toggle:hover {
   color: #ffffff;
-  background: #ccc;
-  background: rgba(0, 0, 0, 0.3);
 }
-.open .menu-dropdown,
-.dropdown.open .menu-dropdown,
-.open .dropdown-menu,
-.dropdown.open .dropdown-menu {
-  display: block;
+.navbar .nav.pull-right .dropdown-menu {
+  left: auto;
+  right: 0;
 }
-
-/*extra size menus for recent*/
-.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
-	width: 260px !important;
-	max-width: 260px !important;
+.navbar .nav.pull-right .dropdown-menu:before {
+  left: auto;
+  right: 12px;
+}
+.navbar .nav.pull-right .dropdown-menu:after {
+  left: auto;
+  right: 13px;
 }
 
 /* ajax spinner */
-.topbar #spinner {
+.navbar #spinner {
 	display: block;
 	float: right;
 	width: 20px;
@@ -2202,9 +2098,700 @@
 	visibility: hidden;
 }
 
-.topbar-inner {
+.navbar-inner {
 	padding: 0px 20px;
 }
+
+/*
+ *	lib/css/bootstrap/dropdown.css
+ */.dropdown {
+  position: relative;
+}
+.dropdown-toggle {
+  *margin-bottom: -3px;
+}
+.dropdown-toggle:active, .open .dropdown-toggle {
+  outline: 0;
+}
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  text-indent: -99999px;
+  *text-indent: 0;
+  vertical-align: top;
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid #000000;
+  opacity: 0.3;
+  filter: alpha(opacity=30);
+  content: "\2193";
+}
+.dropdown .caret {
+  margin-top: 8px;
+  margin-left: 2px;
+}
+.dropdown:hover .caret, .open.dropdown .caret {
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  float: left;
+  display: none;
+  min-width: 160px;
+  max-width: 220px;
+  _width: 160px;
+  padding: 4px 0;
+  margin: 0;
+  list-style: none;
+  background-color: #ffffff;
+  border-color: #ccc;
+  border-color: rgba(0, 0, 0, 0.2);
+  border-style: solid;
+  border-width: 1px;
+  -webkit-border-radius: 0 0 5px 5px;
+  -moz-border-radius: 0 0 5px 5px;
+  border-radius: 0 0 5px 5px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding;
+  background-clip: padding-box;
+  *border-right-width: 2px;
+  *border-bottom-width: 2px;
+}
+.dropdown-menu.bottom-up {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 2px;
+}
+.dropdown-menu .divider {
+  height: 1px;
+  margin: 5px 1px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+  *width: 100%;
+  *margin: -5px 0 5px;
+}
+.dropdown-menu a {
+  display: block;
+  padding: 3px 15px;
+  clear: both;
+  font-weight: normal;
+  line-height: 18px;
+  color: #555555;
+  white-space: nowrap;
+}
+.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #0088cc;
+}
+.dropdown.open {
+  *z-index: 1000;
+}
+.dropdown.open .dropdown-toggle {
+  color: #ffffff;
+  background: #ccc;
+  background: rgba(0, 0, 0, 0.3);
+}
+.dropdown.open .dropdown-menu {
+  display: block;
+}
+/*
+ *	lib/css/bootstrap/tooltip.css
+ */.tooltip {
+  position: absolute;
+  z-index: 1020;
+  display: block;
+  visibility: visible;
+  padding: 5px;
+  font-size: 11px;
+  opacity: 0;
+  filter: alpha(opacity=0);
+}
+.tooltip.in {
+  opacity: 0.8;
+  filter: alpha(opacity=80);
+}
+.tooltip.top {
+  margin-top: -2px;
+}
+.tooltip.right {
+  margin-left: 2px;
+}
+.tooltip.bottom {
+  margin-top: 2px;
+}
+.tooltip.left {
+  margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-right: 5px solid #000000;
+}
+.tooltip-inner {
+  max-width: 200px;
+  padding: 3px 8px;
+  color: #ffffff;
+  text-align: center;
+  text-decoration: none;
+  background-color: #000000;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+.tooltip-arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+}
+.popover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1010;
+  display: none;
+  padding: 5px;
+}
+.popover.top {
+  margin-top: -5px;
+}
+.popover.right {
+  margin-left: 5px;
+}
+.popover.bottom {
+  margin-top: 5px;
+}
+.popover.left {
+  margin-left: -5px;
+}
+.popover.top .arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-left: 5px solid #000000;
+}
+.popover .arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+}
+.popover-inner {
+  padding: 3px;
+  width: 280px;
+  overflow: hidden;
+  background: #000000;
+  background: rgba(0, 0, 0, 0.8);
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+  -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+.popover-title {
+  padding: 9px 15px;
+  line-height: 1;
+  background-color: #f5f5f5;
+  border-bottom: 1px solid #eee;
+  -webkit-border-radius: 3px 3px 0 0;
+  -moz-border-radius: 3px 3px 0 0;
+  border-radius: 3px 3px 0 0;
+}
+.popover-content {
+  padding: 14px;
+  background-color: #ffffff;
+  -webkit-border-radius: 0 0 3px 3px;
+  -moz-border-radius: 0 0 3px 3px;
+  border-radius: 0 0 3px 3px;
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding-box;
+  background-clip: padding-box;
+}
+.popover-content p, .popover-content ul, .popover-content ol {
+  margin-bottom: 0;
+}
+/*
+ *	lib/css/bootstrap/label.css
+ */.label {
+  padding: 2px 4px 3px;
+  font-size: 11.049999999999999px;
+  font-weight: bold;
+  color: #ffffff;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  background-color: #999999;
+  -webkit-border-radius: 3px;
+  -moz-border-radius: 3px;
+  border-radius: 3px;
+}
+.label:hover {
+  color: #ffffff;
+  text-decoration: none;
+}
+.label-important {
+  background-color: #b94a48;
+}
+.label-important:hover {
+  background-color: #953b39;
+}
+.label-warning {
+  background-color: #f89406;
+}
+.label-warning:hover {
+  background-color: #c67605;
+}
+.label-success {
+  background-color: #468847;
+}
+.label-success:hover {
+  background-color: #356635;
+}
+.label-info {
+  background-color: #3a87ad;
+}
+.label-info:hover {
+  background-color: #2d6987;
+}
+/*
+ *	lib/css/bootstrap/icons.css
+ */[class^="icon-"], [class*=" icon-"] {
+  display: inline-block;
+  width: 14px;
+  height: 14px;
+  line-height: 14px;
+  vertical-align: text-top;
+  background-image: url("../lib/images/icons/glyphicons-halflings.png");
+  background-position: 14px 14px;
+  background-repeat: no-repeat;
+  *margin-right: .3em;
+}
+[class^="icon-"]:last-child, [class*=" icon-"]:last-child {
+  *margin-left: 0;
+}
+.icon-white {
+  background-image: url("../lib/images/icons/glyphicons-halflings-white.png");
+}
+.icon-glass {
+  background-position: 0      0;
+}
+.icon-music {
+  background-position: -24px 0;
+}
+.icon-search {
+  background-position: -48px 0;
+}
+.icon-envelope {
+  background-position: -72px 0;
+}
+.icon-heart {
+  background-position: -96px 0;
+}
+.icon-star {
+  background-position: -120px 0;
+}
+.icon-star-empty {
+  background-position: -144px 0;
+}
+.icon-user {
+  background-position: -168px 0;
+}
+.icon-film {
+  background-position: -192px 0;
+}
+.icon-th-large {
+  background-position: -216px 0;
+}
+.icon-th {
+  background-position: -240px 0;
+}
+.icon-th-list {
+  background-position: -264px 0;
+}
+.icon-ok {
+  background-position: -288px 0;
+}
+.icon-remove {
+  background-position: -312px 0;
+}
+.icon-zoom-in {
+  background-position: -336px 0;
+}
+.icon-zoom-out {
+  background-position: -360px 0;
+}
+.icon-off {
+  background-position: -384px 0;
+}
+.icon-signal {
+  background-position: -408px 0;
+}
+.icon-cog {
+  background-position: -432px 0;
+}
+.icon-trash {
+  background-position: -456px 0;
+}
+.icon-home {
+  background-position: 0 -24px;
+}
+.icon-file {
+  background-position: -24px -24px;
+}
+.icon-time {
+  background-position: -48px -24px;
+}
+.icon-road {
+  background-position: -72px -24px;
+}
+.icon-download-alt {
+  background-position: -96px -24px;
+}
+.icon-download {
+  background-position: -120px -24px;
+}
+.icon-upload {
+  background-position: -144px -24px;
+}
+.icon-inbox {
+  background-position: -168px -24px;
+}
+.icon-play-circle {
+  background-position: -192px -24px;
+}
+.icon-repeat {
+  background-position: -216px -24px;
+}
+.icon-refresh {
+  background-position: -240px -24px;
+}
+.icon-list-alt {
+  background-position: -264px -24px;
+}
+.icon-lock {
+  background-position: -287px -24px;
+}
+.icon-flag {
+  background-position: -312px -24px;
+}
+.icon-headphones {
+  background-position: -336px -24px;
+}
+.icon-volume-off {
+  background-position: -360px -24px;
+}
+.icon-volume-down {
+  background-position: -384px -24px;
+}
+.icon-volume-up {
+  background-position: -408px -24px;
+}
+.icon-qrcode {
+  background-position: -432px -24px;
+}
+.icon-barcode {
+  background-position: -456px -24px;
+}
+.icon-tag {
+  background-position: 0 -48px;
+}
+.icon-tags {
+  background-position: -25px -48px;
+}
+.icon-book {
+  background-position: -48px -48px;
+}
+.icon-bookmark {
+  background-position: -72px -48px;
+}
+.icon-print {
+  background-position: -96px -48px;
+}
+.icon-camera {
+  background-position: -120px -48px;
+}
+.icon-font {
+  background-position: -144px -48px;
+}
+.icon-bold {
+  background-position: -167px -48px;
+}
+.icon-italic {
+  background-position: -192px -48px;
+}
+.icon-text-height {
+  background-position: -216px -48px;
+}
+.icon-text-width {
+  background-position: -240px -48px;
+}
+.icon-align-left {
+  background-position: -264px -48px;
+}
+.icon-align-center {
+  background-position: -288px -48px;
+}
+.icon-align-right {
+  background-position: -312px -48px;
+}
+.icon-align-justify {
+  background-position: -336px -48px;
+}
+.icon-list {
+  background-position: -360px -48px;
+}
+.icon-indent-left {
+  background-position: -384px -48px;
+}
+.icon-indent-right {
+  background-position: -408px -48px;
+}
+.icon-facetime-video {
+  background-position: -432px -48px;
+}
+.icon-picture {
+  background-position: -456px -48px;
+}
+.icon-pencil {
+  background-position: 0 -72px;
+}
+.icon-map-marker {
+  background-position: -24px -72px;
+}
+.icon-adjust {
+  background-position: -48px -72px;
+}
+.icon-tint {
+  background-position: -72px -72px;
+}
+.icon-edit {
+  background-position: -96px -72px;
+}
+.icon-share {
+  background-position: -120px -72px;
+}
+.icon-check {
+  background-position: -144px -72px;
+}
+.icon-move {
+  background-position: -168px -72px;
+}
+.icon-step-backward {
+  background-position: -192px -72px;
+}
+.icon-fast-backward {
+  background-position: -216px -72px;
+}
+.icon-backward {
+  background-position: -240px -72px;
+}
+.icon-play {
+  background-position: -264px -72px;
+}
+.icon-pause {
+  background-position: -288px -72px;
+}
+.icon-stop {
+  background-position: -312px -72px;
+}
+.icon-forward {
+  background-position: -336px -72px;
+}
+.icon-fast-forward {
+  background-position: -360px -72px;
+}
+.icon-step-forward {
+  background-position: -384px -72px;
+}
+.icon-eject {
+  background-position: -408px -72px;
+}
+.icon-chevron-left {
+  background-position: -432px -72px;
+}
+.icon-chevron-right {
+  background-position: -456px -72px;
+}
+.icon-plus-sign {
+  background-position: 0 -96px;
+}
+.icon-minus-sign {
+  background-position: -24px -96px;
+}
+.icon-remove-sign {
+  background-position: -48px -96px;
+}
+.icon-ok-sign {
+  background-position: -72px -96px;
+}
+.icon-question-sign {
+  background-position: -96px -96px;
+}
+.icon-info-sign {
+  background-position: -120px -96px;
+}
+.icon-screenshot {
+  background-position: -144px -96px;
+}
+.icon-remove-circle {
+  background-position: -168px -96px;
+}
+.icon-ok-circle {
+  background-position: -192px -96px;
+}
+.icon-ban-circle {
+  background-position: -216px -96px;
+}
+.icon-arrow-left {
+  background-position: -240px -96px;
+}
+.icon-arrow-right {
+  background-position: -264px -96px;
+}
+.icon-arrow-up {
+  background-position: -289px -96px;
+}
+.icon-arrow-down {
+  background-position: -312px -96px;
+}
+.icon-share-alt {
+  background-position: -336px -96px;
+}
+.icon-resize-full {
+  background-position: -360px -96px;
+}
+.icon-resize-small {
+  background-position: -384px -96px;
+}
+.icon-plus {
+  background-position: -408px -96px;
+}
+.icon-minus {
+  background-position: -433px -96px;
+}
+.icon-asterisk {
+  background-position: -456px -96px;
+}
+.icon-exclamation-sign {
+  background-position: 0 -120px;
+}
+.icon-gift {
+  background-position: -24px -120px;
+}
+.icon-leaf {
+  background-position: -48px -120px;
+}
+.icon-fire {
+  background-position: -72px -120px;
+}
+.icon-eye-open {
+  background-position: -96px -120px;
+}
+.icon-eye-close {
+  background-position: -120px -120px;
+}
+.icon-warning-sign {
+  background-position: -144px -120px;
+}
+.icon-plane {
+  background-position: -168px -120px;
+}
+.icon-calendar {
+  background-position: -192px -120px;
+}
+.icon-random {
+  background-position: -216px -120px;
+}
+.icon-comment {
+  background-position: -240px -120px;
+}
+.icon-magnet {
+  background-position: -264px -120px;
+}
+.icon-chevron-up {
+  background-position: -288px -120px;
+}
+.icon-chevron-down {
+  background-position: -313px -119px;
+}
+.icon-retweet {
+  background-position: -336px -120px;
+}
+.icon-shopping-cart {
+  background-position: -360px -120px;
+}
+.icon-folder-close {
+  background-position: -384px -120px;
+}
+.icon-folder-open {
+  background-position: -408px -120px;
+}
+.icon-resize-vertical {
+  background-position: -432px -119px;
+}
+.icon-resize-horizontal {
+  background-position: -456px -118px;
+}
 /*
  *	erpnext/startup/startup.css
  */h1, h2, h3, h4, h5 {
@@ -2222,19 +2809,13 @@
 }
 
 body {
-	background-color: #e2e2e2;
 }
 
 .erpnext-footer {
 	margin: 3px auto;
-	color: #888;
 	text-align: center;
 }
 
-.erpnext-footer a, .erpnext-footer a:hover, .erpnext-footer a:visited {
-	color: #666;
-}
-
 .module-icons {
    background: url(../images/module-icons.png) no-repeat top left;
    width:16px;
@@ -2254,14 +2835,45 @@
 .module-icons-stock{ background-position: 0 -660px;  } 
 .module-icons-support{ background-position: 0 -726px;  } 
 
-.topbar-new-comments {
+.navbar-new-comments {
 	margin: -3px 0px;
 	padding: 2px;
-	font-size: 14px;
-	color: #fff;
-	background-color: #B00D07;
 	min-width: 20px;
 	text-align: center;
 	display: inline-block;
 	border-radius: 2px;
+	color: #999999;
+	background-color: #333131;
+}
+
+.navbar-new-comments:hover,
+.navbar-new-comments:active,
+.navbar-new-comments:focus {
+	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;
+	max-width: 260px !important;
 }
diff --git a/css/all-web.css b/css/all-web.css
index 13ea802..9359de8 100644
--- a/css/all-web.css
+++ b/css/all-web.css
@@ -12,68 +12,7 @@
 	font-family: Arial, Helvetica, Sans;
 	font-size: 12px;
 	color: #000;
-}
-
-/* heading from bootstrap */
-
-h1,
-h2,
-h3,
-h4,
-h5,
-h6 {
-  margin: 0;
-  font-weight: bold;
-  color: #333333;
-  text-rendering: optimizelegibility;
-  margin-bottom: 0.3em;
-}
-h1 small,
-h2 small,
-h3 small,
-h4 small,
-h5 small,
-h6 small {
-  font-weight: normal;
-  color: #999999;
-}
-h1 {
-  font-size: 30px;
-  line-height: 36px;
-}
-h1 small {
-  font-size: 18px;
-}
-h2 {
-  font-size: 24px;
-  line-height: 36px;
-}
-h2 small {
-  font-size: 18px;
-}
-h3 {
-  line-height: 27px;
-  font-size: 18px;
-}
-h3 small {
-  font-size: 14px;
-}
-h4, h5, h6 {
-  line-height: 18px;
-}
-h4 {
-  font-size: 14px;
-}
-h4 small {
-  font-size: 12px;
-}
-h5 {
-  font-size: 12px;
-}
-h6 {
-  font-size: 11px;
-  color: #999999;
-  text-transform: uppercase;
+	background-color: #e2e2e2;
 }
 
 pre { margin: 0px; padding: 0px; }
@@ -126,8 +65,30 @@
   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;}
@@ -142,8 +103,19 @@
 div#body_div {
 	position: relative;
 	display: none;
-	margin-top: 56px;
 	padding-right: 7px;
+	width: 900px;
+	margin: auto;
+	margin-top: 56px;
+}
+
+footer {
+	width: 900px;
+	margin: auto;
+}
+header .container {
+	width: 900px;
+	margin: auto;
 }
 
 div.no_script {
@@ -163,24 +135,6 @@
 	border: 1px solid #FF4;
 }
 
-
-div#head_div { background-color: #FFF; }
-
-#head_banner { background-color: #FFF; }
-
-.link_type {
-	padding:2px;
-	color: #00b;
-	text-decoration: underline;
-	cursor: pointer;
-}
-
-.link_type:hover {
-	color: #fff !important; 
-	background-color: #07b;
-	text-decoration: none;
-}
-
 div.std-footer {
 	margin: 13px 0px;
 	border-top: 1px solid #AAA;
@@ -213,24 +167,37 @@
 	background: linear-gradient(top, #ededed 0%,#d1d1d1 47%,#b7b7b7 100%); /* W3C */	
 }
 
-.header-gradient {
-	background: #84827c; /* Old browsers */
-	background: -moz-linear-gradient(top, #84827c 0%, #27211c 100%); /* FF3.6+ */
-	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#84827c), color-stop(100%,#27211c)); /* Chrome,Safari4+ */
-	background: -webkit-linear-gradient(top, #84827c 0%,#27211c 100%); /* Chrome10+,Safari5.1+ */
-	background: -o-linear-gradient(top, #84827c 0%,#27211c 100%); /* Opera11.10+ */
-	background: -ms-linear-gradient(top, #84827c 0%,#27211c 100%); /* IE10+ */
-	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#84827c', endColorstr='#27211c',GradientType=0 ); /* IE6-9 */
-	background: linear-gradient(top, #84827c 0%,#27211c 100%); /* W3C */
-	color: #FFF;
+.layout_wrapper, .layout-wrapper {
+	-moz-box-shadow: 1px 1px 8px #555;
+	-webkit-box-shadow: 1px 1px 8px #555;
+	box-shadow: 1px 1px 8px #555;
+	background-color: #fff;
+	padding: 15px;
 }
 
-.layout_wrapper {
+.layout-wrapper-background {
+	background-color: #f2f2f2 !important;
+	padding: 0px;
+}
+
+.layout-main-section {
+	width: 71%;
+	float: left;
 	padding: 15px;
-	-moz-box-shadow: 1px 1px 6px #AAA;
-	-webkit-box-shadow: 1px 1px 6px #AAA;
-	box-shadow: 1px 1px 6px #AAA;
 	background-color: #FFF;
+	min-height: 450px;
+	-moz-box-shadow:    7px 0px 6px -2px #ddd;
+	-webkit-box-shadow: 7px 0px 6px -2px #ddd;
+	box-shadow:         7px 0px 6px -2px #ddd;
+}
+
+.layout-side-section {
+	width: 22%;
+	/*float: right;*/
+	color: #606060;
+	overflow-x: hidden;
+	padding: 15px;
+	min-height: 450px;
 }
 
 /* from bootstrap */
@@ -248,6 +215,21 @@
   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);
+}
+
 /*
  *	lib/css/legacy/menus.css
  */
@@ -433,94 +415,104 @@
 }
 
 /*
- *	lib/css/legacy/bootstrap-buttons.css
- */.btn.danger,
-.alert-message.danger,
-.btn.danger:hover,
-.alert-message.danger:hover,
-.btn.error,
-.alert-message.error,
-.btn.error:hover,
-.alert-message.error:hover,
-.btn.success,
-.alert-message.success,
-.btn.success:hover,
-.alert-message.success:hover,
-.btn.info,
-.alert-message.info,
-.btn.info:hover,
-.alert-message.info:hover {
-  color: #ffffff;
+ *	lib/css/bootstrap/headings.css
+ *//* heading from bootstrap */
+
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+  margin: 0;
+  font-weight: bold;
+  color: #333333;
+  text-rendering: optimizelegibility;
+  margin-bottom: 0.3em;
 }
-.btn .close, .alert-message .close {
-  font-family: Arial, sans-serif;
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+  font-weight: normal;
+  color: #999999;
+}
+h1 {
+  font-size: 30px;
+  line-height: 36px;
+}
+h1 small {
+  font-size: 18px;
+}
+h2 {
+  font-size: 24px;
+  line-height: 36px;
+}
+h2 small {
+  font-size: 18px;
+}
+h3 {
+  line-height: 27px;
+  font-size: 18px;
+}
+h3 small {
+  font-size: 14px;
+}
+h4, h5, h6 {
   line-height: 18px;
 }
-.btn.danger,
-.alert-message.danger,
-.btn.error,
-.alert-message.error {
-  background-color: #c43c35;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#ee5f5b), to(#c43c35));
-  background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: -ms-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #ee5f5b), color-stop(100%, #c43c35));
-  background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: -o-linear-gradient(top, #ee5f5b, #c43c35);
-  background-image: linear-gradient(top, #ee5f5b, #c43c35);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #c43c35 #c43c35 #882a25;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 {
+  font-size: 14px;
 }
-.btn.success, .alert-message.success {
-  background-color: #57a957;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#62c462), to(#57a957));
-  background-image: -moz-linear-gradient(top, #62c462, #57a957);
-  background-image: -ms-linear-gradient(top, #62c462, #57a957);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #62c462), color-stop(100%, #57a957));
-  background-image: -webkit-linear-gradient(top, #62c462, #57a957);
-  background-image: -o-linear-gradient(top, #62c462, #57a957);
-  background-image: linear-gradient(top, #62c462, #57a957);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #57a957 #57a957 #3d773d;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h4 small {
+  font-size: 12px;
 }
-.btn.info, .alert-message.info {
-  background-color: #339bb9;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#5bc0de), to(#339bb9));
-  background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: -ms-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #5bc0de), color-stop(100%, #339bb9));
-  background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: -o-linear-gradient(top, #5bc0de, #339bb9);
-  background-image: linear-gradient(top, #5bc0de, #339bb9);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #339bb9 #339bb9 #22697d;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+h5 {
+  font-size: 12px;
+}
+h6 {
+  font-size: 11px;
+  color: #999999;
+  text-transform: uppercase;
+}
+/*
+ *	lib/css/bootstrap/buttons.css
+ */.close {
+  float: right;
+  font-size: 20px;
+  font-weight: bold;
+  line-height: 18px;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+.close:hover {
+  color: #000000;
+  text-decoration: none;
+  opacity: 0.4;
+  filter: alpha(opacity=40);
+  cursor: pointer;
 }
 .btn {
-  cursor: pointer;
   display: inline-block;
-  background-color: #e6e6e6;
-  background-repeat: no-repeat;
+  padding: 4px 10px 4px;
+  font-size: 13px;
+  line-height: 18px;
+  color: #333333;
+  text-align: center;
+  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+  background-color: #fafafa;
   background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
   background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
   background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
   background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
   background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
   background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+  background-repeat: no-repeat;
   filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
-  padding: 5px 14px 6px;
-  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
-  color: #333;
-  font-size: 11px;
-  line-height: normal;
   border: 1px solid #ccc;
   border-bottom-color: #bbb;
   -webkit-border-radius: 4px;
@@ -529,454 +521,803 @@
   -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
   -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
   box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
-  -webkit-transition: 0.1s linear all;
-  -moz-transition: 0.1s linear all;
-  -ms-transition: 0.1s linear all;
-  -o-transition: 0.1s linear all;
-  transition: 0.1s linear all;
+  cursor: pointer;
+  *margin-left: .3em;
+}
+.btn:first-child {
+  *margin-left: 0;
 }
 .btn:hover {
-  background-position: 0 -15px;
-  color: #333;
+  color: #333333;
   text-decoration: none;
+  background-color: #e6e6e6;
+  background-position: 0 -15px;
+  -webkit-transition: background-position 0.1s linear;
+  -moz-transition: background-position 0.1s linear;
+  -ms-transition: background-position 0.1s linear;
+  -o-transition: background-position 0.1s linear;
+  transition: background-position 0.1s linear;
 }
 .btn:focus {
-  outline: 1px dotted #666;
+  outline: thin dotted;
+  outline: 5px auto -webkit-focus-ring-color;
+  outline-offset: -2px;
 }
-.btn.primary {
-  color: #ffffff;
-  background-color: #0064cd;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));
-  background-image: -moz-linear-gradient(top, #049cdb, #0064cd);
-  background-image: -ms-linear-gradient(top, #049cdb, #0064cd);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));
-  background-image: -webkit-linear-gradient(top, #049cdb, #0064cd);
-  background-image: -o-linear-gradient(top, #049cdb, #0064cd);
-  background-image: linear-gradient(top, #049cdb, #0064cd);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  border-color: #0064cd #0064cd #003f81;
-  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+.btn.active, .btn:active {
+  background-image: none;
+  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  background-color: #e6e6e6;
+  background-color: #d9d9d9 \9;
+  color: rgba(0, 0, 0, 0.5);
+  outline: 0;
 }
-.btn.active, .btn :active {
-  -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-  -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25), 0 1px 2px rgba(0, 0, 0, 0.05);
-}
-.btn.disabled {
+.btn.disabled, .btn[disabled] {
   cursor: default;
   background-image: none;
-  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-  filter: alpha(opacity=65);
-  -khtml-opacity: 0.65;
-  -moz-opacity: 0.65;
+  background-color: #e6e6e6;
   opacity: 0.65;
+  filter: alpha(opacity=65);
   -webkit-box-shadow: none;
   -moz-box-shadow: none;
   box-shadow: none;
 }
-.btn[disabled] {
-  cursor: default;
-  background-image: none;
-  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-  filter: alpha(opacity=65);
-  -khtml-opacity: 0.65;
-  -moz-opacity: 0.65;
-  opacity: 0.65;
-  -webkit-box-shadow: none;
-  -moz-box-shadow: none;
-  box-shadow: none;
-}
-.btn.large {
+.btn-large {
+  padding: 9px 14px;
   font-size: 15px;
   line-height: normal;
-  padding: 9px 14px 9px;
-  -webkit-border-radius: 6px;
-  -moz-border-radius: 6px;
-  border-radius: 6px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
 }
-.btn.small {
-  padding: 5px 7px 5px;
+.btn-large .icon {
+  margin-top: 1px;
+}
+.btn-small {
+  padding: 5px 9px;
   font-size: 11px;
+  line-height: 16px;
 }
-:root .alert-message, :root .btn {
-  border-radius: 0 \0;
+.btn-small .icon {
+  margin-top: -1px;
 }
-button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner {
+.btn-primary,
+.btn-primary:hover,
+.btn-warning,
+.btn-warning:hover,
+.btn-danger,
+.btn-danger:hover,
+.btn-success,
+.btn-success:hover,
+.btn-info,
+.btn-info:hover {
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+  color: #ffffff;
+}
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active {
+  color: rgba(255, 255, 255, 0.75);
+}
+.btn-primary {
+  background-color: #006dcc;
+  background-image: -moz-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -ms-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));
+  background-image: -webkit-linear-gradient(top, #0088cc, #0044cc);
+  background-image: -o-linear-gradient(top, #0088cc, #0044cc);
+  background-image: linear-gradient(top, #0088cc, #0044cc);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0);
+  border-color: #0044cc #0044cc #002a80;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+  background-color: #0044cc;
+}
+.btn-primary:active, .btn-primary.active {
+  background-color: #003399 \9;
+}
+.btn-warning {
+  background-color: #faa732;
+  background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+  background-image: -ms-linear-gradient(top, #fbb450, #f89406);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));
+  background-image: -webkit-linear-gradient(top, #fbb450, #f89406);
+  background-image: -o-linear-gradient(top, #fbb450, #f89406);
+  background-image: linear-gradient(top, #fbb450, #f89406);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', GradientType=0);
+  border-color: #f89406 #f89406 #ad6704;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+  background-color: #f89406;
+}
+.btn-warning:active, .btn-warning.active {
+  background-color: #c67605 \9;
+}
+.btn-danger {
+  background-color: #da4f49;
+  background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -ms-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));
+  background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: -o-linear-gradient(top, #ee5f5b, #bd362f);
+  background-image: linear-gradient(top, #ee5f5b, #bd362f);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', GradientType=0);
+  border-color: #bd362f #bd362f #802420;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+  background-color: #bd362f;
+}
+.btn-danger:active, .btn-danger.active {
+  background-color: #942a25 \9;
+}
+.btn-success {
+  background-color: #5bb75b;
+  background-image: -moz-linear-gradient(top, #62c462, #51a351);
+  background-image: -ms-linear-gradient(top, #62c462, #51a351);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));
+  background-image: -webkit-linear-gradient(top, #62c462, #51a351);
+  background-image: -o-linear-gradient(top, #62c462, #51a351);
+  background-image: linear-gradient(top, #62c462, #51a351);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', GradientType=0);
+  border-color: #51a351 #51a351 #387038;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+  background-color: #51a351;
+}
+.btn-success:active, .btn-success.active {
+  background-color: #408140 \9;
+}
+.btn-info {
+  background-color: #49afcd;
+  background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -ms-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));
+  background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: -o-linear-gradient(top, #5bc0de, #2f96b4);
+  background-image: linear-gradient(top, #5bc0de, #2f96b4);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', GradientType=0);
+  border-color: #2f96b4 #2f96b4 #1f6377;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+  background-color: #2f96b4;
+}
+.btn-info:active, .btn-info.active {
+  background-color: #24748c \9;
+}
+button.btn, input[type="submit"].btn {
+  *padding-top: 2px;
+  *padding-bottom: 2px;
+}
+button.btn::-moz-focus-inner, input[type="submit"].btn::-moz-focus-inner {
   padding: 0;
   border: 0;
 }
-
-/* CLose */
-
-.close {
-  float: right;
-  color: #000000;
-  font-size: 15px;
-  font-weight: bold;
-  line-height: 13.5px;
-  margin-bottom: -2px;
-  text-shadow: 0 1px 0 #ffffff;
-  filter: alpha(opacity=25);
-  -khtml-opacity: 0.25;
-  -moz-opacity: 0.25;
-  opacity: 0.25;
-  text-decoration: none;
+button.btn.large, input[type="submit"].btn.large {
+  *padding-top: 7px;
+  *padding-bottom: 7px;
 }
-.close:hover {
-  color: #000000;
-  text-decoration: none;
-  filter: alpha(opacity=40);
-  -khtml-opacity: 0.4;
-  -moz-opacity: 0.4;
-  opacity: 0.4;
-  cursor: pointer;
-  font-weight: bold;
+button.btn.small, input[type="submit"].btn.small {
+  *padding-top: 3px;
+  *padding-bottom: 3px;
+}
+.btn-group {
+  position: relative;
+  *zoom: 1;
+  *margin-left: .3em;
+}
+.btn-group:before, .btn-group:after {
+  display: table;
+  content: "";
+}
+.btn-group:after {
+  clear: both;
+}
+.btn-group:first-child {
+  *margin-left: 0;
+}
+.btn-group + .btn-group {
+  margin-left: 5px;
+}
+.btn-toolbar {
+  margin-top: 9px;
+  margin-bottom: 9px;
+}
+.btn-toolbar .btn-group {
+  display: inline-block;
+  *display: inline;
+  /* IE7 inline-block hack */
+
+  *zoom: 1;
+}
+.btn-group .btn {
+  position: relative;
+  float: left;
+  margin-left: -1px;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.btn-group .btn:first-child {
+  margin-left: 0;
+  -webkit-border-top-left-radius: 4px;
+  -moz-border-radius-topleft: 4px;
+  border-top-left-radius: 4px;
+  -webkit-border-bottom-left-radius: 4px;
+  -moz-border-radius-bottomleft: 4px;
+  border-bottom-left-radius: 4px;
+}
+.btn-group .btn:last-child, .btn-group .dropdown-toggle {
+  -webkit-border-top-right-radius: 4px;
+  -moz-border-radius-topright: 4px;
+  border-top-right-radius: 4px;
+  -webkit-border-bottom-right-radius: 4px;
+  -moz-border-radius-bottomright: 4px;
+  border-bottom-right-radius: 4px;
+}
+.btn-group .btn.large:first-child {
+  margin-left: 0;
+  -webkit-border-top-left-radius: 6px;
+  -moz-border-radius-topleft: 6px;
+  border-top-left-radius: 6px;
+  -webkit-border-bottom-left-radius: 6px;
+  -moz-border-radius-bottomleft: 6px;
+  border-bottom-left-radius: 6px;
+}
+.btn-group .btn.large:last-child, .btn-group .large.dropdown-toggle {
+  -webkit-border-top-right-radius: 6px;
+  -moz-border-radius-topright: 6px;
+  border-top-right-radius: 6px;
+  -webkit-border-bottom-right-radius: 6px;
+  -moz-border-radius-bottomright: 6px;
+  border-bottom-right-radius: 6px;
+}
+.btn-group .btn:hover,
+.btn-group .btn:focus,
+.btn-group .btn:active,
+.btn-group .btn.active {
+  z-index: 2;
+}
+.btn-group .dropdown-toggle:active, .btn-group.open .dropdown-toggle {
+  outline: 0;
+}
+.btn-group .dropdown-toggle {
+  padding-left: 8px;
+  padding-right: 8px;
+  -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+  *padding-top: 5px;
+  *padding-bottom: 5px;
+}
+.btn-group.open {
+  *z-index: 1000;
+}
+.btn-group.open .dropdown-menu {
+  display: block;
+  margin-top: 1px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.btn-group.open .dropdown-toggle {
+  background-image: none;
+  -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+  box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+.btn .caret {
+  margin-top: 7px;
+  margin-left: 0;
+}
+.btn:hover .caret, .open.btn-group .caret {
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+.btn-primary .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret {
+  border-top-color: #ffffff;
+  opacity: 0.75;
+  filter: alpha(opacity=75);
+}
+.btn-small .caret {
+  margin-top: 4px;
 }
 /*
- *	lib/css/bootstrap/bootstrap-topbar.css
- */.topbar {
-  height: 40px;
-  position: fixed;
-  top: 0;
-  left: 0;
-  right: 0;
-  z-index: 10000;
-  overflow: visible;
+ *	lib/css/bootstrap/navbar.css
+ */.nav {
+  margin-left: 0;
+  margin-bottom: 18px;
+  list-style: none;
 }
-.topbar a {
-  color: #bfbfbf;
-  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
-  text-decoration: none;
-}
-.topbar h3 a:hover, .topbar .brand:hover, .topbar ul .active > a {
-  background-color: #333;
-  background-color: rgba(255, 255, 255, 0.05);
-  color: #ffffff;
-  text-decoration: none;
-}
-.topbar h3 {
-  position: relative;
-}
-.topbar h3 a, .topbar .brand {
-  float: left;
+.nav > li > a {
   display: block;
-  padding: 8px 20px 12px;
-  margin-left: -20px;
+}
+.nav > li > a:hover {
+  text-decoration: none;
+  background-color: #eeeeee;
+}
+.nav-list {
+  padding-left: 14px;
+  padding-right: 14px;
+  margin-bottom: 0;
+}
+.nav-list > li > a, .nav-list .nav-header {
+  display: block;
+  padding: 3px 15px;
+  margin-left: -15px;
+  margin-right: -15px;
+  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+.nav-list .nav-header {
+  font-size: 11px;
+  font-weight: bold;
+  line-height: 18px;
+  color: #999999;
+  text-transform: uppercase;
+}
+.nav-list > li + .nav-header {
+  margin-top: 9px;
+}
+.nav-list .active > a, .nav-list .active > a:hover {
   color: #ffffff;
-  font-size: 20px;
-  font-weight: 200;
-  line-height: 1;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+  background-color: #0088cc;
 }
-.topbar p {
-  margin: 0;
-  line-height: 40px;
+.nav-list [class^="icon-"] {
+  margin-right: 2px;
 }
-.topbar p a:hover {
-  background-color: transparent;
-  color: #ffffff;
+.nav-tabs, .nav-pills {
+  *zoom: 1;
 }
-.topbar form {
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+  display: table;
+  content: "";
+}
+.nav-tabs:after, .nav-pills:after {
+  clear: both;
+}
+.nav-tabs > li, .nav-pills > li {
   float: left;
-  margin: 5px 0 0 0;
-  position: relative;
-  filter: alpha(opacity=100);
-  -khtml-opacity: 1;
-  -moz-opacity: 1;
-  opacity: 1;
 }
-.topbar form.pull-right {
-  float: right;
+.nav-tabs > li > a, .nav-pills > li > a {
+  padding-right: 12px;
+  padding-left: 12px;
+  margin-right: 2px;
+  line-height: 14px;
 }
-.topbar input {
-  background-color: #444;
-  background-color: rgba(255, 255, 255, 0.3);
-  font-family: inherit;
-  font-size: normal;
-  font-weight: 13px;
-  line-height: 1;
-  padding: 4px 9px;
+.nav-tabs {
+  border-bottom: 1px solid #ddd;
+}
+.nav-tabs > li {
+  margin-bottom: -1px;
+}
+.nav-tabs > li > a {
+  padding-top: 9px;
+  padding-bottom: 9px;
+  border: 1px solid transparent;
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs > li > a:hover {
+  border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > .active > a, .nav-tabs > .active > a:hover {
+  color: #555555;
+  background-color: #ffffff;
+  border: 1px solid #ddd;
+  border-bottom-color: transparent;
+  cursor: default;
+}
+.nav-pills > li > a {
+  padding-top: 8px;
+  padding-bottom: 8px;
+  margin-top: 2px;
+  margin-bottom: 2px;
+  -webkit-border-radius: 5px;
+  -moz-border-radius: 5px;
+  border-radius: 5px;
+}
+.nav-pills .active > a, .nav-pills .active > a:hover {
   color: #ffffff;
-  color: rgba(255, 255, 255, 0.75);
-  border: 1px solid #111;
+  background-color: #0088cc;
+}
+.nav-stacked > li {
+  float: none;
+}
+.nav-stacked > li > a {
+  margin-right: 0;
+}
+.nav-tabs.nav-stacked {
+  border-bottom: 0;
+}
+.nav-tabs.nav-stacked > li > a {
+  border: 1px solid #ddd;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.nav-tabs.nav-stacked > li:first-child > a {
+  -webkit-border-radius: 4px 4px 0 0;
+  -moz-border-radius: 4px 4px 0 0;
+  border-radius: 4px 4px 0 0;
+}
+.nav-tabs.nav-stacked > li:last-child > a {
+  -webkit-border-radius: 0 0 4px 4px;
+  -moz-border-radius: 0 0 4px 4px;
+  border-radius: 0 0 4px 4px;
+}
+.nav-tabs.nav-stacked > li > a:hover {
+  border-color: #ddd;
+  z-index: 2;
+}
+.nav-pills.nav-stacked > li > a {
+  margin-bottom: 3px;
+}
+.nav-pills.nav-stacked > li:last-child > a {
+  margin-bottom: 1px;
+}
+.nav-tabs .dropdown-menu, .nav-pills .dropdown-menu {
+  margin-top: 1px;
+  border-width: 1px;
+}
+.nav-pills .dropdown-menu {
   -webkit-border-radius: 4px;
   -moz-border-radius: 4px;
   border-radius: 4px;
-  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
-  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
-  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25);
+}
+.nav-tabs .dropdown-toggle .caret, .nav-pills .dropdown-toggle .caret {
+  border-top-color: #0088cc;
+  margin-top: 6px;
+}
+.nav-tabs .dropdown-toggle:hover .caret, .nav-pills .dropdown-toggle:hover .caret {
+  border-top-color: #005580;
+}
+.nav-tabs .active .dropdown-toggle .caret, .nav-pills .active .dropdown-toggle .caret {
+  border-top-color: #333333;
+}
+.nav > .dropdown.active > a:hover {
+  color: #000000;
+  cursor: pointer;
+}
+.nav-tabs .open .dropdown-toggle, .nav-pills .open .dropdown-toggle, .nav > .open.active > a:hover {
+  color: #ffffff;
+  background-color: #999999;
+  border-color: #999999;
+}
+.nav .open .caret, .nav .open.active .caret, .nav .open a:hover .caret {
+  border-top-color: #ffffff;
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+
+.navbar {
+  overflow: visible;
+  margin-bottom: 18px;
+}
+.navbar-inner {
+  padding-left: 20px;
+  padding-right: 20px;
+  background-color: #2c2c2c;
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.btn-navbar {
+  display: none;
+  float: right;
+  padding: 7px 10px;
+  margin-left: 5px;
+  margin-right: 5px;
+  background-color: #2c2c2c;
+  background-image: -moz-linear-gradient(top, #333333, #222222);
+  background-image: -ms-linear-gradient(top, #333333, #222222);
+  background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#333333), to(#222222));
+  background-image: -webkit-linear-gradient(top, #333333, #222222);
+  background-image: -o-linear-gradient(top, #333333, #222222);
+  background-image: linear-gradient(top, #333333, #222222);
+  background-repeat: repeat-x;
+  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
+  border-color: #222222 #222222 #000000;
+  border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+  filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+  -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+  -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+.btn-navbar:hover,
+.btn-navbar:active,
+.btn-navbar.active,
+.btn-navbar.disabled,
+.btn-navbar[disabled] {
+  background-color: #222222;
+}
+.btn-navbar:active, .btn-navbar.active {
+  background-color: #080808 \9;
+}
+.btn-navbar .icon-bar {
+  display: block;
+  width: 18px;
+  height: 2px;
+  background-color: #f5f5f5;
+  -webkit-border-radius: 1px;
+  -moz-border-radius: 1px;
+  border-radius: 1px;
+  -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+  -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
+}
+.btn-navbar .icon-bar + .icon-bar {
+  margin-top: 3px;
+}
+.nav-collapse.collapse {
+  height: auto;
+}
+.navbar .brand:hover {
+  text-decoration: none;
+}
+.navbar .brand {
+  float: left;
+  display: block;
+  padding: 8px 20px 12px;
+  font-size: 20px;
+  font-weight: 200;
+  line-height: 1;
+  color: #ffffff;
+}
+.navbar .navbar-text {
+  margin-bottom: 0;
+  line-height: 40px;
+  color: #999999;
+}
+.navbar .navbar-text a:hover {
+  color: #ffffff;
+  background-color: transparent;
+}
+.navbar .btn, .navbar .btn-group {
+  margin-top: 5px;
+}
+.navbar .btn-group .btn {
+  margin-top: 0;
+}
+.navbar-form {
+  margin-bottom: 0;
+  *zoom: 1;
+}
+.navbar-form:before, .navbar-form:after {
+  display: table;
+  content: "";
+}
+.navbar-form:after {
+  clear: both;
+}
+.navbar-form input, .navbar-form select {
+  display: inline-block;
+  margin-top: 5px;
+  margin-bottom: 0;
+}
+.navbar-form .radio, .navbar-form .checkbox {
+  margin-top: 5px;
+}
+.navbar-form input[type="image"], .navbar-form input[type="checkbox"], .navbar-form input[type="radio"] {
+  margin-top: 3px;
+}
+.navbar-search {
+  position: relative;
+  float: left;
+  margin-top: 6px;
+  margin-bottom: 0;
+}
+.navbar-search .search-query {
+  padding: 4px 9px;
+  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+  font-size: 13px;
+  font-weight: normal;
+  line-height: 1;
+  color: #ffffff;
+  color: rgba(255, 255, 255, 0.75);
+  background: #666;
+  background: rgba(255, 255, 255, 0.3);
+  border: 1px solid #111;
+  -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+  -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
   -webkit-transition: none;
   -moz-transition: none;
   -ms-transition: none;
   -o-transition: none;
   transition: none;
 }
-.topbar input:-moz-placeholder {
-  color: #e6e6e6;
+.navbar-search .search-query :-moz-placeholder {
+  color: #eeeeee;
 }
-.topbar input::-webkit-input-placeholder {
-  color: #e6e6e6;
+.navbar-search .search-query::-webkit-input-placeholder {
+  color: #eeeeee;
 }
-.topbar input:hover {
-  background-color: #bfbfbf;
-  background-color: rgba(255, 255, 255, 0.5);
+.navbar-search .search-query:hover {
   color: #ffffff;
+  background-color: #999999;
+  background-color: rgba(255, 255, 255, 0.5);
 }
-.topbar input:focus, .topbar input.focused {
-  outline: 0;
-  background-color: #ffffff;
-  color: #404040;
-  text-shadow: 0 1px 0 #ffffff;
-  border: 0;
+.navbar-search .search-query:focus, .navbar-search .search-query.focused {
   padding: 5px 10px;
+  color: #333333;
+  text-shadow: 0 1px 0 #ffffff;
+  background-color: #ffffff;
+  border: 0;
   -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
   -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
   box-shadow: 0 0 3px rgba(0, 0, 0, 0.15);
+  outline: 0;
 }
-.topbar-inner, .topbar .fill {
-  background-color: #222;
-  background-color: #222222;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));
-  background-image: -moz-linear-gradient(top, #333333, #222222);
-  background-image: -ms-linear-gradient(top, #333333, #222222);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));
-  background-image: -webkit-linear-gradient(top, #333333, #222222);
-  background-image: -o-linear-gradient(top, #333333, #222222);
-  background-image: linear-gradient(top, #333333, #222222);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);
-  -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-  -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
-  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+.navbar-fixed-top {
+  position: fixed;
+  top: 0;
+  right: 0;
+  left: 0;
+  z-index: 1030;
 }
-.topbar div > ul, .nav {
+.navbar-fixed-top .navbar-inner {
+  padding-left: 0;
+  padding-right: 0;
+  -webkit-border-radius: 0;
+  -moz-border-radius: 0;
+  border-radius: 0;
+}
+.navbar .nav {
+  position: relative;
+  left: 0;
   display: block;
   float: left;
   margin: 0 10px 0 0;
-  position: relative;
-  left: 0;
 }
-.topbar div > ul > li, .nav > li {
+.navbar .nav.pull-right {
+  float: right;
+}
+.navbar .nav > li {
   display: block;
   float: left;
 }
-.topbar div > ul a, .nav a {
-  display: block;
+.navbar .nav > li > a {
   float: none;
   padding: 10px 10px 11px;
   line-height: 19px;
+  color: #999999;
   text-decoration: none;
+  text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
 }
-.topbar div > ul a:hover, .nav a:hover {
+.navbar .nav > li > a:hover {
+  background-color: transparent;
   color: #ffffff;
   text-decoration: none;
 }
-.topbar div > ul .active > a, .nav .active > a {
-  background-color: #222;
+.navbar .nav .active > a, .navbar .nav .active > a:hover {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #222222;
   background-color: rgba(0, 0, 0, 0.5);
 }
-.topbar div > ul.secondary-nav, .nav.secondary-nav {
-  float: right;
+.navbar .divider-vertical {
+  height: 40px;
+  width: 1px;
+  margin: 0 9px;
+  overflow: hidden;
+  background-color: #222222;
+  border-right: 1px solid #333333;
+}
+.navbar .nav.pull-right {
   margin-left: 10px;
   margin-right: 0;
 }
-.topbar div > ul.secondary-nav .menu-dropdown,
-.nav.secondary-nav .menu-dropdown,
-.topbar div > ul.secondary-nav .dropdown-menu,
-.nav.secondary-nav .dropdown-menu {
-  right: 0;
-  border: 0;
+.navbar .dropdown-menu {
+  margin-top: 1px;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
 }
-.topbar div > ul a.menu:hover,
-.nav a.menu:hover,
-.topbar div > ul li.open .menu,
-.nav li.open .menu,
-.topbar div > ul .dropdown-toggle:hover,
-.nav .dropdown-toggle:hover,
-.topbar div > ul .dropdown.open .dropdown-toggle,
-.nav .dropdown.open .dropdown-toggle {
-  background: #444;
-  background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown,
-.nav .menu-dropdown,
-.topbar div > ul .dropdown-menu,
-.nav .dropdown-menu {
-  background-color: #333;
-}
-.topbar div > ul .menu-dropdown a.menu,
-.nav .menu-dropdown a.menu,
-.topbar div > ul .dropdown-menu a.menu,
-.nav .dropdown-menu a.menu,
-.topbar div > ul .menu-dropdown .dropdown-toggle,
-.nav .menu-dropdown .dropdown-toggle,
-.topbar div > ul .dropdown-menu .dropdown-toggle,
-.nav .dropdown-menu .dropdown-toggle {
-  color: #ffffff;
-}
-.topbar div > ul .menu-dropdown a.menu.open,
-.nav .menu-dropdown a.menu.open,
-.topbar div > ul .dropdown-menu a.menu.open,
-.nav .dropdown-menu a.menu.open,
-.topbar div > ul .menu-dropdown .dropdown-toggle.open,
-.nav .menu-dropdown .dropdown-toggle.open,
-.topbar div > ul .dropdown-menu .dropdown-toggle.open,
-.nav .dropdown-menu .dropdown-toggle.open {
-  background: #444;
-  background: rgba(255, 255, 255, 0.05);
-}
-.topbar div > ul .menu-dropdown li a,
-.nav .menu-dropdown li a,
-.topbar div > ul .dropdown-menu li a,
-.nav .dropdown-menu li a {
-  color: #999;
-  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
-}
-.topbar div > ul .menu-dropdown li a:hover,
-.nav .menu-dropdown li a:hover,
-.topbar div > ul .dropdown-menu li a:hover,
-.nav .dropdown-menu li a:hover {
-  background-color: #191919;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#292929), to(#191919));
-  background-image: -moz-linear-gradient(top, #292929, #191919);
-  background-image: -ms-linear-gradient(top, #292929, #191919);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #292929), color-stop(100%, #191919));
-  background-image: -webkit-linear-gradient(top, #292929, #191919);
-  background-image: -o-linear-gradient(top, #292929, #191919);
-  background-image: linear-gradient(top, #292929, #191919);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#292929', endColorstr='#191919', GradientType=0);
-  color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .active a,
-.nav .menu-dropdown .active a,
-.topbar div > ul .dropdown-menu .active a,
-.nav .dropdown-menu .active a {
-  color: #ffffff;
-}
-.topbar div > ul .menu-dropdown .divider,
-.nav .menu-dropdown .divider,
-.topbar div > ul .dropdown-menu .divider,
-.nav .dropdown-menu .divider {
-  background-color: #222;
-  border-color: #444;
-}
-.topbar ul .menu-dropdown li a, .topbar ul .dropdown-menu li a {
-  padding: 4px 15px;
-}
-li.menu, .dropdown {
-  position: relative;
-}
-a.menu:after, .dropdown-toggle:after {
-  width: 0;
-  height: 0;
+.navbar .dropdown-menu:before {
+  content: '';
   display: inline-block;
-  content: "↓";
-  text-indent: -99999px;
-  vertical-align: top;
-  margin-top: 8px;
-  margin-left: 4px;
-  border-left: 4px solid transparent;
-  border-right: 4px solid transparent;
-  border-top: 4px solid #ffffff;
-  filter: alpha(opacity=50);
-  -khtml-opacity: 0.5;
-  -moz-opacity: 0.5;
-  opacity: 0.5;
-}
-.menu-dropdown, .dropdown-menu {
-  background-color: #ffffff;
-  float: left;
-  display: none;
+  border-left: 7px solid transparent;
+  border-right: 7px solid transparent;
+  border-bottom: 7px solid #ccc;
+  border-bottom-color: rgba(0, 0, 0, 0.2);
   position: absolute;
-  top: 40px;
-  z-index: 900;
-  min-width: 160px;
-  max-width: 220px;
-  _width: 160px;
-  margin-left: 0;
-  margin-right: 0;
-  padding: 6px 0;
-  zoom: 1;
-  border-color: #999;
-  border-color: rgba(0, 0, 0, 0.2);
-  border-style: solid;
-  border-width: 0 1px 1px;
-  -webkit-border-radius: 0 0 6px 6px;
-  -moz-border-radius: 0 0 6px 6px;
-  border-radius: 0 0 6px 6px;
-  -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-  -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
-  -webkit-background-clip: padding-box;
-  -moz-background-clip: padding-box;
-  background-clip: padding-box;
+  top: -7px;
+  left: 9px;
 }
-.menu-dropdown li, .dropdown-menu li {
-  float: none;
-  display: block;
-  background-color: none;
+.navbar .dropdown-menu:after {
+  content: '';
+  display: inline-block;
+  border-left: 6px solid transparent;
+  border-right: 6px solid transparent;
+  border-bottom: 6px solid #ffffff;
+  position: absolute;
+  top: -6px;
+  left: 10px;
 }
-.menu-dropdown .divider, .dropdown-menu .divider {
-  height: 1px;
-  margin: 5px 0;
-  overflow: hidden;
-  background-color: #eee;
-  border-bottom: 1px solid #ffffff;
+.navbar .nav .dropdown-toggle .caret, .navbar .nav .open.dropdown .caret {
+  border-top-color: #ffffff;
 }
-.topbar .dropdown-menu a, .dropdown-menu a {
-  display: block;
-  padding: 4px 15px;
-  clear: both;
-  font-weight: normal;
-  line-height: 18px;
-  color: #808080;
-  text-shadow: 0 1px 0 #ffffff;
+.navbar .nav .active .caret {
+  opacity: 1;
+  filter: alpha(opacity=100);
 }
-.topbar .dropdown-menu a:hover,
-.dropdown-menu a:hover,
-.topbar .dropdown-menu a.hover,
-.dropdown-menu a.hover {
-  background-color: #dddddd;
-  background-repeat: repeat-x;
-  background-image: -khtml-gradient(linear, left top, left bottom, from(#eeeeee), to(#dddddd));
-  background-image: -moz-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: -ms-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, #dddddd));
-  background-image: -webkit-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: -o-linear-gradient(top, #eeeeee, #dddddd);
-  background-image: linear-gradient(top, #eeeeee, #dddddd);
-  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#dddddd', GradientType=0);
-  color: #404040;
-  text-decoration: none;
-  -webkit-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
-  -moz-box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
-  box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.025), inset 0 -1px rgba(0, 0, 0, 0.025);
+.navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle {
+  background-color: transparent;
 }
-.open .menu,
-.dropdown.open .menu,
-.open .dropdown-toggle,
-.dropdown.open .dropdown-toggle {
+.navbar .nav .active > .dropdown-toggle:hover {
   color: #ffffff;
-  background: #ccc;
-  background: rgba(0, 0, 0, 0.3);
 }
-.open .menu-dropdown,
-.dropdown.open .menu-dropdown,
-.open .dropdown-menu,
-.dropdown.open .dropdown-menu {
-  display: block;
+.navbar .nav.pull-right .dropdown-menu {
+  left: auto;
+  right: 0;
 }
-
-/*extra size menus for recent*/
-.dropdown-menu#toolbar-recent, .dropdown-menu#toolbar-options, .dropdown-menu#toolbar-help{
-	width: 260px !important;
-	max-width: 260px !important;
+.navbar .nav.pull-right .dropdown-menu:before {
+  left: auto;
+  right: 12px;
+}
+.navbar .nav.pull-right .dropdown-menu:after {
+  left: auto;
+  right: 13px;
 }
 
 /* ajax spinner */
-.topbar #spinner {
+.navbar #spinner {
 	display: block;
 	float: right;
 	width: 20px;
@@ -985,9 +1326,280 @@
 	visibility: hidden;
 }
 
-.topbar-inner {
+.navbar-inner {
 	padding: 0px 20px;
 }
+
+/*
+ *	lib/css/bootstrap/dropdown.css
+ */.dropdown {
+  position: relative;
+}
+.dropdown-toggle {
+  *margin-bottom: -3px;
+}
+.dropdown-toggle:active, .open .dropdown-toggle {
+  outline: 0;
+}
+.caret {
+  display: inline-block;
+  width: 0;
+  height: 0;
+  text-indent: -99999px;
+  *text-indent: 0;
+  vertical-align: top;
+  border-left: 4px solid transparent;
+  border-right: 4px solid transparent;
+  border-top: 4px solid #000000;
+  opacity: 0.3;
+  filter: alpha(opacity=30);
+  content: "\2193";
+}
+.dropdown .caret {
+  margin-top: 8px;
+  margin-left: 2px;
+}
+.dropdown:hover .caret, .open.dropdown .caret {
+  opacity: 1;
+  filter: alpha(opacity=100);
+}
+.dropdown-menu {
+  position: absolute;
+  top: 100%;
+  left: 0;
+  z-index: 1000;
+  float: left;
+  display: none;
+  min-width: 160px;
+  max-width: 220px;
+  _width: 160px;
+  padding: 4px 0;
+  margin: 0;
+  list-style: none;
+  background-color: #ffffff;
+  border-color: #ccc;
+  border-color: rgba(0, 0, 0, 0.2);
+  border-style: solid;
+  border-width: 1px;
+  -webkit-border-radius: 0 0 5px 5px;
+  -moz-border-radius: 0 0 5px 5px;
+  border-radius: 0 0 5px 5px;
+  -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding;
+  background-clip: padding-box;
+  *border-right-width: 2px;
+  *border-bottom-width: 2px;
+}
+.dropdown-menu.bottom-up {
+  top: auto;
+  bottom: 100%;
+  margin-bottom: 2px;
+}
+.dropdown-menu .divider {
+  height: 1px;
+  margin: 5px 1px;
+  overflow: hidden;
+  background-color: #e5e5e5;
+  border-bottom: 1px solid #ffffff;
+  *width: 100%;
+  *margin: -5px 0 5px;
+}
+.dropdown-menu a {
+  display: block;
+  padding: 3px 15px;
+  clear: both;
+  font-weight: normal;
+  line-height: 18px;
+  color: #555555;
+  white-space: nowrap;
+}
+.dropdown-menu li > a:hover, .dropdown-menu .active > a, .dropdown-menu .active > a:hover {
+  color: #ffffff;
+  text-decoration: none;
+  background-color: #0088cc;
+}
+.dropdown.open {
+  *z-index: 1000;
+}
+.dropdown.open .dropdown-toggle {
+  color: #ffffff;
+  background: #ccc;
+  background: rgba(0, 0, 0, 0.3);
+}
+.dropdown.open .dropdown-menu {
+  display: block;
+}
+/*
+ *	lib/css/bootstrap/tooltip.css
+ */.tooltip {
+  position: absolute;
+  z-index: 1020;
+  display: block;
+  visibility: visible;
+  padding: 5px;
+  font-size: 11px;
+  opacity: 0;
+  filter: alpha(opacity=0);
+}
+.tooltip.in {
+  opacity: 0.8;
+  filter: alpha(opacity=80);
+}
+.tooltip.top {
+  margin-top: -2px;
+}
+.tooltip.right {
+  margin-left: 2px;
+}
+.tooltip.bottom {
+  margin-top: 2px;
+}
+.tooltip.left {
+  margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-right: 5px solid #000000;
+}
+.tooltip-inner {
+  max-width: 200px;
+  padding: 3px 8px;
+  color: #ffffff;
+  text-align: center;
+  text-decoration: none;
+  background-color: #000000;
+  -webkit-border-radius: 4px;
+  -moz-border-radius: 4px;
+  border-radius: 4px;
+}
+.tooltip-arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+}
+.popover {
+  position: absolute;
+  top: 0;
+  left: 0;
+  z-index: 1010;
+  display: none;
+  padding: 5px;
+}
+.popover.top {
+  margin-top: -5px;
+}
+.popover.right {
+  margin-left: 5px;
+}
+.popover.bottom {
+  margin-top: 5px;
+}
+.popover.left {
+  margin-left: -5px;
+}
+.popover.top .arrow {
+  bottom: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+  top: 50%;
+  left: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+  top: 0;
+  left: 50%;
+  margin-left: -5px;
+  border-left: 5px solid transparent;
+  border-right: 5px solid transparent;
+  border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+  top: 50%;
+  right: 0;
+  margin-top: -5px;
+  border-top: 5px solid transparent;
+  border-bottom: 5px solid transparent;
+  border-left: 5px solid #000000;
+}
+.popover .arrow {
+  position: absolute;
+  width: 0;
+  height: 0;
+}
+.popover-inner {
+  padding: 3px;
+  width: 280px;
+  overflow: hidden;
+  background: #000000;
+  background: rgba(0, 0, 0, 0.8);
+  -webkit-border-radius: 6px;
+  -moz-border-radius: 6px;
+  border-radius: 6px;
+  -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+  box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3);
+}
+.popover-title {
+  padding: 9px 15px;
+  line-height: 1;
+  background-color: #f5f5f5;
+  border-bottom: 1px solid #eee;
+  -webkit-border-radius: 3px 3px 0 0;
+  -moz-border-radius: 3px 3px 0 0;
+  border-radius: 3px 3px 0 0;
+}
+.popover-content {
+  padding: 14px;
+  background-color: #ffffff;
+  -webkit-border-radius: 0 0 3px 3px;
+  -moz-border-radius: 0 0 3px 3px;
+  border-radius: 0 0 3px 3px;
+  -webkit-background-clip: padding-box;
+  -moz-background-clip: padding-box;
+  background-clip: padding-box;
+}
+.popover-content p, .popover-content ul, .popover-content ol {
+  margin-bottom: 0;
+}
 /*
  *	erpnext/startup/startup.css
  */h1, h2, h3, h4, h5 {
@@ -1005,19 +1617,13 @@
 }
 
 body {
-	background-color: #e2e2e2;
 }
 
 .erpnext-footer {
 	margin: 3px auto;
-	color: #888;
 	text-align: center;
 }
 
-.erpnext-footer a, .erpnext-footer a:hover, .erpnext-footer a:visited {
-	color: #666;
-}
-
 .module-icons {
    background: url(../images/module-icons.png) no-repeat top left;
    width:16px;
@@ -1037,26 +1643,52 @@
 .module-icons-stock{ background-position: 0 -660px;  } 
 .module-icons-support{ background-position: 0 -726px;  } 
 
-.topbar-new-comments {
+.navbar-new-comments {
 	margin: -3px 0px;
 	padding: 2px;
-	font-size: 14px;
-	color: #fff;
-	background-color: #B00D07;
 	min-width: 20px;
 	text-align: center;
 	display: inline-block;
 	border-radius: 2px;
+	color: #999999;
+	background-color: #333131;
+}
+
+.navbar-new-comments:hover,
+.navbar-new-comments:active,
+.navbar-new-comments:focus {
+	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;
+	max-width: 260px !important;
 }
 
 /*
  *	erpnext/website/css/website.css
- */#body_div {
-	width: 900px;
-	margin: auto;
-}
-
-.layout_wrapper {
+ */.layout_wrapper {
 	padding: 20px;
 }
 
@@ -1083,15 +1715,6 @@
 	margin-bottom: 9px;
 }
 
-footer {
-	width: 900px;
-	margin: auto;
-}
-header .topbar .container {
-	width: 900px;
-	margin: auto;
-}
-
 .web-content input[type="text"], .web-content input[type="password"], .web-content select {
 	min-width: 180px;
 }
diff --git a/erpnext/accounts/__init__.py b/erpnext/accounts/__init__.py
index 65d0231..44d6aec 100644
--- a/erpnext/accounts/__init__.py
+++ b/erpnext/accounts/__init__.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import flt
 from webnotes.model.code import get_obj
diff --git a/erpnext/accounts/doctype/account/account.js b/erpnext/accounts/doctype/account/account.js
index b07bb9c..32f60c7 100644
--- a/erpnext/accounts/doctype/account/account.js
+++ b/erpnext/accounts/doctype/account/account.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Fetch parent details
 // -----------------------------------------
 cur_frm.add_fetch('parent_account', 'debit_or_credit', 'debit_or_credit');
diff --git a/erpnext/accounts/doctype/account/account.py b/erpnext/accounts/doctype/account/account.py
index 4cfd64d..e3c1977 100644
--- a/erpnext/accounts/doctype/account/account.py
+++ b/erpnext/accounts/doctype/account/account.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
index 5c5dece..73e767b 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, cdt, cdn){
   // add page head
   var ph = new PageHeader(cur_frm.fields_dict['Head HTML'].wrapper, 'Bank Reconciliation', '');
diff --git a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
index 3ba477b..6220535 100644
--- a/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
+++ b/erpnext/accounts/doctype/bank_reconciliation/bank_reconciliation.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/budget_control/budget_control.py b/erpnext/accounts/doctype/budget_control/budget_control.py
index ec28bfc..65871c6 100644
--- a/erpnext/accounts/doctype/budget_control/budget_control.py
+++ b/erpnext/accounts/doctype/budget_control/budget_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/budget_distribution/budget_distribution.js b/erpnext/accounts/doctype/budget_distribution/budget_distribution.js
index 03e36f7..84726e8 100644
--- a/erpnext/accounts/doctype/budget_distribution/budget_distribution.js
+++ b/erpnext/accounts/doctype/budget_distribution/budget_distribution.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,cdt,cdn){
   if(doc.__islocal){
     var callback1 = function(r,rt){
diff --git a/erpnext/accounts/doctype/budget_distribution/budget_distribution.py b/erpnext/accounts/doctype/budget_distribution/budget_distribution.py
index 1ac1b8b..c1cabf9 100644
--- a/erpnext/accounts/doctype/budget_distribution/budget_distribution.py
+++ b/erpnext/accounts/doctype/budget_distribution/budget_distribution.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/c_form/c_form.js b/erpnext/accounts/doctype/c_form/c_form.js
index 6629de6..82adf29 100644
--- a/erpnext/accounts/doctype/c_form/c_form.js
+++ b/erpnext/accounts/doctype/c_form/c_form.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //c-form js file
 // -----------------------------
 cur_frm.fields_dict.invoice_details.grid.get_field("invoice_no").get_query = function(doc) {
diff --git a/erpnext/accounts/doctype/c_form/c_form.py b/erpnext/accounts/doctype/c_form/c_form.py
index 7228f11..367b27a 100644
--- a/erpnext/accounts/doctype/c_form/c_form.py
+++ b/erpnext/accounts/doctype/c_form/c_form.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 from webnotes.utils import add_days, cint, cstr, date_diff, default_fields, flt, getdate, now, nowdate
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.js b/erpnext/accounts/doctype/cost_center/cost_center.js
index 58f39e0..180836a 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.js
+++ b/erpnext/accounts/doctype/cost_center/cost_center.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //Account filtering for cost center
diff --git a/erpnext/accounts/doctype/cost_center/cost_center.py b/erpnext/accounts/doctype/cost_center/cost_center.py
index b97274f..e87756f 100644
--- a/erpnext/accounts/doctype/cost_center/cost_center.py
+++ b/erpnext/accounts/doctype/cost_center/cost_center.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
index bf67896..84a1c05 100644
--- a/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
+++ b/erpnext/accounts/doctype/fiscal_year/fiscal_year.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/form_16a/form_16a.js b/erpnext/accounts/doctype/form_16a/form_16a.js
index 75af394..503681b 100644
--- a/erpnext/accounts/doctype/form_16a/form_16a.js
+++ b/erpnext/accounts/doctype/form_16a/form_16a.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,cdt,cdn){
   if(doc.company)get_server_fields('get_registration_details','','',doc,cdt,cdn,1);
 }
diff --git a/erpnext/accounts/doctype/form_16a/form_16a.py b/erpnext/accounts/doctype/form_16a/form_16a.py
index 018b834..4de582d 100644
--- a/erpnext/accounts/doctype/form_16a/form_16a.py
+++ b/erpnext/accounts/doctype/form_16a/form_16a.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 001df84..c64d64e 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/gl_entry/gl_entry.py b/erpnext/accounts/doctype/gl_entry/gl_entry.py
index b905afa..00b6844 100644
--- a/erpnext/accounts/doctype/gl_entry/gl_entry.py
+++ b/erpnext/accounts/doctype/gl_entry/gl_entry.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js
index a5ec2b6..4057f7e 100644
--- a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js
+++ b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Booking Entry Id
 // --------------------
 
diff --git a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py
index 24a7db5..0ab0e05 100644
--- a/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py
+++ b/erpnext/accounts/doctype/internal_reconciliation/internal_reconciliation.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/internal_reconciliation/test_ir.py b/erpnext/accounts/doctype/internal_reconciliation/test_ir.py
index b35af6e..c5aa935 100644
--- a/erpnext/accounts/doctype/internal_reconciliation/test_ir.py
+++ b/erpnext/accounts/doctype/internal_reconciliation/test_ir.py
@@ -1,3 +1,19 @@
+# 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 unittest
 import webnotes
 
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js
index 699d17b..771f026 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.js
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
 	var cp = wn.control_panel;
 
diff --git a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
index 5942ca1..a5b2abf 100644
--- a/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
+++ b/erpnext/accounts/doctype/journal_voucher/journal_voucher.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/lease_agreement/lease_agreement.js b/erpnext/accounts/doctype/lease_agreement/lease_agreement.js
index 7b90be9..1453528 100644
--- a/erpnext/accounts/doctype/lease_agreement/lease_agreement.js
+++ b/erpnext/accounts/doctype/lease_agreement/lease_agreement.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 $.extend(cur_frm.cscript, {
 	Generate: function(doc, dt, dn) {
 		if(doc.installment_amount==''){
diff --git a/erpnext/accounts/doctype/lease_agreement/lease_agreement.py b/erpnext/accounts/doctype/lease_agreement/lease_agreement.py
index dd63c2e..1da2f05 100644
--- a/erpnext/accounts/doctype/lease_agreement/lease_agreement.py
+++ b/erpnext/accounts/doctype/lease_agreement/lease_agreement.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.doc import make_autoname, Document, addchild
 from webnotes import msgprint
diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js
index 0095b03..10b1bc1 100755
--- a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js
+++ b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript['Export Report'] = function(doc, cdt, cdn) {
 	$c_obj_csv(make_doclist(cdt, cdn), 'get_report_data', '');
 }
diff --git a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py
index e9a9505..b790d06 100755
--- a/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py
+++ b/erpnext/accounts/doctype/ledger_balance_export/ledger_balance_export.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import add_days, cint, cstr, flt, getdate
 from webnotes.model.doclist import getlist
diff --git a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
index 6ffef4a..3cad944 100644
--- a/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
+++ b/erpnext/accounts/doctype/mode_of_payment/mode_of_payment.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
index 2c9841d..a465ec0 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.tname = "PV Detail";
 cur_frm.cscript.fname = "entries";
 cur_frm.cscript.other_fname = "purchase_tax_details";
diff --git a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
index 8902f52..fe733f7 100644
--- a/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
+++ b/erpnext/accounts/doctype/payable_voucher/payable_voucher.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
index d6360a5..20e9ab1 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 //========================== On Load =================================================
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
index 895130e..7264c44 100644
--- a/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
+++ b/erpnext/accounts/doctype/period_closing_voucher/period_closing_voucher.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.js b/erpnext/accounts/doctype/pos_setting/pos_setting.js
index 2bbc08c..82cf389 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.js
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,cdt,cdn){
   $c_obj(make_doclist(cdt,cdn),'get_series','',function(r,rt){
     if(r.message) set_field_options('naming_series', r.message);
diff --git a/erpnext/accounts/doctype/pos_setting/pos_setting.py b/erpnext/accounts/doctype/pos_setting/pos_setting.py
index 7fff248..45caca5 100755
--- a/erpnext/accounts/doctype/pos_setting/pos_setting.py
+++ b/erpnext/accounts/doctype/pos_setting/pos_setting.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
index 56fbe6d..bc0a145 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.tname = "RV Detail";
 cur_frm.cscript.fname = "entries";
 cur_frm.cscript.other_fname = "other_charges";
diff --git a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
index e21c9ba..03fd762 100644
--- a/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
+++ b/erpnext/accounts/doctype/receivable_voucher/receivable_voucher.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
@@ -7,7 +23,6 @@
 from webnotes.model.doclist import getlist, copy_doclist
 from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
 from webnotes import session, form, is_testing, msgprint, errprint
-from webnotes.utils.scheduler import set_event, cancel_event, Scheduler
 
 in_transaction = webnotes.conn.in_transaction
 convert_to_lists = webnotes.conn.convert_to_lists
@@ -689,29 +704,6 @@
 		elif self.doc.recurring_id:
 			webnotes.conn.sql("""update `tabReceivable Voucher` set convert_into_recurring_invoice = 0 where recurring_id = %s""", self.doc.recurring_id)
 
-		self.manage_scheduler()
-
-	def manage_scheduler(self):
-		""" set/cancel event in scheduler """
-		event = 'accounts.doctype.gl_control.gl_control.manage_recurring_invoices'
-
-		if webnotes.conn.sql("select name from `tabReceivable Voucher` where ifnull(convert_into_recurring_invoice, 0) = 1 and next_date <= end_date"):
-			if not self.check_event_exists(event):
-				set_event(event,  interval = 60*60, recurring = 1)
-		else:
-			cancel_event(event)
-
-
-	def check_event_exists(self, event):
-		try:
-			ev = Scheduler().get_events()
-		except:
-			msgprint("Scheduler database not exists. Please mail to support@erpnext.com", raise_exception=1)
-
-		if event in [d['event'] for d in ev]:
-			return 1
-
-
 	def set_next_date(self):
 		""" Set next date on which auto invoice will be created"""
 
diff --git a/erpnext/accounts/doctype/tds_category/tds_category.js b/erpnext/accounts/doctype/tds_category/tds_category.js
index 6ffef4a..3cad944 100644
--- a/erpnext/accounts/doctype/tds_category/tds_category.js
+++ b/erpnext/accounts/doctype/tds_category/tds_category.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/accounts/doctype/tds_category/tds_category.py b/erpnext/accounts/doctype/tds_category/tds_category.py
index 2b0eb74..7296af4 100644
--- a/erpnext/accounts/doctype/tds_category/tds_category.py
+++ b/erpnext/accounts/doctype/tds_category/tds_category.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/tds_control/tds_control.js b/erpnext/accounts/doctype/tds_control/tds_control.js
index 36e2660..fae4dd9 100644
--- a/erpnext/accounts/doctype/tds_control/tds_control.js
+++ b/erpnext/accounts/doctype/tds_control/tds_control.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 class DocType:
   def __init__(self, doc, doclist=[]):
     self.doc = doc
diff --git a/erpnext/accounts/doctype/tds_control/tds_control.py b/erpnext/accounts/doctype/tds_control/tds_control.py
index 69588d8..be1945d 100644
--- a/erpnext/accounts/doctype/tds_control/tds_control.py
+++ b/erpnext/accounts/doctype/tds_control/tds_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/tds_payment/tds_payment.js b/erpnext/accounts/doctype/tds_payment/tds_payment.js
index c21c505..e15fd13 100644
--- a/erpnext/accounts/doctype/tds_payment/tds_payment.js
+++ b/erpnext/accounts/doctype/tds_payment/tds_payment.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,cdt,cdn){
   cur_frm.cscript.refresh(doc, cdt, cdn);
 }
diff --git a/erpnext/accounts/doctype/tds_payment/tds_payment.py b/erpnext/accounts/doctype/tds_payment/tds_payment.py
index 5079d04..cf97426 100644
--- a/erpnext/accounts/doctype/tds_payment/tds_payment.py
+++ b/erpnext/accounts/doctype/tds_payment/tds_payment.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js b/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js
index 82d84ea..a0cede6 100644
--- a/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js
+++ b/erpnext/accounts/doctype/tds_return_acknowledgement/tds_return_acknowledgement.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.fields_dict['quarter'].get_query = function(doc, cdt, cdn) {
   if(doc.fiscal_year)
     return 'SELECT `tabPeriod`.name FROM `tabPeriod` WHERE `tabPeriod`.fiscal_year = "'+doc.fiscal_year+'" AND `tabPeriod`.period_type = "Quarter" AND `tabPeriod`.docstatus != 2 AND `tabPeriod`.name LIKE "%s" ORDER BY `tabPeriod`.start_date ASC LIMIT 50';
diff --git a/erpnext/accounts/page/accounts_browser/accounts_browser.js b/erpnext/accounts/page/accounts_browser/accounts_browser.js
index 13416e6..60c168d 100644
--- a/erpnext/accounts/page/accounts_browser/accounts_browser.js
+++ b/erpnext/accounts/page/accounts_browser/accounts_browser.js
@@ -1,11 +1,35 @@
-pscript['onload_Accounts Browser'] = function(){
+// 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/>.
+
+pscript['onshow_Accounts Browser'] = function(){
 	wn.require('lib/js/legacy/widgets/tree.js');
-  // 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'});
+
+	var route = decodeURIComponent(location.hash);
+	if(route.indexOf('/')!=-1) {
+		var chart_type = route.split('/')[1];
+		pscript.make_chart(chart_type);
+		return;
+	}
+	
+	// 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'});
 }
 
 pscript.make_chart = function(b) {
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/accounts/page/accounts_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/accounts/page/accounts_home/__init__.py
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.html b/erpnext/accounts/page/accounts_home/accounts_home.html
new file mode 100644
index 0000000..12c80eb
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.html
@@ -0,0 +1,144 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Accounts</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a href="#!List/Journal Voucher">Journal Voucher</a></h4>
+			<p class="help">General Ledger Entries</p>
+			<h4><a href="#!List/Sales Invoice">Sales Invoice</a></h4>
+			<p class="help">Bills raised to Customers</p>
+			<h4><a href="#!List/Purchase Invoice">Purchase Invoice</a></h4>
+			<p class="help">Bills raised by Suppliers</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!Accounts Browser/Account">Chart of Accounts</a></h4>
+			<p class="help">Structure of books of accounts</p>
+			<h4><a href="#!Accounts Browser/Cost Center">Chart of Cost Centers</a></h4>
+			<p class="help">Structure cost centers</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Tools</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title="Update system bank entries (JV) with actual bank trasaction"
+							href="#!Form/Bank Reconciliation/Bank Reconciliation">Bank Reconciliation</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title="Cancel off untracked Payments (JV) against Invoices"
+							href="#!Form/Internal Reconciliation/Internal Reconciliation">Payment Reconciliation</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title="Clear your P/L account and balance your Balance Sheets"
+							href="#!List/Period Closing Voucher">Close Period Entry</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title="Export multiple Account Ledgers (GL) to spreadsheet (csv)"
+							href="#!Form/Ledger Balance Export/Ledger Balance Export">Export Multiple Ledgers (GL)</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title="Lease Agreements"
+							href="#!List/Lease Agreement">Lease Agreements</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Helper for managing return of goods (sales or purchase)"
+							href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales or Purchase Returns</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
+							href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
+					</div>
+
+
+				</div>
+			</div>
+
+			<div class="section">
+				<div class="section-head">Setup</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tax and charges structure master on sales transactions"
+							href="#!List/Other Charges">Sales Other Charges</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tax and charges structure master on purchase transactions"
+							href="#!List/Purchase Other Charges">Purchase Other Charges</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Defaults for Point of Sale (Retail) type of Invoices"
+							href="#!List/POS Setting">Point of Sale (PoS) Setting</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Seasonal distributions for budgets"
+							href="#!List/Budget Distribution">Budget Distribution</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Terms of contract template"
+							href="#!List/Term">Order Terms Template</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Mode of Payment master"
+							href="#!List/Mode of Payment">Mode of Payment</a>
+					</div>
+				</div>
+			</div>
+
+			<div class="section india-specific">
+				<div class="section-head">Tax Deduction (India)</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tax Deduction at Source (TDS) payments to be made to the goverment"
+							href="#!List/TDS Payment">TDS Payments</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Update with acknowledgement recd from the government"
+							href="#!List/TDS Return Acknowledgement">TDS Return Acknowledgement</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tax deduction (TDS) categories"
+							href="#!List/TDS Category">TDS Category</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tax deduction (TDS) rates for different periods"
+							href="#!List/TDS Rate Chart">TDS Rate Chart</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Challan given to employees/suppliers whose tax (TDS) has been deducted"
+							href="#!List/Form 16A">Form 16A</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "C-Forms received from customers"
+							href="#!List/C-Form">C-Form</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.js b/erpnext/accounts/page/accounts_home/accounts_home.js
new file mode 100644
index 0000000..4551db0
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.js
@@ -0,0 +1,22 @@
+// 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/>.
+
+pscript['onload_accounts-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Accounts', wrapper);
+	if(wn.control_panel.country!='India') {
+		$('.india-specific').toggle(false);
+	}
+}
\ No newline at end of file
diff --git a/erpnext/accounts/page/accounts_home/accounts_home.txt b/erpnext/accounts/page/accounts_home/accounts_home.txt
new file mode 100644
index 0000000..5cbceff
--- /dev/null
+++ b/erpnext/accounts/page/accounts_home/accounts_home.txt
@@ -0,0 +1,28 @@
+# Page, accounts-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:23:08',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:23:08',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Accounts',
+		'name': '__common__',
+		'page_name': u'accounts-home',
+		'standard': u'Yes',
+		'title': u'Accounts Home'
+	},
+
+	# Page, accounts-home
+	{
+		'doctype': 'Page',
+		'name': u'accounts-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/accounts/page/financial_statements/financial_statements.js b/erpnext/accounts/page/financial_statements/financial_statements.js
index da269cb..372f5ae 100644
--- a/erpnext/accounts/page/financial_statements/financial_statements.js
+++ b/erpnext/accounts/page/financial_statements/financial_statements.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Financial Statements'] = function() {
 	
 	// header and toolbar
diff --git a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js
index 0c3f88e..f4da7e8 100644
--- a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js
+++ b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py
index 44daddc..cbb622f 100644
--- a/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py
+++ b/erpnext/accounts/search_criteria/accounts_payable/accounts_payable.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Check mandatory filters
 # ------------------------------------------------------------------
 
diff --git a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js
index f31dc76..efc2ec3 100644
--- a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js
+++ b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py
index e6005a6..5a5f4b4 100644
--- a/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py
+++ b/erpnext/accounts/search_criteria/accounts_receivable/accounts_receivable.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 
 # Check mandatory filters
 #------------------------------
diff --git a/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js b/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
index 00254bc..b5f9ffd 100644
--- a/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
+++ b/erpnext/accounts/search_criteria/bank_clearance_report/bank_clearance_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
   this.filter_fields_dict['Journal Voucher'+FILTER_SEP +'To Posting Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
index 00b905e..f6bec4b 100644
--- a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
+++ b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
index ed74d49..b9a126c 100644
--- a/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
+++ b/erpnext/accounts/search_criteria/bank_reconciliation_statement/bank_reconciliation_statement.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #get company
 company = filter_values.get('company') or get_defaults()['company']
 
diff --git a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js
index 08c9693..5cc644c 100644
--- a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js
+++ b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.add_filter({fieldname:'period', label:'Period', fieldtype:'Select', options:'Monthly'+NEWLINE+'Quarterly'+NEWLINE+'Half Yearly'+NEWLINE+'Annual',report_default:'Quarterly',ignore : 1, parent:'Budget Detail'});
   this.add_filter({fieldname:'company', label:'Company', fieldtype:'Link',  options:'Company', report_default:sys_defaults.company, ignore : 1, parent:'Budget Detail', in_first_page:1});
diff --git a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py
index 9f7c690..7000630 100644
--- a/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py
+++ b/erpnext/accounts/search_criteria/budget_variance_report/budget_variance_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # validate Filters
 flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period'}
 for f in flt_dict:
diff --git a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
index 99e3b05..eb24630 100644
--- a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
+++ b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
diff --git a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
index 0ab2c62..e30fa00 100644
--- a/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
+++ b/erpnext/accounts/search_criteria/business_associate_commission_report/business_associate_commission_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 colwidths[col_idx['Business Associate']] = '200px'
 
 coltypes[col_idx['Average Commission Rate']] = 'Currency'
diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
index 558dc78..8bcfa15 100644
--- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
+++ b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.add_filter({fieldname:'show_group_balance', label:'Show Group Balance', fieldtype:'Select', options:NEWLINE+'Yes'+NEWLINE+'No',ignore : 1, parent:'Account'});
diff --git a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py
index dea1120..4c29803 100644
--- a/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py
+++ b/erpnext/accounts/search_criteria/cash_flow_statement/cash_flow_statement.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 cl = [['Account','Data', '200px'],['Debit/Credit', 'Data', '100px'], ['Group/Ledger', 'Data', '100px'], ['Opening','Data', '100px'],['Closing', 'Data', '100px'],['Inc in Cash','Data','100px']]
 
 for c in cl:
diff --git a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js
index f2d5be3..e098cc3 100644
--- a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js
+++ b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.add_filter({fieldname:'report', label:'Report Type', fieldtype:'Select', options:NEWLINE + 'CENVAT CREDIT ACCOUNT - INPUTS (R.G.23 A - PART II)' + NEWLINE + 'CAPITAL GOODS - INPUTS (R.G. 23 C - PART II)', ignore : 1, parent:'Journal Voucher Detail'})
diff --git a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py
index 1013616..cfdd45f 100644
--- a/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py
+++ b/erpnext/accounts/search_criteria/cenvat_credit___input_or_capital_goods/cenvat_credit___input_or_capital_goods.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Add columns
 # -----------
 row_list = [['Date', 'Date', '150px', '']
diff --git a/erpnext/accounts/search_criteria/collection_report/collection_report.js b/erpnext/accounts/search_criteria/collection_report/collection_report.js
index 8559103..411c4aa 100644
--- a/erpnext/accounts/search_criteria/collection_report/collection_report.js
+++ b/erpnext/accounts/search_criteria/collection_report/collection_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/collection_report/collection_report.py b/erpnext/accounts/search_criteria/collection_report/collection_report.py
index 5d814fc..fe0cb57 100644
--- a/erpnext/accounts/search_criteria/collection_report/collection_report.py
+++ b/erpnext/accounts/search_criteria/collection_report/collection_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #check mandatory
 if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
   msgprint("Please select From Posting Date and To Posting Date ")
diff --git a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
index 29c6ab2..d33a4e8 100644
--- a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
+++ b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
index 01cff8e..e46d548 100644
--- a/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
+++ b/erpnext/accounts/search_criteria/cost_center_wise_expense/cost_center_wise_expense.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Add columns
 # -----------
 row_list = [['Cost Center','Data','160px'],
diff --git a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js
index fffb263..b3f1a09 100644
--- a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js
+++ b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   //to hide all filters
diff --git a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py
index ca318c7..a2fa8ed 100644
--- a/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py
+++ b/erpnext/accounts/search_criteria/creditors_ledger/creditors_ledger.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #get company
 company = filter_values.get('company') or get_defaults()['company']
 
diff --git a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js
index fffb263..b3f1a09 100644
--- a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js
+++ b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   //to hide all filters
diff --git a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py
index ca318c7..a2fa8ed 100644
--- a/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py
+++ b/erpnext/accounts/search_criteria/debtors_ledger/debtors_ledger.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #get company
 company = filter_values.get('company') or get_defaults()['company']
 
diff --git a/erpnext/accounts/search_criteria/general_ledger/general_ledger.js b/erpnext/accounts/search_criteria/general_ledger/general_ledger.js
index 7140389..3d6505f 100644
--- a/erpnext/accounts/search_criteria/general_ledger/general_ledger.js
+++ b/erpnext/accounts/search_criteria/general_ledger/general_ledger.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.mytabs.tabs['Select Columns'].hide();
   //to hide all filters
diff --git a/erpnext/accounts/search_criteria/general_ledger/general_ledger.py b/erpnext/accounts/search_criteria/general_ledger/general_ledger.py
index 8c855cf..c78b584 100644
--- a/erpnext/accounts/search_criteria/general_ledger/general_ledger.py
+++ b/erpnext/accounts/search_criteria/general_ledger/general_ledger.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #get company letter head
 #---------------------------------------------------------------------
 l_head = sql("select content from `tabLetter Head` where ifnull(is_default, 0) = 1 and ifnull(disabled, 0) = 0")
diff --git a/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
index e73b4a8..ecd5057 100644
--- a/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
+++ b/erpnext/accounts/search_criteria/itemwise_purchase_register/itemwise_purchase_register.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   filter_list = ['From Voucher Date', 'To Voucher Date', 'Credit To', 'Is Opening', 'From Posting Date', 'To Posting Date']
diff --git a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
index b2bc8a9..d243717 100755
--- a/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
+++ b/erpnext/accounts/search_criteria/itemwise_sales_register/itemwise_sales_register.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   filter_list = ['From Voucher Date', 'To Voucher Date', 'Debit To', 'From Posting Date', 'To Posting Date']
diff --git a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
index 4cb3d2b..d25139c 100644
--- a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
+++ b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
index e749d1b..68f0167 100644
--- a/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
+++ b/erpnext/accounts/search_criteria/lease_agreement_list/lease_agreement_list.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 data =[
 		['Agreement No.','Data','100px',''],
 		['Lessee Name','Data','300px',''],
diff --git a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
+++ b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
index 8e5b8ad..692f6f8 100644
--- a/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
+++ b/erpnext/accounts/search_criteria/lease_monthly_future_installment_inflows/lease_monthly_future_installment_inflows.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 data =[
 		['Month','Data','100px',''],
 		['Year','Data','100px',''],
diff --git a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
+++ b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
index 869d46a..debb3ca 100644
--- a/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
+++ b/erpnext/accounts/search_criteria/lease_over_due_list/lease_over_due_list.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 data =[
 		['Agreement No.','Data','100px',''],
 		['Lessee Name','Data','300px',''],
diff --git a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
+++ b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
index 5e16489..0723760 100644
--- a/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
+++ b/erpnext/accounts/search_criteria/lease_overdue_age_wise/lease_overdue_age_wise.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 data =[
 		['Lessee Name','Data','300px',''],
 		['Below 30 Days','Currency','120px',''],
diff --git a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
index 4cb3d2b..d25139c 100644
--- a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
+++ b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
index 8e5b8ad..692f6f8 100644
--- a/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
+++ b/erpnext/accounts/search_criteria/lease_receipt_summary_month_wise/lease_receipt_summary_month_wise.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 data =[
 		['Month','Data','100px',''],
 		['Year','Data','100px',''],
diff --git a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
index 4cb3d2b..d25139c 100644
--- a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
+++ b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
index b84ff9f..2d13808 100644
--- a/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
+++ b/erpnext/accounts/search_criteria/lease_receipts_client_wise/lease_receipts_client_wise.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 data =[
 		['Lessee Name','Data','300px',''],
 		['Amount','Currency','120px','']
diff --git a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
index 2d89611..7d8152b 100644
--- a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
+++ b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
index 0163ba6..8c1842a 100644
--- a/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
+++ b/erpnext/accounts/search_criteria/lease_yearly_future_installment_inflows/lease_yearly_future_installment_inflows.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 data =[
 		['Year','Data','100px',''],
 		['Amount','Currency','120px','']
diff --git a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js
index d5b5d4d..2fc1c9c 100644
--- a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js
+++ b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   flds = ['ID','Owner','Cost Center','From Posting Date', 'To Posting Date', 'Against Voucher','Voucher Type','Voucher No','Is Cancelled','Is Opening','Remarks', 'From Aging Date', 'To Aging Date', 'Company']
   for(i=0;i<flds.length;i++){
diff --git a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py
index 9811b28..d723f70 100644
--- a/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py
+++ b/erpnext/accounts/search_criteria/monthly_ledger_summary_report/monthly_ledger_summary_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if not filter_values['account']:
   msgprint("Please Enter filter value for Account")
   raise Exception
diff --git a/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py b/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
index f92f72c..fd7ce58 100644
--- a/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
+++ b/erpnext/accounts/search_criteria/payment_receipt_report/payment_receipt_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if not filter_values.get('posting_date'):
   msgprint("Enter From Posting Date.")
   raise Exception
diff --git a/erpnext/accounts/search_criteria/payment_report/payment_report.js b/erpnext/accounts/search_criteria/payment_report/payment_report.js
index 96f7079..6571b69 100644
--- a/erpnext/accounts/search_criteria/payment_report/payment_report.js
+++ b/erpnext/accounts/search_criteria/payment_report/payment_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/payment_report/payment_report.py b/erpnext/accounts/search_criteria/payment_report/payment_report.py
index 99ce3e0..8252103 100644
--- a/erpnext/accounts/search_criteria/payment_report/payment_report.py
+++ b/erpnext/accounts/search_criteria/payment_report/payment_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #check mendatory
 if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
   msgprint("Please select From Posting Date and To Posting Date in 'Set Filters' section")
diff --git a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js
index 3771af8..f96e933 100644
--- a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js
+++ b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   
diff --git a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py
index 07de853..3cac167 100644
--- a/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py
+++ b/erpnext/accounts/search_criteria/progressive_total_excise_duty/progressive_total_excise_duty.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Add columns
 # -----------
 row_list = [['Date', 'Date', '150px', '']
diff --git a/erpnext/accounts/search_criteria/purchase_register/purchase_register.py b/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
index e955815..eb61af4 100644
--- a/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
+++ b/erpnext/accounts/search_criteria/purchase_register/purchase_register.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # add expense head columns
 expense_acc = [c[0] for c in sql("""select distinct expense_head 
 									from `tabPV Detail` 
diff --git a/erpnext/accounts/search_criteria/sales_register/sales_register.js b/erpnext/accounts/search_criteria/sales_register/sales_register.js
index 826fb4d..669d76d 100644
--- a/erpnext/accounts/search_criteria/sales_register/sales_register.js
+++ b/erpnext/accounts/search_criteria/sales_register/sales_register.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
  
   this.filter_fields_dict['Receivable Voucher'+FILTER_SEP +'From Posting Date'].df['report_default'] = sys_defaults.year_start_date;
diff --git a/erpnext/accounts/search_criteria/sales_register/sales_register.py b/erpnext/accounts/search_criteria/sales_register/sales_register.py
index 2cd1d4b..8bb6903 100644
--- a/erpnext/accounts/search_criteria/sales_register/sales_register.py
+++ b/erpnext/accounts/search_criteria/sales_register/sales_register.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # add additional columns
 
 cl = [c[0] for c in sql("""select distinct account_head 
diff --git a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js
index c87a927..7c4c331 100644
--- a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js
+++ b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.add_filter({fieldname:'main_acc_head', label:'Main Account Head', fieldtype:'Link', options:'Account', ignore : 1, parent:'Journal Voucher Detail'});
diff --git a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py
index b10307b..78b992c 100644
--- a/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py
+++ b/erpnext/accounts/search_criteria/service_tax_credit_account___inputs/service_tax_credit_account___inputs.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Add columns
 # -----------
 row_list = [['Date', 'Date', '150px', '']
diff --git a/erpnext/accounts/search_criteria/tds_return/tds_return.js b/erpnext/accounts/search_criteria/tds_return/tds_return.js
index 95f03a0..17cc2b3 100644
--- a/erpnext/accounts/search_criteria/tds_return/tds_return.js
+++ b/erpnext/accounts/search_criteria/tds_return/tds_return.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/tds_return/tds_return.py b/erpnext/accounts/search_criteria/tds_return/tds_return.py
index 4ee2770..24e7308 100644
--- a/erpnext/accounts/search_criteria/tds_return/tds_return.py
+++ b/erpnext/accounts/search_criteria/tds_return/tds_return.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if not filter_values.get('tds_category'):
   msgprint("Please enter TDS Category")
   raise Exception
diff --git a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js
index e1c127b..72fd4b5 100644
--- a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js
+++ b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py
index 752c002..c3f819f 100644
--- a/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py
+++ b/erpnext/accounts/search_criteria/total_amout_collection_for_a_period___customerwise/total_amout_collection_for_a_period___customerwise.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # columns
 colnames[0] = 'Account'
 col_idx['Account'] = 0
diff --git a/erpnext/accounts/search_criteria/trial_balance/trial_balance.js b/erpnext/accounts/search_criteria/trial_balance/trial_balance.js
index 7cfe459..9a26ea2 100644
--- a/erpnext/accounts/search_criteria/trial_balance/trial_balance.js
+++ b/erpnext/accounts/search_criteria/trial_balance/trial_balance.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 	this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
index 994a5b8..34a828a 100644
--- a/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
+++ b/erpnext/accounts/search_criteria/trial_balance/trial_balance.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Columns
 #----------
 cl = [['Account','Data', '200px'],['Debit/Credit', 'Data', '100px'], ['Group/Ledger', 'Data', '100px'], ['Is PL Account', 'Data', '100px'], ['Opening (Dr)','Data', '100px'], ['Opening (Cr)','Data', '100px'],['Debit', 'Data', '100px'],['Credit', 'Data', '100px'],['Closing (Dr)', 'Data', '100px'],['Closing (Cr)', 'Data', '100px']]
diff --git a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
index a89fa86..41ead1c 100644
--- a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
+++ b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
index 91e90f2..4dbfb52 100644
--- a/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
+++ b/erpnext/accounts/search_criteria/voucher_wise_tax_details/voucher_wise_tax_details.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if filter_values.get('based_on') == 'Sales Invoice':
   based_on_dt = 'Receivable Voucher'
 else:
diff --git a/erpnext/accounts/utils/__init__.py b/erpnext/accounts/utils/__init__.py
index e8ca13e..f98c79e 100644
--- a/erpnext/accounts/utils/__init__.py
+++ b/erpnext/accounts/utils/__init__.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 from webnotes.model.doc import make_autoname, Document, addchild
 # Posts JV
 
diff --git a/erpnext/analysis/doctype/mis_control/mis_control.py b/erpnext/analysis/doctype/mis_control/mis_control.py
index 5af36e9..11e48f4 100644
--- a/erpnext/analysis/doctype/mis_control/mis_control.py
+++ b/erpnext/analysis/doctype/mis_control/mis_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/analysis/doctype/ta_control/ta_control.py b/erpnext/analysis/doctype/ta_control/ta_control.py
index 87754ae..f06394c 100755
--- a/erpnext/analysis/doctype/ta_control/ta_control.py
+++ b/erpnext/analysis/doctype/ta_control/ta_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
index 68aa856..bc33d33 100644
--- a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
+++ b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 
 report.customize_filters = function() {
diff --git a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
index c485497..8a7d8c4 100644
--- a/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
+++ b/erpnext/analysis/search_criteria/monthly_transaction_summary/monthly_transaction_summary.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if filter_values.get('period'):
   period_values = filter_values.get('period').split(NEWLINE)
 
diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js
index 9426a23..a25215c 100644
--- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js
+++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
index 42a7c5c..ad57181 100644
--- a/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
+++ b/erpnext/analysis/search_criteria/trend_analyzer/trend_analyzer.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # ********************************************* INITIALIZATION *******************************************
 out = []
 
@@ -105,7 +121,7 @@
 # Territory
 if territory or based_on == 'Territory':
 	add_tab += ' ,`tabTerritory` t11 '
-	add_cond += ' AND t1.territory = t11.name AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s')
+	add_cond += ' AND t1.territory = t11.name and (t11.name = "%s" or t11.name IN (SELECT t12.name FROM `tabTerritory` t12,`tabTerritory` t13 WHERE t12.lft BETWEEN t13.lft and t13.rgt and t12.docstatus !=2 and ifnull(t12.is_group,"No") = "No" and t13.name = "%s"))' % (based_on != 'Territory' and territory or '%(value)s', based_on != 'Territory' and territory or '%(value)s')
 
 # Supplier
 if supplier or based_on == 'Supplier':
diff --git a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
index dd99d28..febd6a3 100644
--- a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
+++ b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.mytabs.items['Select Columns'].hide()
   this.hide_all_filters();
diff --git a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
index 22d6f00..99465a8 100644
--- a/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
+++ b/erpnext/analysis/search_criteria/yearly_transaction_summary/yearly_transaction_summary.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if not filter_values.get('from_fiscal_year'):
   msgprint("Please Select From Fiscal Year")
   raise Exception
diff --git a/erpnext/buying/doctype/indent/indent.js b/erpnext/buying/doctype/indent/indent.js
index 28c5a5a..570e06c 100644
--- a/erpnext/buying/doctype/indent/indent.js
+++ b/erpnext/buying/doctype/indent/indent.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.tname = "Indent Detail";
 cur_frm.cscript.fname = "indent_details";
 
diff --git a/erpnext/buying/doctype/indent/indent.py b/erpnext/buying/doctype/indent/indent.py
index 148d50d..c601c91 100644
--- a/erpnext/buying/doctype/indent/indent.py
+++ b/erpnext/buying/doctype/indent/indent.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.js b/erpnext/buying/doctype/purchase_common/purchase_common.js
index b55cd8f..52f8e53 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.js
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Preset
 // ------
 // cur_frm.cscript.tname - Details table name
diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py
index 0f272ce..16afb02 100644
--- a/erpnext/buying/doctype/purchase_common/purchase_common.py
+++ b/erpnext/buying/doctype/purchase_common/purchase_common.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 1721a7a..0a6c547 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.tname = "PO Detail";
 cur_frm.cscript.fname = "po_details";
 cur_frm.cscript.other_fname = "purchase_tax_details";
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.py b/erpnext/buying/doctype/purchase_order/purchase_order.py
index 0429d1b..efa0524 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.py
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js
index d9735b6..f0b4ae2 100644
--- a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js
+++ b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // 
 
 //--------- ONLOAD -------------
diff --git a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py
index 6cda4d0..d92b594 100644
--- a/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py
+++ b/erpnext/buying/doctype/purchase_other_charges/purchase_other_charges.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js
index a0ee1dc..6591a70 100644
--- a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js
+++ b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.item_code = function(doc, cdt, cdn) {
 	if (doc.item_code)
 		get_server_fields('get_purchase_receipt_item_details','','',doc,cdt,cdn,1);
diff --git a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py
index 58ad248..d95ab7a 100644
--- a/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py
+++ b/erpnext/buying/doctype/qa_inspection_report/qa_inspection_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/buying/doctype/supplier/supplier.js b/erpnext/buying/doctype/supplier/supplier.js
index 8043a96..41889af 100644
--- a/erpnext/buying/doctype/supplier/supplier.js
+++ b/erpnext/buying/doctype/supplier/supplier.js
@@ -1,3 +1,19 @@
+// 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(Contact Control)
 
 cur_frm.cscript.onload = function(doc,dt,dn){
diff --git a/erpnext/buying/doctype/supplier/supplier.py b/erpnext/buying/doctype/supplier/supplier.py
index d43900b..4bc04bb 100644
--- a/erpnext/buying/doctype/supplier/supplier.py
+++ b/erpnext/buying/doctype/supplier/supplier.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/buying/page/buying_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/buying/page/buying_home/__init__.py
diff --git a/erpnext/buying/page/buying_home/buying_home.html b/erpnext/buying/page/buying_home/buying_home.html
new file mode 100644
index 0000000..7f0e906
--- /dev/null
+++ b/erpnext/buying/page/buying_home/buying_home.html
@@ -0,0 +1,64 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Buying</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a href="#!List/Purchase Requisition">Purchase Requisition</a></h4>
+			<p class="help">Request for purchase</p>
+			<h4><a href="#!List/Purchase Order">Purchase Order</a></h4>
+			<p class="help">Purchase Orders given to Suppliers</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!List/Supplier">Supplier</a></h4>
+			<p class="help">Supplier Master</p>
+			<h4><a href="#!List/Item">Item</a></h4>
+			<p class="help">Item Master</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Setup</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tax and charges structure master"
+							href="#!List/Purchase Other Charges">Purchase Other Charges</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Supplier classification"
+							href="#!List/Supplier Type">Supplier Type</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Helper for managing return of goods (sales or purchase)"
+							href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Purchase Returns</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Terms of contract template"
+							href="#!List/Term">Order Terms Template</a>
+					</div>
+				</div>
+			</div>
+			<div class="section">
+				<div class="section-head">Tools</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
+							href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
+					</div>
+				</div>
+			</div>
+
+		</div>
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/buying/page/buying_home/buying_home.js b/erpnext/buying/page/buying_home/buying_home.js
new file mode 100644
index 0000000..1f47b84
--- /dev/null
+++ b/erpnext/buying/page/buying_home/buying_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_buying-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Buying', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/buying/page/buying_home/buying_home.txt b/erpnext/buying/page/buying_home/buying_home.txt
new file mode 100644
index 0000000..d2d2acc
--- /dev/null
+++ b/erpnext/buying/page/buying_home/buying_home.txt
@@ -0,0 +1,28 @@
+# Page, buying-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:22:54',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:22:54',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Buying',
+		'name': '__common__',
+		'page_name': u'buying-home',
+		'standard': u'Yes',
+		'title': u'Buying Home'
+	},
+
+	# Page, buying-home
+	{
+		'doctype': 'Page',
+		'name': u'buying-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js b/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
index 66a1e82..603f915 100644
--- a/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
+++ b/erpnext/buying/search_criteria/itemwise_purchase_details/itemwise_purchase_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Purchase Order'+FILTER_SEP +'From PO Date'].df['report_default'] = sys_defaults.year_start_date;
   this.filter_fields_dict['Purchase Order'+FILTER_SEP +'To PO Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js b/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js
index 426b8bc..641c294 100644
--- a/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js
+++ b/erpnext/buying/search_criteria/itemwise_receipt_details/itemwise_receipt_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'From Transaction Date'].df['report_default'] = sys_defaults.year_start_date;
   this.filter_fields_dict['Purchase Receipt'+FILTER_SEP +'To Transaction Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js b/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
index 79ebc20..de2c037 100644
--- a/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
+++ b/erpnext/buying/search_criteria/pending_po_items_to_bill/pending_po_items_to_bill.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
   this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
index 79ebc20..de2c037 100644
--- a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
+++ b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
   this.filter_fields_dict['Purchase Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
index 3b94497..066882b 100644
--- a/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
+++ b/erpnext/buying/search_criteria/pending_po_items_to_receive/pending_po_items_to_receive.py
@@ -1,2 +1,18 @@
+# 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/>.
+
 colwidths[col_idx['Pending Quantity To Receive']] = '200px'
 colwidths[col_idx['Pending Amount To Receive']] = '200px'
diff --git a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
index 6aba209..ab469cd 100644
--- a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
+++ b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   this.hide_all_filters();
diff --git a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
index 7708fbb..8ecf88c 100644
--- a/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
+++ b/erpnext/buying/search_criteria/purchase_in_transit/purchase_in_transit.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #check mendatory
 if not filter_values.get('posting_date') or not filter_values.get('posting_date1'):
   msgprint("Please select From Posting Date and To Posting Date in 'Set Filters' section")
diff --git a/erpnext/home/__init__.py b/erpnext/home/__init__.py
index 5f9c447..2cca85a 100644
--- a/erpnext/home/__init__.py
+++ b/erpnext/home/__init__.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes import msgprint
 
@@ -42,7 +58,7 @@
 	"makes a new Feed record"
 	#msgprint(subject)
 	from webnotes.model.doc import Document
-	from webnotes.utils import get_full_name
+	from webnotes.utils import get_fullname
 
 	if feedtype in ('Login', 'Comment', 'Assignment'):
 		# delete old login, comment feed
@@ -61,7 +77,7 @@
 	f.doc_name = name
 	f.subject = subject
 	f.color = color
-	f.full_name = get_full_name(owner)
+	f.full_name = get_fullname(owner)
 	f.save()
 
 def update_feed(doc, method=None):   
diff --git a/erpnext/home/doctype/company_control/company_control.py b/erpnext/home/doctype/company_control/company_control.py
index 9c055a7..63f8b71 100644
--- a/erpnext/home/doctype/company_control/company_control.py
+++ b/erpnext/home/doctype/company_control/company_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/home/doctype/company_control/company_control.txt b/erpnext/home/doctype/company_control/company_control.txt
index b11c7da..a83f4dd 100644
--- a/erpnext/home/doctype/company_control/company_control.txt
+++ b/erpnext/home/doctype/company_control/company_control.txt
@@ -18,7 +18,6 @@
 		'module': 'Home',
 		'name': '__common__',
 		'section_style': 'Simple',
-		'server_code': '\n\n\t# Update roles of given user\n\tdef update_roles(self,arg):\n\t\targ = eval(arg)\n\t\tsql("delete from `tabUserRole` where parenttype=\'Profile\' and parent =\'%s\'" % (cstr(arg[\'usr\'])))\n\t\trole_list = arg[\'role_list\'].split(\',\')\n\t\tmsgprint(sql("select role from tabUserRole where parent = \'%s\'" % cstr(arg[\'usr\'])))\n\t\tmsgprint(role_list)\n\t\tfor r in role_list:\n\t\t\tpr=Document(\'UserRole\')\n\t\t\tpr.parent = arg[\'usr\']\n\t\t\tpr.parenttype = \'Profile\'\n\t\t\tpr.role = r\n\t\t\tpr.parentfield = \'userroles\'\n\t\t\tpr.save(1)\n\t\tmsgprint(sql("select role from tabUserRole where parent = \'%s\'" % cstr(arg[\'usr\'])))\n\n\n  # Create New Profile\n  # ====================\n\tdef create_new_profile(self, arg):\n\t\tp = Document(\'Profile\')\n\t\tp.first_name = arg.get(\'first_name\') or arg.get(\'email_id\')\n\t\tp.last_name = arg.get(\'last_name\')\n\t\tp.email = arg.get(\'email_id\')\n\t\tp.name = arg.get(\'email_id\')\n\t\tp.user_type = arg.get(\'user_type\') or \'System User\'\n\t\tp.enabled = 0\t\n\t\tp.save(new=1)\n\t\tp_obj = get_obj(\'Profile\', p.name)\n\t\tp_obj.on_update()',
 		'server_code_error': ' ',
 		'version': 13
 	},
diff --git a/erpnext/home/doctype/feed/feed.py b/erpnext/home/doctype/feed/feed.py
index dca0c35..4586f62 100644
--- a/erpnext/home/doctype/feed/feed.py
+++ b/erpnext/home/doctype/feed/feed.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/home/doctype/home_control/home_control.py b/erpnext/home/doctype/home_control/home_control.py
index 1999345..c88cf9e 100644
--- a/erpnext/home/doctype/home_control/home_control.py
+++ b/erpnext/home/doctype/home_control/home_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/home/doctype/widget_control/widget_control.py b/erpnext/home/doctype/widget_control/widget_control.py
index d6bb9d1..5c2762c 100644
--- a/erpnext/home/doctype/widget_control/widget_control.py
+++ b/erpnext/home/doctype/widget_control/widget_control.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 from webnotes.utils import nowdate
diff --git a/erpnext/home/page/dashboard/dashboard.js b/erpnext/home/page/dashboard/dashboard.js
index b622808..1d01ee9 100644
--- a/erpnext/home/page/dashboard/dashboard.js
+++ b/erpnext/home/page/dashboard/dashboard.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript.onload_dashboard = function() {
 	// load jqplot
 	wn.require('lib/css/jqplot.css');
diff --git a/erpnext/home/page/dashboard/dashboard.py b/erpnext/home/page/dashboard/dashboard.py
index e8f11fb..29f1502 100644
--- a/erpnext/home/page/dashboard/dashboard.py
+++ b/erpnext/home/page/dashboard/dashboard.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 dashboards = [
 	{
 		'type': 'account',
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/home/page/desktop/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/home/page/desktop/__init__.py
diff --git a/erpnext/home/page/desktop/desktop.css b/erpnext/home/page/desktop/desktop.css
new file mode 100644
index 0000000..0aede60
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.css
@@ -0,0 +1,101 @@
+/* Sprite CSS */
+.sprite-account{ background-position: 0 0; width: 32px; height: 40px; } 
+.sprite-buying{ background-position: 0 -90px; width: 40px; height: 40px; } 
+.sprite-calendar{ background-position: 0 -180px; width: 35px; height: 40px; } 
+.sprite-dashboard{ background-position: 0 -270px; width: 40px; height: 29px; } 
+.sprite-feed{ background-position: 0 -349px; width: 32px; height: 40px; } 
+.sprite-hr{ background-position: 0 -439px; width: 40px; height: 32px; } 
+.sprite-kb{ background-position: 0 -521px; width: 24px; height: 39px; } 
+.sprite-messages{ background-position: 0 -610px; width: 40px; height: 26px; } 
+.sprite-production{ background-position: 0 -686px; width: 40px; height: 33px; } 
+.sprite-project{ background-position: 0 -769px; width: 40px; height: 22px; } 
+.sprite-report{ background-position: 0 -841px; width: 29px; height: 40px; } 
+.sprite-selling{ background-position: 0 -931px; width: 34px; height: 40px; } 
+.sprite-setting{ background-position: 0 -1021px; width: 37px; height: 40px; } 
+.sprite-stock{ background-position: 0 -1111px; width: 34px; height: 39px; } 
+.sprite-support{ background-position: 0 -1200px; width: 40px; height: 40px; } 
+.sprite-todo{ background-position: 0 -1290px; width: 40px; height: 34px; } 
+.sprite-website{ background-position: 0 -1374px; width: 40px; height: 40px; } 
+
+.sprite-image { background-image: url("images/sprite-desktop.png"); }
+
+
+.sprite-account{ margin-top: 8px; margin-left: 12px; } 
+.sprite-selling{ margin-top: 8px; margin-left: 12px; } 
+.sprite-stock{ margin-top: 8px; margin-left: 8px; } 
+.sprite-buying{ margin-top: 8px; margin-left: 8px; } 
+.sprite-support{ margin-top: 8px; margin-left: 8px; } 
+.sprite-hr{ margin-top: 12px; margin-left: 8px; } 
+.sprite-project{ margin-top: 16px; margin-left: 8px; } 
+.sprite-production{ margin-top: 10px; margin-left: 8px; } 
+.sprite-website{ margin-top: 8px; margin-left: 8px; } 
+.sprite-setting{ margin-top: 8px; margin-left: 8px; } 
+.sprite-dashboard{ margin-top: 14px; margin-left: 8px; } 
+.sprite-report{ margin-top: 8px; margin-left: 14px; } 
+
+.sprite-messages{ margin-top: 14px; margin-left: 8px; } 
+.sprite-todo{ margin-top: 10px; margin-left: 10px; } 
+.sprite-calendar{ margin-top: 8px; margin-left: 10px; } 
+.sprite-kb{ margin-top: 8px; margin-left: 16px; } 
+.sprite-feed{ margin-top: 8px; margin-left: 14px; } 
+
+.case-border {
+	border-radius: 10px;
+	width: 56px;
+	height: 56px;
+	border: 4px solid white;
+	box-shadow: 0 0 10px 1px black;
+	margin: auto;
+}
+
+.case-wrapper {
+	margin: 24px;
+	float: left;
+	width: 100px;
+	height: 100px;
+}
+
+.case-label {
+	color: white;
+	/*font-size: 12px;*/
+	padding-top: 10px;
+	text-align: center;
+	text-shadow: 1px 1px 5px #000, 3px 3px 5px #000;
+}
+
+/* Hover and click effects */
+.case-border:hover, .circle:hover {
+	box-shadow: 0 0 2px 0px black, 0 0 10px 1px white;
+}
+
+.case-border:active, .case-border:focus, .circle:active, .circle:focus {
+	transform: scale(0.98, 0.98);
+	-ms-transform: scale(0.98, 0.98); /* IE 9 */
+	-webkit-transform: scale(0.98, 0.98); /* Safari and Chrome */
+	-o-transform: scale(0.98, 0.98); /* Opera */
+	-moz-transform: scale(0.98, 0.98); /* Firefox */
+}
+
+.circle {
+	border-radius: 100%;
+	height: 15px;
+	min-width: 15px;
+	background: #B00D07;
+	padding: 3px;
+	z-index: 2;
+	float: right;
+	margin-top: -10px;
+	margin-right: 10px;
+	border: 2px solid white;
+	box-shadow: 0 0 10px 1px black;
+}
+
+.circle-text {
+	color: white;
+	vertical-align: middle;
+	text-align: center;
+	display: inline-block;
+	margin-top: -3px;
+	text-shadow: 1px 1px 5px #000;
+}
+
diff --git a/erpnext/home/page/desktop/desktop.html b/erpnext/home/page/desktop/desktop.html
new file mode 100644
index 0000000..43ee423
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.html
@@ -0,0 +1,6 @@
+<div style="min-height: 500px; background: None; text-align: center;
+	margin: 0px auto;">	
+	<div id="icon-grid">
+	</div>
+</div>
+<div style="clear: both"></div>
diff --git a/erpnext/home/page/desktop/desktop.js b/erpnext/home/page/desktop/desktop.js
new file mode 100644
index 0000000..e2a8d53
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.js
@@ -0,0 +1,92 @@
+wn.provide('erpnext.desktop');
+
+erpnext.desktop.gradient = "<style>\
+	.case-%(name)s {\
+		background: %(start)s; /* Old browsers */\
+		background: -moz-radial-gradient(center, ellipse cover,  %(start)s 0%, %(middle)s 44%, %(end)s 100%); /* FF3.6+ */\
+		background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,%(start)s), color-stop(44%,%(middle)s), color-stop(100%,%(end)s)); /* Chrome,Safari4+ */\
+		background: -webkit-radial-gradient(center, ellipse cover,  %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* Chrome10+,Safari5.1+ */\
+		background: -o-radial-gradient(center, ellipse cover,  %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* Opera 12+ */\
+		background: -ms-radial-gradient(center, ellipse cover,  %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* IE10+ */\
+		background: radial-gradient(center, ellipse cover,  %(start)s 0%,%(middle)s 44%,%(end)s 100%); /* W3C */\
+	}\
+	</style>"
+
+erpnext.desktop.refresh = function() {
+	erpnext.desktop.add_classes();
+	erpnext.desktop.render();
+}
+
+erpnext.desktop.add_classes = function() {
+	var classes = [
+		{ name: 'red', start: '#A90329', middle: '#8F0222',	end: '#6D0019' },
+		{ name: 'brown', start: '#723e02', middle: '#633501', end: '#4a2700' },
+		{ name: 'green', start: '#4b5602', middle: '#3f4901', end: '#313800' },
+		{ name: 'blue', start: '#026584', middle: '#025770', end: '#004256' },
+		{ name: 'yellow', start: '#be7902', middle: '#a66a02', end: '#865500' },
+		{ name: 'purple', start: '#4d017d', middle: '#410169', end: '#310050' },
+		{ name: 'ocean', start: '#02a47e', middle: '#018d6c', end: '#006a51' },
+		{ name: 'pink', start: '#a40281', middle: '#8d016e', end: '#6a0053' },
+		{ name: 'grey', start: '#545454', middle: '#484848', end: '#363636' },
+		{ name: 'dark-red', start: '#68021a', middle: '#590116', end: '#440010' },
+		{ name: 'leaf-green', start: '#b0a400', middle: '#968c00', end: '#726a00' },
+		//{ name: 'dark-blue', start: '#023bae', middle: '#013295', end: '#002672' },
+		{ name: 'bright-green', start: '#03ad1f', middle: '#02941a', end: '#007213' },
+		{ name: 'bright-yellow', start: '#ffd65e', middle: '#febf04', end: '#ed9017' },
+		{ name: 'peacock', start: '#026584', middle: '#026584', end: '#322476' },
+		{ name: 'violet', start: '#50448e', middle: '#473b7f', end: '#3a3169' },
+		{ name: 'ultra-dark-green', start: '#014333', middle: '#01372b', end: '#002a20' },
+	];
+	$.each(classes, function(i, v) {
+		$(repl(erpnext.desktop.gradient, v)).appendTo('head');
+	});
+}
+
+erpnext.desktop.render = function() {
+	var icons = [
+		{ gradient: 'brown', sprite: 'feed', label: 'Activity', link: '#!Event Updates' },
+		{ gradient: 'blue', sprite: 'account', label: 'Accounts', link: '#!accounts-home' },
+		{ gradient: 'green', sprite: 'selling', label: 'Selling', link: '#!selling-home' },
+		{ gradient: 'yellow', sprite: 'stock', label: 'Stock', link: '#!stock-home' },
+		{ gradient: 'red', sprite: 'buying', label: 'Buying', link: '#!buying-home' },
+		{ gradient: 'purple', sprite: 'support', label: 'Support', link: '#!support-home' },
+		{ gradient: 'ocean', sprite: 'hr', label: 'Human<br />Resources', link: '#!hr-home' },
+		{ gradient: 'violet', sprite: 'project', label: 'Projects', link: '#!projects-home' },
+		{ gradient: 'dark-red', sprite: 'production', label: 'Production', link: '#!production-home' },
+		{ gradient: 'leaf-green', sprite: 'website', label: 'Website', link: '#!website-home' },
+		{ gradient: 'grey', sprite: 'setting', label: 'Settings', link: '#!Setup' },
+		{ gradient: 'bright-green', sprite: 'dashboard', label: 'Dashboard', link: '#!dashboard' },
+		//{ gradient: 'dark-blue', sprite: 'report', label: 'Report' },
+		{ gradient: 'pink', sprite: 'messages', label: 'Messages', link: '#!messages' },
+		{ gradient: 'bright-yellow', sprite: 'todo', label: 'To Do', link: '#!todo' },
+		{ gradient: 'peacock', sprite: 'calendar', label: 'Calendar', link: '#!calendar' },
+		{ gradient: 'ultra-dark-green', sprite: 'kb', label: 'Knowledge<br />Base', link: '#!questions' },
+	]
+
+	$.each(icons, function(i, v) {
+		var icon_case = $('#icon-grid').append(repl('\
+			<div id="%(sprite)s" class="case-wrapper"><a href="%(link)s">\
+				<div class="case-border case-%(gradient)s">\
+					<div class="sprite-image sprite-%(sprite)s"></div>\
+				</div></a>\
+				<div class="case-label">%(label)s</div>\
+			</div>', v));
+	});
+
+	erpnext.desktop.show_pending_notifications();
+
+}
+
+erpnext.desktop.show_pending_notifications = function() {
+	$('#messages a:first').prepend('<div id="msg_count" class="circle" title="Unread Messages">\
+		<span class="circle-text"></span></div>');
+	$('#msg_count').toggle(false);
+	update_messages();
+
+}
+
+pscript.onload_desktop = function() {
+	// load desktop
+	erpnext.desktop.refresh();
+}
+
diff --git a/erpnext/home/page/desktop/desktop.txt b/erpnext/home/page/desktop/desktop.txt
new file mode 100644
index 0000000..f1918b9
--- /dev/null
+++ b/erpnext/home/page/desktop/desktop.txt
@@ -0,0 +1,28 @@
+# Page, desktop
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-24 11:37:43',
+		'docstatus': 0,
+		'modified': '2012-02-24 11:37:43',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Home',
+		'name': '__common__',
+		'page_name': u'desktop',
+		'standard': u'Yes',
+		'title': u'Desktop'
+	},
+
+	# Page, desktop
+	{
+		'doctype': 'Page',
+		'name': u'desktop'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/home/page/event_updates/complete_registration.js b/erpnext/home/page/event_updates/complete_registration.js
index e7e0574..8f7eed3 100644
--- a/erpnext/home/page/event_updates/complete_registration.js
+++ b/erpnext/home/page/event_updates/complete_registration.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // complete my company registration
 // --------------------------------
 pscript.complete_registration = function(is_complete, profile) {
diff --git a/erpnext/home/page/event_updates/event_updates.js b/erpnext/home/page/event_updates/event_updates.js
index 15f84d9..d86a1d8 100644
--- a/erpnext/home/page/event_updates/event_updates.js
+++ b/erpnext/home/page/event_updates/event_updates.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Event Updates'] = function() {
 	if(user=='Guest') {
 		loadpage('Login Page');
@@ -13,15 +29,15 @@
 // ==================================
 
 pscript.home_make_body = function() {
-	var wrapper = page_body.pages['Event Updates'];
+	var wrapper = wn.pages['Event Updates'];
 	
 	// body
-	wrapper.main_tab = make_table(wrapper,1,2,'100%',['70%','30%']);
-	$y(wrapper.main_tab, {tableLayout:'fixed'});
-
-	wrapper.body = $a($td(wrapper.main_tab, 0, 0), 'div', 'layout_wrapper');
-
+	$(wrapper).addClass('layout-wrapper').addClass('layout-wrapper-background')
+	
+	wrapper.body = $a(wrapper, 'div', 'layout-main-section');
 	wrapper.head = $a(wrapper.body, 'div');
+	wrapper.side_section =$a(wrapper, 'div', 'layout-side-section');
+	$a(wrapper, 'div', '', {clear:'both'});
 	
 	wrapper.banner_area = $a(wrapper.head, 'div');
 
@@ -31,7 +47,7 @@
 // ==================================
 
 pscript.home_set_banner = function(wrapper) {
-	var wrapper = page_body.pages['Event Updates'];
+	var wrapper = wn.pages['Event Updates'];
 	var cp = wn.control_panel;
 
 	// banner
@@ -45,8 +61,8 @@
 // ==================================
 
 pscript.home_make_widgets = function() {
-	var wrapper = page_body.pages['Event Updates'];
-	var cell = $td(wrapper.main_tab, 0, 1);
+	var wrapper = wn.pages['Event Updates'];
+	var cell = wrapper.side_section;
 
 	// sidebar
 	sidebar = new wn.widgets.PageSidebar(cell, {
@@ -579,7 +595,7 @@
 }
 
 pscript.home_make_status = function() {
-	var wrapper = page_body.pages['Event Updates'];
+	var wrapper = wn.pages['Event Updates'];
 
 	// get values
 	$c_page('home', 'event_updates', 'get_status_details', user,
@@ -609,7 +625,7 @@
 	$.extend(this, {
 		make: function(status) {
 			me.status = status;
-			me.wrapper = page_body.pages['Event Updates'].setup_wizard_area;
+			me.wrapper = wn.pages['Event Updates'].setup_wizard_area;
 			$ds(me.wrapper);
 			me.make_percent(status.percent);
 			me.make_suggestion(status.ret);
diff --git a/erpnext/home/page/event_updates/event_updates.py b/erpnext/home/page/event_updates/event_updates.py
index 05f3d93..05f1cfc 100644
--- a/erpnext/home/page/event_updates/event_updates.py
+++ b/erpnext/home/page/event_updates/event_updates.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import cint
 
@@ -16,7 +32,7 @@
 	return webnotes.conn.sql("""\
 		SELECT name, comment
 		FROM `tabComment Widget Record`
-		WHERE comment_doctype='My Company'
+		WHERE comment_doctype IN ('My Company', 'Message')
 		AND comment_docname = %s
 		AND ifnull(docstatus,0)=0
 		""", webnotes.user.name, as_list=1)
diff --git a/erpnext/home/page/my_company/my_company.js b/erpnext/home/page/my_company/my_company.js
index 298b313..775c89e 100644
--- a/erpnext/home/page/my_company/my_company.js
+++ b/erpnext/home/page/my_company/my_company.js
@@ -1,5 +1,21 @@
+// 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/>.
+
 pscript['onload_My Company'] = function() {
-	var wrapper = page_body.pages['My Company'];
+	var wrapper = wn.pages['My Company'];
 	
 	// body
 	wrapper.className = 'layout_wrapper';
@@ -96,7 +112,7 @@
 }
 
 pscript.myc_refresh = function() {
-	page_body.pages['My Company'].member_list.lst.run();	
+	wn.pages['My Company'].member_list.lst.run();	
 }
 
 pscript.myc_make_list= function(wrapper) {
@@ -105,7 +121,7 @@
 
 pscript.get_fullname=function(uid) {
 	if(uid=='Administrator') return uid;
-	return page_body.pages['My Company'].member_list.member_items[uid].fullname;		
+	return wn.pages['My Company'].member_list.member_items[uid].fullname;		
 }
 
 
@@ -724,7 +740,7 @@
 
 	this.user = $a(this.comment, 'span', 'link_type', {fontWeight:'bold'}, pscript.get_fullname(det.owner));
 	this.user.onclick = function() {
-		page_body.pages['My Company'].member_list.show_profile(me.det.owner);
+		wn.pages['My Company'].member_list.show_profile(me.det.owner);
 	}
 
 	var st = (!det.docstatus ? {fontWeight: 'bold'} : null);
diff --git a/erpnext/home/page/my_company/my_company.py b/erpnext/home/page/my_company/my_company.py
index ead5333..f35f475 100644
--- a/erpnext/home/page/my_company/my_company.py
+++ b/erpnext/home/page/my_company/my_company.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 from webnotes.utils import cint, load_json, cstr
diff --git a/erpnext/home/page/profile_settings/profile_settings.js b/erpnext/home/page/profile_settings/profile_settings.js
index 96b2294..9dac7f6 100644
--- a/erpnext/home/page/profile_settings/profile_settings.js
+++ b/erpnext/home/page/profile_settings/profile_settings.js
@@ -1,5 +1,21 @@
+// 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/>.
+
 pscript['onload_profile-settings'] = function() {
-	var wrapper = page_body.pages['profile-settings'];
+	var wrapper = wn.pages['profile-settings'];
 	wrapper.className = 'layout_wrapper';
 	pscript.myprofile = new MyProfile(wrapper)
 }
diff --git a/erpnext/home/page/profile_settings/profile_settings.py b/erpnext/home/page/profile_settings/profile_settings.py
index 8ab5b95..f614c75 100644
--- a/erpnext/home/page/profile_settings/profile_settings.py
+++ b/erpnext/home/page/profile_settings/profile_settings.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 from webnotes.utils import load_json, cint, nowdate
diff --git a/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js b/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js
index bb0e9e5..16c3ec7 100644
--- a/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js
+++ b/erpnext/home/search_criteria/enquiry_to_follow_up/enquiry_to_follow_up.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   this.filter_fields_dict['Enquiry'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js b/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
index ff22521..94f2ef5 100644
--- a/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
+++ b/erpnext/home/search_criteria/lead_to_follow_up/lead_to_follow_up.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Lead'+FILTER_SEP +'Status'].df.filter_hide = 1;
   this.filter_fields_dict['Lead'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js b/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
index 0f86a56..799cd22 100644
--- a/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
+++ b/erpnext/home/search_criteria/lead_to_follow_up/sales_order_overdue.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Customer'].df.filter_hide = 0;
diff --git a/erpnext/hr/doctype/appraisal/appraisal.js b/erpnext/hr/doctype/appraisal/appraisal.js
index 78b5fd3..0483c38 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.js
+++ b/erpnext/hr/doctype/appraisal/appraisal.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.add_fetch('employee', 'company', 'company');
 
 cur_frm.cscript.onload = function(doc,cdt,cdn){
diff --git a/erpnext/hr/doctype/appraisal/appraisal.py b/erpnext/hr/doctype/appraisal/appraisal.py
index 51ce9c8..67bd1e6 100644
--- a/erpnext/hr/doctype/appraisal/appraisal.py
+++ b/erpnext/hr/doctype/appraisal/appraisal.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/attendance/attendance.js b/erpnext/hr/doctype/attendance/attendance.js
index d95c579..4ccc63e 100644
--- a/erpnext/hr/doctype/attendance/attendance.js
+++ b/erpnext/hr/doctype/attendance/attendance.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.add_fetch('employee', 'company', 'company');	
 
 //get employee's name based on employee id selected
diff --git a/erpnext/hr/doctype/attendance/attendance.py b/erpnext/hr/doctype/attendance/attendance.py
index 3c687ef..0d0c23c 100644
--- a/erpnext/hr/doctype/attendance/attendance.py
+++ b/erpnext/hr/doctype/attendance/attendance.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
index c36a72a..6c141cc 100644
--- a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
+++ b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,cdt,cdn){
   cur_frm.log_div = $a(cur_frm.fields_dict['Import Log1'].wrapper,'div','',{border:'1px solid #CCC', backgroundColor:'#DDD',width : '100%', height : '300px', overflow : 'auto'});
   hide_field('Import Log1')
diff --git a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py
index eb22179..a2105c3 100644
--- a/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py
+++ b/erpnext/hr/doctype/attendance_control_panel/attendance_control_panel.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/employee/employee.js b/erpnext/hr/doctype/employee/employee.js
index 2bd8e1e..c696071 100644
--- a/erpnext/hr/doctype/employee/employee.js
+++ b/erpnext/hr/doctype/employee/employee.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // get retirement date
 //========================================================
 cur_frm.cscript.date_of_birth = function(doc, dt, dn) {
diff --git a/erpnext/hr/doctype/employee/employee.py b/erpnext/hr/doctype/employee/employee.py
index ba602cf..2cf46a6 100644
--- a/erpnext/hr/doctype/employee/employee.py
+++ b/erpnext/hr/doctype/employee/employee.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
diff --git a/erpnext/hr/doctype/employee_profile/employee_profile.js b/erpnext/hr/doctype/employee_profile/employee_profile.js
index aedfc34..ac2a2f4 100644
--- a/erpnext/hr/doctype/employee_profile/employee_profile.js
+++ b/erpnext/hr/doctype/employee_profile/employee_profile.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, cdt, cdn){
   $c('runserverobj', args={'method':'cal_tot_exp','docs':compress_doclist (make_doclist (doc.doctype,doc.name))},
 function(r, rt) { refresh_many(['year','months']); });
diff --git a/erpnext/hr/doctype/employee_profile/employee_profile.py b/erpnext/hr/doctype/employee_profile/employee_profile.py
index 130395d..5cc7dd6 100644
--- a/erpnext/hr/doctype/employee_profile/employee_profile.py
+++ b/erpnext/hr/doctype/employee_profile/employee_profile.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/expense_voucher/expense_voucher.js b/erpnext/hr/doctype/expense_voucher/expense_voucher.js
index bdad2c5..2e03567 100644
--- a/erpnext/hr/doctype/expense_voucher/expense_voucher.js
+++ b/erpnext/hr/doctype/expense_voucher/expense_voucher.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.add_fetch('employee', 'company', 'company');
 
 cur_frm.cscript.onload = function(doc,cdt,cdn){
diff --git a/erpnext/hr/doctype/expense_voucher/expense_voucher.py b/erpnext/hr/doctype/expense_voucher/expense_voucher.py
index 4352cca..b349100 100644
--- a/erpnext/hr/doctype/expense_voucher/expense_voucher.py
+++ b/erpnext/hr/doctype/expense_voucher/expense_voucher.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list.py b/erpnext/hr/doctype/holiday_list/holiday_list.py
index afafcec..2f73159 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list.py
+++ b/erpnext/hr/doctype/holiday_list/holiday_list.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/it_checklist/it_checklist.js b/erpnext/hr/doctype/it_checklist/it_checklist.js
index d30e35a..a97ae65 100644
--- a/erpnext/hr/doctype/it_checklist/it_checklist.js
+++ b/erpnext/hr/doctype/it_checklist/it_checklist.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload=function(doc,cdt,cdn){
 
   if(doc.employee && doc.__islocal ==1){
diff --git a/erpnext/hr/doctype/it_checklist/it_checklist.py b/erpnext/hr/doctype/it_checklist/it_checklist.py
index 182e171..4ddfc0a 100644
--- a/erpnext/hr/doctype/it_checklist/it_checklist.py
+++ b/erpnext/hr/doctype/it_checklist/it_checklist.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.js b/erpnext/hr/doctype/leave_allocation/leave_allocation.js
index 9b82cf9..bce7af3 100755
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.js
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // ****************************************** onload ********************************************************
 cur_frm.cscript.onload = function(doc, dt, dn) {
   if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
diff --git a/erpnext/hr/doctype/leave_allocation/leave_allocation.py b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
index 12fe37a..eb37609 100755
--- a/erpnext/hr/doctype/leave_allocation/leave_allocation.py
+++ b/erpnext/hr/doctype/leave_allocation/leave_allocation.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/leave_application/leave_application.js b/erpnext/hr/doctype/leave_application/leave_application.js
index 1eda69f..b7524c8 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.js
+++ b/erpnext/hr/doctype/leave_application/leave_application.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // ****************************************** onload ********************************************************
 cur_frm.cscript.onload = function(doc, dt, dn) {
   if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
diff --git a/erpnext/hr/doctype/leave_application/leave_application.py b/erpnext/hr/doctype/leave_application/leave_application.py
index f688cae..a8c030a 100755
--- a/erpnext/hr/doctype/leave_application/leave_application.py
+++ b/erpnext/hr/doctype/leave_application/leave_application.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
index 2e1f695..54cc8d5 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,dt,dn){
   if(!doc.posting_date) set_multiple(dt,dn,{posting_date:get_today()});
   if(!doc.leave_transaction_type) set_multiple(dt,dn,{leave_transaction_type:'Allocation'});
diff --git a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
index 164a062..fe75785 100644
--- a/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
+++ b/erpnext/hr/doctype/leave_control_panel/leave_control_panel.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/payroll_rule/payroll_rule.js b/erpnext/hr/doctype/payroll_rule/payroll_rule.js
index 9984ce4..e021338 100644
--- a/erpnext/hr/doctype/payroll_rule/payroll_rule.js
+++ b/erpnext/hr/doctype/payroll_rule/payroll_rule.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //omload function to set values in select field
 cur_frm.cscript.onload = function(doc, cdt, cdn){
   var mydoc = doc
diff --git a/erpnext/hr/doctype/payroll_rule/payroll_rule.py b/erpnext/hr/doctype/payroll_rule/payroll_rule.py
index 67cbd52..5d6e13f 100644
--- a/erpnext/hr/doctype/payroll_rule/payroll_rule.py
+++ b/erpnext/hr/doctype/payroll_rule/payroll_rule.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/salary_manager/__init__.py b/erpnext/hr/doctype/salary_manager/__init__.py
index cb6c600..ca974f3 100644
--- a/erpnext/hr/doctype/salary_manager/__init__.py
+++ b/erpnext/hr/doctype/salary_manager/__init__.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 from webnotes import ValidationError
 
 class SalarySlipExistsError(ValidationError): pass
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.js b/erpnext/hr/doctype/salary_manager/salary_manager.js
index cf470be..91eac1a 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.js
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 var display_activity_log = function(msg) {
 	if(!pscript.ss_html)
 		pscript.ss_html = $a(cur_frm.fields_dict['Activity Log'].wrapper,'div','',{border:'1px solid #CCC', backgroundColor:'#CCC'});
diff --git a/erpnext/hr/doctype/salary_manager/salary_manager.py b/erpnext/hr/doctype/salary_manager/salary_manager.py
index badd69b..107305e 100644
--- a/erpnext/hr/doctype/salary_manager/salary_manager.py
+++ b/erpnext/hr/doctype/salary_manager/salary_manager.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/salary_manager/test_salary_manager.py b/erpnext/hr/doctype/salary_manager/test_salary_manager.py
index c7d0867..0282bfe 100644
--- a/erpnext/hr/doctype/salary_manager/test_salary_manager.py
+++ b/erpnext/hr/doctype/salary_manager/test_salary_manager.py
@@ -1,3 +1,19 @@
+# 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 unittest
 import webnotes
 
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.js b/erpnext/hr/doctype/salary_slip/salary_slip.js
index c6ae27b..0dc7ad9 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.js
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.add_fetch('employee', 'company', 'company');
 
 // On load
diff --git a/erpnext/hr/doctype/salary_slip/salary_slip.py b/erpnext/hr/doctype/salary_slip/salary_slip.py
index 3a42dca..e0313a4 100644
--- a/erpnext/hr/doctype/salary_slip/salary_slip.py
+++ b/erpnext/hr/doctype/salary_slip/salary_slip.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.js b/erpnext/hr/doctype/salary_structure/salary_structure.js
index 8014b69..fe57910 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.js
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.add_fetch('employee', 'company', 'company');
 
 // On load
diff --git a/erpnext/hr/doctype/salary_structure/salary_structure.py b/erpnext/hr/doctype/salary_structure/salary_structure.py
index 36a1855..562a885 100644
--- a/erpnext/hr/doctype/salary_structure/salary_structure.py
+++ b/erpnext/hr/doctype/salary_structure/salary_structure.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/hr/page/hr_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/hr/page/hr_home/__init__.py
diff --git a/erpnext/hr/page/hr_home/hr_home.html b/erpnext/hr/page/hr_home/hr_home.html
new file mode 100644
index 0000000..7d1f27f
--- /dev/null
+++ b/erpnext/hr/page/hr_home/hr_home.html
@@ -0,0 +1,123 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Human Resources</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a href="#!List/Attendance">Attendance</a></h4>
+			<p class="help">Attendance Mark</p>
+			<h4><a href="#!List/Leave Application">Leave Application</a></h4>
+			<p class="help">Applications for leave</p>
+			<h4><a href="#!List/Expense Voucher">Expense Voucher</a></h4>
+			<p class="help">Claims for expenses</p>
+			<h4><a href="#!List/Salary Slip">Salary Slip</a></h4>
+			<p class="help">Monthly salary statement</p>	
+			<h4><a href="#!List/Appraisal">Appraisal</a></h4>
+			<p class="help">Performance appraisal</p>	
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!List/Employee">Employee</a></h4>
+			<p class="help">Employee Master</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Leave and Attendance</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Upload and update attendance from a spreadsheet file (csv)"
+							href="#!Form/Attendance Control Panel/Attendance Control Panel">Upload attendance</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Leave allocation helper"
+							href="#!Form/Leave Control Panel/Leave Control Panel">Allocate Leaves</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Allocate leaves"
+							href="#!List/Leave Allocation">Leave Allocation</a>
+					</div>
+
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Type of leaves like casual, sick etc."
+							href="#!List/Leave Type">Leave Type</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "List of holidays"
+							href="#!List/Leave Allocation">Holiday List</a>
+					</div>
+				</div>
+			</div>
+			<div class="section">
+				<div class="section-head">Salary and Payroll</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Monthly salary template with earnings and deductions"
+							href="#!List/Salary Structure">Salary Structure</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Generate Salary Slips"
+							href="#!Form/Salary Manager/Salary Manager">Process Payroll</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Benefit types like basic salary, allowances etc."
+							href="#!List/Earning Type">Earning Type</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "tax and other salary deductions"
+							href="#!List/Deduction Type">Deduction Type</a>
+					</div>
+				</div>
+			</div>
+			<div class="section">
+				<div class="section-head">Employee Setup</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Type of employment master"
+							href="#!List/Employment Type">Employment Type</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link"
+							title = "Template for employee performance appraisals"
+							href="#!List/KRA Template">Key Performance Area (KRA) Template</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link"
+							title = "Company branches (for employee records)"
+							href="#!List/Branch">Branch</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link"
+							title = "Company departments"
+							href="#!List/Department">Department</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link"
+							title = "Company departments"
+							href="#!List/Designation">Designation</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link"
+							title = "Employee grades"
+							href="#!List/Grade">Grade</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/hr/page/hr_home/hr_home.js b/erpnext/hr/page/hr_home/hr_home.js
new file mode 100644
index 0000000..418ed57
--- /dev/null
+++ b/erpnext/hr/page/hr_home/hr_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_hr-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('HR', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/hr/page/hr_home/hr_home.txt b/erpnext/hr/page/hr_home/hr_home.txt
new file mode 100644
index 0000000..a5a4ba9
--- /dev/null
+++ b/erpnext/hr/page/hr_home/hr_home.txt
@@ -0,0 +1,28 @@
+# Page, hr-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:24:05',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:24:05',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'HR',
+		'name': '__common__',
+		'page_name': u'hr-home',
+		'standard': u'Yes',
+		'title': u'Human Resources Home'
+	},
+
+	# Page, hr-home
+	{
+		'doctype': 'Page',
+		'name': u'hr-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/hr/search_criteria/employee_information/employee_information.py b/erpnext/hr/search_criteria/employee_information/employee_information.py
index 74f8282..74dd259 100644
--- a/erpnext/hr/search_criteria/employee_information/employee_information.py
+++ b/erpnext/hr/search_criteria/employee_information/employee_information.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 for c in range(0,len(colnames)):
   l = (len(colnames[c])*9) 
   if l < 150 : col_width = '150px'
diff --git a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js
index 24d1774..88d1cb4 100644
--- a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js
+++ b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 this.mytabs.items['Select Columns'].hide();
 
 this.mytabs.tabs['More Filters'].hide();
diff --git a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py
index 8c0c747..2721a6b 100644
--- a/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py
+++ b/erpnext/hr/search_criteria/employeewise_balance_leave_report/employeewise_balance_leave_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 leave_types = sql("""
 	SELECT name FROM `tabLeave Type`
 	WHERE
diff --git a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
index bb74506..e922a2f 100644
--- a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
+++ b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 var get_month = function(){
 
   var dict = {0:'Jan', 1:'Feb',2:'Mar',3:'Apr',4:'May',5:'June',6:'July',7:'Aug',8:'Sept',9:'Oct',10:'Nov',11:'Dec'}
diff --git a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
index 55fdef0..a45c09d 100644
--- a/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
+++ b/erpnext/hr/search_criteria/monthly_attendance_details/monthly_attendance_details.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #add column employee, employee name
 #--------------------------------------------------------------------------------------
 col =[['Employee','Link','155px','Employee'],['Employee Name','Data','150px','']]
diff --git a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
index ee61977..e6dc267 100644
--- a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
+++ b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   var d = new Date();
   
diff --git a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
index aae4db1..f116d90 100644
--- a/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
+++ b/erpnext/hr/search_criteria/new_or_left_employees_for_a_month/new_or_left_employees_for_a_month.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 status = filter_values.get('status')
 month = filter_values.get('month')
 
diff --git a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
index 4b5adec..810fe16 100644
--- a/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
+++ b/erpnext/hr/search_criteria/pending_appraisals/pending_appraisals.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();  
   
diff --git a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js
index d4c0398..388aa7b 100644
--- a/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js
+++ b/erpnext/hr/search_criteria/pending_expense_vouchers/pending_expense_vouchers.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();  
   
diff --git a/erpnext/hr/search_criteria/salary_register/salary_register.js b/erpnext/hr/search_criteria/salary_register/salary_register.js
index 4119944..c451b27 100644
--- a/erpnext/hr/search_criteria/salary_register/salary_register.js
+++ b/erpnext/hr/search_criteria/salary_register/salary_register.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   fld_lst = ['ID','Employee']
 
diff --git a/erpnext/hr/search_criteria/salary_register/salary_register.py b/erpnext/hr/search_criteria/salary_register/salary_register.py
index 049708a..c44954c 100644
--- a/erpnext/hr/search_criteria/salary_register/salary_register.py
+++ b/erpnext/hr/search_criteria/salary_register/salary_register.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 sal_slips_ids = ''
 for r in res:
   if not sal_slips_ids == '': sal_slips_ids +=","
diff --git a/erpnext/knowledge_base/doctype/question/question.py b/erpnext/knowledge_base/doctype/question/question.py
index 5ddee6a..c104cfa 100644
--- a/erpnext/knowledge_base/doctype/question/question.py
+++ b/erpnext/knowledge_base/doctype/question/question.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 class DocType:
 	def __init__(self, d, dl):
 		self.doc, self.doclist = d, dl
diff --git a/erpnext/knowledge_base/page/kb_common/kb_common.js b/erpnext/knowledge_base/page/kb_common/kb_common.js
index 433ea2e..a734f65 100644
--- a/erpnext/knowledge_base/page/kb_common/kb_common.js
+++ b/erpnext/knowledge_base/page/kb_common/kb_common.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // question toolbar
 // contains - voting widget / tag list and user info / timestamp
 // By XXXXXX on YYYYY
@@ -8,7 +24,6 @@
 	this.make = function() {
 		this.wrapper = $a(this.parent, 'div', '', {});
 		this.line1 = $a(this.wrapper, 'div', '', {color: '#888', fontSize:'11px', margin:'7px 0px'});
-		this.line2 = $a(this.wrapper, 'div','',{marginBottom:'7px'});
 		this.make_timestamp();
 		this.make_vote();
 		if(this.with_tags)
@@ -29,7 +44,8 @@
 	}
 
 	this.make_vote = function() {
-		new KBPoints(this.line2, this.det.points, this.det._users_voted, this.doctype, this.det.name, this.det.owner);
+		this.line1.innerHTML += ' | '
+		new KBPoints(this.line1, this.det.points, this.det._users_voted, this.doctype, this.det.name, this.det.owner);
 	}
 	
 	this.del = function() {
@@ -41,7 +57,8 @@
 	}
 	
 	this.make_tags = function() {
-		this.tags_area = $a(this.line2, 'span', 'kb-tags')
+		this.line1.innerHTML += ' | '
+		this.tags_area = $a(this.line1, 'span', 'kb-tags')
 		this.tags = new TagList(this.tags_area, 
 			this.det._user_tags && (this.det._user_tags.split(',')), 
 			this.doctype, this.det.name, 0, kb.set_tag_filter)		
@@ -57,7 +74,7 @@
 	var me = this;
 	voted = voted ? voted.split(',') : [];
 
-	this.wrapper = $a(parent, 'span', '', {fontSize: '11px', marginRight: '13px'});
+	this.wrapper = $a(parent, 'span', '', {fontSize: '11px', marginRight: '7px', marginLeft: '7px'});
 	
 	this.render_points = function(p) {
 		if(!this.points_area)
@@ -99,16 +116,14 @@
 	$.extend(this, args);
 	var me = this;
 	
-	this.display = $a(me.parent, 'div', me.disp_class, '', me.text);
-	this.input = $a(me.parent, 'textarea', me.inp_class, {display:'none'});
+	this.wrapper = $a(me.parent, 'div');
+	this.display = $a(me.wrapper, 'div', me.disp_class, '', me.text);
+	this.input = $a(me.wrapper, 'textarea', me.inp_class, {display:'none'});
 	
-	var div = $a(me.parent, 'div', '', {marginTop:'5px', height:'23px'});
+	var div = $a(me.wrapper, 'div', '', {marginTop:'5px', height:'23px'});
 	
 	// edit text
-	this.edit_btn = $a(div, 'span', '', {color:'#333', marginLeft:'-2px', cursor:'pointer', padding:'3px', backgroundColor:'#ddd', cssFloat: 'left'});
-	$br(this.edit_btn, '3px')
-	$a(this.edit_btn, 'div', 'wn-icon ic-pencil', {marginBottom:'-2px', cssFloat:'left'} );
-	$a(this.edit_btn, 'span', 'link_type', {marginLeft:'3px', color:'#555', fontSize:'11px'}, 'Edit');
+	this.edit_btn = $a(div, 'a', '', {cursor:'pointer'}, '[edit]');
 
 	this.edit_btn.onclick = function() {
 		me.input.value = me.display.innerHTML;
diff --git a/erpnext/knowledge_base/page/question_view/question_view.css b/erpnext/knowledge_base/page/question_view/question_view.css
index 0c2526c..4472da7 100644
--- a/erpnext/knowledge_base/page/question_view/question_view.css
+++ b/erpnext/knowledge_base/page/question_view/question_view.css
@@ -24,9 +24,6 @@
 }
 
 .qv-question-wrapper {
-	margin: 7px 0px 13px 0px;
-	padding-bottom: 7px;
-	border-bottom: 1px solid #CCC;
 }
 
 .qv-add-answer {
@@ -43,7 +40,5 @@
 }
 
 .qv-answer {
-	margin: 7px 0px 7px 0px;
-	padding-bottom: 7px;
-	border-bottom: 1px solid #CCC;	
+
 }
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/question_view/question_view.html b/erpnext/knowledge_base/page/question_view/question_view.html
new file mode 100644
index 0000000..9939332
--- /dev/null
+++ b/erpnext/knowledge_base/page/question_view/question_view.html
@@ -0,0 +1,13 @@
+<div class="layout-wrapper">
+	<a class="close" onclick="window.history.back();">&times;</a>
+	<h1>Knowledge Base</h1>
+	<hr>
+	<p style="text-align: right"><a href="#!questions">&larr; Back to Questions</a></p>
+	<div class="qv-question-wrapper">
+	</div>
+	<hr>
+	<div class="qv-answer-wrapper">
+	</div>
+	<div class="add-answer-link"></div>
+	<div class="add-answer-area"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/question_view/question_view.js b/erpnext/knowledge_base/page/question_view/question_view.js
index 422fb30..5783471 100644
--- a/erpnext/knowledge_base/page/question_view/question_view.js
+++ b/erpnext/knowledge_base/page/question_view/question_view.js
@@ -1,14 +1,25 @@
-pscript['onload_question-view'] = function() {
-//
-	var w = page_body.pages['question-view'];
-	w.className = 'layout_wrapper';
-	new PageHeader(w, 'Knowledge Base');
-	w.link = $ln($a(w, 'div'), '< Back to all questions', function() { loadpage('questions'); })
-	w.body = $a(w, 'div', 'qv-body');
+// 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/>.
 
+pscript['onload_question-view'] = function(wrapper) {
+	wrapper.add_answer_area = $('.add-answer-area').get(0);
 }
 
 pscript['refresh_question-view'] = function() {
+	$('.add-answer-area').empty();
 	// href
 	var qid = window.location.hash.split('/')[1];
 	if(qid) {
@@ -17,22 +28,17 @@
 }
 
 pscript.question_view = function(qid, qtext) {
-	var w = page_body.pages['question-view'];
+	var w = wn.pages['question-view'];
 	new KBQuestionView(w, qid, qtext);
 }
 
 KBQuestionView = function(w, qid, qtext) {
 	var me = this;
-	
-	w.body.innerHTML = '';
-	w.question_area = $a(w.body, 'div', 'social qv-question-wrapper');
-	w.answer_area = $a(w.body, 'div', 'social qv-answer-wrapper');
-	w.add_answer_link = $a(w.body, 'div', '', {margin:'3px 0px'});
-	w.add_answer_area = $a(w.body, 'div', 'qv-add-answer');
-	
+		
 	this.make_question = function() {
+		$(w).find('.qv-question-wrapper').empty();
 		new EditableText({
-			parent: w.question_area,
+			parent: $(w).find('.qv-question-wrapper').get(0),
 			dt: 'Question',
 			dn: qid,
 			fieldname: 'question',
@@ -46,8 +52,9 @@
 	
 	// answer list
 	this.make_answer_list = function() {
+		$(w).find('.qv-answer-wrapper').empty();
 		this.ans_list = new KBAnswerList({
-			parent: w.answer_area,
+			parent: $(w).find('.qv-answer-wrapper').get(0),
 			qid: qid
 		})
 	}
@@ -64,11 +71,12 @@
 	
 	// add a link to open add answer
 	this.make_answer_box_link = function() {
-		$a(w.add_answer_link, 'span', 'link_type', null, '+ Add your answer', 
-			function() { 
-				$dh(w.add_answer_link);
-				me.make_answer_box();
-			});
+		$('.add-answer-link').html('<button class="btn btn-small">\
+			<i class="icon-plus"></i> Add you answer</button>').find('button').click(
+				function() {
+					$(this).toggle(false);
+					me.make_answer_box();
+				});
 	}
 	
 	// answer box
@@ -126,7 +134,7 @@
 		this.list = new wn.widgets.Listing({
 			parent: me.parent,
 			as_dict: 1,
-			no_results_message: 'No answers yet, be the first one to answer!',
+			no_result_message: 'No answers yet, be the first one to answer!',
 			render_row: function(body, data) {
 				new KBAnswer(body, data, me)
 			},
@@ -135,7 +143,8 @@
 					+"t2.last_name, t1.modified from tabAnswer t1, tabProfile t2 "
 					+"where question='%(qid)s' and t1.owner = t2.name "
 					+"order by t1.points desc, t1.modified desc", {qid: me.qid})
-			}
+			},
+			title: 'Answers'
 		});
 		
 		this.list.run();
@@ -152,7 +161,7 @@
 // points yyy
 KBAnswer = function(body, data, ans_list) {
 	body.className = 'qv-answer';
-	new EditableText({
+	var edtxt = new EditableText({
 		parent: body,
 		dt: 'Answer',
 		dn: data.name,
@@ -163,6 +172,8 @@
 		rich_text: 1
 	});	
 	
+	$(edtxt.wrapper).addClass('well');
+	
 	var div = $a(body, 'div', '', {})
 	new KBItemToolbar({
 		parent: div,
diff --git a/erpnext/knowledge_base/page/question_view/question_view.py b/erpnext/knowledge_base/page/question_view/question_view.py
index c711b90..c7d927e 100644
--- a/erpnext/knowledge_base/page/question_view/question_view.py
+++ b/erpnext/knowledge_base/page/question_view/question_view.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import load_json, cstr, now
 
diff --git a/erpnext/knowledge_base/page/questions/questions.css b/erpnext/knowledge_base/page/questions/questions.css
index b8a80c4..aa97ffc 100644
--- a/erpnext/knowledge_base/page/questions/questions.css
+++ b/erpnext/knowledge_base/page/questions/questions.css
@@ -13,7 +13,6 @@
 }
 
 .kb-questions {
-	color: #000;
 }
 
 .kb-question-details {
diff --git a/erpnext/knowledge_base/page/questions/questions.html b/erpnext/knowledge_base/page/questions/questions.html
index e69de29..c76f490 100644
--- a/erpnext/knowledge_base/page/questions/questions.html
+++ b/erpnext/knowledge_base/page/questions/questions.html
@@ -0,0 +1,19 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Knowledge Base</h1>
+		<hr>
+		<div class="well kb-search-wrapper">
+			<textarea></textarea>
+			<div>
+				<button class="btn btn-small search" onclick="">
+					<i class="icon-search"></i> Search</button>
+				<button class="btn btn-small ask">
+					<i class="icon-question-sign"></i> Ask</button>
+			</div>
+		</div>
+	</div>
+	<div class="layout-side-section">
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/knowledge_base/page/questions/questions.js b/erpnext/knowledge_base/page/questions/questions.js
index a3dff13..7261cd8 100644
--- a/erpnext/knowledge_base/page/questions/questions.js
+++ b/erpnext/knowledge_base/page/questions/questions.js
@@ -1,22 +1,33 @@
-pscript.onload_questions = function() {
-	var w = page_body.pages['questions'];
+// 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/>.
+
+pscript.onload_questions = function(wrapper) {	
+	body = $(wrapper).find('.layout-main-section').get(0);
 	
-	var tab = make_table(w, 1, 2, '100%', ['75%', '25%'], {});
-	var body = $a($td(tab,0,0),'div','layout_wrapper');
-
-	new PageHeader(body, 'Knowledge Base');
-
 	// kb
 	var kb = new KnowledgeBase(body);
 	
 	// sidebar
-	$y($td(tab, 0, 1), {paddingTop:'53px'});
-	this.sidebar = new wn.widgets.PageSidebar($td(tab, 0, 1), {
+	this.sidebar = new wn.widgets.PageSidebar($(wrapper).find('.layout-side-section').get(0), {
 		sections: [
 			{
 				title: 'Top Tags',
 				render: function(body) {
-					new wn.widgets.TagCloud(body, 'Question', function(tag) { kb.set_tag_filter(tag) });
+					new wn.widgets.TagCloud(body, 'Question', function(tag) 
+						{ kb.set_tag_filter(tag) });
 				}				
 			}
 		]
@@ -34,11 +45,14 @@
 	this.tag_filter_dict = {};
 	
 	this.make_search_bar = function() {
-		this.search = $a($a(w,'div','kb-search-wrapper'), 'textarea');
+		this.search = $(w).find('.kb-search-wrapper textarea').get(0);
 		
-		var div = $a(w,'div','kb-btn-wrapper');
-		$btn(div, 'Search', function() { me.run() }, {fontSize:'14px'});
-		$btn(div, 'Ask', function() { me.ask() }, {fontSize:'14px'});
+		$(w).find('.btn.search').click(function() {
+			me.run();
+		})
+		$(w).find('.btn.ask').click(function() {
+			me.ask();
+		})
 	}
 	
 	// ask a new question
diff --git a/erpnext/knowledge_base/page/questions/questions.py b/erpnext/knowledge_base/page/questions/questions.py
index d3f0d7c..1b90fc7 100644
--- a/erpnext/knowledge_base/page/questions/questions.py
+++ b/erpnext/knowledge_base/page/questions/questions.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 from webnotes.utils import load_json, cint, cstr
diff --git a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
index 34fd498..8fee8c5 100644
--- a/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
+++ b/erpnext/patches/before_jan_2012/Discount_purchase_cycle.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/accounts_default_form.py b/erpnext/patches/before_jan_2012/accounts_default_form.py
index dab6923..282ebf5 100644
--- a/erpnext/patches/before_jan_2012/accounts_default_form.py
+++ b/erpnext/patches/before_jan_2012/accounts_default_form.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
         import webnotes
         from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/auto_indent.py b/erpnext/patches/before_jan_2012/auto_indent.py
index a8488e7..7373c39 100644
--- a/erpnext/patches/before_jan_2012/auto_indent.py
+++ b/erpnext/patches/before_jan_2012/auto_indent.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/c_form_patch.py b/erpnext/patches/before_jan_2012/c_form_patch.py
index 0f8fa22..8c00891 100644
--- a/erpnext/patches/before_jan_2012/c_form_patch.py
+++ b/erpnext/patches/before_jan_2012/c_form_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py b/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py
index 7de04b7..2213c20 100644
--- a/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py
+++ b/erpnext/patches/before_jan_2012/delivery_billing_status_patch.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 sql = webnotes.conn.sql
 
diff --git a/erpnext/patches/before_jan_2012/deploy_email_digest.py b/erpnext/patches/before_jan_2012/deploy_email_digest.py
index 02f842c..5adeb97 100644
--- a/erpnext/patches/before_jan_2012/deploy_email_digest.py
+++ b/erpnext/patches/before_jan_2012/deploy_email_digest.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def execute():
diff --git a/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py b/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py
index 380de83..7d5b856 100644
--- a/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py
+++ b/erpnext/patches/before_jan_2012/edigest_enable_income_year_to_date.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.doc import Document
 
diff --git a/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py b/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
index 59c5940..bab119e 100644
--- a/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
+++ b/erpnext/patches/before_jan_2012/employeewise_balance_leave_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 	This patch changes criteria name
 	of search criteria "employeewise_balance_leave_report"
diff --git a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
index e78a82e..aab64a0 100644
--- a/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
+++ b/erpnext/patches/before_jan_2012/erpnext_structure_cleanup.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 #Cleanup all unwanted documents and restructure of moduloes
 #----------------------------------------------------------
 
diff --git a/erpnext/patches/before_jan_2012/index_patch.py b/erpnext/patches/before_jan_2012/index_patch.py
index 788b68d..7e1991c 100644
--- a/erpnext/patches/before_jan_2012/index_patch.py
+++ b/erpnext/patches/before_jan_2012/index_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 	This patch removes wrong indexs and add proper indexes in tables
 """
diff --git a/erpnext/patches/before_jan_2012/install_print_formats.py b/erpnext/patches/before_jan_2012/install_print_formats.py
index 40a008e..3a18aae 100644
--- a/erpnext/patches/before_jan_2012/install_print_formats.py
+++ b/erpnext/patches/before_jan_2012/install_print_formats.py
@@ -1,3 +1,19 @@
+# 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
 import webnotes
 
diff --git a/erpnext/patches/before_jan_2012/lcw_patch.py b/erpnext/patches/before_jan_2012/lcw_patch.py
index 66afafc..b274069 100644
--- a/erpnext/patches/before_jan_2012/lcw_patch.py
+++ b/erpnext/patches/before_jan_2012/lcw_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/p1.py b/erpnext/patches/before_jan_2012/p1.py
index e2304c7..ef8ca4c 100644
--- a/erpnext/patches/before_jan_2012/p1.py
+++ b/erpnext/patches/before_jan_2012/p1.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	if not webnotes.conn.sql("select name from tabDocFormat where parent = 'Receivable Voucher' and format != 'POS Invoice'"):
diff --git a/erpnext/patches/before_jan_2012/packing_slip.py b/erpnext/patches/before_jan_2012/packing_slip.py
index 9285e8a..23c34d9d 100644
--- a/erpnext/patches/before_jan_2012/packing_slip.py
+++ b/erpnext/patches/before_jan_2012/packing_slip.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/price_list_patch.py b/erpnext/patches/before_jan_2012/price_list_patch.py
index 0f485b3..ce2ff4a 100644
--- a/erpnext/patches/before_jan_2012/price_list_patch.py
+++ b/erpnext/patches/before_jan_2012/price_list_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/print_hide_price_list.py b/erpnext/patches/before_jan_2012/print_hide_price_list.py
index 833ab98..8940ef3 100644
--- a/erpnext/patches/before_jan_2012/print_hide_price_list.py
+++ b/erpnext/patches/before_jan_2012/print_hide_price_list.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("update `tabDocField` set print_hide = 1 where fieldname in ('price_list_currency', 'plc_conversion_rate')")
diff --git a/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py b/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py
index 8d25047..559266d 100644
--- a/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py
+++ b/erpnext/patches/before_jan_2012/profile_mark_not_in_create.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 def execute():
 	"""
diff --git a/erpnext/patches/before_jan_2012/project_patch.py b/erpnext/patches/before_jan_2012/project_patch.py
index c5473a0..f4b0ea6 100644
--- a/erpnext/patches/before_jan_2012/project_patch.py
+++ b/erpnext/patches/before_jan_2012/project_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_address.py b/erpnext/patches/before_jan_2012/reload_address.py
index 252339b..3ef80d8 100644
--- a/erpnext/patches/before_jan_2012/reload_address.py
+++ b/erpnext/patches/before_jan_2012/reload_address.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_bom.py b/erpnext/patches/before_jan_2012/reload_bom.py
index f050f3c..f925bc6 100644
--- a/erpnext/patches/before_jan_2012/reload_bom.py
+++ b/erpnext/patches/before_jan_2012/reload_bom.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_doclayer.py b/erpnext/patches/before_jan_2012/reload_doclayer.py
index 8ee4919..4ab077e 100644
--- a/erpnext/patches/before_jan_2012/reload_doclayer.py
+++ b/erpnext/patches/before_jan_2012/reload_doclayer.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 	Reload DocLayer, DocLayerField and Print Format doctypes
 """
diff --git a/erpnext/patches/before_jan_2012/reload_email_digest.py b/erpnext/patches/before_jan_2012/reload_email_digest.py
index 2890254..13a2614 100644
--- a/erpnext/patches/before_jan_2012/reload_email_digest.py
+++ b/erpnext/patches/before_jan_2012/reload_email_digest.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	from webnotes.modules.module_manager import reload_doc
 	reload_doc('Setup', 'DocType', 'Email Digest')
diff --git a/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py b/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
index b03b44b..b60d3d4 100644
--- a/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
+++ b/erpnext/patches/before_jan_2012/reload_employeewise_balance_leave_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_flat_bom.py b/erpnext/patches/before_jan_2012/reload_flat_bom.py
index b493610..a46ad5e 100644
--- a/erpnext/patches/before_jan_2012/reload_flat_bom.py
+++ b/erpnext/patches/before_jan_2012/reload_flat_bom.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	from webnotes.modules import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_gl_mapper.py b/erpnext/patches/before_jan_2012/reload_gl_mapper.py
index edb00bc..27f2c58 100644
--- a/erpnext/patches/before_jan_2012/reload_gl_mapper.py
+++ b/erpnext/patches/before_jan_2012/reload_gl_mapper.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_lc_wizard.py b/erpnext/patches/before_jan_2012/reload_lc_wizard.py
index 6b8565e..7645419 100644
--- a/erpnext/patches/before_jan_2012/reload_lc_wizard.py
+++ b/erpnext/patches/before_jan_2012/reload_lc_wizard.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_print_format.py b/erpnext/patches/before_jan_2012/reload_print_format.py
index e3c6adf..37b83a6 100644
--- a/erpnext/patches/before_jan_2012/reload_print_format.py
+++ b/erpnext/patches/before_jan_2012/reload_print_format.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_project_task.py b/erpnext/patches/before_jan_2012/reload_project_task.py
index 019a177..14d39fd 100644
--- a/erpnext/patches/before_jan_2012/reload_project_task.py
+++ b/erpnext/patches/before_jan_2012/reload_project_task.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 	Reload Task Doctype of Project Module
 """
diff --git a/erpnext/patches/before_jan_2012/reload_reco.py b/erpnext/patches/before_jan_2012/reload_reco.py
index 6b9ecc4..9335992 100644
--- a/erpnext/patches/before_jan_2012/reload_reco.py
+++ b/erpnext/patches/before_jan_2012/reload_reco.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_rv.py b/erpnext/patches/before_jan_2012/reload_rv.py
index 7b47b4c..f41db49 100644
--- a/erpnext/patches/before_jan_2012/reload_rv.py
+++ b/erpnext/patches/before_jan_2012/reload_rv.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/reload_support_ticket.py b/erpnext/patches/before_jan_2012/reload_support_ticket.py
index 85145bd..803754f 100644
--- a/erpnext/patches/before_jan_2012/reload_support_ticket.py
+++ b/erpnext/patches/before_jan_2012/reload_support_ticket.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py b/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py
index aaddd99..fcc40d1 100644
--- a/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py
+++ b/erpnext/patches/before_jan_2012/remove_duplicate_table_mapper_detail.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 	Removes duplicate entries created in 
 """
diff --git a/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py b/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py
index 7005db9..1129f06 100644
--- a/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py
+++ b/erpnext/patches/before_jan_2012/remove_extra_button_from_email_digest.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("""
diff --git a/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py b/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py
index 5736c9c..17d9c33 100644
--- a/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py
+++ b/erpnext/patches/before_jan_2012/remove_old_cp_email_settings.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		remove control panel email settings if automail.webnotestech.com
diff --git a/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py b/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py
index 8d842e3..4687c1e 100644
--- a/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py
+++ b/erpnext/patches/before_jan_2012/remove_page_break_from_defaults.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("""delete from `tabDefaultValue` where defkey in ('page_break', 'projects', 'packing_details', 'discounts', 'brands', 'item_batch_nos', 'after_sales_installations', 'item_searial_nos', 'item_group_in_details', 'exports', 'imports', 'item_advanced', 'sales_extras', 'more_info', 'quality', 'manufacturing', 'pos', 'item_serial_nos', 'purchase_discounts', 'recurring_invoice') and parent = 'Control Panel'""")
diff --git a/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py b/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py
index 677188e..c8e0029 100644
--- a/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py
+++ b/erpnext/patches/before_jan_2012/remove_previous_field_property_setter.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 def execute():
 	webnotes.conn.sql("""\
diff --git a/erpnext/patches/before_jan_2012/repost_account_bal.py b/erpnext/patches/before_jan_2012/repost_account_bal.py
index 7ca8b39..e44a49a 100644
--- a/erpnext/patches/before_jan_2012/repost_account_bal.py
+++ b/erpnext/patches/before_jan_2012/repost_account_bal.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 
 def execute():
 	import webnotes
diff --git a/erpnext/patches/before_jan_2012/repost_stock.py b/erpnext/patches/before_jan_2012/repost_stock.py
index a19494c..2c62039 100644
--- a/erpnext/patches/before_jan_2012/repost_stock.py
+++ b/erpnext/patches/before_jan_2012/repost_stock.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
     import webnotes
     sql = webnotes.conn.sql
diff --git a/erpnext/patches/before_jan_2012/sal_man_patch.py b/erpnext/patches/before_jan_2012/sal_man_patch.py
index aef6251..b8f5301 100644
--- a/erpnext/patches/before_jan_2012/sal_man_patch.py
+++ b/erpnext/patches/before_jan_2012/sal_man_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 
 def execute():
 	import webnotes
diff --git a/erpnext/patches/before_jan_2012/task_email_notification.py b/erpnext/patches/before_jan_2012/task_email_notification.py
index e6a7afa..8d1a078 100644
--- a/erpnext/patches/before_jan_2012/task_email_notification.py
+++ b/erpnext/patches/before_jan_2012/task_email_notification.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/before_jan_2012/update_0_idx.py b/erpnext/patches/before_jan_2012/update_0_idx.py
index 9c31f1d..ec38b8a 100644
--- a/erpnext/patches/before_jan_2012/update_0_idx.py
+++ b/erpnext/patches/before_jan_2012/update_0_idx.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 def execute():
 	doc_type_list = webnotes.conn.sql("""SELECT DISTINCT parent FROM `tabDocField` where idx=0""")
diff --git a/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py b/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py
index 5a03ec7..6f6f6b9 100644
--- a/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py
+++ b/erpnext/patches/before_jan_2012/update_gle_against_voucher_for_jv.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.model.code import get_obj
diff --git a/erpnext/patches/jan_mar_2012/account_type_patch.py b/erpnext/patches/jan_mar_2012/account_type_patch.py
index 81552f0..2029a3a 100644
--- a/erpnext/patches/jan_mar_2012/account_type_patch.py
+++ b/erpnext/patches/jan_mar_2012/account_type_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("""update `tabAccount` 
diff --git a/erpnext/patches/jan_mar_2012/allocated_to_profile.py b/erpnext/patches/jan_mar_2012/allocated_to_profile.py
index ac95c2b..32c7a2c 100644
--- a/erpnext/patches/jan_mar_2012/allocated_to_profile.py
+++ b/erpnext/patches/jan_mar_2012/allocated_to_profile.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		Changes allocated_to option to Profile in
diff --git a/erpnext/patches/jan_mar_2012/apps/todo_item.py b/erpnext/patches/jan_mar_2012/apps/todo_item.py
index f2239f5..6eec6fd 100644
--- a/erpnext/patches/jan_mar_2012/apps/todo_item.py
+++ b/erpnext/patches/jan_mar_2012/apps/todo_item.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		* Reload ToDo Item
diff --git a/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py b/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py
index 8404f19..8a6aaa8 100644
--- a/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py
+++ b/erpnext/patches/jan_mar_2012/cancel_purchase_returned.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		Set docstatus = 2 where status = 'Purchase Returned' for serial no
diff --git a/erpnext/patches/jan_mar_2012/clear_session_cache.py b/erpnext/patches/jan_mar_2012/clear_session_cache.py
index cdcbb14..2071ae5 100644
--- a/erpnext/patches/jan_mar_2012/clear_session_cache.py
+++ b/erpnext/patches/jan_mar_2012/clear_session_cache.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("""
diff --git a/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py
index 1ae94a7..dad5da4 100644
--- a/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py
+++ b/erpnext/patches/jan_mar_2012/convert_tables_to_utf8.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def execute():
diff --git a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
index b55acd4..4671143 100644
--- a/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
+++ b/erpnext/patches/jan_mar_2012/customer_address_contact_patch.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def execute():
@@ -31,7 +47,7 @@
 			GROUP BY sales_partner HAVING SUM(IFNULL(is_primary_contact, 0))=0
 		)
 	""", as_list=1)
-	names = ", ".join(['"' + str(r[0]) + '"' for r in res if r])
+	names = ", ".join(['"' + unicode(r[0]) + '"' for r in res if r])
 	if names: webnotes.conn.sql("UPDATE `tabContact` SET is_primary_contact=1 WHERE name IN (%s)" % names)
 
 def patch_primary_address():
@@ -54,5 +70,5 @@
 			AND SUM(IFNULL(is_shipping_address, 0))=0
 		)
 	""", as_list=1)
-	names = ", ".join(['"' + str(r[0]) + '"' for r in res if r])
+	names = ", ".join(['"' + unicode(r[0]) + '"' for r in res if r])
 	if names: webnotes.conn.sql("UPDATE `tabAddress` SET is_primary_address=1 WHERE name IN (%s)" % names)
diff --git a/erpnext/patches/jan_mar_2012/delete_pur_of_service.py b/erpnext/patches/jan_mar_2012/delete_pur_of_service.py
index eecece6..da31300 100644
--- a/erpnext/patches/jan_mar_2012/delete_pur_of_service.py
+++ b/erpnext/patches/jan_mar_2012/delete_pur_of_service.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.model import delete_doc
diff --git a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
index 94bda6e..7a28ef8 100644
--- a/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
+++ b/erpnext/patches/jan_mar_2012/deploy_packing_slip.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.modules.module_manager import reload_doc
 
diff --git a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
index eae0d21..a6f7a7c 100644
--- a/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
+++ b/erpnext/patches/jan_mar_2012/doclabel_in_doclayer.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 def execute():
 	"""
diff --git a/erpnext/patches/jan_mar_2012/email_settings_reload.py b/erpnext/patches/jan_mar_2012/email_settings_reload.py
index bfe3efe..ec6f05d 100644
--- a/erpnext/patches/jan_mar_2012/email_settings_reload.py
+++ b/erpnext/patches/jan_mar_2012/email_settings_reload.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		* Change type of mail_port field to int
diff --git a/erpnext/patches/jan_mar_2012/fix_packing_slip.py b/erpnext/patches/jan_mar_2012/fix_packing_slip.py
index 98eb825..fb3a4da 100644
--- a/erpnext/patches/jan_mar_2012/fix_packing_slip.py
+++ b/erpnext/patches/jan_mar_2012/fix_packing_slip.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		* Change DN to PS mapper
diff --git a/erpnext/patches/jan_mar_2012/jan_production_patches.py b/erpnext/patches/jan_mar_2012/jan_production_patches.py
index 8795cc3..d57fb9e 100644
--- a/erpnext/patches/jan_mar_2012/jan_production_patches.py
+++ b/erpnext/patches/jan_mar_2012/jan_production_patches.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 def execute():
 	"""
diff --git a/erpnext/patches/jan_mar_2012/map_conversion_rate.py b/erpnext/patches/jan_mar_2012/map_conversion_rate.py
index 1a00bde..0b947b3 100644
--- a/erpnext/patches/jan_mar_2012/map_conversion_rate.py
+++ b/erpnext/patches/jan_mar_2012/map_conversion_rate.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.code import get_obj
 from webnotes.model.doc import addchild
diff --git a/erpnext/patches/jan_mar_2012/navupdate.py b/erpnext/patches/jan_mar_2012/navupdate.py
new file mode 100644
index 0000000..d29a2cf
--- /dev/null
+++ b/erpnext/patches/jan_mar_2012/navupdate.py
@@ -0,0 +1,48 @@
+# 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 webnotes
+import _mysql_exceptions
+
+def execute():
+	from webnotes.modules import reload_doc
+	reload_doc('accounts', 'page', 'accounts_home')
+	reload_doc('selling', 'page', 'selling_home')
+	reload_doc('buying', 'page', 'buying_home')
+	reload_doc('stock', 'page', 'stock_home')
+	reload_doc('hr', 'page', 'hr_home')
+	reload_doc('support', 'page', 'support_home')
+	reload_doc('production', 'page', 'production_home')
+	reload_doc('projects', 'page', 'projects_home')
+	reload_doc('website', 'page', 'website_home')
+	reload_doc('home', 'page', 'desktop')
+	reload_doc('utilities', 'page', 'todo')
+	reload_doc('utilities', 'page', 'calendar')
+	reload_doc('utilities', 'page', 'messages')
+	
+	webnotes.conn.set_value('Control Panel', 'Control Panel', 'home_page',
+			'desktop')
+
+	webnotes.conn.commit()
+
+	try:
+		webnotes.conn.sql("""create table __SchedulerLog (
+			`timestamp` timestamp,
+			method varchar(200),
+			error text
+		) engine=MyISAM""")
+	except _mysql_exceptions.OperationalError, e:
+		pass
diff --git a/erpnext/patches/jan_mar_2012/no_copy_patch.py b/erpnext/patches/jan_mar_2012/no_copy_patch.py
index 5e97ae3..fb12824 100644
--- a/erpnext/patches/jan_mar_2012/no_copy_patch.py
+++ b/erpnext/patches/jan_mar_2012/no_copy_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("update `tabDocField` set no_copy = 1 where fieldname = 'insert_after' and parent = 'Custom Field'")
diff --git a/erpnext/patches/jan_mar_2012/pending_patches.py b/erpnext/patches/jan_mar_2012/pending_patches.py
index 970af74..351200f 100644
--- a/erpnext/patches/jan_mar_2012/pending_patches.py
+++ b/erpnext/patches/jan_mar_2012/pending_patches.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.model.code import get_obj
diff --git a/erpnext/patches/jan_mar_2012/pos_setting_patch.py b/erpnext/patches/jan_mar_2012/pos_setting_patch.py
index c202ab7..c974b35 100644
--- a/erpnext/patches/jan_mar_2012/pos_setting_patch.py
+++ b/erpnext/patches/jan_mar_2012/pos_setting_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("update `tabDocField` set `default` = 1 where fieldname = 'conversion_rate' and parent = 'POS Setting'")
diff --git a/erpnext/patches/jan_mar_2012/print_hide_totals.py b/erpnext/patches/jan_mar_2012/print_hide_totals.py
index 5d1854d..4299cb4 100644
--- a/erpnext/patches/jan_mar_2012/print_hide_totals.py
+++ b/erpnext/patches/jan_mar_2012/print_hide_totals.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def execute():
diff --git a/erpnext/patches/jan_mar_2012/production_cleanup.py b/erpnext/patches/jan_mar_2012/production_cleanup.py
index f50278f..d0a5879 100644
--- a/erpnext/patches/jan_mar_2012/production_cleanup.py
+++ b/erpnext/patches/jan_mar_2012/production_cleanup.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/reload_doctype.py b/erpnext/patches/jan_mar_2012/reload_doctype.py
index a63039a..51241b8 100644
--- a/erpnext/patches/jan_mar_2012/reload_doctype.py
+++ b/erpnext/patches/jan_mar_2012/reload_doctype.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/reload_item.py b/erpnext/patches/jan_mar_2012/reload_item.py
index 158b67d..c45b818 100644
--- a/erpnext/patches/jan_mar_2012/reload_item.py
+++ b/erpnext/patches/jan_mar_2012/reload_item.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py b/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
index c97f20c..4ed252b 100644
--- a/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
+++ b/erpnext/patches/jan_mar_2012/reload_po_pr_mapper.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/remove_archive.py b/erpnext/patches/jan_mar_2012/remove_archive.py
index 1b914d5..5f5cea6 100644
--- a/erpnext/patches/jan_mar_2012/remove_archive.py
+++ b/erpnext/patches/jan_mar_2012/remove_archive.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # TODO take backup before running this patch
 def execute():
 	"""
diff --git a/erpnext/patches/jan_mar_2012/remove_get_tds_button.py b/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
index 268c9ef..fe804c0 100644
--- a/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
+++ b/erpnext/patches/jan_mar_2012/remove_get_tds_button.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		Remove One Get TDS button, which is appearing twice in JV
diff --git a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
index 511424f..01aeebf 100644
--- a/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
+++ b/erpnext/patches/jan_mar_2012/rename_doctype_indent.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 def execute():
 	"""
diff --git a/erpnext/patches/jan_mar_2012/serial_no_add_opt.py b/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
index 92011b0..947c28d 100644
--- a/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
+++ b/erpnext/patches/jan_mar_2012/serial_no_add_opt.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	opts = webnotes.conn.sql("""\
diff --git a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
index bd86411..e4078aa 100644
--- a/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
+++ b/erpnext/patches/jan_mar_2012/stable_branch_shift_09_01_12.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.modules.module_manager import reload_doc
 	
diff --git a/erpnext/patches/jan_mar_2012/subcon_default_val.py b/erpnext/patches/jan_mar_2012/subcon_default_val.py
index c0bee4c..8164b0a 100644
--- a/erpnext/patches/jan_mar_2012/subcon_default_val.py
+++ b/erpnext/patches/jan_mar_2012/subcon_default_val.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	webnotes.conn.sql("""
diff --git a/erpnext/patches/jan_mar_2012/website/all.py b/erpnext/patches/jan_mar_2012/website/all.py
index 1443f36..47be62a 100644
--- a/erpnext/patches/jan_mar_2012/website/all.py
+++ b/erpnext/patches/jan_mar_2012/website/all.py
@@ -1,3 +1,19 @@
+# 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 patches.jan_mar_2012.website.login
 import patches.jan_mar_2012.website.feed
 import patches.jan_mar_2012.website.website
diff --git a/erpnext/patches/jan_mar_2012/website/allow_product_delete.py b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
index fbef48f..effec2e 100644
--- a/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
+++ b/erpnext/patches/jan_mar_2012/website/allow_product_delete.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	"""
 		Allow deletion of products
diff --git a/erpnext/patches/jan_mar_2012/website/analytics.py b/erpnext/patches/jan_mar_2012/website/analytics.py
index 68ccfcf..b8afb59 100644
--- a/erpnext/patches/jan_mar_2012/website/analytics.py
+++ b/erpnext/patches/jan_mar_2012/website/analytics.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():	
 	from webnotes.modules import reload_doc
 	reload_doc('website', 'doctype', 'website_settings')
diff --git a/erpnext/patches/jan_mar_2012/website/cleanups.py b/erpnext/patches/jan_mar_2012/website/cleanups.py
index b7b7736..16297d2 100644
--- a/erpnext/patches/jan_mar_2012/website/cleanups.py
+++ b/erpnext/patches/jan_mar_2012/website/cleanups.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def execute():
diff --git a/erpnext/patches/jan_mar_2012/website/domain_list.py b/erpnext/patches/jan_mar_2012/website/domain_list.py
index fabbdce..25f50e2 100644
--- a/erpnext/patches/jan_mar_2012/website/domain_list.py
+++ b/erpnext/patches/jan_mar_2012/website/domain_list.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 def execute():
 	import webnotes
 	from webnotes.modules.module_manager import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/website/feed.py b/erpnext/patches/jan_mar_2012/website/feed.py
index c913c49..4af0140 100644
--- a/erpnext/patches/jan_mar_2012/website/feed.py
+++ b/erpnext/patches/jan_mar_2012/website/feed.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.doc import Document
 from webnotes.modules import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/website/file_data_rename.py b/erpnext/patches/jan_mar_2012/website/file_data_rename.py
index 2cd5e68..481a530 100644
--- a/erpnext/patches/jan_mar_2012/website/file_data_rename.py
+++ b/erpnext/patches/jan_mar_2012/website/file_data_rename.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def execute():
diff --git a/erpnext/patches/jan_mar_2012/website/getfile_rename.py b/erpnext/patches/jan_mar_2012/website/getfile_rename.py
index 15aa815..769ac37 100644
--- a/erpnext/patches/jan_mar_2012/website/getfile_rename.py
+++ b/erpnext/patches/jan_mar_2012/website/getfile_rename.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def execute():
diff --git a/erpnext/patches/jan_mar_2012/website/login.py b/erpnext/patches/jan_mar_2012/website/login.py
index 97cd323..babd550 100644
--- a/erpnext/patches/jan_mar_2012/website/login.py
+++ b/erpnext/patches/jan_mar_2012/website/login.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.doc import Document
 from webnotes.modules import reload_doc
diff --git a/erpnext/patches/jan_mar_2012/website/website.py b/erpnext/patches/jan_mar_2012/website/website.py
index 320c31e..c6403e5 100644
--- a/erpnext/patches/jan_mar_2012/website/website.py
+++ b/erpnext/patches/jan_mar_2012/website/website.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # website patch
 
 import webnotes
diff --git a/erpnext/patches/old_patches/customer_address.py b/erpnext/patches/old_patches/customer_address.py
index 41c97b8..44568ce 100644
--- a/erpnext/patches/old_patches/customer_address.py
+++ b/erpnext/patches/old_patches/customer_address.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 from webnotes.model.doc import Document
diff --git a/erpnext/patches/old_patches/doctype_permission_patch.py b/erpnext/patches/old_patches/doctype_permission_patch.py
index 2bb7cf1..0953864 100644
--- a/erpnext/patches/old_patches/doctype_permission_patch.py
+++ b/erpnext/patches/old_patches/doctype_permission_patch.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 def set_doctype_permissions():
diff --git a/erpnext/patches/old_patches/feed_patch.py b/erpnext/patches/old_patches/feed_patch.py
index 9d8ab0b..1edac88 100644
--- a/erpnext/patches/old_patches/feed_patch.py
+++ b/erpnext/patches/old_patches/feed_patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # long patches
 import webnotes
 
diff --git a/erpnext/patches/old_patches/patch_1.py b/erpnext/patches/old_patches/patch_1.py
index 9173ca5..4176bf5 100644
--- a/erpnext/patches/old_patches/patch_1.py
+++ b/erpnext/patches/old_patches/patch_1.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 	Old patches for reference
 """
diff --git a/erpnext/patches/old_patches/rename_search_criteria.py b/erpnext/patches/old_patches/rename_search_criteria.py
index e7cf1d9..0cd23ed 100644
--- a/erpnext/patches/old_patches/rename_search_criteria.py
+++ b/erpnext/patches/old_patches/rename_search_criteria.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.code import get_obj
 def execute():
diff --git a/erpnext/patches/old_patches/replacecode.py b/erpnext/patches/old_patches/replacecode.py
index ff9e10d..0043f9c 100644
--- a/erpnext/patches/old_patches/replacecode.py
+++ b/erpnext/patches/old_patches/replacecode.py
@@ -1,3 +1,19 @@
+# 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
 
 def replace_code(old, new):
diff --git a/erpnext/patches/patch.py b/erpnext/patches/patch.py
index 2563915..744b102 100644
--- a/erpnext/patches/patch.py
+++ b/erpnext/patches/patch.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # REMEMBER to update this
 # ========================
 
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index e83d2a6..dc9f1dd 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 patch_list = [
 	{
 		'patch_module': 'patches.jan_mar_2012',
diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
index 1342140..ae61147 100644
--- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
+++ b/erpnext/production/doctype/bill_of_materials/bill_of_materials.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // On REFRESH
 cur_frm.cscript.refresh = function(doc,dt,dn){
 	if(!doc.__islocal) {
diff --git a/erpnext/production/doctype/bill_of_materials/bill_of_materials.py b/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
index decb9fe..3f0bb9e 100644
--- a/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
+++ b/erpnext/production/doctype/bill_of_materials/bill_of_materials.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import cint, cstr, flt, get_defaults, getdate, now, nowdate
 from webnotes.model.doc import Document, addchild, getchildren, make_autoname
diff --git a/erpnext/production/doctype/bom_control/bom_control.py b/erpnext/production/doctype/bom_control/bom_control.py
index a880d72..d8a9e59 100644
--- a/erpnext/production/doctype/bom_control/bom_control.py
+++ b/erpnext/production/doctype/bom_control/bom_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js
index f01fdfd..41cb17c 100644
--- a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js
+++ b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 // Get Query functions 
 cur_frm.fields_dict['s_bom'].get_query = function(doc) {
diff --git a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py
index 9b64b77..c7ab0d3 100644
--- a/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py
+++ b/erpnext/production/doctype/bom_replace_utility/bom_replace_utility.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/production/doctype/production_control/production_control.py b/erpnext/production/doctype/production_control/production_control.py
index f3e1492..c051d1e 100644
--- a/erpnext/production/doctype/production_control/production_control.py
+++ b/erpnext/production/doctype/production_control/production_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/production/doctype/production_order/production_order.js b/erpnext/production/doctype/production_order/production_order.js
index 9ff72ef..227f3ca 100644
--- a/erpnext/production/doctype/production_order/production_order.js
+++ b/erpnext/production/doctype/production_order/production_order.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 cur_frm.cscript.onload = function(doc, dt, dn) {
   if (!doc.posting_date) doc.transaction_date = dateutil.obj_to_str(new Date());
diff --git a/erpnext/production/doctype/production_order/production_order.py b/erpnext/production/doctype/production_order/production_order.py
index ff9de8f..ded32ff 100644
--- a/erpnext/production/doctype/production_order/production_order.py
+++ b/erpnext/production/doctype/production_order/production_order.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
index 6083dcb..e52c853 100644
--- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
+++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.item_code = function(doc,cdt,cdn) {
 	var d = locals[cdt][cdn];
 	if (d.item_code) {
diff --git a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
index c2a609d..4e4832f 100644
--- a/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
+++ b/erpnext/production/doctype/production_planning_tool/production_planning_tool.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import cint, cstr, flt, getdate, now, nowdate
 from webnotes.model.doc import addchild
diff --git a/erpnext/production/doctype/update_delivery_date/update_delivery_date.js b/erpnext/production/doctype/update_delivery_date/update_delivery_date.js
index 372d6da..394f76c 100644
--- a/erpnext/production/doctype/update_delivery_date/update_delivery_date.js
+++ b/erpnext/production/doctype/update_delivery_date/update_delivery_date.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //get query select Territory
 //=======================================================================================================================
 cur_frm.fields_dict['territory'].get_query = function(doc,cdt,cdn) {
diff --git a/erpnext/production/doctype/update_delivery_date/update_delivery_date.py b/erpnext/production/doctype/update_delivery_date/update_delivery_date.py
index 7cfe588..c7c2e48 100644
--- a/erpnext/production/doctype/update_delivery_date/update_delivery_date.py
+++ b/erpnext/production/doctype/update_delivery_date/update_delivery_date.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/production/doctype/workstation/workstation.js b/erpnext/production/doctype/workstation/workstation.js
index 6ffef4a..3cad944 100644
--- a/erpnext/production/doctype/workstation/workstation.js
+++ b/erpnext/production/doctype/workstation/workstation.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/production/doctype/workstation/workstation.py b/erpnext/production/doctype/workstation/workstation.py
index 45851de..d92f6ac 100644
--- a/erpnext/production/doctype/workstation/workstation.py
+++ b/erpnext/production/doctype/workstation/workstation.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/production/page/bill_of_materials/bill_of_materials.js b/erpnext/production/page/bill_of_materials/bill_of_materials.js
index c40fa11..aba5666 100644
--- a/erpnext/production/page/bill_of_materials/bill_of_materials.js
+++ b/erpnext/production/page/bill_of_materials/bill_of_materials.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Bill of Materials'] = function() {
 	wn.require('lib/js/legacy/widgets/tree.js');
 	
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/production/page/production_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/production/page/production_home/__init__.py
diff --git a/erpnext/production/page/production_home/production_home.html b/erpnext/production/page/production_home/production_home.html
new file mode 100644
index 0000000..13e2468
--- /dev/null
+++ b/erpnext/production/page/production_home/production_home.html
@@ -0,0 +1,58 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Production</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a href="#!List/Production Order">Production Order</a></h4>
+			<p class="help">Orders for manufacturing</p>
+			<h4><a href="#!Form/Production Planning Tool/Production Planning Tool">Production Plan</a></h4>
+			<p class="help">Generate Purchase Requisition (MRP) and Production Orders</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!List/Bill Of Materials">Bill of Materials</a></h4>
+			<p class="help">Bill of Materials (BOM) Master</p>
+			<h4><a href="#!List/Item">Item</a></h4>
+			<p class="help">Item Master</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Setup</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Workstation master"
+							href="#!List/Workstation">Workstations</a>
+					</div>
+				</div>
+			</div>
+			<div class="section">
+				<div class="section-head">Tools</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "browse bill of materials in a tree"
+							href="#!Bill of Materials">BOM Browser</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Replace item/sub-assembly from a sub-assembly from all BOMs"
+							href="#!Form/BOM Replace Utility/BOM Replace Utility">BOM Replace Item</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Update delivery dates in all Sales Orders"
+							href="#!Form/Update Delivery Date/Update Delivery Date">Update Delivery Dates</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/production/page/production_home/production_home.js b/erpnext/production/page/production_home/production_home.js
new file mode 100644
index 0000000..5367815
--- /dev/null
+++ b/erpnext/production/page/production_home/production_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_production-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Production', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/production/page/production_home/production_home.txt b/erpnext/production/page/production_home/production_home.txt
new file mode 100644
index 0000000..4f6cabb
--- /dev/null
+++ b/erpnext/production/page/production_home/production_home.txt
@@ -0,0 +1,28 @@
+# Page, production-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:24:34',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:24:34',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Production',
+		'name': '__common__',
+		'page_name': u'production-home',
+		'standard': u'Yes',
+		'title': u'Production Home'
+	},
+
+	# Page, production-home
+	{
+		'doctype': 'Page',
+		'name': u'production-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
index 970dd51..63d0da8 100644
--- a/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
+++ b/erpnext/production/search_criteria/delivery_plan/delivery_plan.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   //to hide all filters
diff --git a/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js b/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js
index 10ec7fb..4998fad 100644
--- a/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js
+++ b/erpnext/production/search_criteria/itemwise_production_report/itemwise_production_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   //to hide all filters
diff --git a/erpnext/projects/doctype/project/project.js b/erpnext/projects/doctype/project/project.js
index b286cd7..801ba56 100644
--- a/erpnext/projects/doctype/project/project.js
+++ b/erpnext/projects/doctype/project/project.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //-------------------------- Onload ---------------------------
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
   if(!doc.status) set_multiple(cdt,cdn,{status:'Draft'});
diff --git a/erpnext/projects/doctype/project/project.py b/erpnext/projects/doctype/project/project.py
index 4504191..2e3e3e6 100644
--- a/erpnext/projects/doctype/project/project.py
+++ b/erpnext/projects/doctype/project/project.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/projects/doctype/project_activity/project_activity.js b/erpnext/projects/doctype/project_activity/project_activity.js
index bc256a1..ed2b1df 100644
--- a/erpnext/projects/doctype/project_activity/project_activity.js
+++ b/erpnext/projects/doctype/project_activity/project_activity.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, dt, dn) {
   // created?
   if(cur_frm.mylist) {
diff --git a/erpnext/projects/doctype/project_activity/project_activity.py b/erpnext/projects/doctype/project_activity/project_activity.py
index af94ec8..d90dfa9 100644
--- a/erpnext/projects/doctype/project_activity/project_activity.py
+++ b/erpnext/projects/doctype/project_activity/project_activity.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/projects/doctype/project_control/project_control.py b/erpnext/projects/doctype/project_control/project_control.py
index ed192d2..a1fdf11 100644
--- a/erpnext/projects/doctype/project_control/project_control.py
+++ b/erpnext/projects/doctype/project_control/project_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/projects/doctype/ticket/ticket.js b/erpnext/projects/doctype/ticket/ticket.js
index 323643b..322b8a1 100644
--- a/erpnext/projects/doctype/ticket/ticket.js
+++ b/erpnext/projects/doctype/ticket/ticket.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,cdt,cdn){
   if(!doc.senders_name) {  
     doc.senders_name = user_fullname;
diff --git a/erpnext/projects/doctype/ticket/ticket.py b/erpnext/projects/doctype/ticket/ticket.py
index 24c9750..51a9875 100644
--- a/erpnext/projects/doctype/ticket/ticket.py
+++ b/erpnext/projects/doctype/ticket/ticket.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/projects/doctype/timesheet/timesheet.js b/erpnext/projects/doctype/timesheet/timesheet.js
index 4140698..a49b5a1 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.js
+++ b/erpnext/projects/doctype/timesheet/timesheet.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 // ======================= OnLoad =============================================
 cur_frm.cscript.onload = function(doc,cdt,cdn){  
diff --git a/erpnext/projects/doctype/timesheet/timesheet.py b/erpnext/projects/doctype/timesheet/timesheet.py
index f07975c..ec58a46 100644
--- a/erpnext/projects/doctype/timesheet/timesheet.py
+++ b/erpnext/projects/doctype/timesheet/timesheet.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/projects/page/projects/projects.js b/erpnext/projects/page/projects/projects.js
index 5f4c52d..3778a34 100644
--- a/erpnext/projects/page/projects/projects.js
+++ b/erpnext/projects/page/projects/projects.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript.queries_bg_dict = {
 	'Urgent':'RED',
 	'High':'ORANGE',
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/projects/page/projects_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/projects/page/projects_home/__init__.py
diff --git a/erpnext/projects/page/projects_home/projects_home.html b/erpnext/projects/page/projects_home/projects_home.html
new file mode 100644
index 0000000..37da61f
--- /dev/null
+++ b/erpnext/projects/page/projects_home/projects_home.html
@@ -0,0 +1,38 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Projects</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a href="#!List/Project">Project</a></h4>
+			<p class="help">Project master</p>
+			<h4><a href="#!List/Task">Task</a></h4>
+			<p class="help">Project activity / task</p>
+			<h4><a href="#!List/Task">Timesheet</a></h4>
+			<p class="help">Timesheet for tasks</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!Projects">Gantt Chart</a></h4>
+			<p class="help">Gantt chart of all tasks</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Setup</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Types of activities for Time Sheets"
+							href="#!List/Activity Type">Activity Type</a>						
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/projects/page/projects_home/projects_home.js b/erpnext/projects/page/projects_home/projects_home.js
new file mode 100644
index 0000000..73d6e33
--- /dev/null
+++ b/erpnext/projects/page/projects_home/projects_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_projects-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Projects', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/projects/page/projects_home/projects_home.txt b/erpnext/projects/page/projects_home/projects_home.txt
new file mode 100644
index 0000000..665ac99
--- /dev/null
+++ b/erpnext/projects/page/projects_home/projects_home.txt
@@ -0,0 +1,28 @@
+# Page, projects-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:24:22',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:24:22',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Projects',
+		'name': '__common__',
+		'page_name': u'projects-home',
+		'standard': u'Yes',
+		'title': u'Projects Home'
+	},
+
+	# Page, projects-home
+	{
+		'doctype': 'Page',
+		'name': u'projects-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
index f2ffe9f..a31d6e4 100644
--- a/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
+++ b/erpnext/projects/search_criteria/dispatch_report/dispatch_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.mytabs.items['Select Columns'].hide()
   //this.mytabs.items['More Filters'].hide()
diff --git a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
index 594c5c0..77ce624 100644
--- a/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
+++ b/erpnext/projects/search_criteria/projectwise_delivered_qty_and_costs/projectwise_delivered_qty_and_costs.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
index f518e4b..e04a7c6 100644
--- a/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
+++ b/erpnext/projects/search_criteria/projectwise_pending_qty_and_costs/projectwise_pending_qty_and_costs.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
index 19ffe09..0401c28 100644
--- a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
+++ b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   //hide all filters
   //------------------------------------------------
diff --git a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
index 60a09d1..2147699 100644
--- a/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
+++ b/erpnext/projects/search_criteria/projectwise_purchase_details/projectwise_purchase_details.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 based_on = filter_values.get('based_on')
 # make default columns
 #for r in res:
diff --git a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
index 0d3a598..83951b5 100644
--- a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
+++ b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   //hide all filters
   //------------------------------------------------
diff --git a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
index 0999ac4..15a20a7 100644
--- a/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
+++ b/erpnext/projects/search_criteria/projectwise_sales_details/projectwise_sales_details.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 based_on = filter_values.get('based_on')
 
 cols=[]
diff --git a/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js b/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js
index 1cfe178..12d9680 100644
--- a/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js
+++ b/erpnext/projects/search_criteria/timesheet_report/timesheet_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Timesheet Detail'+FILTER_SEP +'Project Name'].df.in_first_page = 1;
   this.filter_fields_dict['Timesheet Detail'+FILTER_SEP +'Task Id'].df.in_first_page = 1;
diff --git a/erpnext/sandbox/test_leave.py b/erpnext/sandbox/test_leave.py
index cc2149f..407b0f1 100644
--- a/erpnext/sandbox/test_leave.py
+++ b/erpnext/sandbox/test_leave.py
@@ -1,3 +1,19 @@
+# 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 unittest
 
 import webnotes
diff --git a/erpnext/sandbox/test_stock_entry.py b/erpnext/sandbox/test_stock_entry.py
index d1e0097..7721a3e 100644
--- a/erpnext/sandbox/test_stock_entry.py
+++ b/erpnext/sandbox/test_stock_entry.py
@@ -1,3 +1,19 @@
+# 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 unittest
 
 import webnotes
diff --git a/erpnext/sandbox/test_stock_reco.py b/erpnext/sandbox/test_stock_reco.py
index bcde49e..1d78277 100644
--- a/erpnext/sandbox/test_stock_reco.py
+++ b/erpnext/sandbox/test_stock_reco.py
@@ -1,3 +1,19 @@
+# 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 unittest
 
 import webnotes
diff --git a/erpnext/sandbox/testdata/leaves.py b/erpnext/sandbox/testdata/leaves.py
index 8d44ffb..d8ed122 100644
--- a/erpnext/sandbox/testdata/leaves.py
+++ b/erpnext/sandbox/testdata/leaves.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 from webnotes.model.doc import Document
 
 emp = Document(
diff --git a/erpnext/sandbox/testdata/masters.py b/erpnext/sandbox/testdata/masters.py
index 7f2d67c..368e6e4 100644
--- a/erpnext/sandbox/testdata/masters.py
+++ b/erpnext/sandbox/testdata/masters.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 	All master data in one place, can be created by 1 function call
 
diff --git a/erpnext/sandbox/testdata/sle_data.py b/erpnext/sandbox/testdata/sle_data.py
index eab0376..3469c10 100644
--- a/erpnext/sandbox/testdata/sle_data.py
+++ b/erpnext/sandbox/testdata/sle_data.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 from webnotes.model.doc import Document
 
 # Existing SLE data
diff --git a/erpnext/sandbox/testdata/stock_entry.py b/erpnext/sandbox/testdata/stock_entry.py
index 3316016..91aaed4 100644
--- a/erpnext/sandbox/testdata/stock_entry.py
+++ b/erpnext/sandbox/testdata/stock_entry.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 from webnotes.model.doc import Document
 
 # Material  Receipt
diff --git a/erpnext/sandbox/testdata/stock_reco.py b/erpnext/sandbox/testdata/stock_reco.py
index efcbbc5..14e28ff 100644
--- a/erpnext/sandbox/testdata/stock_reco.py
+++ b/erpnext/sandbox/testdata/stock_reco.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 from webnotes.model.doc import Document
 
 # Stock Reconciliation
diff --git a/erpnext/selling/doctype/campaign/campaign.js b/erpnext/selling/doctype/campaign/campaign.js
index 6ffef4a..3cad944 100644
--- a/erpnext/selling/doctype/campaign/campaign.js
+++ b/erpnext/selling/doctype/campaign/campaign.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/selling/doctype/campaign/campaign.txt b/erpnext/selling/doctype/campaign/campaign.txt
index 1f1c3a0..8810cb8 100644
--- a/erpnext/selling/doctype/campaign/campaign.txt
+++ b/erpnext/selling/doctype/campaign/campaign.txt
@@ -5,164 +5,84 @@
 	{
 		'creation': '2010-08-08 17:08:54',
 		'docstatus': 0,
-		'modified': '2010-09-20 14:06:57',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
+		'modified': '2012-02-20 18:06:32',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
 	},
 
 	# These values are common for all DocType
 	{
+		'_last_update': u'1326102553',
 		'allow_trash': 1,
-		'autoname': 'field:campaign_name',
-		'colour': 'White:FFF',
+		'autoname': u'field:campaign_name',
+		'colour': u'White:FFF',
+		'default_print_format': u'Standard',
 		'doctype': 'DocType',
-		'document_type': 'Master',
-		'module': 'Selling',
+		'document_type': u'Master',
+		'module': u'Selling',
 		'name': '__common__',
-		'section_style': 'Simple',
-		'server_code_error': ' ',
+		'section_style': u'Simple',
+		'server_code_error': u' ',
 		'show_in_menu': 0,
-		'version': 6
+		'version': 7
 	},
 
 	# These values are common for all DocField
 	{
-		'doctype': 'DocField',
+		'doctype': u'DocField',
 		'name': '__common__',
-		'parent': 'Campaign',
-		'parentfield': 'fields',
-		'parenttype': 'DocType'
-	},
-
-	# These values are common for all DocPerm
-	{
-		'amend': 0,
-		'doctype': 'DocPerm',
-		'name': '__common__',
-		'parent': 'Campaign',
-		'parentfield': 'permissions',
-		'parenttype': 'DocType',
-		'read': 1,
-		'submit': 0
+		'parent': u'Campaign',
+		'parentfield': u'fields',
+		'parenttype': u'DocType'
 	},
 
 	# DocType, Campaign
 	{
 		'doctype': 'DocType',
-		'name': 'Campaign'
-	},
-
-	# DocPerm
-	{
-		'cancel': 0,
-		'create': 0,
-		'doctype': 'DocPerm',
-		'idx': 1,
-		'permlevel': 1,
-		'role': 'Sales Manager',
-		'write': 0
-	},
-
-	# DocPerm
-	{
-		'cancel': 0,
-		'create': 0,
-		'doctype': 'DocPerm',
-		'idx': 2,
-		'permlevel': 0,
-		'role': 'Sales Manager',
-		'write': 0
-	},
-
-	# DocPerm
-	{
-		'cancel': 0,
-		'create': 0,
-		'doctype': 'DocPerm',
-		'idx': 3,
-		'permlevel': 1,
-		'role': 'Sales Master Manager',
-		'write': 0
-	},
-
-	# DocPerm
-	{
-		'cancel': 0,
-		'create': 0,
-		'doctype': 'DocPerm',
-		'idx': 4,
-		'permlevel': 1,
-		'role': 'Sales User',
-		'write': 0
-	},
-
-	# DocPerm
-	{
-		'cancel': 0,
-		'create': 0,
-		'doctype': 'DocPerm',
-		'idx': 5,
-		'permlevel': 0,
-		'role': 'Sales User',
-		'write': 0
-	},
-
-	# DocPerm
-	{
-		'cancel': 1,
-		'create': 1,
-		'doctype': 'DocPerm',
-		'idx': 6,
-		'permlevel': 0,
-		'role': 'Sales Master Manager',
-		'write': 1
+		'name': u'Campaign'
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'trash_reason',
-		'fieldtype': 'Small Text',
-		'idx': 1,
-		'label': 'Trash Reason',
-		'oldfieldname': 'trash_reason',
-		'oldfieldtype': 'Small Text',
+		'doctype': u'DocField',
+		'fieldname': u'trash_reason',
+		'fieldtype': u'Small Text',
+		'label': u'Trash Reason',
+		'oldfieldname': u'trash_reason',
+		'oldfieldtype': u'Small Text',
 		'permlevel': 1
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldtype': 'Section Break',
-		'idx': 2,
-		'label': 'Campaign',
-		'oldfieldtype': 'Section Break',
+		'doctype': u'DocField',
+		'fieldtype': u'Section Break',
+		'label': u'Campaign',
+		'oldfieldtype': u'Section Break',
 		'permlevel': 0
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'campaign_name',
-		'fieldtype': 'Data',
-		'idx': 3,
-		'label': 'Campaign Name',
-		'oldfieldname': 'campaign_name',
-		'oldfieldtype': 'Data',
+		'doctype': u'DocField',
+		'fieldname': u'campaign_name',
+		'fieldtype': u'Data',
+		'label': u'Campaign Name',
+		'oldfieldname': u'campaign_name',
+		'oldfieldtype': u'Data',
 		'permlevel': 0,
 		'reqd': 1
 	},
 
 	# DocField
 	{
-		'doctype': 'DocField',
-		'fieldname': 'description',
-		'fieldtype': 'Text',
-		'idx': 4,
-		'label': 'Description',
-		'oldfieldname': 'description',
-		'oldfieldtype': 'Text',
+		'doctype': u'DocField',
+		'fieldname': u'description',
+		'fieldtype': u'Text',
+		'label': u'Description',
+		'oldfieldname': u'description',
+		'oldfieldtype': u'Text',
 		'permlevel': 0,
-		'width': '300px'
+		'width': u'300px'
 	}
 ]
\ No newline at end of file
diff --git a/erpnext/selling/doctype/customer/customer.js b/erpnext/selling/doctype/customer/customer.js
index 7e689dd..89b95fa 100644
--- a/erpnext/selling/doctype/customer/customer.js
+++ b/erpnext/selling/doctype/customer/customer.js
@@ -1,3 +1,19 @@
+// 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(Contact Control)
 
 /* ********************************* onload ********************************************* */
diff --git a/erpnext/selling/doctype/customer/customer.py b/erpnext/selling/doctype/customer/customer.py
index 2c804e5..4530cf5 100644
--- a/erpnext/selling/doctype/customer/customer.py
+++ b/erpnext/selling/doctype/customer/customer.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/enquiry/enquiry.js b/erpnext/selling/doctype/enquiry/enquiry.js
index f7159ab..c3f0a0b 100644
--- a/erpnext/selling/doctype/enquiry/enquiry.js
+++ b/erpnext/selling/doctype/enquiry/enquiry.js
@@ -1,3 +1,19 @@
+// 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(SMS Control)
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn){
diff --git a/erpnext/selling/doctype/enquiry/enquiry.py b/erpnext/selling/doctype/enquiry/enquiry.py
index 5748525..6d655fb 100644
--- a/erpnext/selling/doctype/enquiry/enquiry.py
+++ b/erpnext/selling/doctype/enquiry/enquiry.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/industry_type/industry_type.js b/erpnext/selling/doctype/industry_type/industry_type.js
index 6ffef4a..3cad944 100644
--- a/erpnext/selling/doctype/industry_type/industry_type.js
+++ b/erpnext/selling/doctype/industry_type/industry_type.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/selling/doctype/installation_note/installation_note.js b/erpnext/selling/doctype/installation_note/installation_note.js
index 3fe7998..5486857 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.js
+++ b/erpnext/selling/doctype/installation_note/installation_note.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.tname = "Installed Item Details";
 cur_frm.cscript.fname = "installed_item_details";
 
diff --git a/erpnext/selling/doctype/installation_note/installation_note.py b/erpnext/selling/doctype/installation_note/installation_note.py
index 58b7d91..0b5f3c2 100644
--- a/erpnext/selling/doctype/installation_note/installation_note.py
+++ b/erpnext/selling/doctype/installation_note/installation_note.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/lead/lead.js b/erpnext/selling/doctype/lead/lead.js
index 888c030..7255636 100644
--- a/erpnext/selling/doctype/lead/lead.js
+++ b/erpnext/selling/doctype/lead/lead.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Module CRM
 
 $import(SMS Control)
diff --git a/erpnext/selling/doctype/lead/lead.py b/erpnext/selling/doctype/lead/lead.py
index 14d14e1..e5d2633 100644
--- a/erpnext/selling/doctype/lead/lead.py
+++ b/erpnext/selling/doctype/lead/lead.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/plot_control/plot_control.py b/erpnext/selling/doctype/plot_control/plot_control.py
index d403053..468f3c1 100644
--- a/erpnext/selling/doctype/plot_control/plot_control.py
+++ b/erpnext/selling/doctype/plot_control/plot_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index 9710447..2a130a5 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Module CRM
 cur_frm.cscript.tname = "Quotation Detail";
 cur_frm.cscript.fname = "quotation_details";
diff --git a/erpnext/selling/doctype/quotation/quotation.py b/erpnext/selling/doctype/quotation/quotation.py
index b903cc6..531de21 100644
--- a/erpnext/selling/doctype/quotation/quotation.py
+++ b/erpnext/selling/doctype/quotation/quotation.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/sales_common/sales_common.js b/erpnext/selling/doctype/sales_common/sales_common.js
index 98e5712..5d88c30 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.js
+++ b/erpnext/selling/doctype/sales_common/sales_common.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Preset
 // ------
 // cur_frm.cscript.tname - Details table name
diff --git a/erpnext/selling/doctype/sales_common/sales_common.py b/erpnext/selling/doctype/sales_common/sales_common.py
index 62d8861..003c3bd 100644
--- a/erpnext/selling/doctype/sales_common/sales_common.py
+++ b/erpnext/selling/doctype/sales_common/sales_common.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index b559755..4a724d2 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Module CRM
 
 cur_frm.cscript.tname = "Sales Order Detail";
diff --git a/erpnext/selling/doctype/sales_order/sales_order.py b/erpnext/selling/doctype/sales_order/sales_order.py
index 7de32dd..943a1fd 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.py
+++ b/erpnext/selling/doctype/sales_order/sales_order.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/doctype/shipping_address/shipping_address.js b/erpnext/selling/doctype/shipping_address/shipping_address.js
index 77c0d35..0ac173a 100755
--- a/erpnext/selling/doctype/shipping_address/shipping_address.js
+++ b/erpnext/selling/doctype/shipping_address/shipping_address.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Get Customer Details
 // =====================================================================
 cur_frm.add_fetch('customer','customer_name','customer_name');
diff --git a/erpnext/selling/doctype/shipping_address/shipping_address.py b/erpnext/selling/doctype/shipping_address/shipping_address.py
index 76d3749..179e2d4 100755
--- a/erpnext/selling/doctype/shipping_address/shipping_address.py
+++ b/erpnext/selling/doctype/shipping_address/shipping_address.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 sql = webnotes.conn.sql
 
diff --git a/erpnext/selling/doctype/sms_center/sms_center.py b/erpnext/selling/doctype/sms_center/sms_center.py
index 5564347..0e54dd6 100644
--- a/erpnext/selling/doctype/sms_center/sms_center.py
+++ b/erpnext/selling/doctype/sms_center/sms_center.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/selling/page/sales_browser/sales_browser.js b/erpnext/selling/page/sales_browser/sales_browser.js
index c7e400e..b079515 100644
--- a/erpnext/selling/page/sales_browser/sales_browser.js
+++ b/erpnext/selling/page/sales_browser/sales_browser.js
@@ -1,5 +1,29 @@
-pscript['onload_Sales Browser'] = function(){
+// 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/>.
+
+pscript['onshow_Sales Browser'] = function(){
   wn.require('lib/js/legacy/widgets/tree.js');
+
+	var route = decodeURIComponent(location.hash);
+	if(route.indexOf('/')!=-1) {
+		var chart_type = route.split('/')[1];
+		new SalesBrowser().set_val(chart_type)
+		return;
+	}
+
   var parent = $i('tr_body');
   parent.innerHTML = 'Please select your chart: '
   var sel = $a(parent,'select');
diff --git a/erpnext/selling/page/sales_dashboard/sales_dashboard.js b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
index d15c602..1af5cb4 100644
--- a/erpnext/selling/page/sales_dashboard/sales_dashboard.js
+++ b/erpnext/selling/page/sales_dashboard/sales_dashboard.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Sales Dashboard'] = function() {
   var h = new PageHeader('pt_header','Sales Dashboard');
   
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/selling/page/selling_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/selling/page/selling_home/__init__.py
diff --git a/erpnext/selling/page/selling_home/selling_home.html b/erpnext/selling/page/selling_home/selling_home.html
new file mode 100644
index 0000000..4216f43
--- /dev/null
+++ b/erpnext/selling/page/selling_home/selling_home.html
@@ -0,0 +1,102 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Selling</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a href="#!List/Lead">Lead</a></h4>
+			<p class="help">Prospective customers</p>
+			<h4><a href="#!List/Enquiry">Enquiry</a></h4>
+			<p class="help">Business opportunities</p>
+			<h4><a href="#!List/Quotation">Quotation</a></h4>
+			<p class="help">Quotes sent to Leads / Customers</p>
+			<h4><a href="#!List/Sales Order">Sales Order</a></h4>
+			<p class="help">Confirmed orders from Customers</p>	
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!List/Customer">Customer</a></h4>
+			<p class="help">Customer Master</p>
+			<h4><a href="#!List/Item">Item</a></h4>
+			<p class="help">Item Master</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Setup</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tax and charges structure master"
+							href="#!List/Other Charges">Sales Other Charges</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Multiple prices lists for items"
+							href="#!List/Price List">Price List</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Group items and accessories in one item code"
+							href="#!List/Sales BOM">Sales BOM</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Terms of contract template"
+							href="#!List/Term">Order Terms Template</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tree of customer groups"
+							href="#!Sales Browser/Customer Group">Customer Group</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tree of sales territories"
+							href="#!Sales Browser/Territory">Territory</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Sales persons and targets"
+							href="#!Sales Browser/Sales Person">Sales Person</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Commission partners and targets"
+							href="#!List/Sales Partner">Sales Partner</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Sales campaigns"
+							href="#!List/Campaign">Campaign</a>
+					</div>
+				</div>
+			</div>
+			<div class="section">
+				<div class="section-head">Tools</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Helper for managing return of goods (sales or purchase)"
+							href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales Returns</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Analyze Sales and Purchase trends and slice them based on item, customer, groups etc"
+							href="#!Report/Profile/Trend Analyzer">Trend Analyzer</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "sales trends"
+							href="#!Sales Dashboard">Sales Dashboard</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/selling/page/selling_home/selling_home.js b/erpnext/selling/page/selling_home/selling_home.js
new file mode 100644
index 0000000..e0430d7
--- /dev/null
+++ b/erpnext/selling/page/selling_home/selling_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_selling-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Selling', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/selling/page/selling_home/selling_home.txt b/erpnext/selling/page/selling_home/selling_home.txt
new file mode 100644
index 0000000..e6636a8
--- /dev/null
+++ b/erpnext/selling/page/selling_home/selling_home.txt
@@ -0,0 +1,43 @@
+# Page, selling-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-20 15:46:39',
+		'docstatus': 0,
+		'modified': '2012-02-20 15:46:57',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Selling',
+		'name': '__common__',
+		'page_name': u'selling-home',
+		'standard': u'Yes',
+		'title': u'Selling Home'
+	},
+
+	# These values are common for all Page Role
+	{
+		'doctype': u'Page Role',
+		'name': '__common__',
+		'parent': u'selling-home',
+		'parentfield': u'roles',
+		'parenttype': u'Page',
+		'role': u'All'
+	},
+
+	# Page, selling-home
+	{
+		'doctype': 'Page',
+		'name': u'selling-home'
+	},
+
+	# Page Role
+	{
+		'doctype': u'Page Role'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt b/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
index 99890b7..f63b2cc 100644
--- a/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
+++ b/erpnext/selling/search_criteria/customer_address_contact/customer_address_contact.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-02-13 11:28:45',
+		'creation': '2012-02-23 14:18:56',
 		'docstatus': 0,
-		'modified': '2012-02-13 11:28:45',
+		'modified': '2012-02-23 14:18:56',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
diff --git a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
index d8b6476..df8fc21 100644
--- a/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
+++ b/erpnext/selling/search_criteria/delivered_items_to_be_install/delivered_items_to_be_install.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
   this.filter_fields_dict['Delivery Note'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js b/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
index 0e73442..7f8aed8 100644
--- a/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
+++ b/erpnext/selling/search_criteria/draft_sales_orders/draft_sales_orders.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df['report_default'] = sys_defaults.year_start_date;
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'To Sales Order Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js
index 9497efb..f9c3cba 100644
--- a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js
+++ b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.mytabs.items['Select Columns'].hide()
   this.mytabs.items['More Filters'].hide()
diff --git a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py
index 1dcbeb0..85c37dc 100644
--- a/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py
+++ b/erpnext/selling/search_criteria/follow_up_report/follow_up_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 follow_up_on = filter_values.get('follow_up_on')
 
 cols = [['Document Type', 'Data', '150px', '']
diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.js b/erpnext/selling/search_criteria/gross_profit/gross_profit.js
index e610408..d53c07d 100644
--- a/erpnext/selling/search_criteria/gross_profit/gross_profit.js
+++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.mytabs.items['Select Columns'].hide();
   this.mytabs.tabs['More Filters'].hide();
diff --git a/erpnext/selling/search_criteria/gross_profit/gross_profit.py b/erpnext/selling/search_criteria/gross_profit/gross_profit.py
index 04f0220..47ca383 100644
--- a/erpnext/selling/search_criteria/gross_profit/gross_profit.py
+++ b/erpnext/selling/search_criteria/gross_profit/gross_profit.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Add Columns
 # ------------
 colnames[colnames.index('Rate*')] = 'Rate' 
diff --git a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
index df3b401..d501844 100644
--- a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
+++ b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Delivery Note'+FILTER_SEP +'From Voucher Date'].df['report_default'] = sys_defaults.year_start_date;
   this.filter_fields_dict['Delivery Note'+FILTER_SEP +'To Voucher Date'].df['report_default'] = dateutil.obj_to_str(new Date());
diff --git a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
index 55041e4..e86f8d3 100644
--- a/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
+++ b/erpnext/selling/search_criteria/itemwise_delivery_details/itemwise_delivery_details.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 out=[]
 qty,amt,bil_qty=0,0,0
 
diff --git a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
index 43a6951..05b2e75 100644
--- a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
+++ b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'ID'].df.in_first_page = 1;
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'From Sales Order Date'].df['report_default'] = sys_defaults.year_start_date;
diff --git a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
index e85302c..0e88acb 100644
--- a/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
+++ b/erpnext/selling/search_criteria/itemwise_sales_details/itemwise_sales_details.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 out=[]
 qty,amt,del_qty,bil_qty=0,0,0,0
 
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
index ca88e29..ac04e28 100644
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
+++ b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.js
@@ -1,2 +1,18 @@
+// 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/>.
+
 this.mytabs.items['Select Columns'].hide();
 this.mytabs.items['More Filters'].hide();
\ No newline at end of file
diff --git a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
index 8aed5a2..f18ee15 100644
--- a/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
+++ b/erpnext/selling/search_criteria/monthly_despatched_trend/monthly_despatched_trend.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 total = 0.0
 monthlist = ['','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec']
 for r in res:
diff --git a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
index 04d2755..ef3cef5 100644
--- a/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
+++ b/erpnext/selling/search_criteria/periodic_sales_summary/periodic_sales_summary.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.add_filter({fieldname:'transaction_date', label:'Sales Order Date', fieldtype:'Date', parent:'Sales Order', in_first_page : 1,default:''});
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
index 4cb0f3d..049c597 100644
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
+++ b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Sales Partner'].df.filter_hide = 0;
diff --git a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
index 4412f6c..4958674 100644
--- a/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
+++ b/erpnext/selling/search_criteria/sales_agentwise_commission/sales_agentwise_commission.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 coltypes[col_idx['Average Commission Rate']] = 'Currency'
 colwidths[col_idx['Average Commission Rate']] = '200px'
 
diff --git a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js b/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
index 46d4b2b..1b3837a 100644
--- a/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
+++ b/erpnext/selling/search_criteria/sales_order_pending_items1/sales_order_pending_items1.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
index 46d4b2b..1b3837a 100644
--- a/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
+++ b/erpnext/selling/search_criteria/sales_orderwise_pending_amount_to_bill/sales_orderwise_pending_amount_to_bill.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
index 0e0d461..135b68d 100644
--- a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
+++ b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   this.hide_all_filters();
diff --git a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
index 1eaf7bf..3375f08 100644
--- a/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
+++ b/erpnext/selling/search_criteria/sales_persons_target_variance_item_group_wise/sales_persons_target_variance_item_group_wise.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # validate Filters
 flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'sales_person':'Sales Person', 'target_on':'Target On'}
 for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
index 15de4b9..e1bd1d3 100755
--- a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
+++ b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
 
diff --git a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
index e47d654..83c61f4 100755
--- a/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
+++ b/erpnext/selling/search_criteria/sales_personwise_transaction_summary/sales_personwise_transaction_summary.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if filter_values.get('based_on') == 'Sales Invoice':
   based_on_dt = 'Receivable Voucher'
 else:
diff --git a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js
index 8a717b0..155b98d 100644
--- a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js
+++ b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Cost Center'+NEWLINE+'Sales Person'+NEWLINE+'Sales Partner',report_default:'Cost Center',ignore : 1,parent:'Target Detail'});
diff --git a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py
index 44016ee..771fd28 100644
--- a/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py
+++ b/erpnext/selling/search_criteria/target_variance_report/target_variance_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # validate Filters
 flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'company':'Company', 'under' : 'Under', 'based_on' : 'Based On'}
 for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
index 1843632..1afb7b1 100644
--- a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
+++ b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   this.hide_all_filters();
diff --git a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
index 41e9e16..eacb606 100644
--- a/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
+++ b/erpnext/selling/search_criteria/territories_target_variance_item_group_wise/territories_target_variance_item_group_wise.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # validate Filters
 flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'territory':'Territory', 'target_on':'Target On'}
 for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
index 3c513df..cf1df24 100644
--- a/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
+++ b/erpnext/selling/search_criteria/territory_item_group_wise_gp/territory_item_group_wise_gp.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Add Columns
 # ------------
 based_on = filter_values.get('based_on')
diff --git a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
index b589c25..2d725d2 100644
--- a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
+++ b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Sales Order'+NEWLINE+'Delivery Note'+NEWLINE+'Receivable Voucher',report_default:'Sales Order',ignore : 1, parent:'Territory'});
   this.add_filter({fieldname:'fiscal_year', label:'Fiscal Year', fieldtype:'Link', options:'Fiscal Year', report_default:sys_defaults.fiscal_year, ignore : 1, parent:'Territory'});
diff --git a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
index 3d0fbe2..0cc3af9 100644
--- a/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
+++ b/erpnext/selling/search_criteria/territory_sales___variance_report/territory_sales___variance_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if filter_values.get('period'):
   period_values = filter_values['period']
   if len(period_values.split(NEWLINE))>1:
diff --git a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
index d5ec9de..59a9b89 100644
--- a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
+++ b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Sales Person',report_default:'Territory',ignore : 1,parent:'Target Detail', single_select :1});
diff --git a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
index ff26227..fb6dee1 100644
--- a/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
+++ b/erpnext/selling/search_criteria/total_target_variance_report/total_target_variance_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # validate Filters
 flt_dict = {'fiscal_year': 'Fiscal Year', 'period': 'Period', 'under' : 'Under', 'based_on' : 'Based On','target_on':'Target On'}
 for f in flt_dict:
diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.js b/erpnext/selling/search_criteria/variance_report/variance_report.js
index e1f67d6..e4011e5 100644
--- a/erpnext/selling/search_criteria/variance_report/variance_report.js
+++ b/erpnext/selling/search_criteria/variance_report/variance_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.add_filter({fieldname:'based_on', label:'Based On', fieldtype:'Select', options:'Territory'+NEWLINE+'Sales Person'+NEWLINE+'Sales Partner',report_default:'Territory',ignore : 1,parent:'Target Detail'});
diff --git a/erpnext/selling/search_criteria/variance_report/variance_report.py b/erpnext/selling/search_criteria/variance_report/variance_report.py
index 3c26745..e4ebf33 100644
--- a/erpnext/selling/search_criteria/variance_report/variance_report.py
+++ b/erpnext/selling/search_criteria/variance_report/variance_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Add columns
 # -----------
 row_list = [['ID','Data','150px','']]
diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.js b/erpnext/setup/doctype/authorization_control/authorization_control.js
index fdec673..077d4f5 100644
--- a/erpnext/setup/doctype/authorization_control/authorization_control.js
+++ b/erpnext/setup/doctype/authorization_control/authorization_control.js
@@ -1 +1,17 @@
+// 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/>.
+
 // Settings
\ No newline at end of file
diff --git a/erpnext/setup/doctype/authorization_control/authorization_control.py b/erpnext/setup/doctype/authorization_control/authorization_control.py
index a91894f..ddfca53 100644
--- a/erpnext/setup/doctype/authorization_control/authorization_control.py
+++ b/erpnext/setup/doctype/authorization_control/authorization_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.js b/erpnext/setup/doctype/authorization_rule/authorization_rule.js
index 21f0848..02bd653 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.js
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/authorization_rule/authorization_rule.py b/erpnext/setup/doctype/authorization_rule/authorization_rule.py
index 60e1d45..2c4a0dc 100644
--- a/erpnext/setup/doctype/authorization_rule/authorization_rule.py
+++ b/erpnext/setup/doctype/authorization_rule/authorization_rule.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/brand/brand.js b/erpnext/setup/doctype/brand/brand.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/brand/brand.js
+++ b/erpnext/setup/doctype/brand/brand.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/company/company.js b/erpnext/setup/doctype/company/company.js
index c82b95c..3938cb5 100644
--- a/erpnext/setup/doctype/company/company.js
+++ b/erpnext/setup/doctype/company/company.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
   if(doc.abbr && !doc.__islocal) set_field_permlevel('abbr',1);
 }
diff --git a/erpnext/setup/doctype/company/company.py b/erpnext/setup/doctype/company/company.py
index 505ee13..9756583 100644
--- a/erpnext/setup/doctype/company/company.py
+++ b/erpnext/setup/doctype/company/company.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/contact_control/__init__.py b/erpnext/setup/doctype/contact_control/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/setup/doctype/contact_control/__init__.py
+++ /dev/null
diff --git a/erpnext/setup/doctype/contact_control/contact_control.js b/erpnext/setup/doctype/contact_control/contact_control.js
deleted file mode 100755
index b6825eb..0000000
--- a/erpnext/setup/doctype/contact_control/contact_control.js
+++ /dev/null
@@ -1,562 +0,0 @@
-// common partner functions
-// =========================
-
-/*
-// make shipping list body
-// ------------------------
-cur_frm.cscript.make_sl_body = function(){
-	cur_frm.fields_dict['Shipping HTML'].wrapper.innerHTML = '';
-	cur_frm.shipping_html = $a(cur_frm.fields_dict['Shipping HTML'].wrapper,'div');
-}
-*/
-
-// make history list body
-// -----------------------
-cur_frm.cscript.make_hl_body = function(){
-	cur_frm.fields_dict['History HTML'].wrapper.innerHTML = '';
-	cur_frm.history_html = $a(cur_frm.fields_dict['History HTML'].wrapper,'div');
-}
-
-
-/*
-// set shipping list message
-// --------------------------
-cur_frm.cscript.set_sl_msg = function(doc){
-	cur_frm.shipping_html.innerHTML = 'Shipping Address Details will appear only when you save the ' + doc.doctype.toLowerCase();
-}
-*/
-/*
-// set history list message
-// -------------------------
-cur_frm.cscript.set_hl_msg = function(doc){
-	cur_frm.history_html.innerHTML= 'History Details will appear only when you save the ' + doc.doctype.toLowerCase();
-}
-*/
-
-
-/*
-// make shipping address
-// -------------
-cur_frm.cscript.make_shipping_address = function(doc, dt, dn){
-  	cur_frm.shipping_html.innerHTML = '';
-
-	var dsn = cur_frm.doc.customer_name;
-	var dsa = cur_frm.doc.address;
-	cl = new AddressList(cur_frm.shipping_html,dt,dn,dsn,dsa);
-}
-*/
-
-
-// make history
-// -------------
-cur_frm.cscript.make_history = function(doc,dt,dn){
-	cur_frm.history_html.innerHTML = '';
-	cur_frm.cscript.make_history_list(cur_frm.history_html,doc);
-}
-
-// make history list
-// ------------------
-cur_frm.cscript.make_history_list = function(parent,doc){
-
-	var sel = $a(parent,'select');
-	
-	var ls = ['Select Transaction..'];
-	for(d in cur_frm.history_dict){
-		ls.push(d);
-	}
-	
-	add_sel_options(sel,ls,'Select..');
-	
-	var body = $a(parent,'div');
-	body.innerHTML = '<div class="help_box">Please select a transaction type to see History</div>';
-	
-	sel.body = body;
-	sel.doc = doc;
-	
-	sel.onchange = function(){
-		for(d in cur_frm.history_dict){
-			if(sel_val(this) == d){
-				this.body.innerHTML = '';
-				eval(cur_frm.history_dict[d]);
-				return;
-			}
-			else{
-				// pass
-			}
-		}
-	}
-}
-
-// run list
-// ---------
-cur_frm.cscript.run_list = function(lst,parent,q,q_max,doc,dn,nm){
-	
-	parent.innerHTML = '';
-	$dh(parent);
-	
-	lst.doc = doc;
-	lst.dn = dn;
-	lst.nm = nm;
-	lst.page_len = 10;
-	
-	lst.get_query = function(){
-		this.query = q;
-		this.query_max = q_max;
-	}
-	
-	lst.make(parent);
-	lst.run();
-	
-	lst.onrun = function(){
-		$ds(parent);
-		if(!this.has_data()){
-			parent.innerHTML = '';
-			var dv = $a(parent,'div','help_box');
-			$a(dv,'span').innerHTML = "No " + this.dn + " found. ";
-			
-			var lbl = 'Create the <b>first</b> ' + this.dn + ' for ' + this.doc.name;
-			var sp = $a(dv,'span');
-			sp.nm = this.nm;
-			$(sp).html(lbl).addClass('link_type').click(function(){ newdoc(this.nm); });
-		}
-	}
-}
-
-
-// get sates on country trigger
-// -----------------------------
-cur_frm.cscript.get_states=function(doc,dt,dn){
-   $c('runserverobj', args={'method':'check_state', 'docs':compress_doclist([doc])},
-    function(r,rt){
-      if(r.message) {
-        set_field_options('state', r.message);
-      }
-    }  
-  );
-
-}
-
-cur_frm.cscript.country = function(doc, dt, dn) {
-  cur_frm.cscript.get_states(doc, dt, dn);
-}
-
-// territory help - cutsomer + sales partner
-// -----------------------------------------
-cur_frm.cscript.TerritoryHelp = function(doc,dt,dn){
-  var call_back = function(){
-
-    var sb_obj = new SalesBrowser();        
-    sb_obj.set_val('Territory');
-  }
-  loadpage('Sales Browser',call_back);
-}
-
-// get query select Territory
-// ---------------------------
-if(cur_frm.fields_dict['territory']){
-	cur_frm.fields_dict['territory'].get_query = function(doc,dt,dn) {
-		return 'SELECT `tabTerritory`.`name`,`tabTerritory`.`parent_territory` FROM `tabTerritory` WHERE `tabTerritory`.`is_group` = "No" AND `tabTerritory`.`docstatus`!= 2 AND `tabTerritory`.%(key)s LIKE "%s"  ORDER BY  `tabTerritory`.`name` ASC LIMIT 50';
-	}
-}
-
-
-// =======================================================================================================
-
-// contact list
-// --------------
-ContactList = function(parent,dt,dn,dsn){
-	
-	var me = this;
-	
-	this.dt = dt;
-	this.dn = dn;
-	this.dsn = dsn ? dsn : dn;
-
-	this.wrapper = $a(parent,'div');
-	me.get_list();
-}
-
-// add contact
-// ------------
-ContactList.prototype.add_contact = function(){
-	var me = this;
-	
-	// onload - set default values
-	var cont = LocalDB.create('Contact');
-
-	var c = locals['Contact'][cont];
-	
-	if(me.dt == 'Customer')	{
-		c.is_customer = 1;
-		c.customer = me.dn;
-		c.customer_name = me.dsn;
-	}
-	else if(me.dt == 'Supplier'){
-		c.is_supplier = 1;
-		c.supplier = me.dn;
-		c.supplier_name = me.dsn;
-	}
-	else if(me.dt == 'Sales Partner'){
-		c.is_sales_partner = 1;
-		c.sales_partner = me.dn;
-		//c.sales_partner_name = me.dsn;
-	}
-	
-	loaddoc('Contact',c.name);
-}
-
-// get contact list
-// -----------------
-ContactList.prototype.get_list = function(){
-	var me = this;
-	
-	me.make_list();
-	
-	var dt = me.dt.toLowerCase().split(' ').join('_');
-	
-	// build query
-	me.lst.get_query = function(){
-		this.query = repl("select name, first_name, last_name, concat_ws(' ', first_name, last_name), email_id, contact_no, department, designation, is_primary_contact, has_login, disable_login from tabContact where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
-
-		this.query_max = repl("select count(name) from tabContact where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
-	}
-	
-	// render list ui
-	me.lst.show_cell = function(cell,ri,ci,d){
-		me.render_list(cell,ri,ci,d);
-	}
-	
-	// run query
-	me.lst.run();
-	
-	// onrun
-	me.lst.onrun = function(){
-		if(!this.has_data()){
-			this.rec_label.innerHTML = '';
-			
-			$a(this.rec_label,'span').innerHTML = "You do not have any contact. ";
-			$($a(this.rec_label,'span')).html('Add a new contact').addClass('link_type').click(function(){ me.add_contact(); });
-			
-			$dh(this.results);
-		}
-		else{
-			$ds(this.results);
-		}
-	}	
-}
-
-// make list
-// -----------
-ContactList.prototype.make_list = function(){
-	var me = this;
-	
-	var l = new Listing();
-	l.colwidths = ['5%','30%','30%','20%','20%'];
-	l.colnames = ['Sr.','Contact Name','Email Id','Contact No', 'Action'];
-	l.page_len = 10;
-  
-	me.lst = l;
-	
-	l.make(me.wrapper);
-	
-	// Add contact button
-	me.add_btn = $btn(l.btn_area,'+ Add Contact', function(){ me.add_contact();}, {fontWeight:'bold'});
-}
-
-// make contact cell
-// ------------------
-ContactList.prototype.render_list = function(cell,ri,ci,d){
-	var me = this;
-
-	// name
-	if(ci == 0){
-		var nm = $a($a(cell,'div'),'span','',{cursor:'pointer'});
-		nm.innerHTML = d[ri][3];
-		nm.id = d[ri][0];
-		
-		nm.onclick = function(){
-			loaddoc('Contact', this.id);
-			
-			// on save callback - refresh list
-		}
-
-		// department and designation
-		var des = d[ri][7] ? d[ri][7] : '';
-		var dep = d[ri][6] ? d[ri][6] : '';
-		
-		var sp = $a(cell,'div','comment');
-		sp.innerHTML = des + (dep ? (', ' + dep) : ''); 
-	}
-	
-	// email id, contact no, department, designation
-	// -----------------------------------------------------
-	if(ci == 1) cell.innerHTML = d[ri][4] ? d[ri][4] : '-';
-	if(ci == 2) cell.innerHTML = d[ri][5] ? d[ri][5] : '-';
-	
-	// actions
-	// --------------------------------------
-	if(ci== 3) me.make_actions(cell,ri,ci,d);
-}
-
-// make actions
-// ---------------
-ContactList.prototype.make_actions = function(cell,ri,ci,d){
-	var me = this;
-	
-	var tab = make_table(cell,1,2,'100%',['40%','60%']);
-
-	// Edit and Delete
-	var t = make_table($td(tab,0,0),1,2);
-	
-	var edit = $a($td(t,0,0),'div','wn-icon ic-doc_edit');
-	$(edit).click(function(){ loaddoc('Contact',d[ri][0]); });
-	
-	edit.setAttribute('title','Edit');
-
-// Below code should be uncommented once customer/venodr invitation process is stable
-// ===========================================================================
-/* 
-	var del = $a($td(t,0,1),'div','wn-icon ic-trash');
-	$(del).click(function(){ me.delete_contact(d[ri][0],d[ri][4]) });
-
-	set_custom_tooltip(del, 'Delete');
-	
-	//  Invite, Enable and Disable - Integrate after gateway logic incorporated
-
-	if(d[ri][9] == 'Yes')	{
-		if(d[ri][10] == 'Yes'){
-			var enb = $a($td(tab,0,1),'div','wn-icon ic-checkmark');
-			$(enb).click(function(){ me.enable_login(d[ri][0], d[ri][4]); });
-		}
-		else{
-			var dsb = $a($td(tab,0,1),'div','wn-icon ic-delete');
-			$(dsb).click(function(){ me.disable_login(d[ri][0], d[ri][4]) });
-		}
-	}
-	else{
-		var inv = $a($td(tab,0,1),'div','wn-icon ic-mail');
-		$(inv).click(function(){ me.invite_contact(d[ri][0], d[ri][4], d[ri][1], d[ri][2]) });
-	}*/
-}
-
-// enable login
-// ----------------------------------------------------------
-ContactList.prototype.enable_login = function(id, email_id){
-	var me = this;
-	
-	var callback = function(r,rt){
-		me.get_list();
-		
-		if(!r.exc) msgprint('Login for contact enabled',1);
-		else errprint(r.exc);
-	}
-	
-	var args = {};
-	args.contact = id;
-	args.email = email_id;
-	
-	$c_obj('Contact Control','enable_login',JSON.stringify(args),callback);
-}
-
-// disable login
-// -------------------------------------------------------------
-ContactList.prototype.disable_login = function(id, email_id){
-	var me = this;
-	
-	var callback = function(r,rt){
-		me.get_list();
-		
-		if(!r.exc) msgprint('Login for contact disabled',1);
-		else errprint(r.exc);
-	}
-
-	var args = {};
-	args.contact = id;
-	args.email = email_id;
-		
-	$c_obj('Contact Control','disable_login',JSON.stringify(args),callback);
-}
-
-// delete contact
-// -----------------
-ContactList.prototype.delete_contact = function(id,email_id,has_login){
-	var me = this;
-	
-	var callback = function(r,rt){
-		me.get_list();
-		
-		if(!r.exc) msgprint('Contact deleted successfully');
-		else errprint(r.exc);
-	}
-	
-	var args = {};
-	args.contact = id;
-	args.email = email_id;
-	args.has_login = has_login;
-	
-	$c_obj('Contact Control','delete_contact',JSON.stringify(args),callback);
-}
-
-// invite user
-// --------------------------------------------------------
-ContactList.prototype.invite_contact = function(id,email_id,first_name,last_name){
-	var me = this;
-
-	if(!email_id){
-		msgprint("Please add email id and save the contact first. You can then invite contact to view transactions.")
-	}
-	else{
-		var callback = function(r,rt){
-			if(!r.exc) msgprint('Invitation sent');
-			else errprint(r.exc);
-		}
-	
-		var args = {
-			'contact' : id,
-			'email' : email_id,
-			'first_name' : first_name ? first_name : '',
-			'last_name' : last_name ? last_name : '',
-			'usert_type' : 'Partner'
-		};
-		
-		$c_obj('Contact Control','invite_contact',JSON.stringify(args),callback);	
-	}
-}
-
-
-// address list
-// --------------
-AddressList = function(parent,dt,dn,dsn,dsa){
-	
-	var me = this;
-	
-	this.dt = dt;
-	this.dn = dn;
-	this.dsn = dsn ? dsn : dn;
-        this.dsa = dsa ? dsa : '';
-
-	this.wrapper = $a(parent,'div');
-	me.get_addr_list();
-}
-
-
-// add contact
-// ------------
-AddressList.prototype.add_address = function(){
-	var me = this;
-	
-	// onload - set default values
-	var addr = LocalDB.create('Shipping Address');
-
-	var a = locals['Shipping Address'][addr];
-	
-	a.customer = me.dn;
-	a.customer_name = me.dsn;
-        a.customer_address = me.dsa;	
-	loaddoc('Shipping Address',a.name);
-}
-
-
-// get address list
-// -----------------
-AddressList.prototype.get_addr_list = function(){
-	var me = this;
-	
-	me.make_addr_list();
-	
-	var dt = me.dt.toLowerCase().split(' ').join('_');
-	
-	// build query
-	me.lst.get_query = function(){
-		this.query = repl("select name, ship_to, shipping_address, is_primary_address, shipping_details from `tabShipping Address` where %(dt)s = '%(dn)s' and docstatus != 2",{'dt':dt, 'dn':me.dn});
-
-		this.query_max = repl("select count(name) from `tabShipping Address` where %(dt)s = '%(dn)s'",{'dt':dt, 'dn':me.dn});
-	}
-	
-	// render list ui
-	me.lst.show_cell = function(cell,ri,ci,d){
-		me.render_list(cell,ri,ci,d);
-	}
-	
-	// run query
-	me.lst.run();
-	
-	// onrun
-	me.lst.onrun = function(){
-		if(!this.has_data()){
-			this.rec_label.innerHTML = '';
-			
-			$a(this.rec_label,'span').innerHTML = "You do not have any shipping address.";
-			$($a(this.rec_label,'span')).html('Add a new address').addClass('link_type').click(function(){ me.add_address(); });
-			
-			$dh(this.results);
-		}
-		else{
-			$ds(this.results);
-		}
-	}	
-}
-
-
-// make list
-// -----------
-AddressList.prototype.make_addr_list = function(){
-	var me = this;
-	
-	var l = new Listing();
-	l.colwidths = ['5%', '15%', '25%','10%','35%','10%'];
-	l.colnames = ['Sr.', 'Ship To', 'Shipping Address','Primary Address', 'Shipping Details', 'Action'];
-    l.page_len = 10;
-  
-	me.lst = l;
-	
-	l.make(me.wrapper);
-	
-	// Add address button
-	me.add_btn = $btn(l.btn_area,'+ Add Address', function(){ me.add_address();}, {fontWeight:'bold'});
-}
-
-
-
-// make address cell
-// ------------------
-AddressList.prototype.render_list = function(cell,ri,ci,d){
-	var me = this;
-
-	// name
-	if(ci == 0){
-		var nm = $a($a(cell,'div'),'span','',{cursor:'pointer'});
-		nm.innerHTML = d[ri][1];
-		nm.id = d[ri][0];
-		
-		nm.onclick = function(){
-			loaddoc('Shipping Address', this.id);
-		}
-	}
-	
-	// shipping address, primary address, shipping details
-	// ----------------------------------------------------
-	if(ci == 1) cell.innerHTML = d[ri][2] ? d[ri][2] : '-';
-	if(ci == 2) cell.innerHTML = d[ri][3] ? d[ri][3] : '-';
-	if(ci == 3) cell.innerHTML = d[ri][4] ? d[ri][4] : '-';
-	
-	// actions
-	// --------------------------------------
-	if(ci== 4) me.make_actions(cell,ri,ci,d);
-}
-
-// make actions
-// ---------------
-AddressList.prototype.make_actions = function(cell,ri,ci,d){
-	var me = this;
-	
-	var tab = make_table(cell,1,2,'100%',['40%','60%']);
-
-	// Edit and Delete
-	var t = make_table($td(tab,0,0),1,2);
-	
-	var edit = $a($td(t,0,0),'div','wn-icon ic-doc_edit');
-	$(edit).click(function(){ loaddoc('Shipping Address',d[ri][0]); });
-	
-	edit.setAttribute('title','Edit');
-}
diff --git a/erpnext/setup/doctype/contact_control/contact_control.py b/erpnext/setup/doctype/contact_control/contact_control.py
deleted file mode 100644
index 3c25d7f..0000000
--- a/erpnext/setup/doctype/contact_control/contact_control.py
+++ /dev/null
@@ -1,103 +0,0 @@
-# Please edit this list and import only required elements
-import webnotes
-
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
-from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
-from webnotes.model.doclist import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, is_testing, msgprint, errprint
-
-set = webnotes.conn.set
-sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-	
-# -----------------------------------------------------------------------------------------
-
-
-class DocType:
-  def __init__(self,doc,doclist=[]):
-    self.doc = doc
-    self.doclist = doclist
-    
-  def enable_login(self,arg):
-    arg = eval(arg)
-    sql("update tabContact set disable_login = 'No' where name=%s",arg['contact'])
-    sql("update tabProfile set enabled=1 where name=%s",arg['email'])
-    
-  def disable_login(self,arg):
-    arg = eval(arg)
-    sql("update tabContact set disable_login = 'Yes' where name=%s",arg['contact'])
-    sql("update tabProfile set enabled=0 where name=%s",arg['email'])
-    
-  def create_login(self,arg):
-    arg = eval(arg)
-    cont_det = sql("select * from tabContact where name=%s",(arg['contact']),as_dict=1)
-    if cont_det[0]['docstatus'] !=0:
-      msgprint('Please save the corresponding contact first')
-      raise Exception
-      
-    if sql("select name from tabProfile where name=%s",cont_det[0]['email_id']):
-      msgprint('Profile with same name already exist.')
-      raise Exception
-    else:
-      p = Document('Profile')
-      p.name = cont_det[0]['email_id']
-      p.first_name = cont_det[0]['first_name']
-      p.last_name = cont_det[0]['last_name']
-      p.email = cont_det[0]['email_id']
-      p.cell_no = cont_det[0]['contact_no']
-      p.password = 'password'
-      p.enabled = 1
-      p.user_type = 'Partner';
-      p.save(1)
-      
-      get_obj(doc=p).on_update()
-      
-      role = []
-      if cont_det[0]['contact_type'] == 'Individual':
-        role = ['Customer']
-      else:
-        if cont_det[0]['is_customer']:
-          role.append('Customer')
-        if cont_det[0]['is_supplier']:
-          role.append('Supplier')
-        if cont_det[0]['is_sales_partner']:
-          role.append('Partner')
-
-      if role:
-        prof_nm = p.name
-        for i in role:
-          r = Document('UserRole')
-          r.parent = p.name
-          r.role = i
-          r.parenttype = 'Profile'
-          r.parentfield = 'userroles'
-          r.save(1)
-        
-          if i == 'Customer':
-            def_keys = ['from_company','customer_name','customer']
-            def_val = cont_det[0]['customer_name']
-            self.set_default_val(def_keys,def_val,prof_nm)
-
-          if i == 'Supplier':
-            def_keys = ['supplier_name','supplier']
-            def_val = cont_det[0]['supplier_name']
-            self.set_default_val(def_keys,def_val,prof_nm)
-
-      sql("update tabContact set has_login = 'Yes' where name=%s",cont_det[0]['name'])
-      sql("update tabContact set disable_login = 'No' where name=%s",cont_det[0]['name'])
-      msgprint('User login is created.')
-      
- #------set default values---------
-  def set_default_val(self,def_keys,def_val,prof_nm):
-    for d in def_keys:
-      kv = Document('DefaultValue')
-      kv.defkey = d
-      kv.defvalue = def_val
-      kv.parent = prof_nm
-      kv.parenttype = 'Profile'
-      kv.parentfield = 'defaults'
-      kv.save(1)
\ No newline at end of file
diff --git a/erpnext/setup/doctype/contact_control/contact_control.txt b/erpnext/setup/doctype/contact_control/contact_control.txt
deleted file mode 100644
index b9e84ad..0000000
--- a/erpnext/setup/doctype/contact_control/contact_control.txt
+++ /dev/null
@@ -1,88 +0,0 @@
-# DocType, Contact Control
-[
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2010-08-08 17:08:56',
-		'docstatus': 0,
-		'modified': '2010-09-20 14:06:57',
-		'modified_by': 'yogesh@webnotestech.com',
-		'owner': 'Administrator'
-	},
-
-	# These values are common for all DocType
-	{
-		'colour': 'White:FFF',
-		'doctype': 'DocType',
-		'in_create': 1,
-		'issingle': 1,
-		'module': 'Setup',
-		'name': '__common__',
-		'read_only': 1,
-		'section_style': 'Simple',
-		'server_code_error': ' ',
-		'show_in_menu': 0,
-		'version': 25
-	},
-
-	# These values are common for all DocField
-	{
-		'doctype': 'DocField',
-		'fieldtype': 'Text',
-		'name': '__common__',
-		'parent': 'Contact Control',
-		'parentfield': 'fields',
-		'parenttype': 'DocType',
-		'permlevel': 0
-	},
-
-	# These values are common for all DocPerm
-	{
-		'create': 0,
-		'doctype': 'DocPerm',
-		'idx': 1,
-		'name': '__common__',
-		'parent': 'Contact Control',
-		'parentfield': 'permissions',
-		'parenttype': 'DocType',
-		'permlevel': 0,
-		'read': 1,
-		'role': 'System Manager',
-		'write': 1
-	},
-
-	# DocType, Contact Control
-	{
-		'doctype': 'DocType',
-		'name': 'Contact Control'
-	},
-
-	# DocPerm
-	{
-		'doctype': 'DocPerm'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'header',
-		'idx': 1,
-		'label': 'Header'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'customer_intro',
-		'idx': 2,
-		'label': 'Customer Intro'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'supplier_intro',
-		'idx': 3,
-		'label': 'Supplier Intro'
-	}
-]
\ No newline at end of file
diff --git a/erpnext/setup/doctype/country/country.js b/erpnext/setup/doctype/country/country.js
index 6074742..bb7eae6 100644
--- a/erpnext/setup/doctype/country/country.js
+++ b/erpnext/setup/doctype/country/country.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //Tips not required
 /*
  
diff --git a/erpnext/setup/doctype/customer_group/customer_group.js b/erpnext/setup/doctype/customer_group/customer_group.js
index a2fe4b5..11794cc 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.js
+++ b/erpnext/setup/doctype/customer_group/customer_group.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 cur_frm.cscript.onload = function(){
diff --git a/erpnext/setup/doctype/customer_group/customer_group.py b/erpnext/setup/doctype/customer_group/customer_group.py
index 4537876..30885eb 100644
--- a/erpnext/setup/doctype/customer_group/customer_group.py
+++ b/erpnext/setup/doctype/customer_group/customer_group.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/email_digest/email_digest.js b/erpnext/setup/doctype/email_digest/email_digest.js
index 81b37e4..67de256 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.js
+++ b/erpnext/setup/doctype/email_digest/email_digest.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.refresh = function(doc, dt, dn) {
 	doc = locals[dt][dn];
 	var save_msg = "You must <b>Save</b> the form before proceeding";
diff --git a/erpnext/setup/doctype/email_digest/email_digest.py b/erpnext/setup/doctype/email_digest/email_digest.py
index e391d37..c5989bb 100644
--- a/erpnext/setup/doctype/email_digest/email_digest.py
+++ b/erpnext/setup/doctype/email_digest/email_digest.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 import webnotes.utils
 
@@ -406,49 +422,6 @@
 			#webnotes.errprint(webnotes.getTraceback())
 
 
-	def on_update(self):
-		"""
-
-		"""
-		import webnotes
-		args = {
-			'db_name': webnotes.conn.get_value('Control Panel', '', 'account_id'),
-			'event': 'setup.doctype.email_digest.email_digest.send'
-		}
-		from webnotes.utils.scheduler import Scheduler
-		#print "before scheduler"
-		sch = Scheduler()
-		sch.connect()
-
-		if self.doc.enabled == 1:
-			# Create scheduler entry
-			res = sch.conn.sql("""
-				SELECT * FROM Event
-				WHERE
-					db_name = %(db_name)s AND
-					event = %(event)s
-			""", args)
-
-			if not (res and res[0]):
-				args['next_execution'] = self.get_next_execution()
-				sch.conn.begin()
-				sch.conn.sql("""
-					INSERT INTO	Event (db_name, event, `interval`, next_execution, recurring)
-					VALUES (%(db_name)s, %(event)s, 86400, %(next_execution)s, 1)
-				""", args)
-				sch.conn.commit()
-
-		else:
-			# delete scheduler entry if no other email digest is enabled
-			res = webnotes.conn.sql("""
-				SELECT * FROM `tabEmail Digest`
-				WHERE enabled=1
-			""")
-			if not (res and res[0]):
-				sch.clear(args['db_name'], args['event'])
-		#print "after on update"
-	
-
 	def get_next_sending(self):
 		"""
 
@@ -783,7 +756,7 @@
 			send_date = dt_dict['server_dt'].date()
 			send_time = dt_dict['server_dt'].time()
 
-			if (now_date == send_date) and (send_time <= now_time):
+			if (now_date == send_date):
 				#webnotes.msgprint('sending ' + ed_obj.doc.name)
 				ed_obj.send()
 			#else:
diff --git a/erpnext/setup/doctype/email_settings/email_settings.js b/erpnext/setup/doctype/email_settings/email_settings.js
index cbc6a44..599fbcc 100644
--- a/erpnext/setup/doctype/email_settings/email_settings.js
+++ b/erpnext/setup/doctype/email_settings/email_settings.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.refresh = function(doc,cdt,cdn){
   if(!doc.outgoing_mail_server || !doc.mail_login || !doc.mail_password || !doc.auto_email_id || !doc.mail_port || !doc.use_ssl){
     get_server_fields('set_vals','','',doc, cdt, cdn, 1);
diff --git a/erpnext/setup/doctype/email_settings/email_settings.py b/erpnext/setup/doctype/email_settings/email_settings.py
index 8cb5a56..0f930bc 100644
--- a/erpnext/setup/doctype/email_settings/email_settings.py
+++ b/erpnext/setup/doctype/email_settings/email_settings.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 sql = webnotes.conn.sql
 	
diff --git a/erpnext/setup/doctype/features_setup/features_setup.py b/erpnext/setup/doctype/features_setup/features_setup.py
index 3a549d9..e26ca47 100644
--- a/erpnext/setup/doctype/features_setup/features_setup.py
+++ b/erpnext/setup/doctype/features_setup/features_setup.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 class DocType:
 	def __init__(self, d, dl):
 		self.doc, self.doclist = d, dl
diff --git a/erpnext/setup/doctype/import_data_control/import_data_control.py b/erpnext/setup/doctype/import_data_control/import_data_control.py
index b9c98f1..e11c552 100644
--- a/erpnext/setup/doctype/import_data_control/import_data_control.py
+++ b/erpnext/setup/doctype/import_data_control/import_data_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/item_group/item_group.js b/erpnext/setup/doctype/item_group/item_group.js
index aa49363..40b66d3 100644
--- a/erpnext/setup/doctype/item_group/item_group.js
+++ b/erpnext/setup/doctype/item_group/item_group.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 cur_frm.cscript.onload = function(){
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index 223e53d..ba49117 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/manage_account/manage_account.js b/erpnext/setup/doctype/manage_account/manage_account.js
index 63cc1d5..631fd0b 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.js
+++ b/erpnext/setup/doctype/manage_account/manage_account.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Validate
 cur_frm.cscript.validate = function(doc, cdt, cdn) {
   $c_obj(make_doclist(cdt, cdn), 'get_defaults', '', function(r, rt){
diff --git a/erpnext/setup/doctype/manage_account/manage_account.py b/erpnext/setup/doctype/manage_account/manage_account.py
index eed566e..15700e8 100644
--- a/erpnext/setup/doctype/manage_account/manage_account.py
+++ b/erpnext/setup/doctype/manage_account/manage_account.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """Global Defaults"""
 import webnotes
 
diff --git a/erpnext/setup/doctype/naming_series/naming_series.js b/erpnext/setup/doctype/naming_series/naming_series.js
index a0216e2..cd70dd7 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.js
+++ b/erpnext/setup/doctype/naming_series/naming_series.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Settings
 cur_frm.cscript.onload = function(doc, cdt, cdn){
   var callback = function(r, rt){
diff --git a/erpnext/setup/doctype/naming_series/naming_series.py b/erpnext/setup/doctype/naming_series/naming_series.py
index 2ad1236..bef4987 100644
--- a/erpnext/setup/doctype/naming_series/naming_series.py
+++ b/erpnext/setup/doctype/naming_series/naming_series.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/notification_control/notification_control.js b/erpnext/setup/doctype/notification_control/notification_control.js
index d8133bb..32919b6 100644
--- a/erpnext/setup/doctype/notification_control/notification_control.js
+++ b/erpnext/setup/doctype/notification_control/notification_control.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.select_transaction = function(doc, dt, dn) {
   if(doc.select_transaction) {
     var callback = function(r,rt) {
diff --git a/erpnext/setup/doctype/notification_control/notification_control.py b/erpnext/setup/doctype/notification_control/notification_control.py
index ae37cbd..9dc0076 100644
--- a/erpnext/setup/doctype/notification_control/notification_control.py
+++ b/erpnext/setup/doctype/notification_control/notification_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js b/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js
+++ b/erpnext/setup/doctype/order_lost_reason/order_lost_reason.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/other_charges/other_charges.js b/erpnext/setup/doctype/other_charges/other_charges.js
index 6708e37..a6f457d 100644
--- a/erpnext/setup/doctype/other_charges/other_charges.js
+++ b/erpnext/setup/doctype/other_charges/other_charges.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //--------- ONLOAD -------------
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
   // 
diff --git a/erpnext/setup/doctype/other_charges/other_charges.py b/erpnext/setup/doctype/other_charges/other_charges.py
index b8b9189..eb9ebb5 100644
--- a/erpnext/setup/doctype/other_charges/other_charges.py
+++ b/erpnext/setup/doctype/other_charges/other_charges.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/period/period.js b/erpnext/setup/doctype/period/period.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/period/period.js
+++ b/erpnext/setup/doctype/period/period.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/period_control/period_control.py b/erpnext/setup/doctype/period_control/period_control.py
index a14f133..ac32a6e 100644
--- a/erpnext/setup/doctype/period_control/period_control.py
+++ b/erpnext/setup/doctype/period_control/period_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/permission_control/permission_control.py b/erpnext/setup/doctype/permission_control/permission_control.py
index 044dff5..049a3f5 100644
--- a/erpnext/setup/doctype/permission_control/permission_control.py
+++ b/erpnext/setup/doctype/permission_control/permission_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/personalize/personalize.py b/erpnext/setup/doctype/personalize/personalize.py
index 552532d..acf71e5 100644
--- a/erpnext/setup/doctype/personalize/personalize.py
+++ b/erpnext/setup/doctype/personalize/personalize.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 class DocType:
diff --git a/erpnext/setup/doctype/price_list/price_list.js b/erpnext/setup/doctype/price_list/price_list.js
index 2eeab84..173e42f 100644
--- a/erpnext/setup/doctype/price_list/price_list.js
+++ b/erpnext/setup/doctype/price_list/price_list.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 //--------- ONLOAD -------------
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/setup/doctype/price_list/price_list.py b/erpnext/setup/doctype/price_list/price_list.py
index c4bab3b..ec1a7c2 100644
--- a/erpnext/setup/doctype/price_list/price_list.py
+++ b/erpnext/setup/doctype/price_list/price_list.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/print_heading/print_heading.js b/erpnext/setup/doctype/print_heading/print_heading.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/print_heading/print_heading.js
+++ b/erpnext/setup/doctype/print_heading/print_heading.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/print_heading/print_heading.py b/erpnext/setup/doctype/print_heading/print_heading.py
index 1b15025..b735c79 100644
--- a/erpnext/setup/doctype/print_heading/print_heading.py
+++ b/erpnext/setup/doctype/print_heading/print_heading.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/role/role.js b/erpnext/setup/doctype/role/role.js
deleted file mode 100644
index 672f4ac..0000000
--- a/erpnext/setup/doctype/role/role.js
+++ /dev/null
@@ -1,6 +0,0 @@
-class DocType:
-  def __init__(self, d, dl):
-    self.doc, self.doclist = d, dl
-
-  def t1(self):
-    msgprint('role')
\ No newline at end of file
diff --git a/erpnext/setup/doctype/role/role.py b/erpnext/setup/doctype/role/role.py
deleted file mode 100644
index 4c9d7f5..0000000
--- a/erpnext/setup/doctype/role/role.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# Please edit this list and import only required elements
-import webnotes
-
-from webnotes.utils import add_days, add_months, add_years, cint, cstr, date_diff, default_fields, flt, fmt_money, formatdate, generate_hash, getTraceback, get_defaults, get_first_day, get_last_day, getdate, has_common, month_name, now, nowdate, replace_newlines, sendmail, set_default, str_esc_quote, user_format, validate_email_add
-from webnotes.model import db_exists
-from webnotes.model.doc import Document, addchild, removechild, getchildren, make_autoname, SuperDocType
-from webnotes.model.doclist import getlist, copy_doclist
-from webnotes.model.code import get_obj, get_server_obj, run_server_obj, updatedb, check_syntax
-from webnotes import session, form, is_testing, msgprint, errprint
-
-set = webnotes.conn.set
-sql = webnotes.conn.sql
-get_value = webnotes.conn.get_value
-in_transaction = webnotes.conn.in_transaction
-convert_to_lists = webnotes.conn.convert_to_lists
-	
-# -----------------------------------------------------------------------------------------
-
-
-class DocType:
-  def __init__(self, d, dl):
-    self.doc, self.doclist = d, dl
-
-  def t1(self):
-    msgprint('role')
\ No newline at end of file
diff --git a/erpnext/setup/doctype/role/role.txt b/erpnext/setup/doctype/role/role.txt
deleted file mode 100644
index afebb31..0000000
--- a/erpnext/setup/doctype/role/role.txt
+++ /dev/null
@@ -1,114 +0,0 @@
-# DocType, Role
-[
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2009-05-12 11:19:11',
-		'docstatus': 0,
-		'modified': '2010-12-28 17:02:39',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
-	},
-
-	# These values are common for all DocType
-	{
-		'_last_update': '1307624201',
-		'allow_copy': 0,
-		'allow_email': 0,
-		'allow_print': 0,
-		'autoname': 'field:role_name',
-		'colour': 'White:FFF',
-		'doctype': 'DocType',
-		'hide_heading': 0,
-		'hide_toolbar': 0,
-		'idx': 0,
-		'issingle': 0,
-		'istable': 0,
-		'module': 'Setup',
-		'name': '__common__',
-		'read_only': 0,
-		'section_style': 'Simple',
-		'server_code_error': ' ',
-		'show_in_menu': 0,
-		'version': 1
-	},
-
-	# These values are common for all DocField
-	{
-		'doctype': 'DocField',
-		'name': '__common__',
-		'parent': 'Role',
-		'parentfield': 'fields',
-		'parenttype': 'DocType',
-		'permlevel': 0
-	},
-
-	# These values are common for all DocPerm
-	{
-		'cancel': 0,
-		'create': 1,
-		'doctype': 'DocPerm',
-		'execute': 0,
-		'idx': 1,
-		'name': '__common__',
-		'parent': 'Role',
-		'parentfield': 'permissions',
-		'parenttype': 'DocType',
-		'permlevel': 0,
-		'read': 1,
-		'role': 'Administrator',
-		'submit': 0,
-		'write': 1
-	},
-
-	# DocType, Role
-	{
-		'doctype': 'DocType',
-		'name': 'Role'
-	},
-
-	# DocPerm
-	{
-		'doctype': 'DocPerm'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'module',
-		'fieldtype': 'Select',
-		'idx': 1,
-		'label': 'Module',
-		'oldfieldname': 'module',
-		'oldfieldtype': 'Select',
-		'options': 'link:Module Def',
-		'reqd': 1
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'role_name',
-		'fieldtype': 'Data',
-		'idx': 2,
-		'label': 'Role Name',
-		'oldfieldname': 'role_name',
-		'oldfieldtype': 'Data',
-		'reqd': 1
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'defaults',
-		'fieldtype': 'Table',
-		'hidden': 0,
-		'idx': 3,
-		'label': 'Defaults',
-		'oldfieldname': 'defaults',
-		'oldfieldtype': 'Table',
-		'options': 'DefaultValue',
-		'reqd': 0,
-		'search_index': 0
-	}
-]
\ No newline at end of file
diff --git a/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py b/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py
index e9f8242..3d820e1 100644
--- a/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py
+++ b/erpnext/setup/doctype/sales_browser_control/sales_browser_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.js b/erpnext/setup/doctype/sales_partner/sales_partner.js
index e829e29..1194756 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.js
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.js
@@ -1,3 +1,19 @@
+// 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(Contact Control)
 
 cur_frm.cscript.onload = function(doc,dt,dn){
diff --git a/erpnext/setup/doctype/sales_partner/sales_partner.py b/erpnext/setup/doctype/sales_partner/sales_partner.py
index 7258611..c92c120 100644
--- a/erpnext/setup/doctype/sales_partner/sales_partner.py
+++ b/erpnext/setup/doctype/sales_partner/sales_partner.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/sales_person/sales_person.js b/erpnext/setup/doctype/sales_person/sales_person.js
index aef79a3..0057ff0 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.js
+++ b/erpnext/setup/doctype/sales_person/sales_person.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
 }
diff --git a/erpnext/setup/doctype/sales_person/sales_person.py b/erpnext/setup/doctype/sales_person/sales_person.py
index fbcb83e..651cfb4 100644
--- a/erpnext/setup/doctype/sales_person/sales_person.py
+++ b/erpnext/setup/doctype/sales_person/sales_person.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/setup_control/setup_control.py b/erpnext/setup/doctype/setup_control/setup_control.py
index b003c18..beb3cc6 100644
--- a/erpnext/setup/doctype/setup_control/setup_control.py
+++ b/erpnext/setup/doctype/setup_control/setup_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py b/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py
index f6b04eb..ec54f54 100644
--- a/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py
+++ b/erpnext/setup/doctype/setup_wizard_control/setup_wizard_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/state/state.js b/erpnext/setup/doctype/state/state.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/state/state.js
+++ b/erpnext/setup/doctype/state/state.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/supplier_type/supplier_type.js b/erpnext/setup/doctype/supplier_type/supplier_type.js
index e34ca8c..306ead0 100644
--- a/erpnext/setup/doctype/supplier_type/supplier_type.js
+++ b/erpnext/setup/doctype/supplier_type/supplier_type.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 // ONLOAD
diff --git a/erpnext/setup/doctype/term/term.js b/erpnext/setup/doctype/term/term.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/term/term.js
+++ b/erpnext/setup/doctype/term/term.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/territory/territory.js b/erpnext/setup/doctype/territory/territory.js
index 91f7da6..3752f26 100644
--- a/erpnext/setup/doctype/territory/territory.js
+++ b/erpnext/setup/doctype/territory/territory.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
diff --git a/erpnext/setup/doctype/territory/territory.py b/erpnext/setup/doctype/territory/territory.py
index 26805be..461b447 100644
--- a/erpnext/setup/doctype/territory/territory.py
+++ b/erpnext/setup/doctype/territory/territory.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/uom/uom.js b/erpnext/setup/doctype/uom/uom.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/uom/uom.js
+++ b/erpnext/setup/doctype/uom/uom.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/update_series/update_series.py b/erpnext/setup/doctype/update_series/update_series.py
index dcca22a..b8a0477 100644
--- a/erpnext/setup/doctype/update_series/update_series.py
+++ b/erpnext/setup/doctype/update_series/update_series.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js
index 041638f..4f46546 100644
--- a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js
+++ b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 //--------- ONLOAD -------------
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py
index 35564bb..2d695f3d 100644
--- a/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py
+++ b/erpnext/setup/doctype/upload_accounts_transactions/upload_accounts_transactions.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/warehouse_type/warehouse_type.js b/erpnext/setup/doctype/warehouse_type/warehouse_type.js
index 6ffef4a..3cad944 100644
--- a/erpnext/setup/doctype/warehouse_type/warehouse_type.js
+++ b/erpnext/setup/doctype/warehouse_type/warehouse_type.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/workflow_engine/workflow_engine.py b/erpnext/setup/doctype/workflow_engine/workflow_engine.py
index bf9b1ef..6f7aea7 100644
--- a/erpnext/setup/doctype/workflow_engine/workflow_engine.py
+++ b/erpnext/setup/doctype/workflow_engine/workflow_engine.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/workflow_rule/workflow_rule.js b/erpnext/setup/doctype/workflow_rule/workflow_rule.js
index 3fda3eb..1570045 100644
--- a/erpnext/setup/doctype/workflow_rule/workflow_rule.js
+++ b/erpnext/setup/doctype/workflow_rule/workflow_rule.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/setup/doctype/workflow_rule/workflow_rule.py b/erpnext/setup/doctype/workflow_rule/workflow_rule.py
index 792cbf0..36cdbd3 100644
--- a/erpnext/setup/doctype/workflow_rule/workflow_rule.py
+++ b/erpnext/setup/doctype/workflow_rule/workflow_rule.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/page/import_data/import_data.js b/erpnext/setup/page/import_data/import_data.js
index f1601e7..aeb7dad 100644
--- a/erpnext/setup/page/import_data/import_data.js
+++ b/erpnext/setup/page/import_data/import_data.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Import Data'] = function() {
 	
 	//alert(profile.can_get_report);
diff --git a/erpnext/setup/page/permission_engine/permission_engine.js b/erpnext/setup/page/permission_engine/permission_engine.js
index f4f6fe8..1d77e51 100644
--- a/erpnext/setup/page/permission_engine/permission_engine.js
+++ b/erpnext/setup/page/permission_engine/permission_engine.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Permission Engine'] = function() {
 	// header and toolbar
 	var h = new PageHeader('pe_header','Permissions Manager','Set specific permissions for Roles')
diff --git a/erpnext/setup/page/setup/setup.css b/erpnext/setup/page/setup/setup.css
new file mode 100644
index 0000000..bff44db
--- /dev/null
+++ b/erpnext/setup/page/setup/setup.css
@@ -0,0 +1,6 @@
+.setup-column {
+	float: left;
+	width: 45%;
+	margin-right: 5%;
+	margin-bottom: 15px;
+}
\ No newline at end of file
diff --git a/erpnext/setup/page/setup/setup.html b/erpnext/setup/page/setup/setup.html
index ec21ab7..7963cb9 100644
--- a/erpnext/setup/page/setup/setup.html
+++ b/erpnext/setup/page/setup/setup.html
@@ -1,3 +1,124 @@
-<div id="setup_div" class="layout_wrapper">
-	<div style="margin: 200px auto; text-align: center; color: #888">Loading...</div>
+<div class="layout-wrapper">
+	<a class="close" onclick="window.history.back();">&times;</a>
+	<h1>Setup</h1>
+	<hr>
+	<div class="setup-column">
+		<h3>Company</h3>
+		<p>
+			<b><a href="#!List/Company">Companies</a></b><br>
+			<span class="help">List of companies (not customers / suppliers)</span>
+		</p>
+		<p>
+			<b><a href="#!List/Fiscal Year">Fiscal Years</a></b><br>
+			<span class="help">Financial Years for books of accounts</span>
+		</p>
+		<p>
+			<b><a href="#!List/Currency">Currencies</a></b><br>
+			<span class="help">Currency Master</span>
+		</p>
+	</div>
+	<div class="setup-column">
+		<h3>Users and Permissions</h3>
+		<p>
+			<b><a href="#!My Company">Users</a></b><br>
+			<span class="help">Add/remove users, set roles, passwords etc</span>
+		</p>
+		<p>
+			<b><a href="#!Permission Engine">Permission Manager</a></b><br>
+			<span class="help">Set permissions on transactions / masters</span>
+		</p>
+		<p>
+			<b><a href="#!List/Authorization Rule">Amount based Authorization Rules</a></b><br>
+			<span class="help">Restrict submission rights based on amount</span>
+		</p>
+	</div>
+	<div class="setup-column">
+		<h3>Data</h3>
+		<p>
+			<b><a href="#!Import Data">Import Data</a></b><br>
+			<span class="help">Import data from spreadsheet (csv) files</span>
+		</p>
+		<p>
+			<b><a href="#!Form/Manage Account/Manage Account">Global Defaults</a></b><br>
+			<span class="help">Set default values for entry</span>
+		</p>
+		<p>
+			<b><a href="#!Trash">Recycle Bin</a></b><br>
+			<span class="help">Un-trash items</span>
+		</p>
+		<p>
+			<b><a href="#!Form/Rename Tool/Rename Tool">Rename Master</a></b><br>
+			<span class="help">Rename a single master record</span>
+		</p>
+		<p>
+			<b><a href="#!List/Bulk Rename Tool">Rename Many</a></b><br>
+			<span class="help">Rename by uploading a csv file</span>
+		</p>
+	</div>
+	<div class="setup-column">
+		<h3>Email and Notifications</h3>
+		<p>
+			<b><a href="#!Form/Email Settings/Email Settings">Email Settings</a></b><br>
+			<span class="help">Out going mail server and support ticket mailbox</span>
+		</p>
+		<p>
+			<b><a href="#!Form/Notification Control/Notification Control">Auto Notifications</a></b><br>
+			<span class="help">Automatic email sending to customers and suppliers</span>
+		</p>
+		<p>
+			<b><a href="#!List/Email Digest">Email Digests</a></b><br>
+			<span class="help">Daily, weekly, monthly email Digests</span>
+		</p>
+		<p>
+			<b><a href="#!Form/SMS Settings/SMS Settings">SMS Setup</a></b><br>
+			<span class="help">Setup outgoing SMS via your bulk SMS provider</span>
+		</p>
+		<p>
+			<b><a href="#!Form/SMS Center/SMS Center">Send Bulk SMS</a></b><br>
+			<span class="help">Send bulk SMS to leads, customers, contacts</span>
+		</p>
+	</div>
+	<div class="setup-column">
+		<h3>Customize ERPNext</h3>
+		<p>
+			<b><a href="#!List/Custom Field">Custom Fields</a></b><br>
+			<span class="help">Add fields to forms</span>
+		</p>
+		<p>
+			<b><a href="#!Form/DocLayer/DocLayer">Customize Forms</a></b><br>
+			<span class="help">Change entry properties (hide fields, make mandatory etc)</span>
+		</p>
+		<p>
+			<b><a href="#!Form/Naming Series/Naming Series">Numbering Series</a></b><br>
+			<span class="help">Set multiple numbering series for transactions</span>
+		</p>
+		<p>
+			<b><a href="#!Form/Features Setup/Features Setup">Disable Features</a></b><br>
+			<span class="help">Simplify entry forms by disabling features</span>
+		</p>
+	</div>
+	<div class="setup-column">
+		<h3>Branding and Printing</h3>
+		<p>
+			<b><a href="#!List/Letter Head">Letter Heads</a></b><br>
+			<span class="help">Letter heads for print</span>
+		</p>
+		<p>
+			<b><a href="#!List/Print Format">Print Formats</a></b><br>
+			<span class="help">HTML print formats for quotes, invoices etc</span>
+		</p>
+		<p>
+			<b><a href="#!List/Print Heading">Print Headings</a></b><br>
+			<span class="help">Add headers for standard print formats</span>
+		</p>
+		<p>
+			<b><a href="#!Form/Personalize/Personalize">Home Banner</a></b><br>
+			<span class="help">Add a home page banner</span>
+		</p>
+		<p>
+			<b><a href="#!Form/Style Settings/Style Settings">Style Settings</a></b><br>
+			<span class="help">Change background fonts etc</span>
+		</p>
+	</div>
+	<div style="clear: both"></div>
 </div>
\ No newline at end of file
diff --git a/erpnext/setup/page/setup/setup.js b/erpnext/setup/page/setup/setup.js
index d58f11a..3ee0027 100644
--- a/erpnext/setup/page/setup/setup.js
+++ b/erpnext/setup/page/setup/setup.js
@@ -1,255 +1,19 @@
-pscript.onload_Setup = function() {
-  var parent = $i('setup_div');
+// 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/>.
 
-  var callback = function(r,rt){
-    $('#setup_div').empty();
-    // header
-    parent.page_head = new PageHeader(parent,'Setup');
-    
-    // sections
-    var setup_data = new SetupData(r.message);
-    pscript.setup_make_sections(setup_data);
-    
-  }
-  $c_obj('Setup Wizard Control','get_country','',callback);  
-}
-
-pscript.setup_set_height = function() {
-  var parent = $i('setup_div');
-  $y(parent.tray.body, {height: get_window_height() - parent.page_head.wrapper.offsetHeight + 'px', overflow:'auto'})
-}
-
-// Make sections
-// ===================================================
-
-pscript.setup_make_sections = function(setup_data) {
-  var parent = $i('setup_div');
-  parent.tray = new TrayPage(parent)
-
-  // list of setup data
-  var lst = [setup_data.system, setup_data.general, setup_data.accounts, setup_data.selling, setup_data.buying, setup_data.stock, setup_data.hr, setup_data.maintenance, setup_data.production];
-
-  for(var s=0; s<lst.length; s++){
-    var lbl = keys(lst[s])[0];
-
-    var ti = parent.tray.add_item(lbl, null, null, 1)
-    new SetupItem(ti.body, lbl, lst[s][lbl]);
-
-    if(s==0) ti.expand();
-  }
-  
-  setTimeout(pscript.setup_set_height, 100);
-  resize_observers.push(pscript.setup_set_height);
-}
-
-// Setup Item
-// ===================================================
-SetupItem = function(parent, lbl, link_list) {
-  this.icons = {'System':'back_img Setup', 'General':'back_img Home', 'Accounts':'back_img Accounts', 'Selling':'back_img Selling', 'Stock':'back_img Stock', 'Buying':'back_img Buying', 'Maintenance':'back_img Maintenance', 'Production':'back_img Production', 'HR':'back_img HR'};
-  this.make_item_body(parent, lbl, link_list);
-}
-
-
-// Make body for item in setup wizard
-// ===================================================
-SetupItem.prototype.make_item_body = function(parent, lbl, link_list){
-  // item link area
-  this.link_area = parent;
-  this.render_item_body(lbl, link_list);
-}
-
-
-// Render item body
-// ===================================================
-SetupItem.prototype.render_item_body = function(lbl, link_list) {
-  var me = this;
-  // set item header
-
-  link_list.sort(function(a, b) { return a[0] > b[0]; });
-
-  // show links for item
-  for(var i=0; i<link_list.length; i++){
-    var wrapper = $a(this.link_area, 'div','',{marginBottom:'4px', padding:'2px'});
-    $(wrapper).hover(
-      function() { $y(this,{backgroundColor:'#EEF'}) }
-      ,function() { $y(this,{backgroundColor:''}) }
-    )
-    var tab = make_table($a(wrapper,'div'), 1, 2, '100%', [200/7+'%', 500/7+'%'])
-
-    var dt= $a($td(tab,0,0), 'span', 'link_type');
-    dt.innerHTML = link_list[i][0]; 
-    dt.label = link_list[i][0];
-    dt.arg = link_list[i][1]; 
-    dt.nm = link_list[i][2];
-    
-    if(dt.arg == 1) dt.cn = link_list[i][3]; 
-    else if(dt.arg == 2) dt.cb=link_list[i][3];
- 
-    // execute when link is clicked
-    dt.onclick = function(){
-      me.link_action(this)
-    }
-    
-    // description
-    $y($td(tab,0,1), {color:'#777'});
-    $td(tab,0,1).innerHTML = link_list[i][4];
-  }
-}
-
-
-// Execute when link is clicked
-// ----------------------------
-SetupItem.prototype.link_action = function(obj) {
-  var me = this;
-  var obj = obj;
-  
-  // if object links to a doc browser
-  if(obj.arg == 1){
-    if(in_list(profile.can_read, obj.nm)){
-      if(obj.cn !='')
-        loaddocbrowser(obj.nm, obj.nm, obj.cn);
-      else
-        loaddocbrowser(obj.nm);
-    }
-    else
-      msgprint('No read permission',1);
-  }
-  
-  // if obj links to a page
-  else if(obj.arg == 2){
-    me.show_page(obj);
-  }
-  
-  // if object links to a single doctype
-  else if(obj.arg == 3){
-    newdoc(obj.nm);
-  }
-}
-
-
-// Show page for corresponding link
-// --------------------------------
-SetupItem.prototype.show_page = function(obj) {
-  var me = obj;
-  var callback = function(r,rt)
-  {
-    if(r.message){
-      if(me.cb == '')
-        loadpage(me.nm);
-      else
-        show_chart_browser(me.nm,me.cb);    
-    }
-    else
-      msgprint('No read permission',1);
-  }
-  $c_obj('Setup Wizard Control','get_page_lst',me.nm,callback);  
-}
-
-
-// Setup Data
-// ======================================================================================================================================================= 
-SetupData = function(cnty){
-
-  // arg : 1 - Docbrowser, 2 - Page, 3 - DocType
-  
-  //[label, arg, name, callback/col_name, description]
-
-  this.system = {'System':[['Global Defaults',3,'Manage Account','','Set global default values'],
-    ['Manage Series',3,'Naming Series','','Manage numbering series for transactions'],
-    ['Custom Field',1,'Custom Field','dt'+NEWLINE+'label'+NEWLINE+'fieldtype'+NEWLINE+'options','Add and manage custom fields on forms'],
-    ['Email Settings',3,'Email Settings','','Outgoing email server and address'],
-    ['Notification Settings',3,'Notification Control','','Automatic emails set at selected events'],
-	['Email Digest', 1, 'Email Digest', '', 'Schedule Daily / Weekly / Monthly Summary e-mails'],
-    ['Company',1,'Company','id'+NEWLINE+'is_active'+NEWLINE+'email','Manage list of companies'],
-    ['Fiscal Year',1,'Fiscal Year','id'+NEWLINE+'company'+NEWLINE+'is_active'+NEWLINE+'year','Manage list of fiscal years'],
-    ['Personalize',3,'Personalize','','Set your banner'],
-    ['Manage Trash',2,'Trash','','Restore trashed items'],
-    ['Import Data',2,'Import Data','','Import data from CSV files'],
-    ['Manage Users',2,'My Company','','Add / remove users and manage their roles'],
-    //['Web Forms',2,'Webforms','', 'Code to embed forms in yor website'],
-    ['Permissions Manager',2,'Permission Engine','', 'Manage all permissions from one tool'],
-    //['Property Setter',1,'Property Setter','', 'Customize properties of a Form (DocType) or Field'],
-    ['Customize Form View',3,'DocLayer','', 'Customize properties of a Form (DocType) or Field'],
-	['Print Formats', 1, 'Print Format', '', 'Manage Print Formats'],
-    ['Letter Head',1,'Letter Head','','Manage different letter heads for Prints'],
-    ['SMS Settings',3,'SMS Settings','','Integrate your personalized SMS gateway which support http web service'],
-    ['SMS Center',3,'SMS Center','','Send mass sms to your leads, contacts and partners'],
-    ['Features Setup',3,'Features Setup','','Displays fields based on features selected']
-  ]};
-
-  
-  this.general = {'General':[['Authorization Rule',1,'Authorization Rule','','Set rules based on amounts'],
-    ['Print Heading',1,'Print Heading','','Manage headings for printing transactions'],
-    ['Term',1,'Term','','Manage template of standard Terms for order / invoices etc'],
-    ['Currency',1,'Currency','','Manage list of currencies'],
-    ['Address',1,'Address','','Manage Address of customers, suppliers'],
-    ['Country',1,'Country','','Country master'],
-    ['State',1,'State','','State master'],
-    ['Rename Tool',3,'Rename Tool','','Rename a record'],
-    ['Bulk Rename Tool',3,'Bulk Rename Tool','','Rename multiple records at a time'],
-    ['Activty Type',1,'Activity Type','','Types of activities that you can select in your Timesheet'],
-    ['City',1,'City','','City master']]};
-  
-  this.selling = {'Selling':[['Customer Group',2,'Sales Browser','Customer Group','Manage customer categories'],
-    ['Territory',2,'Sales Browser','Territory','Manage sales territories'],
-    ['Customer',1,'Customer','customer_group'+NEWLINE+'country','Customer master'],
-    ['Sales Person',2,'Sales Browser','Sales Person','Manage sales persons'],
-    ['Sales Partner',1,'Sales Partner','', 'Manage sales partners'],
-    ['Campaign',1,'Campaign','id'+NEWLINE+'campaign_name'+NEWLINE+'description','Manage sales / marketing campaigns'],
-    ['Sales BOM',1,'Sales BOM','id'+NEWLINE+'is_active'+NEWLINE+'new_item_name'+NEWLINE+'description'+NEWLINE+'item_group','Manage Sales Bill of Material (Main item + accessories)'],
-    ['Price List',1,'Price List','','Price list master']]};
-
-  this.accounts = {'Accounts':[['Chart of Accounts',2,'Accounts Browser','Account','Manage chart of accounts'],
-    ['Chart of Cost Centers',2,'Accounts Browser','Cost Center','Manage chart of cost centers'],
-    ['POS Setting',1,'POS Setting','','Manage Point of Sales default Settings.']]};
-    
-  // if country = india; show india related doctypes
-  //-------------------------------------------------
-    
-  if(cnty == 'India'){  
-    var lst1 = [['TDS Rate Chart',1,'TDS Rate Chart','', 'TDS rate master'],['TDS Category',1,'TDS Category','id'+NEWLINE+'module','TDS categories']];
-    for(var i =0; i<lst1.length;i++)      
-      this.accounts['Accounts'].push(lst1[i]);
-  }
-  //--------------------------------------------------    
-  
-  var lst = [['Monthly Distribution',1,'Budget Distribution','id'+NEWLINE+'fiscal_year'+NEWLINE+'distribution_id','Manage budget distributions (seasonalities)'],
-    ['Sales Other Charges',1,'Other Charges','','Manage your charge structures (taxes + charges) for sales'],
-    ['Purchase Other Charges',1,'Purchase Other Charges','','Manage your charge structures (taxes + charges) for purchase'],
-    ['Mode of Payment',1,'Mode of Payment','','Mode of payment master']];
-             
-  for(var i =0; i<lst.length;i++)
-      this.accounts['Accounts'].push(lst[i]);
-  
-  this.stock = {'Stock':[['Item Group',2,'Sales Browser','Item Group','Manage item classifications'],
-    ['Item',1,'Item','name'+NEWLINE+'item_group'+NEWLINE+'description','Item master'],
-    ['Brand',1,'Brand','id'+NEWLINE+'description','Brand master'],
-    ['Batch',1,'Batch','name'+NEWLINE+'start_date'+NEWLINE+'item'+NEWLINE+'expiry_date','Manage batches'],
-    ['Price List',1,'Price List','','Price list master'],
-    ['UOM',1,'UOM','','Unit of measure (UOM) master'],
-    ['Warehouse Type',1,'Warehouse Type','','Warehouse classifications'],
-    ['Warehouse',1,'Warehouse','','Warehouse master']]};
-  
-  this.buying = {'Buying':[['Supplier Type',1,'Supplier Type','','Manage supplier classifications'],
-    ['Supplier',1,'Supplier','id'+NEWLINE+'supplier_type'+NEWLINE+'supplier_status'+NEWLINE+'company','Supplier master']]};
-  
-  this.maintenance = {'Maintenance':[['Serial No',1,'Serial No','item_code'+NEWLINE+'status'+NEWLINE+'pr_no'+NEWLINE+'delivery_note_no'+NEWLINE+'customer_name','Manage unique serial numbers for items']]};
-  
-  this.production = {'Production':[['Bill of Materials',1,'Bill Of Materials','id'+NEWLINE+'item'+NEWLINE+'description'+NEWLINE+'operating_cost'+NEWLINE+'maintained_by','Muti-level bill of materials and operations'],
-    ['Workstation',1,'Workstation','id'+NEWLINE+'workstation_name'+NEWLINE+'warehouse'+NEWLINE+'description','Workstation master']]};
-  
-  this.hr = {'HR':[['Department',1,'Department','','Company department master'],
-    ['Designation',1,'Designation','','Company designation master'],
-    ['Branch',1,'Branch','','Manage branches for your company'],
-    ['Grade',1,'Grade','','Manage employee grades'],
-    ['Employment Type',1,'Employment Type','','Manage types of employment'],
-    ['Employee',1,'Employee','employee_name'+NEWLINE+'employment_type'+NEWLINE+'status'+NEWLINE+'branch'+NEWLINE+'designation'+NEWLINE+'department'+NEWLINE+'grade'+NEWLINE+'reports_to','Employee master'],
-    ['Earning Type',1,'Earning Type','taxable'+NEWLINE+'exemption_limit','Types of salary earning master'],
-    ['Deduction Type',1,'Deduction Type','','Types of salary deduction master'],
-    ['Expense Type',1,'Expense Type','', 'Types of expense master'],
-      
-    ['Salary Structure',1,'Salary Structure','employee'+NEWLINE+'is_active'+NEWLINE+'fiscal_year'+NEWLINE+'from_date'+NEWLINE+'ctc'+NEWLINE+'total_earning'+NEWLINE+'total_deduction'+NEWLINE+'total','Salary structure template'],
-    ['Holiday List',1,'Holiday List','fiscal_year','List of holidays'],
-    ['Leave Type',1,'Leave Type','max_days_allowed'+NEWLINE+'is_carry_forward'+NEWLINE+'is_encash','Leave type master'],
-    ['KRA Template',1,'KRA Template','','Template of Key Result Areas (KRAs)']]};
-}
+pscript.onload_Setup = function(wrapper) {
+	erpnext.module_page.hide_links(wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/setup/page/setup/setup_static.html b/erpnext/setup/page/setup/setup_static.html
deleted file mode 100644
index 54fee71..0000000
--- a/erpnext/setup/page/setup/setup_static.html
+++ /dev/null
@@ -1 +0,0 @@
-Setup
\ No newline at end of file
diff --git a/erpnext/setup/page/setup_wizard/setup_wizard.js b/erpnext/setup/page/setup_wizard/setup_wizard.js
index 59308f1..053330b 100644
--- a/erpnext/setup/page/setup_wizard/setup_wizard.js
+++ b/erpnext/setup/page/setup_wizard/setup_wizard.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Setup Wizard'] = function()
 {   
 
diff --git a/erpnext/setup/page/webforms/webforms.js b/erpnext/setup/page/webforms/webforms.js
index d429ce0..85caadf 100644
--- a/erpnext/setup/page/webforms/webforms.js
+++ b/erpnext/setup/page/webforms/webforms.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript.onload_Webforms = function(){
 
   $c_obj('Home Control','get_acc_id','', function(r,rt) {
diff --git a/erpnext/startup/__init__.py b/erpnext/startup/__init__.py
index cea033b..3549898 100644
--- a/erpnext/startup/__init__.py
+++ b/erpnext/startup/__init__.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # add startup propertes
 
 add_in_head = """
diff --git a/erpnext/startup/event_handlers.py b/erpnext/startup/event_handlers.py
index 9740be4..5f0cc23 100644
--- a/erpnext/startup/event_handlers.py
+++ b/erpnext/startup/event_handlers.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 import webnotes.defs
 from webnotes.utils import cint
@@ -54,19 +70,24 @@
 	import webnotes
 	import webnotes.model.doc
 	
+	bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
+
 	if webnotes.session['user']=='Guest':
 		bootinfo['website_settings'] = webnotes.model.doc.getsingle('Website Settings')
 		bootinfo['website_menus'] = webnotes.conn.sql("""select label, url, custom_page, 
 			parent_label, parentfield
 			from `tabTop Bar Item` where parent='Website Settings' order by idx asc""", as_dict=1)
-		bootinfo['custom_css'] = webnotes.conn.get_value('Style Settings', None, 'custom_css') or ''
 		bootinfo['analytics_code'] = \
 			webnotes.conn.get_value('Website Settings', None, 'analytics_code')
 		bootinfo['analytics_call'] = \
 			webnotes.conn.get_value('Website Settings', None, 'analytics_call')
+		
 	else:	
 		bootinfo['letter_heads'] = get_letter_heads()
 
+		import webnotes.model.doctype
+		bootinfo['docs'] += webnotes.model.doctype.get('Event')
+
 def get_letter_heads():
 	"""load letter heads with startup"""
 	import webnotes
@@ -74,7 +95,6 @@
 		where ifnull(disabled,0)=0""")
 	return dict(ret)
 
-
 def login_as(login_manager):
 	"""
 		Login as functionality -- allows signin from signin.erpnext.com
diff --git a/erpnext/startup/feature_setup.js b/erpnext/startup/feature_setup.js
index a7b6dd1..8644c1d 100644
--- a/erpnext/startup/feature_setup.js
+++ b/erpnext/startup/feature_setup.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 /* features setup "Dictionary", "Script"
 Dictionary Format
 	'projects': {
diff --git a/erpnext/startup/modules.js b/erpnext/startup/modules.js
index 0280c74..dbd11b0 100644
--- a/erpnext/startup/modules.js
+++ b/erpnext/startup/modules.js
@@ -1,350 +1,79 @@
-// ====================================================================
+// 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/>.
 
-pscript.startup_make_sidebar = function() {
-	$y(page_body.left_sidebar, {width:(100/6)+'%', paddingTop:'8px'});
+wn.provide('erpnext.module_page');
 
-	var callback = function(r,rt) {
-		// menu
-		var ml = r.message;
+erpnext.module_page.setup_page = function(module, wrapper) {
+	erpnext.module_page.hide_links(wrapper);
+	erpnext.module_page.make_list(module, wrapper);
+	$(wrapper).find("a[title]").tooltip({
+		delay: { show: 500, hide: 100 }
+	});	
+}
 
-		// clear
-		page_body.left_sidebar.innerHTML = '';
+// hide list links where the user does
+// not have read permissions
 
-		for(var m=0; m<ml.length; m++){
-			if(ml[m]) {
-				new SidebarItem(ml[m]);
-			}
+erpnext.module_page.hide_links = function(wrapper) {
+	// lists
+	$(wrapper).find('[href*="List/"]').each(function() {
+		var href = $(this).attr('href');
+		var dt = href.split('/')[1];
+		if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
+			var txt = $(this).text();
+			$(this).parent().css('color', '#999').html(txt);
 		}
-		nav_obj.observers.push({notify:function(t,dt,dn) { pscript.select_sidebar_menu(t, dt, dn); }});
-
-		// select current
-		var no = nav_obj.ol[nav_obj.ol.length-1];
-		if(no && menu_item_map[decodeURIComponent(no[0])][decodeURIComponent(no[1])])
-			pscript.select_sidebar_menu(decodeURIComponent(no[0]), decodeURIComponent(no[1]));
-	}
-	$c_obj('Home Control', 'get_modules', '', callback);
-}
-
-// ====================================================================
-// Menu observer
-// ====================================================================
-
-cur_menu_pointer = null;
-var menu_item_map = {'Form':{}, 'Page':{}, 'Report':{}, 'List':{}}
-
-pscript.select_sidebar_menu = function(t, dt, dn) {
-	// get menu item
-	if(menu_item_map[t][dt]) {
-		// select
-		menu_item_map[t][dt].select();
-	} else {
-		// none found :-( Unselect
-		if(cur_menu_pointer)
-			cur_menu_pointer.deselect();
-	}
-}
-
-// ====================================================================
-// Menu pointer
-// ====================================================================
-
-var body_background = '#e2e2e2';
-
-MenuPointer = function(parent, label) {
-	var me = this;
-	this.wrapper = $a(parent, 'div', '', {padding:'0px', cursor:'pointer', margin:'2px 0px'});
-	$br(this.wrapper, '3px');
-
-	this.tab = make_table($a(this.wrapper, 'div'), 1, 2, '100%', ['', '11px'], {height:'22px',
-		verticalAlign:'middle', padding:'0px'}, {borderCollapse:'collapse', tableLayout:'fixed'});
-
-	$y($td(this.tab, 0, 0), {padding:'0px 4px', color:'#444', whiteSpace:'nowrap'});
-
-	// triangle border (?)
-	this.tab.triangle_div = $a($td(this.tab, 0, 1), 'div','', {
-		borderColor: body_background + ' ' + body_background + ' ' + body_background + ' ' + 'transparent',
-		borderWidth:'11px', borderStyle:'solid', height:'0px', width:'0px', marginRight:'-11px'});
-
-	this.label_area = $a($td(this.tab, 0, 0), 'span', '', '', label);
-
-	$(this.wrapper)
-		.hover(
-			function() { if(!me.selected)
-				$bg(this, '#eee'); } ,
-			function() { if(!me.selected)
-				$bg(this, body_background); }
-		)
-
-	$y($td(this.tab, 0, 0), {borderBottom:'1px solid #ddd'});
-
-}
-
-// ====================================================================
-
-MenuPointer.prototype.select = function(grey) {
-	$y($td(this.tab, 0, 0), {
-		color:'#fff', borderBottom:'0px solid #000'
 	});
-	$(this.wrapper).css('background-color', '#999');
-	this.selected = 1;
-
-	if(cur_menu_pointer && cur_menu_pointer != this)
-		cur_menu_pointer.deselect();
-
-	cur_menu_pointer = this;
-}
-
-// ====================================================================
-
-MenuPointer.prototype.deselect = function() {
-	$y($td(this.tab, 0, 0), {color:'#444', borderBottom:'1px solid #ddd'});
-	$(this.wrapper).css('background-color', body_background);
-	this.selected = 0;
-}
-
-
-// ====================================================================
-// Sidebar Item
-// ====================================================================
-
-var cur_sidebar_item = null;
-
-SidebarItem = function(det) {
-	var me = this;
-	this.det = det;
-	this.wrapper = $a(page_body.left_sidebar, 'div', '', {marginRight:'12px'});
-
-	this.body = $a(this.wrapper, 'div');
-	this.tab = make_table(this.body, 1, 2, '100%', ['24px', null], {verticalAlign:'middle'}, {tableLayout:'fixed'});
-
-	// icon
-	var ic = $a($td(this.tab, 0, 0), 'div', 'module-icons module-icons-' + det.module_label.toLowerCase(), {marginLeft:'3px', marginBottom:'-2px'});
-
-	// pointer table
-	this.pointer = new MenuPointer($td(this.tab, 0, 1), det.module_label);
-	$y($td(this.pointer.tab, 0, 0), {fontWeight:'bold'});
-
-	// for page type
-	if(det.module_page) {
-		menu_item_map.Page[det.module_page] = this.pointer;
-	}
-
-	// items area
-	this.items_area = $a(this.wrapper, 'div');
-
-	this.body.onclick = function() { me.onclick(); }
-}
-
-// ====================================================================
-
-SidebarItem.prototype.onclick = function() {
-	var me = this;
-
-	if(this.det.module_page) {
-		// page type
-		this.pointer.select();
-
-		$(me.pointer.label_area).set_working();
-		loadpage(this.det.module_page, function() { 
-			$(me.pointer.label_area).done_working(); 
-		});
-
-	} else {
-		// show sub items
-		this.toggle();
-	}
-}
-
-// ====================================================================
-
-SidebarItem.prototype.collapse = function() {
-	$(this.items_area).slideUp();
-	this.is_open = 0;
-	$fg(this.pointer.label_area, '#444')
-}
-
-// ====================================================================
-
-SidebarItem.prototype.toggle = function() {
-	if(this.loading) return;
-
-	if(this.is_open) {
-		this.collapse();
-	} else {
-		if(this.loaded) $(this.items_area).slideDown();
-		else this.show_items();
-		this.is_open = 1;
-		$fg(this.pointer.label_area, '#000')
-		//this.pointer.select(1);
-
-		// close existing open
-		if(cur_sidebar_item && cur_sidebar_item != this) {
-			cur_sidebar_item.collapse();
+	
+	// reports
+	$(wrapper).find('[data-doctype]').each(function() {
+		var dt = $(this).attr('data-doctype');
+		if(wn.boot.profile.can_read.indexOf(dt)==-1) {
+			var txt = $(this).text();
+			$(this).parent().css('color', '#999').html(txt);
 		}
-		cur_sidebar_item = this;
-	}
-}
-
-// ====================================================================
-
-SidebarItem.prototype.show_items = function() {
-	this.loading = 1;
-	var me = this;
-
-	$(this.pointer.label_area).set_working();
-	var callback = function(r,rt){
-		me.loaded = 1;
-		me.loading = 0;
-		var smi = null;
-		var has_reports = 0;
-		var has_tools = 0;
-
-		// widget code
-		$(me.pointer.label_area).done_working();
-
-		if(r.message.il) {
-			me.il = r.message.il;
-
-			// forms
-			for(var i=0; i<me.il.length;i++){
-				if(me.il[i].doc_type == 'Forms') {
-					if(in_list(profile.can_read, me.il[i].doc_name)) {
-						var smi = new SidebarModuleItem(me, me.il[i]);
-
-						menu_item_map['Form'][me.il[i].doc_name] = smi.pointer;
-						menu_item_map['List'][me.il[i].doc_name] = smi.pointer;
-					}
-				}
-				if(me.il[i].doc_type=='Reports') has_reports = 1;
-				if(in_list(['Single DocType', 'Pages', 'Setup Forms'], me.il[i].doc_type)) 
-					has_tools = 1;
-			}
-			// reports
-			if(has_reports) {
-				var smi = new SidebarModuleItem(me, {doc_name:'Reports', doc_type:'Reports'});
-
-				// add to menu-item mapper
-				menu_item_map['Page'][me.det.module_label + ' Reports'] = smi.pointer;
-			}
-
-			// tools
-			if(has_tools) {
-				var smi = new SidebarModuleItem(me, {doc_name:'Tools', doc_type:'Tools'});
-
-				// add to menu-item mapper
-				menu_item_map['Page'][me.det.module_label + ' Tools'] = smi.pointer;
-			}
-
-			// custom reports
-			if(r.message.custom_reports.length) {
-				me.il = add_lists(r.message.il, r.message.custom_reports);
-				var smi = new SidebarModuleItem(me, {doc_name:'Custom Reports', doc_type:'Custom Reports'});
-
-				// add to menu-item mapper
-				menu_item_map['Page'][me.det.module_label + ' Custom Reports'] = smi.pointer;
-			}
+	});
+	
+	// single (forms)
+	$(wrapper).find('[href*="Form/"]').each(function() {
+		var href = $(this).attr('href');
+		var dt = href.split('/')[1];
+		if(wn.boot.profile.can_read.indexOf(get_label_doctype(dt))==-1) {
+			var txt = $(this).text();
+			$(this).parent().css('color', '#999').html(txt);
 		}
-		
-		
-		$(me.items_area).slideDown();
+	});}
 
-		// high light
-		var no = nav_obj.ol[nav_obj.ol.length-1];
-		if(no && menu_item_map[decodeURIComponent(no[0])][decodeURIComponent(no[1])])
-			pscript.select_sidebar_menu(decodeURIComponent(no[0]), decodeURIComponent(no[1]));
+// make list of reports
 
-	}
-
-	$c_obj('Home Control', 'get_module_details', me.det.name, callback);
-}
-
-// ====================================================================
-// Show Reports
-// ====================================================================
-
-SidebarItem.prototype.show_section = function(sec_type) {
-	var me = this;
-	var label = this.det.module_label + ' ' + sec_type;
-	var type_map = {'Reports':'Reports', 'Custom Reports':'Custom Reports', 
-		'Pages':'Tools', 'Single DocType':'Tools', 'Setup Forms':'Tools'}
-
-
-	if(page_body.pages[label]) {
-		loadpage(label, null, 1);
-	} else {
-		
-		// make the reports page
-		var page = page_body.add_page(label);
-		this.wrapper = $a(page,'div','layout_wrapper');
-
-
-		// head
-		this.head = new PageHeader(this.wrapper, label);
-
-		// body
-		this.body1 = $a(this.wrapper, 'div', '', {marginTop:'16px'});
-
-		// add a report link
-		var add_link = function(det) {
-			var div = $a(me.body1, 'div', '', {marginBottom:'6px'});
-			var span = $a(div, 'span', 'link_type');
-
-			// tag the span
-			span.innerHTML = det.display_name; span.det = det;
-			if(sec_type=='Reports' || sec_type=='Custom Reports') {
-				// Reports
-				// -------
-				span.onclick = function() { loadreport(this.det.doc_name, this.det.display_name); }
-
-			} else {
-				// Tools
-				// -----
-
-				if(det.doc_type=='Pages') {
-					// Page
-					if(det.click_function) {
-						span.onclick = function() { eval(this.det.click_function) }
-						span.click_function = det.click_function;
-					} else {
-						span.onclick = function() { loadpage(this.det.doc_name); }
-					}
-				} else if(det.doc_type=='Setup Forms') {
-					// Doc Browser
-					span.onclick = function() { loaddocbrowser(this.det.doc_name); }
-				} else {
-					// Single
-					span.onclick = function() { loaddoc(this.det.doc_name, this.det.doc_name); }
-				}
-			}
-		}
-
-		// item list
-		for(var i=0; i<me.il.length;i++){
-			if(type_map[me.il[i].doc_type] == sec_type) {
-				add_link(me.il[i]);
-			}
-		}
-		loadpage(label, null, 1);
-	}
-}
-
-
-// ====================================================================
-// Sidebar module item
-// ====================================================================
-
-SidebarModuleItem = function(si, det) {
-	this.det = det;
-	var me= this;
-
-	this.pointer = new MenuPointer(si.items_area, get_doctype_label(det.doc_name));
-	$y(si.items_area, {marginLeft:'32px'})
-	$y($td(this.pointer.tab, 0, 0), {fontSize:'11px'});
-
-	this.pointer.wrapper.onclick = function() {
-		if(me.det.doc_type=='Forms')
-			loaddocbrowser(det.doc_name);
-		else
-			si.show_section(me.det.doc_type);
-	}
-}
+erpnext.module_page.make_list = function(module, wrapper) {
+	// make project listing
+	wrapper.list = new wn.widgets.Listing({
+		parent: $(wrapper).find('.reports-list').get(0),
+		method: 'utilities.get_report_list',
+		render_row: function(row, data) {
+			if(!data.parent_doc_type) data.parent_doc_type = data.doc_type;
+			$(row).html(repl('<a href="#!Report/%(doc_type)s/%(criteria_name)s" \
+				data-doctype="%(parent_doc_type)s">\
+				%(criteria_name)s</a>', data))
+		},
+		args: {
+			module: module
+		},
+		no_refresh: true
+	});
+	wrapper.list.run();	
+}
\ No newline at end of file
diff --git a/erpnext/startup/modules_new.js b/erpnext/startup/modules_new.js
deleted file mode 100644
index 5f912b0..0000000
--- a/erpnext/startup/modules_new.js
+++ /dev/null
@@ -1,36 +0,0 @@
-// Tools Page
-erpnext.ListPage = Class.extend({
-	init: function(opts) {
-		var me = this;
-		this.opts = opts;
-		this.page = page_body.add_page[opts.title];
-		this.page.wrapper = $a(this.page, 'div', 'layout_wrapper');
-		this.page.head = new PageHeading(this.wrapper, this.title)
-		this.page.list = new wn.widgets.Listing({
-			parent: this.page.wrapper,
-			query: opts.query,
-			render:row: opts.render_row
-		});
-	},
-	show: function() {
-		if(this.first) {
-			this.page.list.run();
-			this.first = false;
-		}
-		page_body.change_to(this.opts.title);
-	}
-});
-
-erpnext.ToolsPage = erpnext.ListPage.extend({
-	init: function(opts) {
-		this._super({
-			title: opts.module + ' Settings',
-			query: repl('select name, description from tabDocType where \
-				module=%(module)s and ifnull(issingle,0)=1 order by name asc', opts),
-			render_row: function(parent, data) {
-				parent.innerHTML = repl('<a href="#!Form/%(name)s/%(name)s">%(name)s</a>\
-					<div class="comment">%(description)s</div>', data)
-			}
-		})
-	}
-});
\ No newline at end of file
diff --git a/erpnext/startup/schedule_handlers.py b/erpnext/startup/schedule_handlers.py
new file mode 100644
index 0000000..a828fea
--- /dev/null
+++ b/erpnext/startup/schedule_handlers.py
@@ -0,0 +1,56 @@
+# 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/>.
+
+"""will be called by scheduler"""
+
+import webnotes
+from webnotes.utils import scheduler
+	
+def execute_all():
+	"""
+		* get support email
+		* recurring invoice
+	"""
+	try:
+		from support.doctype.support_ticket import get_support_mails
+		get_support_mails()
+	except Exception, e:
+		scheduler.log('get_support_mails')
+
+	try:
+		from accounts.doctype.gl_control.gl_control import manage_recurring_invoices
+		manage_recurring_invoices()
+	except Exception, e:
+		scheduler.log('manage_recurring_invoices')
+
+	
+	
+def execute_daily():
+	"""email digest"""
+	try:
+		from setup.doctype.email_digest.email_digest import send
+		send()
+	except Exception, e:
+		scheduler.log('email_digest.send')
+
+def execute_weekly():
+	pass
+
+def execute_monthly():
+	pass
+
+def execute_hourly():
+	pass
diff --git a/erpnext/startup/startup.css b/erpnext/startup/startup.css
index 0fee616..ae0ef60 100644
--- a/erpnext/startup/startup.css
+++ b/erpnext/startup/startup.css
@@ -13,19 +13,13 @@
 }
 
 body {
-	background-color: #e2e2e2;
 }
 
 .erpnext-footer {
 	margin: 3px auto;
-	color: #888;
 	text-align: center;
 }
 
-.erpnext-footer a, .erpnext-footer a:hover, .erpnext-footer a:visited {
-	color: #666;
-}
-
 .module-icons {
    background: url(../images/module-icons.png) no-repeat top left;
    width:16px;
@@ -45,14 +39,45 @@
 .module-icons-stock{ background-position: 0 -660px;  } 
 .module-icons-support{ background-position: 0 -726px;  } 
 
-.topbar-new-comments {
+.navbar-new-comments {
 	margin: -3px 0px;
 	padding: 2px;
-	font-size: 14px;
-	color: #fff;
-	background-color: #B00D07;
 	min-width: 20px;
 	text-align: center;
 	display: inline-block;
 	border-radius: 2px;
+	color: #999999;
+	background-color: #333131;
+}
+
+.navbar-new-comments:hover,
+.navbar-new-comments:active,
+.navbar-new-comments:focus {
+	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;
+	max-width: 260px !important;
 }
diff --git a/erpnext/startup/startup.js b/erpnext/startup/startup.js
index c68650a..83b1685 100644
--- a/erpnext/startup/startup.js
+++ b/erpnext/startup/startup.js
@@ -1,7 +1,21 @@
+// 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/>.
+
 var current_module;
 var is_system_manager = 0;
-var module_content_dict = {};
-var user_full_nm = {};
 
 wn.provide('erpnext.startup');
 
@@ -14,19 +28,16 @@
 	$('#startup_div').html('Starting up...').toggle(true);
 	
 	erpnext.startup.set_globals();
-	
+
+	if(wn.boot.custom_css) {
+		set_style(wn.boot.custom_css);
+	}
+		
 	if(user == 'Guest'){
-		$dh(page_body.left_sidebar);
-		if(wn.boot.custom_css) {
-			set_style(wn.boot.custom_css);
-		}
 		if(wn.boot.website_settings.title_prefix) {
 			wn.title_prefix = wn.boot.website_settings.title_prefix;
 		}
 	} else {
-		// modules
-		pscript.startup_make_sidebar();
-
 		// setup toolbar
 		erpnext.toolbar.setup();
 		
@@ -35,7 +46,7 @@
 
 		// border to the body
 		// ------------------
-		$('footer').html('<div class="erpnext-footer">\
+		$('footer').html('<div class="web-footer erpnext-footer">\
 			Powered by <a href="https://erpnext.com">ERPNext</a></div>');
 	}
 
@@ -84,13 +95,24 @@
 var update_messages = function() {
 	// Updates Team Messages
 	
-	if(inList(['Guest', 'Administrator'], user)) { return; }
+	if(inList(['Guest'], user)) { return; }
 	
 	$c_page('home', 'event_updates', 'get_unread_messages', null,
 		function(r,rt) {
 			if(!r.exc) {
 				// This function is defined in toolbar.js
 				page_body.wntoolbar.set_new_comments(r.message);
+				var circle = $('#msg_count')
+				if(circle) {
+					if(r.message.length) {
+						circle.find('span:first').text(r.message.length);
+						circle.toggle(true);
+					} else {
+						circle.toggle(false);
+					}
+				}
+			} else {
+				clearInterval(wn.updates.id);
 			}
 		}
 	);
@@ -104,12 +126,12 @@
 		clearInterval(wn.updates.id);
 	}
 
-	wn.updates.id = setInterval(update_messages, 180000);
+	wn.updates.id = setInterval(update_messages, 60000);
 }
 
 // =======================================
 
 // start
 $(document).bind('startup', function() {
-	erpnext.startup.start();	
+	erpnext.startup.start();
 });
diff --git a/erpnext/startup/toolbar.js b/erpnext/startup/toolbar.js
index 11499b8..7eda493 100644
--- a/erpnext/startup/toolbar.js
+++ b/erpnext/startup/toolbar.js
@@ -1,18 +1,36 @@
+// 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/>.
+
 /* toolbar settings */
 wn.provide('erpnext.toolbar');
 
 erpnext.toolbar.setup = function() {
-	// profile
-	$('#toolbar-user').append('<li><a href="#profile-settings">Profile Settings</a></li>');
+	// modules 
+	erpnext.toolbar.add_modules();
 	
-	$('#toolbar-user').append('<li><a href="#My Company">Team / Messages</a></li>');
+	// profile
+	$('#toolbar-user').append('<li><a href="#!profile-settings">Profile Settings</a></li>');
 
-	$('.topbar .secondary-nav').prepend('\
-		<li><a href="#" id="toolbar-new-comments"></a></li>');
+	$('.navbar .pull-right').append('\
+		<li><a href="#!messages" title="Unread Messages"><span class="navbar-new-comments"></span></a></li>');
 
 	// help
-	$('.topbar .secondary-nav').append('<li class="dropdown">\
-		<a class="dropdown-toggle" href="#" onclick="return false;">Help</a>\
+	$('.navbar .pull-right').prepend('<li class="dropdown">\
+		<a class="dropdown-toggle" data-toggle="dropdown" href="#" \
+			onclick="return false;">Help<b class="caret"></b></a>\
 		<ul class="dropdown-menu" id="toolbar-help">\
 		</ul></li>')
 
@@ -32,18 +50,18 @@
 
 	$.extend(page_body.wntoolbar, {
 		set_new_comments: function(new_comments) {
-			var topbar_nc = $('#toolbar-new-comments');
+			var navbar_nc = $('.navbar-new-comments');
 			if(new_comments && new_comments.length>0) {
-				topbar_nc.html('<span class="topbar-new-comments">' + new_comments.length + '</span>');
-				topbar_nc.click(function() { loadpage('My Company'); });
+				navbar_nc.text(new_comments.length);
+				navbar_nc.addClass('navbar-new-comments-true')
 				$.each(new_comments, function(i, v) {
 					var msg = 'New Message: ' + (v[1].length<=100 ? v[1] : (v[1].substr(0, 100) + "..."));
 					var id = v[0].replace('/', '-');
 					if(!$('#' + id)[0]) { show_alert(msg, id); }
 				})
 			} else {
-				topbar_nc.html('');
-				topbar_nc.click(function() { return false; });
+				navbar_nc.removeClass('navbar-new-comments-true');
+				navbar_nc.text(0);
 			}
 		}
 	});
@@ -51,3 +69,24 @@
 	page_body.wntoolbar.set_new_comments();
 }
 
+erpnext.toolbar.add_modules = function() {
+	$('<li class="dropdown">\
+		<a class="dropdown-toggle" data-toggle="dropdown" href="#"\
+			onclick="return false;">Modules<b class="caret"></b></a>\
+		<ul class="dropdown-menu">\
+			<li><a href="#!accounts-home" data-module="Accounts">Accounts</a></li>\
+			<li><a href="#!selling-home" data-module="Selling">Selling</a></li>\
+			<li><a href="#!stock-home" data-module="Stock">Stock</a></li>\
+			<li><a href="#!buying-home" data-module="Buying">Buying</a></li>\
+			<li><a href="#!support-home" data-module="Support">Support</a></li>\
+			<li><a href="#!hr-home" data-module="HR">Human Resources</a></li>\
+			<li><a href="#!projects-home" data-module="Projects">Projects</a></li>\
+			<li><a href="#!production-home" data-module="Production">Production</a></li>\
+			<li><a href="#!website-home" data-module="Website">Website</a></li>\
+			<li class="divider"></li>\
+			<li><a href="#!Setup" data-module="Setup">Setup</a></li>\
+		</ul>\
+		</li>').prependTo('.navbar .nav:first');
+	$('.navbar .nav:first')	
+}
+
diff --git a/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt b/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt
index f59ab73..7cc2350 100644
--- a/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt
+++ b/erpnext/stock/DocType Mapper/Delivery Note-Packing Slip/Delivery Note-Packing Slip.txt
@@ -3,9 +3,9 @@
 
 	# These values are common in all dictionaries
 	{
-		'creation': '2012-02-02 11:50:33',
+		'creation': '2012-02-22 15:45:56',
 		'docstatus': 0,
-		'modified': '2012-02-21 16:11:29',
+		'modified': '2012-02-22 15:45:56',
 		'modified_by': u'Administrator',
 		'owner': u'Administrator'
 	},
diff --git a/erpnext/stock/doctype/bin/bin.py b/erpnext/stock/doctype/bin/bin.py
index 8f1bdf2..dc847f6 100644
--- a/erpnext/stock/doctype/bin/bin.py
+++ b/erpnext/stock/doctype/bin/bin.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index b9e7503..3a8931e 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Module Material Management
 cur_frm.cscript.tname = "Delivery Note Detail";
 cur_frm.cscript.fname = "delivery_note_details";
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.py b/erpnext/stock/doctype/delivery_note/delivery_note.py
index 013245a..a94531b 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.py
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/item/item.js b/erpnext/stock/doctype/item/item.js
index 691e259..59235ab 100644
--- a/erpnext/stock/doctype/item/item.js
+++ b/erpnext/stock/doctype/item/item.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.refresh = function(doc) {
 	// make sensitive fields(has_serial_no, is_stock_item, valuation_method)
 	// read only if any stock ledger entry exists
diff --git a/erpnext/stock/doctype/item/item.py b/erpnext/stock/doctype/item/item.py
index 4dca704..64cb0c9 100644
--- a/erpnext/stock/doctype/item/item.py
+++ b/erpnext/stock/doctype/item/item.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/item/test_item.py b/erpnext/stock/doctype/item/test_item.py
index 529c82a..43ace79 100644
--- a/erpnext/stock/doctype/item/test_item.py
+++ b/erpnext/stock/doctype/item/test_item.py
@@ -1,3 +1,19 @@
+# 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 unittest
 import webnotes
 import copy
diff --git a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js
index 6ffef4a..3cad944 100644
--- a/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js
+++ b/erpnext/stock/doctype/landed_cost_master/landed_cost_master.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 //--------- ONLOAD -------------
diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
index 369fd4d..eb0c3df 100644
--- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
+++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
 if(!doc.currency){doc.currency = sys_defaults.currency;}
 }
diff --git a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
index ea63d04..2468247 100644
--- a/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
+++ b/erpnext/stock/doctype/landed_cost_wizard/landed_cost_wizard.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import cint, cstr, flt
 from webnotes.model.doc import addchild, getchildren
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.js b/erpnext/stock/doctype/packing_slip/packing_slip.js
index 7359ffa..d3f4fb4 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.js
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.fields_dict['delivery_note'].get_query = function(doc, cdt, cdn) {
 	return 'SELECT name FROM `tabDelivery Note` WHERE docstatus=0 AND %(key)s LIKE "%s"';
 }
diff --git a/erpnext/stock/doctype/packing_slip/packing_slip.py b/erpnext/stock/doctype/packing_slip/packing_slip.py
index 23367c7..90a1d71 100644
--- a/erpnext/stock/doctype/packing_slip/packing_slip.py
+++ b/erpnext/stock/doctype/packing_slip/packing_slip.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import flt, cint
 
diff --git a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py b/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py
index 05f502c..2b48ed0 100644
--- a/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py
+++ b/erpnext/stock/doctype/packing_slip_detail/packing_slip_detail.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 class DocType:
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index 5a5db04..0f6d1a8 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.tname = "Purchase Receipt Detail";
 cur_frm.cscript.fname = "purchase_receipt_details";
 cur_frm.cscript.other_fname = "purchase_tax_details";
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
index 0193352..530afcf 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js
index 5e49713..2320f00 100644
--- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js
+++ b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // Onload
 //-------------------------------
 cur_frm.cscript.onload = function(doc,dt,dn){
diff --git a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
index ca6761e..9b421d3 100644
--- a/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
+++ b/erpnext/stock/doctype/sales_and_purchase_return_wizard/sales_and_purchase_return_wizard.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.js b/erpnext/stock/doctype/sales_bom/sales_bom.js
index 5bae649..be159e7 100644
--- a/erpnext/stock/doctype/sales_bom/sales_bom.js
+++ b/erpnext/stock/doctype/sales_bom/sales_bom.js
@@ -1,3 +1,19 @@
+// 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/>.
+
  
 
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
diff --git a/erpnext/stock/doctype/sales_bom/sales_bom.py b/erpnext/stock/doctype/sales_bom/sales_bom.py
index ce4567e..39fa2cd 100644
--- a/erpnext/stock/doctype/sales_bom/sales_bom.py
+++ b/erpnext/stock/doctype/sales_bom/sales_bom.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/serial_no/serial_no.js b/erpnext/stock/doctype/serial_no/serial_no.js
index a41113c..00929ec 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.js
+++ b/erpnext/stock/doctype/serial_no/serial_no.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // ************************************** onload ****************************************************
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
   if(!doc.status) set_multiple(cdt, cdn, {status:'In Store'});
diff --git a/erpnext/stock/doctype/serial_no/serial_no.py b/erpnext/stock/doctype/serial_no/serial_no.py
index b242edb..2384171 100644
--- a/erpnext/stock/doctype/serial_no/serial_no.py
+++ b/erpnext/stock/doctype/serial_no/serial_no.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index 161e094..0eb78df 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
   if (!doc.posting_date) doc.posting_date = dateutil.obj_to_str(new Date());
   if (!doc.transfer_date) doc.transfer_date = dateutil.obj_to_str(new Date());
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.py b/erpnext/stock/doctype/stock_entry/stock_entry.py
index 1a3e783..6d080a8 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.py
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/stock_ledger/stock_ledger.py b/erpnext/stock/doctype/stock_ledger/stock_ledger.py
index f22d2c2..577d2ef 100644
--- a/erpnext/stock/doctype/stock_ledger/stock_ledger.py
+++ b/erpnext/stock/doctype/stock_ledger/stock_ledger.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
index 3833e45..c9d23c6 100644
--- a/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
+++ b/erpnext/stock/doctype/stock_ledger_entry/stock_ledger_entry.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
index 2e428df..613c230 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.refresh = function(doc) {	
 	if (doc.docstatus) hide_field('Steps');
 }
diff --git a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
index ace16fb..8ea8273 100644
--- a/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
+++ b/erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import cstr, flt, get_defaults, nowdate
 from webnotes import msgprint
diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
index 8352506..b71f94b 100644
--- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
+++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.fields_dict['item_code'].get_query = function(doc) {
   return 'SELECT DISTINCT `tabItem`.`name`, `tabItem`.description FROM `tabItem` WHERE (IFNULL(`tabItem`.`end_of_life`,"") = "" OR `tabItem`.`end_of_life` ="0000-00-00" OR `tabItem`.`end_of_life` > NOW()) AND `tabItem`.`%(key)s` like "%s" ORDER BY `tabItem`.`name` LIMIT 50';
 }
diff --git a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
index 0fa7a3b..e80e66f 100644
--- a/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
+++ b/erpnext/stock/doctype/stock_uom_replace_utility/stock_uom_replace_utility.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/stock/doctype/valuation_control/valuation_control.py b/erpnext/stock/doctype/valuation_control/valuation_control.py
index 52d9640..f0cbed9 100644
--- a/erpnext/stock/doctype/valuation_control/valuation_control.py
+++ b/erpnext/stock/doctype/valuation_control/valuation_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes, unittest
 
diff --git a/erpnext/stock/doctype/warehouse/warehouse.js b/erpnext/stock/doctype/warehouse/warehouse.js
index a418027..cf0d4a0 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.js
+++ b/erpnext/stock/doctype/warehouse/warehouse.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.country = function(doc, cdt, cdn) {
   var mydoc=doc;
   $c('runserverobj', args={'method':'check_state', 'docs':compress_doclist([doc])},
diff --git a/erpnext/stock/doctype/warehouse/warehouse.py b/erpnext/stock/doctype/warehouse/warehouse.py
index b9d560a..8b08fab 100644
--- a/erpnext/stock/doctype/warehouse/warehouse.py
+++ b/erpnext/stock/doctype/warehouse/warehouse.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/stock/page/stock_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/stock/page/stock_home/__init__.py
diff --git a/erpnext/stock/page/stock_home/stock_home.html b/erpnext/stock/page/stock_home/stock_home.html
new file mode 100644
index 0000000..9ba21a4
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.html
@@ -0,0 +1,105 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Stock</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a ahref="#!List/Stock Entry">Stock Entry</a></h4>
+			<p class="help">Transfer stock from one warehouse to another</p>
+			<h4><a href="#!List/Delivery Note">Delivery Note</a></h4>
+			<p class="help">Delivery (shipment) to customers</p>
+			<h4><a href="#!List/Purchase Receipt">Purchase Receipt</a></h4>
+			<p class="help">Goods received from Suppliers</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!List/Item">Item</a></h4>
+			<p class="help">Item Master</p>
+			<h4><a href="#!List/Serial No">Serial No</a></h4>
+			<p class="help">Single unit of an Item</p>
+			<h4><a href="#!List/Batch">Batch</a></h4>
+			<p class="help">Batch of units of an Item</p>
+			<h4><a href="#!List/Item">Warehouse</a></h4>
+			<p class="help">Warehouse is where items are stored</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Tools</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Update stock by uploading a spreadsheet (csv) file"
+							href="#!List/Stock Reconciliation">Stock Reconciliation</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Details of item installations"
+							href="#!List/Installation Note">Installation Note</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Details packages against a delivery"
+							href="#!List/Packing Slip">Packing Slip</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Readings of incoming quality inspections"
+							href="#!List/List/QA Inspection Report">Incoming Inspection</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "List of expense heads (Account) that will be distributed across incoming purchases (costs that you find out some time after you receive goods, like Custom Duty, but are a part of item valuation)"
+							href="#!List/Landed Cost Master">Landed Cost Master</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Distribute costs on Purchase Receipts and add them to item value"
+							href="#!List/Landed Cost Wizard">Landed Cost Wizard</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Change Unit of Measure (UOM) of an item"
+							href="#!Form/Stock UOM Replace Utility/Stock UOM Replace Utility">UOM Replace Utility</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Helper for managing return of goods (sales or purchase)"
+							href="#!Form/Sales and Purchase Return Wizard/Sales and Purchase Return Wizard">Sales or Purchase Returns</a>
+					</div>
+
+				</div>
+			</div>
+			<div class="section">
+				<div class="section-head">Setup</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Tree of item classification"
+							href="#!Sales Browser/Item Group">Item Group</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Unit of Measure (UOM) master"
+							href="#!List/UOM">Unit of Measure (UOM)</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "List of Item Brands (optional)"
+							href="#!List/Brand">Brand</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Types of warehouses"
+							href="#!List/Warehouse Type">Warehouse Type</a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_home/stock_home.js b/erpnext/stock/page/stock_home/stock_home.js
new file mode 100644
index 0000000..aa33722
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_stock-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Stock', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/stock/page/stock_home/stock_home.txt b/erpnext/stock/page/stock_home/stock_home.txt
new file mode 100644
index 0000000..f3e7cda
--- /dev/null
+++ b/erpnext/stock/page/stock_home/stock_home.txt
@@ -0,0 +1,28 @@
+# Page, stock-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:23:22',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:23:22',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Stock',
+		'name': '__common__',
+		'page_name': u'stock-home',
+		'standard': u'Yes',
+		'title': u'Stock Home'
+	},
+
+	# Page, stock-home
+	{
+		'doctype': 'Page',
+		'name': u'stock-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js
index 83be08c..b19db63 100644
--- a/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js
+++ b/erpnext/stock/search_criteria/itemwise_price_list/itemwise_price_list.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Item'+FILTER_SEP +'ID'].df.in_first_page = 1;
 }
\ No newline at end of file
diff --git a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js
index 3c0f8bf..d9cf4d4 100644
--- a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js
+++ b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   this.add_filter({fieldname:'posting_date', label:'Posting Date', fieldtype:'Date', ignore : 1, parent:'Item'});
diff --git a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py
index 75b3f3f..2645d50 100644
--- a/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py
+++ b/erpnext/stock/search_criteria/shortage_to_indent/shortage_to_indent.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 mon_list = []
 data = {'start_date':0, 'end_date':1, 'working_days': 2}
 
diff --git a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js
index 194990a..8cc73dd 100644
--- a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js
+++ b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   //this.hide_all_filters();
 
diff --git a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py
index 42b0cc3..2557451 100644
--- a/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py
+++ b/erpnext/stock/search_criteria/stock_aging_report/stock_aging_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 col = [['In Store Period (in days)', 'Data', '']]
 for c in col:
   colnames.append(str(c[0]))
diff --git a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js
index 89e1dbc..a47806f 100644
--- a/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js
+++ b/erpnext/stock/search_criteria/stock_ledger/stock_ledger.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.add_filter({fieldname:'item_name', label:'Item Name', fieldtype:'Data', options:'', parent:'Item'});
   this.add_filter({fieldname:'description', label:'Description', fieldtype:'Small Text', options: '', parent:'Item'});
diff --git a/erpnext/stock/search_criteria/stock_level/stock_level.js b/erpnext/stock/search_criteria/stock_level/stock_level.js
index e84fe57..f456d0b 100644
--- a/erpnext/stock/search_criteria/stock_level/stock_level.js
+++ b/erpnext/stock/search_criteria/stock_level/stock_level.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.add_filter({fieldname:'item_name', label:'Item Name', fieldtype:'Data', options:'', parent:'Item', in_first_page : 1});
   this.add_filter({fieldname:'description', label:'Description', fieldtype:'Small Text', options: '', parent:'Item', in_first_page : 1});
diff --git a/erpnext/stock/search_criteria/stock_level/stock_level.py b/erpnext/stock/search_criteria/stock_level/stock_level.py
index 4aa397c..7782805 100644
--- a/erpnext/stock/search_criteria/stock_level/stock_level.py
+++ b/erpnext/stock/search_criteria/stock_level/stock_level.py
@@ -1,2 +1,18 @@
+# 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/>.
+
 colwidths[col_idx['Reserved Quantity']]= "120px" 
 colwidths[col_idx['Ordered Quantity']] = "120px"
\ No newline at end of file
diff --git a/erpnext/stock/search_criteria/stock_report/stock_report.js b/erpnext/stock/search_criteria/stock_report/stock_report.js
index 9304bd4..5451eb1 100644
--- a/erpnext/stock/search_criteria/stock_report/stock_report.js
+++ b/erpnext/stock/search_criteria/stock_report/stock_report.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //233
 report.customize_filters = function() {
   this.mytabs.items['Select Columns'].hide()
diff --git a/erpnext/stock/search_criteria/stock_report/stock_report.py b/erpnext/stock/search_criteria/stock_report/stock_report.py
index 1868794..84866e9 100644
--- a/erpnext/stock/search_criteria/stock_report/stock_report.py
+++ b/erpnext/stock/search_criteria/stock_report/stock_report.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 if not filter_values.get('based_on'):
   msgprint("Please Select Based On")
   raise Exception
diff --git a/erpnext/stock/tests.py b/erpnext/stock/tests.py
index a8c0ffd..acd0edc 100644
--- a/erpnext/stock/tests.py
+++ b/erpnext/stock/tests.py
@@ -1,3 +1,19 @@
+# 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 unittest
 
 import sys
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.js b/erpnext/support/doctype/customer_issue/customer_issue.js
index 8d62568..3890cb7 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.js
+++ b/erpnext/support/doctype/customer_issue/customer_issue.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc,cdt,cdn){
   if(!doc.status) set_multiple(dt,dn,{status:'Open'});  
   if(doc.__islocal){    
diff --git a/erpnext/support/doctype/customer_issue/customer_issue.py b/erpnext/support/doctype/customer_issue/customer_issue.py
index 12a8ebd..b00a6a0 100644
--- a/erpnext/support/doctype/customer_issue/customer_issue.py
+++ b/erpnext/support/doctype/customer_issue/customer_issue.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
index d284c4c..51853a6 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, dt, dn) {
   if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
   
diff --git a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
index c47ec22..30083da 100644
--- a/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
+++ b/erpnext/support/doctype/maintenance_schedule/maintenance_schedule.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
index 27b5a5f..df976d1 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, dt, dn) {
   if(!doc.status) set_multiple(dt,dn,{status:'Draft'});
   if(doc.customer) cur_frm.cscript.customer(doc,cdt,cdn);
diff --git a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
index e4efe1c..902b92a 100644
--- a/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
+++ b/erpnext/support/doctype/maintenance_visit/maintenance_visit.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py
index e6cf07e..c9d1958 100644
--- a/erpnext/support/doctype/support_ticket/__init__.py
+++ b/erpnext/support/doctype/support_ticket/__init__.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import cstr
 
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.css b/erpnext/support/doctype/support_ticket/support_ticket.css
new file mode 100644
index 0000000..8d563a7
--- /dev/null
+++ b/erpnext/support/doctype/support_ticket/support_ticket.css
@@ -0,0 +1,8 @@
+.support-ticket-wrapper {
+	margin-top: 10px;
+}
+
+.support-ticket-title {
+	padding: 5px;
+	border-bottom: 1px solid black;
+}
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.js b/erpnext/support/doctype/support_ticket/support_ticket.js
index 397ee8d..02c9a5d 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.js
+++ b/erpnext/support/doctype/support_ticket/support_ticket.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // threading structure
 // -------- orginal message --------
 // xoxoxoxo
@@ -143,13 +159,11 @@
 			this.from_email = this.from_email.replace('<', '&lt;').replace('>', '&gt;');
 		
 		// main wrapper
-		w = $a(parent, 'div', '', 
-			{margin:'7px 0px', padding:'0px', border:'1px solid #c8c8c8', backgroundColor:'#f9f9f9'}
-		);
-		$br(w, '7px');
+		w = $a(parent, 'div', 'support-ticket-wrapper well');
+		//$(w).addClass('support-ticket-wrapper');
 
 		// sender and timestamp
-		$a($a(w, 'div', '', {marginBottom:'7px', padding: '7px', backgroundColor:'#d2d2f2'}), 
+		$a($a(w, 'div', 'support-ticket-title'), 
 			'span', 'link_type', {}, repl('By %(from_email)s on %(creation)s:', this), 
 			function() {
 				// toggle message display on timestamp
diff --git a/erpnext/support/doctype/support_ticket/support_ticket.py b/erpnext/support/doctype/support_ticket/support_ticket.py
index 68b1c55..384d26f 100644
--- a/erpnext/support/doctype/support_ticket/support_ticket.py
+++ b/erpnext/support/doctype/support_ticket/support_ticket.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.doc import make_autoname
 
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/support/page/__init__.py
similarity index 100%
rename from erpnext/setup/doctype/role/__init__.py
rename to erpnext/support/page/__init__.py
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/support/page/support_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/support/page/support_home/__init__.py
diff --git a/erpnext/support/page/support_home/support_home.html b/erpnext/support/page/support_home/support_home.html
new file mode 100644
index 0000000..6c1f790
--- /dev/null
+++ b/erpnext/support/page/support_home/support_home.html
@@ -0,0 +1,41 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Support</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a href="#!List/Support Ticket">Support Ticket</a></h4>
+			<p class="help">Support queries from customers via email or website</p>
+			<h4><a href="#!List/Customer Issue">Customer Issue</a></h4>
+			<p class="help">Customer Issue against a Serial No (warranty)</p>
+			<h4><a href="#!List/Maintenance Schedule">Maintenance Schedule</a></h4>
+			<p class="help">Plan for scheduled maintenance contracts</p>
+			<h4><a href="#!List/Maintenance Visit">Maintenance Visit</a></h4>
+			<p class="help">Visit report for maintenance visit</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!List/Serial No">Serial No</a></h4>
+			<p class="help">Single unit of an Item</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Tools</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Pull support issue from support email account"
+							href="#!Form/Email Settings/Email Settings">Email Settings</a>
+					</div>
+				</div>
+			</div>
+		</div>
+
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/support/page/support_home/support_home.js b/erpnext/support/page/support_home/support_home.js
new file mode 100644
index 0000000..b9fd85e
--- /dev/null
+++ b/erpnext/support/page/support_home/support_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_support-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Support', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/support/page/support_home/support_home.txt b/erpnext/support/page/support_home/support_home.txt
new file mode 100644
index 0000000..a462abd
--- /dev/null
+++ b/erpnext/support/page/support_home/support_home.txt
@@ -0,0 +1,28 @@
+# Page, support-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:23:35',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:23:35',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Support',
+		'name': '__common__',
+		'page_name': u'support-home',
+		'standard': u'Yes',
+		'title': u'Support Home'
+	},
+
+	# Page, support-home
+	{
+		'doctype': 'Page',
+		'name': u'support-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/support/search_criteria/amc_summary/amc_summary.js b/erpnext/support/search_criteria/amc_summary/amc_summary.js
index c3208b3..0ce3619 100644
--- a/erpnext/support/search_criteria/amc_summary/amc_summary.js
+++ b/erpnext/support/search_criteria/amc_summary/amc_summary.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.mytabs.items['Select Columns'].hide();
diff --git a/erpnext/support/search_criteria/amc_summary/amc_summary.py b/erpnext/support/search_criteria/amc_summary/amc_summary.py
index 49a5976..f0b7631 100644
--- a/erpnext/support/search_criteria/amc_summary/amc_summary.py
+++ b/erpnext/support/search_criteria/amc_summary/amc_summary.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # ADD NEW COLUMNS
 row_list = [['Item Group','Data','150px',''],
             ['Out of AMC','Int','150px',''],
diff --git a/erpnext/support/search_criteria/customer_issues/customer_issues.js b/erpnext/support/search_criteria/customer_issues/customer_issues.js
index 4af2f7a..8eaf6f6 100644
--- a/erpnext/support/search_criteria/customer_issues/customer_issues.js
+++ b/erpnext/support/search_criteria/customer_issues/customer_issues.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Status'].df.in_first_page = 1;
   this.filter_fields_dict['Customer Issue'+FILTER_SEP +'Allocated To'].df.in_first_page = 1;
diff --git a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
index 46d4b2b..1b3837a 100644
--- a/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
+++ b/erpnext/support/search_criteria/maintenance_orderwise_pending_amount_to_bill/maintenance_orderwise_pending_amount_to_bill.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Company'].df['report_default'] = sys_defaults.company;
   this.filter_fields_dict['Sales Order'+FILTER_SEP +'Fiscal Year'].df['report_default'] = sys_defaults.fiscal_year;
diff --git a/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js b/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
index 87651bb..c4800ea 100644
--- a/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
+++ b/erpnext/support/search_criteria/maintenance_schedule_details/maintenance_schedule_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
 
   this.filter_fields_dict['Maintenance Schedule Detail'+FILTER_SEP +'From Scheduled Date'].df.in_first_page = 1;
diff --git a/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js b/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
index d1e78e0..ad5ce26 100644
--- a/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
+++ b/erpnext/support/search_criteria/warranty_amc_expiry_details/warranty_amc_expiry_details.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //this.mytabs.items['Select Columns'].hide();
 
 report.customize_filters = function() {
diff --git a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
index 07f6952..4ad5a76 100644
--- a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
+++ b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 report.customize_filters = function() {
   this.hide_all_filters();
   this.mytabs.items['Select Columns'].hide();
diff --git a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
index 783f91a..17f36c0 100644
--- a/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
+++ b/erpnext/support/search_criteria/warranty_amc_summary/warranty_amc_summary.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 
 opt = filter_values.get('based_on')
 opt_dict = {'Territory':'territory', 'Item Group':'item_group'}
diff --git a/erpnext/utilities/__init__.py b/erpnext/utilities/__init__.py
index e69de29..28eacce 100644
--- a/erpnext/utilities/__init__.py
+++ b/erpnext/utilities/__init__.py
@@ -0,0 +1,28 @@
+# 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 webnotes
+
+@webnotes.whitelist()
+def get_report_list(arg=None):
+	"""return list of reports for the given module module"""	
+	webnotes.response['values'] = webnotes.conn.sql("""select 
+		distinct criteria_name, doc_type, parent_doc_type
+		from `tabSearch Criteria` 
+		where module='%(module)s' 
+		and docstatus in (0, NULL) 
+		order by criteria_name 
+		limit %(limit_start)s, %(limit_page_length)s""" % webnotes.form_dict, as_dict=True)
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py b/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py
index fde7552..e3063e9 100644
--- a/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py
+++ b/erpnext/utilities/doctype/activity_dashboard_control/activity_dashboard_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/address/address.js b/erpnext/utilities/doctype/address/address.js
index aa1d871..fc274ef 100644
--- a/erpnext/utilities/doctype/address/address.js
+++ b/erpnext/utilities/doctype/address/address.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
 	if(doc.customer) cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
 	if(doc.supplier) cur_frm.add_fetch('supplier', 'supplier_name', 'supplier_name');
diff --git a/erpnext/utilities/doctype/address/address.py b/erpnext/utilities/doctype/address/address.py
index 7602d1d..a2946f5 100644
--- a/erpnext/utilities/doctype/address/address.py
+++ b/erpnext/utilities/doctype/address/address.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py b/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py
index bb9d9e6..f5310c0 100644
--- a/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py
+++ b/erpnext/utilities/doctype/bulk_rename_tool/bulk_rename_tool.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/contact/contact.js b/erpnext/utilities/doctype/contact/contact.js
index d33750d..2aa89c1 100644
--- a/erpnext/utilities/doctype/contact/contact.js
+++ b/erpnext/utilities/doctype/contact/contact.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 //--------- ONLOAD -------------
 cur_frm.cscript.onload = function(doc, cdt, cdn) {
 	if(doc.customer) cur_frm.add_fetch('customer', 'customer_name', 'customer_name');
diff --git a/erpnext/utilities/doctype/contact/contact.py b/erpnext/utilities/doctype/contact/contact.py
index 8cc9ba1..a6c94da 100644
--- a/erpnext/utilities/doctype/contact/contact.py
+++ b/erpnext/utilities/doctype/contact/contact.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/doctype_label/__init__.py b/erpnext/utilities/doctype/doctype_label/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/utilities/doctype/doctype_label/__init__.py
+++ /dev/null
diff --git a/erpnext/utilities/doctype/doctype_label/doctype_label.txt b/erpnext/utilities/doctype/doctype_label/doctype_label.txt
deleted file mode 100644
index 12f0cf8..0000000
--- a/erpnext/utilities/doctype/doctype_label/doctype_label.txt
+++ /dev/null
@@ -1 +0,0 @@
-[{'section_style': 'Simple', 'is_transaction_doc': None, 'creation': '2010-06-10 10:41:58', 'search_fields': None, 'module': 'Application Internal', 'doctype': 'DocType', 'change_log': None, 'print_outline': '', 'owner': 'Administrator', 'in_dialog': None, 'in_create': None, 'read_only': None, 'allow_email': None, 'dt_template': None, 'hide_heading': None, 'issingle': None, 'allow_rename': None, 'smallicon': None, 'allow_attach': None, 'show_in_menu': None, 'max_attachments': None, 'version': 2, 'menu_index': None, 'docstatus': 0, 'allow_copy': None, 'istable': None, 'description': None, 'parent': None, 'server_code': None, 'allow_trash': None, 'allow_print': None, 'autoname': 'field:dt', 'client_script_core': None, 'client_string': None, 'use_template': None, 'modified_by': 'Administrator', 'document_type': None, 'name': 'DocType Label', 'idx': None, 'hide_toolbar': None, 'colour': 'White:FFF', 'client_script': None, 'modified': '2010-09-20 14:06:57', 'server_code_error': ' ', 'name_case': '', 'parenttype': None, 'read_only_onload': None, 'server_code_core': None, 'server_code_compiled': None, 'parent_node': None, 'parentfield': None}, {'cancel': None, 'amend': None, 'execute': None, 'modified_by': 'Administrator', 'name': 'PERM01036', 'parent': 'DocType Label', 'read': 1, 'create': 1, 'creation': '2010-06-10 10:41:58', 'modified': '2010-06-10 10:44:09', 'submit': None, 'doctype': 'DocPerm', 'write': 1, 'idx': 1, 'parenttype': 'DocType', 'role': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'permlevel': 0, 'match': None, 'parentfield': 'permissions'}, {'no_copy': None, 'oldfieldtype': 'Select', 'creation': '2010-06-10 10:41:58', 'doctype': 'DocField', 'oldfieldname': 'dt', 'owner': 'Administrator', 'reqd': 1, 'in_filter': None, 'print_hide': None, 'modified_by': 'Administrator', 'label': 'Select DocType', 'width': None, 'trigger': None, 'depends_on': None, 'docstatus': 0, 'hidden': None, 'permlevel': 0, 'description': None, 'parent': 'DocType Label', 'search_index': None, 'allow_on_submit': None, 'icon': None, 'name': 'FL05322', 'idx': 1, 'default': None, 'colour': None, 'modified': '2010-06-10 10:44:09', 'parenttype': 'DocType', 'fieldname': 'dt', 'fieldtype': 'Select', 'options': 'link:DocType', 'report_hide': None, 'parentfield': 'fields'}, {'no_copy': None, 'oldfieldtype': 'Data', 'creation': '2010-06-10 10:41:58', 'doctype': 'DocField', 'oldfieldname': 'dt_label', 'owner': 'Administrator', 'reqd': 1, 'in_filter': None, 'print_hide': None, 'modified_by': 'Administrator', 'label': 'DocType Label', 'width': None, 'trigger': None, 'depends_on': None, 'docstatus': 0, 'hidden': None, 'permlevel': 0, 'description': None, 'parent': 'DocType Label', 'search_index': None, 'allow_on_submit': None, 'icon': None, 'name': 'FL05323', 'idx': 2, 'default': None, 'colour': None, 'modified': '2010-06-10 10:44:09', 'parenttype': 'DocType', 'fieldname': 'dt_label', 'fieldtype': 'Data', 'options': None, 'report_hide': None, 'parentfield': 'fields'}]
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/doctype_property_setter/__init__.py b/erpnext/utilities/doctype/doctype_property_setter/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/erpnext/utilities/doctype/doctype_property_setter/__init__.py
+++ /dev/null
diff --git a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.py b/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.py
deleted file mode 100644
index 28eccd4..0000000
--- a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.py
+++ /dev/null
@@ -1,15 +0,0 @@
-class DocType:
-  def __init__(self,d,dl):
-    self.doc, self.doclist = d, dl
-    
-  def update_dt(self):
-    sql("update tabDocType set module=%s, autoname=%s, read_only_onload=%s, section_style=%s, description=%s where name=%s limit 1", (self.doc.module, self.doc.autoname, self.doc.show_print_format_first, self.doc.page_style, self.doc.description, self.doc.select_doctype))
-    
-  def get_details(self):
-    ret = sql("select module, autoname, read_only_onload, section_style, description from tabDocType where name=%s", (self.doc.select_doctype))    
-    self.doc.module = ret[0][0] or ''
-    self.doc.autoname = ret[0][1] or ''
-    self.doc.show_print_format_first = ret[0][2] or 0
-    self.doc.page_style = ret[0][3] or 'Simple'
-    self.doc.description = ret[0][4] or ''
-    
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.txt b/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.txt
deleted file mode 100644
index f0d17d8..0000000
--- a/erpnext/utilities/doctype/doctype_property_setter/doctype_property_setter.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-# DocType, DocType Property Setter
-[
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2010-08-08 17:08:59',
-		'docstatus': 0,
-		'modified': '2010-09-20 14:06:57',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
-	},
-
-	# These values are common for all DocType
-	{
-		'colour': 'White:FFF',
-		'doctype': 'DocType',
-		'issingle': 1,
-		'module': 'Utilities',
-		'name': '__common__',
-		'section_style': 'Simple',
-		'server_code_error': ' ',
-		'version': 4
-	},
-
-	# These values are common for all DocField
-	{
-		'doctype': 'DocField',
-		'name': '__common__',
-		'parent': 'DocType Property Setter',
-		'parentfield': 'fields',
-		'parenttype': 'DocType',
-		'permlevel': 0
-	},
-
-	# These values are common for all DocPerm
-	{
-		'create': 1,
-		'doctype': 'DocPerm',
-		'idx': 1,
-		'name': '__common__',
-		'parent': 'DocType Property Setter',
-		'parentfield': 'permissions',
-		'parenttype': 'DocType',
-		'permlevel': 0,
-		'read': 1,
-		'role': 'System Manager',
-		'write': 1
-	},
-
-	# DocType, DocType Property Setter
-	{
-		'doctype': 'DocType',
-		'name': 'DocType Property Setter'
-	},
-
-	# DocPerm
-	{
-		'doctype': 'DocPerm'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'select_doctype',
-		'fieldtype': 'Select',
-		'idx': 1,
-		'label': 'Select DocType',
-		'options': 'link:DocType'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldtype': 'Button',
-		'idx': 2,
-		'label': 'Get Details',
-		'options': 'get_details',
-		'trigger': 'Server'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'module',
-		'fieldtype': 'Link',
-		'idx': 3,
-		'label': 'Module',
-		'options': 'Module Def'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'autoname',
-		'fieldtype': 'Data',
-		'idx': 4,
-		'label': 'Autoname'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'page_style',
-		'fieldtype': 'Select',
-		'idx': 5,
-		'label': 'Page Style',
-		'options': 'Simple\nTabbed\nTray'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'show_print_format_first',
-		'fieldtype': 'Check',
-		'idx': 6,
-		'label': 'Show Print Format First'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldname': 'description',
-		'fieldtype': 'Text Editor',
-		'idx': 7,
-		'label': 'Description',
-		'width': '300px'
-	},
-
-	# DocField
-	{
-		'doctype': 'DocField',
-		'fieldtype': 'Button',
-		'idx': 8,
-		'label': 'Update',
-		'options': 'update_dt',
-		'trigger': 'Server'
-	}
-]
\ No newline at end of file
diff --git a/erpnext/utilities/doctype/file_browser_control/file_browser_control.py b/erpnext/utilities/doctype/file_browser_control/file_browser_control.py
index d5ad0cc..8e0e3c4 100644
--- a/erpnext/utilities/doctype/file_browser_control/file_browser_control.py
+++ b/erpnext/utilities/doctype/file_browser_control/file_browser_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/menu_control/menu_control.js b/erpnext/utilities/doctype/menu_control/menu_control.js
index 96c4b3c..ce0b10f 100644
--- a/erpnext/utilities/doctype/menu_control/menu_control.js
+++ b/erpnext/utilities/doctype/menu_control/menu_control.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 class DocType:
   def __init__(self, d, dl):
     self.doc, self.doclist = d,dl
diff --git a/erpnext/utilities/doctype/menu_control/menu_control.py b/erpnext/utilities/doctype/menu_control/menu_control.py
index 0718006..a6ab09a 100644
--- a/erpnext/utilities/doctype/menu_control/menu_control.py
+++ b/erpnext/utilities/doctype/menu_control/menu_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/patch_util/patch_util.py b/erpnext/utilities/doctype/patch_util/patch_util.py
index 828c805..19a5232 100644
--- a/erpnext/utilities/doctype/patch_util/patch_util.py
+++ b/erpnext/utilities/doctype/patch_util/patch_util.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/profile_control/profile_control.py b/erpnext/utilities/doctype/profile_control/profile_control.py
index b8db231..8f44bd2 100644
--- a/erpnext/utilities/doctype/profile_control/profile_control.py
+++ b/erpnext/utilities/doctype/profile_control/profile_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.js b/erpnext/utilities/doctype/rename_tool/rename_tool.js
index bcd156e..fe024c6 100644
--- a/erpnext/utilities/doctype/rename_tool/rename_tool.js
+++ b/erpnext/utilities/doctype/rename_tool/rename_tool.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // over-ride the link query to return relevant link names
 
 cur_frm.fields_dict.document_to_rename.get_query = function(doc, dt, dn) {
diff --git a/erpnext/utilities/doctype/rename_tool/rename_tool.py b/erpnext/utilities/doctype/rename_tool/rename_tool.py
index ea12433..6c4b058 100644
--- a/erpnext/utilities/doctype/rename_tool/rename_tool.py
+++ b/erpnext/utilities/doctype/rename_tool/rename_tool.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 class DocType:
 	def __init__(self, d, dl=[]):
 		self.doc, self.doclist = d, dl
diff --git a/erpnext/utilities/doctype/reposting_tool/reposting_tool.js b/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
index 8a1d41f..006ef9a 100644
--- a/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
+++ b/erpnext/utilities/doctype/reposting_tool/reposting_tool.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 var bin_list = [];
 var msg = [];
 var binidx = 0;
diff --git a/erpnext/utilities/doctype/reposting_tool/reposting_tool.py b/erpnext/utilities/doctype/reposting_tool/reposting_tool.py
index 489a3b6..82df4e3 100644
--- a/erpnext/utilities/doctype/reposting_tool/reposting_tool.py
+++ b/erpnext/utilities/doctype/reposting_tool/reposting_tool.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/sms_center/sms_center.js b/erpnext/utilities/doctype/sms_center/sms_center.js
index abc52cf..45a6073 100644
--- a/erpnext/utilities/doctype/sms_center/sms_center.js
+++ b/erpnext/utilities/doctype/sms_center/sms_center.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 cur_frm.cscript.refresh = function(doc, cdt, cdn) {
   if(doc.send_to == 'Customer Group')
     unhide_field('customer_group_name');
diff --git a/erpnext/utilities/doctype/sms_center/sms_center.py b/erpnext/utilities/doctype/sms_center/sms_center.py
index 552e26d..a65c4cb 100644
--- a/erpnext/utilities/doctype/sms_center/sms_center.py
+++ b/erpnext/utilities/doctype/sms_center/sms_center.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/sms_control/sms_control.js b/erpnext/utilities/doctype/sms_control/sms_control.js
index c6cc53e..42d961f 100644
--- a/erpnext/utilities/doctype/sms_control/sms_control.js
+++ b/erpnext/utilities/doctype/sms_control/sms_control.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 function SMSManager() {
 	var me = this;
 	this.get_contact_number = function(contact, key, value) {
diff --git a/erpnext/utilities/doctype/sms_control/sms_control.py b/erpnext/utilities/doctype/sms_control/sms_control.py
index c595158..9d11283 100644
--- a/erpnext/utilities/doctype/sms_control/sms_control.py
+++ b/erpnext/utilities/doctype/sms_control/sms_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/doctype/trash_control/trash_control.py b/erpnext/utilities/doctype/trash_control/trash_control.py
index 228160e..2c1064e 100644
--- a/erpnext/utilities/doctype/trash_control/trash_control.py
+++ b/erpnext/utilities/doctype/trash_control/trash_control.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 # Please edit this list and import only required elements
 import webnotes
 
diff --git a/erpnext/utilities/page/file_browser/__init__.py b/erpnext/utilities/page/calendar/__init__.py
similarity index 100%
rename from erpnext/utilities/page/file_browser/__init__.py
rename to erpnext/utilities/page/calendar/__init__.py
diff --git a/erpnext/utilities/page/calendar/calendar.css b/erpnext/utilities/page/calendar/calendar.css
new file mode 100644
index 0000000..9adae7a
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.css
@@ -0,0 +1,169 @@
+/**** CALENDAR ****/
+
+div.cal_body {
+	margin: 16px;
+	background-color: #DDD;
+	position: relative;
+	border-radius: 5px;
+	-moz-border-radius: 5px;
+	-webkit-border-radius: 5px;	
+	padding: 16px;
+	-moz-box-shadow: 1px 1px 8px #555;
+	-webkit-box-shadow: 1px 1px 8px #555;
+	box-shadow: 1px 1px 8px #555;
+}
+
+div.cal_body h4 {
+	text-align: center;
+}
+
+div.cal_head {
+	margin: 16px;
+	margin-bottom: 0px;
+}
+div.cal_head div {
+	font-size: 18px;
+	color: #666;
+	padding-top: 8px;
+}
+
+div.cal_toolbar {
+	width: 80%;
+}
+
+div.cal_toolbar .btn {
+	text-align: center;
+	margin: 0px;
+	margin-left: -1px;
+}
+
+div.cal_view_body {
+}
+
+div.cal_view_body_plain {
+	margin: 16px;
+}
+
+div.cal_month_head {
+	margin: 8px 0px 8px 0px;
+	height: 30px;
+}
+
+div.cal_month_head .btn {
+	float: right;
+}
+
+span.cal_view_title {
+	display: inline-block;
+	font-size: 20px;
+}
+
+div.cal_month_body {
+}
+
+.cal_month_headtable {
+	/*table-layout:fixed;*/
+	width: 100%;
+}
+
+.cal_month_name {
+	width: 100%;
+	color: #888;
+	font-size: 14px;
+	font-weight: bold;
+	text-align: center;
+}
+
+.cal_month_headtable tr td{
+	font-size: 12px;
+	font-weight: bold;
+	text-align: center;
+	padding: 4px;
+}
+
+table.cal_month_table {
+	border-collapse: collapse;
+	/*table-layout:fixed;*/
+	width: 100%;
+}
+
+table.cal_month_table td {
+	width: 14.29%;
+	height: 20%;
+	/*overflow:hidden;*/
+	padding:0px;
+}
+
+div.cal_month_date {
+	width:100%;
+	font-size: 10px;
+	/*background-color: #EEF;*/
+}
+
+div.cal_month_date_holiday {
+	/*background-color: #FFF;*/
+}
+
+div.cal_month_unit {
+	width:100%;
+	min-height: 100px;
+	overflow:hidden;
+	cursor:pointer;
+	/*background-color:#FFF;*/
+}
+	
+div.cal_vu_disabled {
+	background-color:#FFF;
+	cursor:default;
+}
+
+table.cal_day_table {
+	border-collapse: collapse;
+	width: 100%;
+}
+
+table.cal_day_table td {
+}
+
+div.cal_day_body {
+	width: 100%;
+	overflow-x: hidden;
+	border-top: 1px solid #AAA;
+}
+
+div.cal_day_unit{
+	width:100%;
+	cursor:pointer;
+}
+
+table.cal_week_table {
+	border-collapse: collapse;
+	width: 100%;
+}
+
+table.cal_week_table td {
+	width: 12.5%;
+}
+
+div.cal_week_body {
+	width: 100%;
+	overflow-x: hidden;
+	border-top: 1px solid #888;
+}
+
+div.cal_week_unit{
+	width: 100%;
+	cursor:pointer;
+}
+
+div.cal_event_Public {
+	color: GREEN;
+}
+
+div.cal_event_Private {
+	color: BLUE;
+}
+
+div.cal_event_hover {
+	text-decoration: underline;
+}
diff --git a/erpnext/utilities/page/calendar/calendar.html b/erpnext/utilities/page/calendar/calendar.html
new file mode 100644
index 0000000..456566d
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.html
@@ -0,0 +1,26 @@
+<div class="cal_body">
+	<a class="close" onclick="window.history.back();">&times;</a>
+	<div class="cal_toolbar btn-group">
+		<button class="btn btn-small" onclick="erpnext.calendar.add_event()">
+			<i class="icon-plus"></i> Add Event
+		</button>
+		<button class="btn btn-small" onclick="erpnext.calendar.refresh('Day')">
+			Day View
+		</button>
+		<button class="btn btn-small" onclick="erpnext.calendar.refresh('Week')">
+			Week View
+		</button>
+		<button class="btn btn-small" onclick="erpnext.calendar.refresh('Month')">
+			Month View
+		</button>
+	</div>
+	<div class="cal_month_head">
+		<span class="cal_view_title"></span>
+		<button class="btn btn-small" onclick="erpnext.calendar.cur_view.next()">
+			<i class="icon-arrow-right"></i>
+		</button>
+		<button class="btn btn-small" onclick="erpnext.calendar.cur_view.prev()">
+			<i class="icon-arrow-left"></i>
+		</button>
+	</div>
+</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/calendar/calendar.js b/erpnext/utilities/page/calendar/calendar.js
new file mode 100644
index 0000000..ac1ac88
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.js
@@ -0,0 +1,680 @@
+// Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
+// 
+// MIT License (MIT)
+// 
+// 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:
+// 
+// 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.
+// 
+
+pscript.onload_calendar = function(wrapper) {
+	if(!erpnext.calendar) {
+		erpnext.calendar = new Calendar();
+		erpnext.calendar.init(wrapper);
+		rename_observers.push(erpnext.calendar);
+	}
+}
+
+///// CALENDAR
+
+Calendar=function() {
+	this.views=[];
+	this.events = {};
+	this.events_by_name = {};
+	this.weekdays = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
+}
+
+Calendar.prototype.init=function (parent) {
+
+	this.wrapper = parent;
+ 	this.body = $('.cal_body').get(0);
+
+ 	//this.make_head_buttons();
+ 	//this.make_header();
+	this.view_title = $('.cal_view_title').get(0);
+ 	
+	this.todays_date = new Date();
+	this.selected_date = this.todays_date;
+	this.selected_hour = 8;
+
+	// Create views
+	this.views['Month'] = new Calendar.MonthView(this);
+	this.views['Week'] = new Calendar.WeekView(this);
+	this.views['Day'] = new Calendar.DayView(this);
+
+	// Month view as initial
+	this.cur_view = this.views['Month'];
+	this.views['Month'].show();
+	
+}
+
+Calendar.prototype.rename_notify = function(dt, old_name, new_name) {
+	// calendar
+	if(dt = 'Event'){		
+		if(this.events_by_name[old_name]) {
+			delete this.events_by_name[old_name];
+		}
+	}
+}
+
+//------------------------------------------------------
+
+Calendar.prototype.show_event = function(ev, cal_ev) {
+	var me = this;
+	if(!this.event_dialog) {
+		var d = new Dialog(400, 400, 'Calendar Event');
+		d.make_body([
+			['HTML','Heading']
+			,['Text','Description']
+			,['Check', 'Public Event']
+			,['Check', 'Cancel Event']
+			,['HTML', 'Event Link']
+			,['Button', 'Save']
+		])
+		
+		// show the event when the dialog opens
+		d.onshow = function() {
+			// heading
+			var c = me.selected_date;
+			var tmp = time_to_ampm(this.ev.event_hour);
+			tmp = tmp[0]+':'+tmp[1]+' '+tmp[2];
+			
+			this.widgets['Heading'].innerHTML = 
+				'<div style="text-align: center; padding:4px; font-size: 14px">'
+				+ erpnext.calendar.weekdays[c.getDay()] + ', ' + c.getDate() + ' ' + month_list_full[c.getMonth()] + ' ' + c.getFullYear() 
+				+ ' - <b>'+tmp+'</b></div>';
+			
+			// set
+			this.widgets['Description'].value = cstr(this.ev.description);
+			
+			this.widgets['Public Event'].checked = false;
+			this.widgets['Cancel Event'].checked = false;
+
+			if(this.ev.event_type=='Public')
+				this.widgets['Public Event'].checked = true;
+			
+			this.widgets['Event Link'].innerHTML = '';
+
+			// link
+			var div = $a(this.widgets['Event Link'], 'div', 'link_type', {margin:'4px 0px'});
+			div.onclick = function() { me.event_dialog.hide(); loaddoc('Event', me.event_dialog.ev.name); }
+			div.innerHTML = 'View Event details, add or edit participants';
+				
+		}
+		
+		// event save
+		d.widgets['Save'].onclick = function() {
+			var d = me.event_dialog;
+			
+			// save values
+			d.ev.description = d.widgets['Description'].value;
+			if(d.widgets['Cancel Event'].checked) 
+				d.ev.event_type='Cancel';
+			else if(d.widgets['Public Event'].checked) 
+				d.ev.event_type='Public';
+			
+			me.event_dialog.hide();
+			
+			// if new event
+			me.save_event(d.ev);
+		}
+		this.event_dialog = d;
+	}
+	this.event_dialog.ev = ev;
+	this.event_dialog.cal_ev = cal_ev ? cal_ev : null;
+	this.event_dialog.show();
+	
+}
+
+Calendar.prototype.save_event = function(doc) {
+	var me = this;
+	save_doclist('Event', doc.name, 'Save', function(r) { 
+		var doc = locals['Event'][r.docname];
+		var cal = erpnext.calendar;
+		cal.cur_view.refresh();
+
+		// if cancelled, hide
+		if(doc.event_type=='Cancel') {
+			$(cal.events_by_name[doc.name].body).toggle(false);
+		}
+	});
+}
+
+//------------------------------------------------------
+
+Calendar.prototype.add_event = function() {
+		
+	var ev = LocalDB.create('Event');
+	ev = locals['Event'][ev];
+	
+	ev.event_date = dateutil.obj_to_str(this.selected_date);
+	ev.event_hour = this.selected_hour+':00';
+	ev.event_type = 'Private';
+
+	this.show_event(ev);
+}
+//------------------------------------------------------
+
+Calendar.prototype.get_month_events = function(call_back) {
+	// ret fn
+	var me = this;
+	var f = function(r, rt) {
+		if(me.cur_view) me.cur_view.refresh();
+		if(call_back)call_back();
+	}
+
+	//load
+	var y=this.selected_date.getFullYear(); var m = this.selected_date.getMonth();
+	if(!this.events[y] || !this.events[y][m]) {
+		$c('webnotes.widgets.event.load_month_events', args = {
+			'month': m + 1, 
+			'year' : y},
+			f);	
+	}
+}
+//------------------------------------------------------
+
+Calendar.prototype.get_daily_event_list=function(day) {
+	var el = [];
+	var d = day.getDate(); var m = day.getMonth(); var y = day.getFullYear()
+	if(this.events[y] && this.events[y][m] &&
+		this.events[y][m][d]) {
+		var l = this.events[y][m][d]
+		for(var i in l) {
+			for(var j in l[i]) el[el.length] = l[i][j];
+		}
+		return el;
+	}
+	else return [];
+}
+//------------------------------------------------------
+
+Calendar.prototype.set_event = function(ev) {
+	// don't duplicate
+	if(this.events_by_name[ev.name]) {
+		return this.events_by_name[ev.name];
+	}
+		
+	var dt = dateutil.str_to_obj(ev.event_date);
+	var m = dt.getMonth();
+	var d = dt.getDate();
+	var y = dt.getFullYear();
+
+	if(!this.events[y]) this.events[y] = [];
+	if(!this.events[y][m]) this.events[y][m] = [];
+	if(!this.events[y][m][d]) this.events[y][m][d] = [];
+	if(!this.events[y][m][d][cint(ev.event_hour)]) 
+		this.events[y][m][d][cint(ev.event_hour)] = [];
+
+	var cal_ev = new Calendar.CalEvent(ev, this);
+	this.events[y][m][d][cint(ev.event_hour)].push(cal_ev);	
+	this.events_by_name[ev.name] = cal_ev;
+	
+	return cal_ev;
+}
+
+//------------------------------------------------------
+
+Calendar.prototype.refresh = function(viewtype){//Sets the viewtype of the Calendar and Calls the View class based on the viewtype
+ 	if(viewtype)
+ 		this.viewtype = viewtype;
+ 	// switch view if reqd
+ 	if(this.cur_view.viewtype!=this.viewtype) {
+ 		this.cur_view.hide();
+ 		this.cur_view = this.views[this.viewtype];
+ 		this.cur_view.in_home = false; // for home page
+ 		this.cur_view.show();
+ 	}
+ 	else{
+ 		this.cur_view.refresh(this);
+ 	}
+}
+
+//------------------------------------------------------
+
+Calendar.CalEvent= function(doc, cal) {
+	this.body = document.createElement('div');
+	this.link = $a(this.body, 'a', '', {}, locals['Event'][doc.name].description || '');
+	this.doc = doc;
+	var me = this;
+
+	this.link.onclick = function() {
+		if(me.doc.name) {
+			cal.show_event(me.doc, me);
+		}
+	}
+}
+
+Calendar.CalEvent.prototype.show = function(vu) {
+
+	var t = this.doc.event_type;
+	this.my_class = 'cal_event_'+ t;
+	
+	if(this.body.parentNode)
+		this.body.parentNode.removeChild(this.body);
+	vu.body.appendChild(this.body);
+	
+	// refresh
+	this.link.innerHTML = this.doc.description || '';
+	this.body.className = this.my_class;
+}
+
+
+// ----------
+
+Calendar.View =function() { this.daystep = 0; this.monthstep = 0; }
+Calendar.View.prototype.init=function(cal) {
+ 	this.cal = cal;
+ 	this.body = $a(cal.body, 'div', 'cal_view_body');
+ 	this.body.style.display = 'none';
+ 	this.create_table();
+}
+
+
+Calendar.View.prototype.show=function() { 
+	this.get_events(); this.refresh(); this.body.style.display = 'block'; 
+}
+
+Calendar.View.prototype.hide=function() { this.body.style.display = 'none';}
+
+Calendar.View.prototype.next = function() {
+	var s = this.cal.selected_date;
+	this.cal.selected_date = new Date(s.getFullYear(), s.getMonth() + this.monthstep, s.getDate() + this.daystep);
+	this.get_events(); this.refresh();
+}
+
+Calendar.View.prototype.prev = function() {
+	var s = this.cal.selected_date;
+	this.cal.selected_date = new Date(s.getFullYear(), s.getMonth() - this.monthstep, s.getDate() - this.daystep);
+	this.get_events(); this.refresh();
+}
+
+Calendar.View.prototype.get_events = function() { 
+	this.cal.get_month_events(); 
+}
+Calendar.View.prototype.add_unit = function(vu) { 
+	this.viewunits[this.viewunits.length] = vu; 
+}
+Calendar.View.prototype.refresh_units = function() { 
+	// load the events
+	if(locals['Event']) {
+		for(var name in locals['Event']) {
+			this.cal.set_event(locals['Event'][name]);
+		}
+	}
+	
+	
+	for(var r in this.table.rows) {
+		for(var c in this.table.rows[r].cells) {
+			if(this.table.rows[r].cells[c].viewunit) {
+				this.table.rows[r].cells[c].viewunit.refresh();
+			}
+		}
+	}
+}
+
+// ................. Month View..........................
+Calendar.MonthView = function(cal) { this.init(cal); this.monthstep = 1; this.rows = 5; this.cells = 7; }
+Calendar.MonthView.prototype=new Calendar.View();
+Calendar.MonthView.prototype.create_table = function() {
+
+	// create head
+	this.head_wrapper = $a(this.body, 'div', 'cal_month_head');
+
+	// create headers
+	this.headtable = $a(this.head_wrapper, 'table', 'cal_month_headtable');
+	var r = this.headtable.insertRow(0);
+	for(var j=0;j<7;j++) {
+ 		var cell = r.insertCell(j);
+		cell.innerHTML = erpnext.calendar.weekdays[j]; $w(cell, (100 / 7) + '%');
+ 	}
+
+	this.main = $a(this.body, 'div', 'cal_month_body');
+	this.table = $a(this.main, 'table', 'cal_month_table');
+	var me = this;
+
+	// create body
+ 	for(var i=0;i<5;i++) {
+ 		var r = this.table.insertRow(i);
+ 		for(var j=0;j<7;j++) {
+ 			var cell = r.insertCell(j);
+			cell.viewunit = new Calendar.MonthViewUnit(cell);
+ 		}
+  	}  	
+}
+
+Calendar.MonthView.prototype.refresh = function() {
+ 	var c =this.cal.selected_date;
+	var	me=this;
+	// fill other days
+
+	var cur_row = 0; 
+
+ 	var cur_month = c.getMonth();
+ 	var cur_year = c.getFullYear();
+
+ 	var d = new Date(cur_year, cur_month, 1);
+	var day = 1 - d.getDay();
+	
+
+	// set day headers
+ 	var d = new Date(cur_year, cur_month, day);
+
+	this.cal.view_title.innerHTML = month_list_full[cur_month] + ' ' + cur_year;
+
+ 	for(var i=0;i<6;i++) {
+ 		if((i<5) || cur_month==d.getMonth()) { // if this month
+	 		for(var j=0;j<7;j++) {
+				var cell = this.table.rows[cur_row].cells[j];
+
+		 		if((i<5) || cur_month==d.getMonth()) {	// if this month
+					cell.viewunit.day = d;
+					cell.viewunit.hour = 8;
+			 		if(cur_month == d.getMonth()) {
+						cell.viewunit.is_disabled = false;
+	
+						if(same_day(this.cal.todays_date, d))
+							cell.viewunit.is_today = true;
+						else
+							cell.viewunit.is_today = false;					
+						
+					} else {
+						cell.viewunit.is_disabled = true;
+					}
+				}
+				// new date
+	 			day++;
+		 		d = new Date(cur_year, cur_month, day);
+	 		}
+	 	}
+		cur_row++;
+ 		if(cur_row == 5) {cur_row = 0;} // back to top
+	}
+	this.refresh_units();
+	
+}
+ // ................. Daily View..........................
+Calendar.DayView=function(cal){ this.init(cal); this.daystep = 1; }
+Calendar.DayView.prototype=new Calendar.View();
+Calendar.DayView.prototype.create_table = function() {
+
+	// create body
+	this.main = $a(this.body, 'div', 'cal_day_body');
+	this.table = $a(this.main, 'table', 'cal_day_table');
+	var me = this;
+	
+ 	for(var i=0;i<24;i++) {
+ 		var r = this.table.insertRow(i);
+ 		for(var j=0;j<2;j++) {
+ 			var cell = r.insertCell(j);
+			if(j==0) {
+				var tmp = time_to_ampm((i)+':00');
+				cell.innerHTML = tmp[0]+':'+tmp[1]+' '+tmp[2];
+				$w(cell, '10%');
+			} else {
+				cell.viewunit = new Calendar.DayViewUnit(cell);
+				cell.viewunit.hour = i;
+				$w(cell, '90%');
+				if((i>=7)&&(i<=20)) {
+					cell.viewunit.is_daytime = true;
+				}
+			}
+ 		}
+  	}
+ }
+
+Calendar.DayView.prototype.refresh = function() {
+	var c =this.cal.selected_date;
+			
+	// fill other days
+	var me=this;
+
+	this.cal.view_title.innerHTML = erpnext.calendar.weekdays[c.getDay()] + ', ' 
+		+ c.getDate() + ' ' + month_list_full[c.getMonth()] + ' ' + c.getFullYear();
+
+	// headers
+	var d = c;
+
+	for(var i=0;i<24;i++) {
+		var cell = this.table.rows[i].cells[1];
+		if(same_day(this.cal.todays_date, d)) cell.viewunit.is_today = true;
+		else cell.viewunit.is_today = false;
+		cell.viewunit.day = d;
+	}
+	 this.refresh_units();
+}
+
+// ................. Weekly View..........................
+Calendar.WeekView=function(cal) { this.init(cal); this.daystep = 7; }
+Calendar.WeekView.prototype=new Calendar.View();
+Calendar.WeekView.prototype.create_table = function() {
+
+	// create head
+	this.head_wrapper = $a(this.body, 'div', 'cal_month_head');
+
+	// day headers
+	this.headtable = $a(this.head_wrapper, 'table', 'cal_month_headtable');
+	var r = this.headtable.insertRow(0);
+	for(var j=0;j<8;j++) {
+ 		var cell = r.insertCell(j);
+		$w(cell, (100 / 8) + '%');
+ 	}
+ 	
+ 	// hour header
+
+	// create body
+	this.main = $a(this.body, 'div', 'cal_week_body');
+	this.table = $a(this.main, 'table', 'cal_week_table');
+	var me = this;
+	
+ 	for(var i=0;i<24;i++) {
+ 		var r = this.table.insertRow(i);
+ 		for(var j=0;j<8;j++) {
+ 			var cell = r.insertCell(j);
+			if(j==0) {
+				var tmp = time_to_ampm(i+':00');
+				cell.innerHTML = tmp[0]+':'+tmp[1]+' '+tmp[2];
+
+				$w(cell, '10%');
+			} else {
+				cell.viewunit = new Calendar.WeekViewUnit(cell);
+				cell.viewunit.hour = i;
+				if((i>=7)&&(i<=20)) {
+					cell.viewunit.is_daytime = true;
+				}
+			}
+ 		}
+  	}
+}
+
+Calendar.WeekView.prototype.refresh = function() {
+	var c =this.cal.selected_date;
+	// fill other days
+	var me=this;
+
+	this.cal.view_title.innerHTML = month_list_full[c.getMonth()] + ' ' + c.getFullYear();
+
+	// headers
+	var d = new Date(c.getFullYear(), c.getMonth(), c.getDate() - c.getDay());
+
+	for (var k=1;k<8;k++) 	{
+		this.headtable.rows[0].cells[k].innerHTML = erpnext.calendar.weekdays[d.getDay()] + ' ' + d.getDate();
+
+		for(var i=0;i<24;i++) {
+			var cell = this.table.rows[i].cells[k];
+			if(same_day(this.cal.todays_date, d)) 
+				cell.viewunit.is_today = true;
+			else cell.viewunit.is_today = false;
+
+			cell.viewunit.day = d;
+			//cell.viewunit.refresh();
+		}
+		d=new Date(d.getFullYear(),d.getMonth(),d.getDate() + 1);
+
+	 }
+	 
+	 this.refresh_units();
+}
+
+//------------------------------------------------------.
+
+Calendar.ViewUnit = function() {}
+Calendar.ViewUnit.prototype.init = function(parent) {
+	parent.style.border = "1px solid #CCC"	;
+	this.body = $a(parent, 'div', this.default_class);
+	this.parent = parent;
+
+	var me = this;
+	this.body.onclick = function() {
+		erpnext.calendar.selected_date = me.day;
+		erpnext.calendar.selected_hour = me.hour;
+	
+		if(erpnext.calendar.cur_vu && erpnext.calendar.cur_vu!=me){
+			erpnext.calendar.cur_vu.deselect();
+			me.select();
+			erpnext.calendar.cur_vu = me;
+		}
+	}
+	this.body.ondblclick = function() {
+		erpnext.calendar.add_event();
+	}
+}
+
+Calendar.ViewUnit.prototype.set_header=function(v) {
+ 	this.header.innerHTML = v;
+}
+
+Calendar.ViewUnit.prototype.set_today = function() {
+	this.is_today = true;
+	this.set_display();
+}
+
+Calendar.ViewUnit.prototype.clear = function() {
+	if(this.header)this.header.innerHTML = '';
+
+	// clear body
+	while(this.body.childNodes.length)
+		this.body.removeChild(this.body.childNodes[0]);
+}
+
+Calendar.ViewUnit.prototype.set_display = function() {
+	var cn = '#FFF';
+
+	// colors
+	var col_tod_sel = '#EEE';
+	var col_tod = '#FFF';
+	var col_sel = '#EEF';
+
+	if(this.is_today) {
+		if(this.selected) cn = col_tod_sel;
+		else cn = col_tod;
+	} else 
+		if(this.selected) cn = col_sel;
+	
+	if(this.header) {
+		if(this.is_disabled) {
+			this.body.className = this.default_class + ' cal_vu_disabled';
+			this.header.style.color = '#BBB';
+		} else {
+			this.body.className = this.default_class;
+			this.header.style.color = '#000';		
+		}
+		
+		if(this.day&&this.day.getDay()==0)
+			this.header.style.backgroundColor = '#FEE';
+		else 
+			this.header.style.backgroundColor = '';
+	}
+	this.parent.style.backgroundColor = cn;
+}
+
+Calendar.ViewUnit.prototype.is_selected = function() {
+	return (same_day(this.day, erpnext.calendar.selected_date)
+		&& this.hour==erpnext.calendar.selected_hour)
+}
+
+Calendar.ViewUnit.prototype.get_event_list = function() {
+	var y = this.day.getFullYear();
+	var m = this.day.getMonth();
+	var d = this.day.getDate();
+	if(erpnext.calendar.events[y] && erpnext.calendar.events[y][m] &&
+		erpnext.calendar.events[y][m][d] &&
+			erpnext.calendar.events[y][m][d][this.hour]) {
+		return erpnext.calendar.events[y][m][d][this.hour];
+	} else
+		return [];
+}
+
+Calendar.ViewUnit.prototype.refresh = function() {
+	this.clear();
+
+	if(this.is_selected()) { 
+		if(erpnext.calendar.cur_vu)erpnext.calendar.cur_vu.deselect();
+		this.selected = true;
+		erpnext.calendar.cur_vu = this;	
+	}
+	this.set_display();
+	this.el = this.get_event_list();
+	if(this.onrefresh)this.onrefresh();	
+
+	for(var i in this.el) {
+		this.el[i].show(this);
+	}
+		
+	var me = this;
+}
+
+Calendar.ViewUnit.prototype.select=function() { this.selected = true; this.set_display(); }
+Calendar.ViewUnit.prototype.deselect=function() { this.selected = false; this.set_display(); }
+Calendar.ViewUnit.prototype.setevent=function() { }
+
+Calendar.MonthViewUnit=function(parent) {
+	this.header = $a(parent, 'div' , "cal_month_date");
+	this.default_class = "cal_month_unit";
+	
+	this.init(parent);
+
+	this.onrefresh = function() {
+		this.header.innerHTML = this.day.getDate();
+	} 
+}
+Calendar.MonthViewUnit.prototype = new Calendar.ViewUnit();
+Calendar.MonthViewUnit.prototype.is_selected = function() {
+	return same_day(this.day, erpnext.calendar.selected_date)
+}
+
+Calendar.MonthViewUnit.prototype.get_event_list = function() {
+	return erpnext.calendar.get_daily_event_list(this.day);
+}
+
+Calendar.DayViewUnit= function(parent) { 
+	this.default_class = "cal_day_unit"; this.init(parent); 
+}
+Calendar.DayViewUnit.prototype = new Calendar.ViewUnit();
+Calendar.DayViewUnit.prototype.onrefresh = function() {
+	if(this.el.length<3) 
+		this.body.style.height = '30px';
+	else this.body.style.height = '';
+}
+
+Calendar.WeekViewUnit=function(parent) { 
+	this.default_class = "cal_week_unit"; this.init(parent); 
+}
+Calendar.WeekViewUnit.prototype = new Calendar.ViewUnit();
+Calendar.WeekViewUnit.prototype.onrefresh = function() {
+	if(this.el.length<3) this.body.style.height = '30px';
+	else this.body.style.height = '';
+}
diff --git a/erpnext/utilities/page/file_browser/__init__.py b/erpnext/utilities/page/calendar/calendar.py
similarity index 100%
copy from erpnext/utilities/page/file_browser/__init__.py
copy to erpnext/utilities/page/calendar/calendar.py
diff --git a/erpnext/utilities/page/calendar/calendar.txt b/erpnext/utilities/page/calendar/calendar.txt
new file mode 100644
index 0000000..668c909
--- /dev/null
+++ b/erpnext/utilities/page/calendar/calendar.txt
@@ -0,0 +1,28 @@
+# Page, calendar
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-24 11:24:12',
+		'docstatus': 0,
+		'modified': '2012-02-24 11:24:12',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Utilities',
+		'name': '__common__',
+		'page_name': u'calendar',
+		'standard': u'Yes',
+		'title': u'Calendar'
+	},
+
+	# Page, calendar
+	{
+		'doctype': 'Page',
+		'name': u'calendar'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/file_browser.html b/erpnext/utilities/page/file_browser/file_browser.html
deleted file mode 100644
index d30409e..0000000
--- a/erpnext/utilities/page/file_browser/file_browser.html
+++ /dev/null
@@ -1,55 +0,0 @@
-<div style="margin: 0px;">
-<div id="fb_header">&nbsp;</div>
-<!--
-<table style="border: 1px solid #cccccc; width: 100%; background-color: #dfe1fd; vertical-align: middle; border-collapse: collapse;" border="0">
-<tbody>
-<tr>
-<td style="width: 70%; padding-left: 8px;">
-<h2>File Browser</h2>
-</td>
-<td style="width: 30%; text-align: right; padding-right: 8px; vertical-align: middle;"><span class="link_type" title="Close"> <img style="cursor:pointer" mce_style="cursor:pointer" onclick="nav_obj.show_last_open()" src="images/icons/close.gif" mce_src="images/icons/close.gif" alt="" /> </span></td>
-</tr>
-</tbody>
-</table>
--->
-<div style="width: 100%;">
-<table style="border: 1px solid #cccccc; width: 100%; border-collapse: collapse;" border="0">
-<tbody>
-<tr>
-<td style="border: 1px solid #cccccc; padding: 8px; width: 40%; border-collapse: collapse;">
-<table style="width: 100%;" border="0">
-<tbody>
-<tr>
-<td id="fb_gen_action" style="width: 100%; vertical-align: middle;">&nbsp;</td>
-</tr>
-<tr>
-<td id="fb_tree_div" style="width: 100%; padding-top: 20px;">&nbsp;</td>
-</tr>
-</tbody>
-</table>
-</td>
-<td style="border: 1px solid #cccccc; padding: 8px; width: 60%; border-collapse: collapse;">
-<table style="width: 100%;" border="0">
-<tbody>
-<tr>
-<td id="fb_file_action" style="width: 100%; vertical-align: middle;">&nbsp;</td>
-</tr>
-<tr>
-<td id="fb_grp_action" style="width: 100%; vertical-align: middle;">&nbsp;</td>
-</tr>
-<tr>
-<td id="fb_display_div" style="width: 100%; vertical-align: middle;">&nbsp;</td>
-</tr>
-<tr>
-<td id="unselect">
-<h2 style="color:#AAA">You have not selected anything.</h2>
-</td>
-</tr>
-</tbody>
-</table>
-</td>
-</tr>
-</tbody>
-</table>
-</div>
-</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/file_browser.js b/erpnext/utilities/page/file_browser/file_browser.js
deleted file mode 100644
index 279bbed..0000000
--- a/erpnext/utilities/page/file_browser/file_browser.js
+++ /dev/null
@@ -1,992 +0,0 @@
-pscript['onload_File Browser'] = function(){
-	
-	// header and toolbar
-	var h = new PageHeader('fb_header','File Management','Upload and share your file across users');
-	//$dh(h.toolbar); $y(h.toolbar,{width:'0px', height:'0px'})
-	
-	if(!pscript.fb_tree)
-		pscript.create_browser_tree();
-	pscript.get_root_file_grps();
-	
-	pscript.create_action_widget();
-	pscript.create_display_div();
-
-	pscript.create_n_file_grp_obj();
-	pscript.create_n_file_obj();
-	pscript.create_attach_obj();
-	
-	pscript.get_all_roles();
-	
-	$ds(pscript.gen_div);
-	$dh(pscript.grp_div);
-	$dh(pscript.file_div);
-	
-	$ds($i('unselect'));
-}
-
-// Get all roles
-pscript.get_all_roles = function(){
-	if(!pscript.fg_all_roles){
-		var callback = function(r,rt){
-			pscript.fg_all_roles = r.message ? r.message : '';
-			pscript.create_share_obj();
-			pscript.fg_share.make(r.message);
-		}
-		$c_obj('File Browser Control','get_all_roles','',callback);
-	}
-}
-
-
-// Creating File Browser tree.
-pscript.create_browser_tree = function() {
-
-	$i('fb_tree_div').innerHTML = '';
-	var tree = new Tree($i('fb_tree_div'), '100%');
-	pscript.fb_tree = tree;
-	
-	pscript.fb_tree.std_onclick = function(node) { /*pass*/ }		   // on click
-	pscript.fb_tree.std_onexp = function(node) { /*PASS*/ }			 // on expand
-	
-	$ds(pscript.gen_div);
-	$dh(pscript.grp_div);
-	$dh(pscript.file_div);
-	
-	$dh(pscript.f_file_display);
-}
-
-// Creating a Share Privilege object.
-pscript.create_share_obj = function(){
-	
-	var d = new Dialog(400,400,'Assign Privilege');
-	var me = d;
-	d.inputs = {};
-	
-	d.make_body([
-		['HTML','Privilege','<div id="fg_share_div" style="overflow-y:auto; height:300px"></div>'],
-		['Button','Update']
-	]);
-	
-	
-	d.make = function(all_roles){
-		optn_header = make_table('fg_share_div',1,2,'100%',['60%','40%'],{padding:'4px'});
-
-		for(var c=0;c<2;c++){
-			if(c==1)
-				$td(optn_header,0,c).innerHTML = '<b>Privilege</b>';
-			else
-				$td(optn_header,0,c).innerHTML = '<b>Role</b>';
-		}
-		
-		optn_tbl = make_table('fg_share_div',all_roles.length,2,'100%',['60%','40%'],{padding:'4px'});
-		
-		for(var i=0;i<all_roles.length;i++){
-
-			var v=$a($td(optn_tbl, i,0),'div');
-			v.innerHTML=all_roles[i];
-
-			// make select
-			var sel = $a($td(optn_tbl, i,1),'select');
-			add_sel_options(sel,['None','Edit','View'],'None');
-			
-			sel.r_nm = all_roles[i];
-			d.inputs[sel.r_nm] = sel;
-			
-			sel.onchange = function(){}
-		}
-	}
-
-	// Assigning roles in Share Privilege object.
-	d.assign = function(all_roles,edit_roles,view_roles){
-
-		if(all_roles == undefined) all_roles = '';		
-		if(edit_roles == undefined) edit_roles = '';
-		if(view_roles == undefined) view_roles = '';
-		
-		for(var i=0;i<all_roles.length;i++){
-			var ele = all_roles[i];
-			var sel = me.inputs[ele];
-			
-			if(in_list(edit_roles,ele))
-				sel.value = 'Edit';
-			else if(in_list(view_roles,ele))
-				sel.value = 'View';
-			else
-				sel.value = 'None';
-		}
-	}
-	
-	//on update
-	d.widgets['Update'].onclick = function(){
-		var edit_roles = []; var view_roles = [];
-		
-		for(var i=0;i<pscript.fg_all_roles.length;i++){
-			var ele = pscript.fg_all_roles[i]; var sel = me.inputs[ele];
-
-			if(sel_val(sel) == 'Edit')
-				edit_roles.push(ele)
-			else if(sel_val(sel) == 'View')
-				view_roles.push(ele)
-		}
-
-		var args = {}; args.name = pscript.f_cur_node_name; args.type = pscript.f_cur_node_type;
-		args.edit_roles = edit_roles.join(','); args.view_roles = view_roles.join(',');
-		
-		$c_obj('File Browser Control','update_privileges',docstring(args),function(r,rt){me.hide();});
-	}
-	
-	d.onshow = function(){}	
-	d.onhide = function(){}
-	pscript.fg_share = d;
-}
-
-// Action Widget
-pscript.create_action_widget = function(){
-
-	// General Actions.
-	// new action widget
-	pscript.gen_div = $i('fb_gen_action');
-	
-	//refresh tree
-	f_refresh = $a(pscript.gen_div,'span','',{marginRight:'15px'});
-	f_refresh.innerHTML = '<img src="images/icons/page_refresh.gif" style="margin-right:5px; vertical-align:middle"/><span class="link_type" style="vertical-align:middle">Refresh</span>';
-	f_refresh.onclick = function(){
-		pscript.fb_refresh(); 
-		$dh(pscript.f_file_display);
-	}
-
-	// new group
-	f_new_grp = $a(pscript.gen_div,'span','',{marginRight:'15px'});
-	f_new_grp.innerHTML = '<img src="images/icons/folder.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">New</span>';
-	f_new_grp.onclick = function(){ pscript.fb_show_grp(''); $ds(pscript.f_file_display); $dh($i('unselect')); }
-
-	// Group actions.	
-	pscript.grp_div = $i('fb_grp_action');
-	
-	// share group
-	f_share_grp = $a(pscript.grp_div,'span','',{marginRight:'15px'});
-	f_share_grp.innerHTML = '<img src="images/icons/user.png" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Share</span>';
-	f_share_grp.onclick = function(){ pscript.fb_share(); }
-	
-	//Delete group.
-	f_del_grp = $a(pscript.grp_div,'span','',{marginRight:'15px'});
-	f_del_grp.innerHTML = '<img src="images/icons/cancel.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Delete</span>';
-	f_del_grp.onclick = function(){ pscript.fb_delete(); }
-	
-	// Add file to group.
-	f_new_file = $a(pscript.grp_div,'span','',{marginRight:'15px'});
-	f_new_file.innerHTML = '<img src="images/icons/page_add.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Upload</span>';
-	f_new_file.onclick = function(){ pscript.fb_create_new_file(); }
-   // $dh(f_new_file);
-	
-	// file actions
-	pscript.file_div = $i('fb_file_action');
-
-
-	//share file
-	f_share_file = $a(pscript.file_div,'span','',{marginRight:'15px'});
-	f_share_file.innerHTML = '<img src="images/icons/user.png" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Share</span>';
-	f_share_file.onclick = function(){ pscript.fb_share(); };
-	
-	// delete file
-	f_del_file = $a(pscript.file_div,'span','',{marginRight:'15px'});
-	f_del_file.innerHTML = '<img src="images/icons/cancel.gif" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Delete</span>';
-	f_del_file.onclick = function(){ pscript.fb_delete(); };
-	
-		
-	//edit file
-	f_edit_file = $a(pscript.file_div,'span','',{marginRight:'15px'});
-	f_edit_file.innerHTML = '<img src="images/icons/table_edit.png" style="margin-right: 5px; vertical-align:middle"><span class="link_type" style="vertical-align:middle">Edit</span>';
-	f_edit_file.onclick = function(){ pscript.fb_edit_file(); };
-}
-
-
-// Refresh tree
-pscript.fb_refresh = function(){
-	pscript.create_browser_tree();
-	pscript.get_root_file_grps();
-	
-	$ds(pscript.gen_div);
-	$dh(pscript.grp_div);
-	$dh(pscript.file_div);
-	
-	if(!pscript.f_cur_node_name){ $dh($i('unselect')); } else{ $ds($i('unselect')); }
-}
-
-// Show selected / create a new file group.
-pscript.fb_show_grp = function(grp){
-	var parent = pscript.f_file_display;
-
-	if(!grp || grp == undefined){
-		parent.f_file_title.innerHTML = 'New File Group';
-		pscript.n_file_grp.show('');
-	}
-	else{
-		var callback = function(r,rt){
-
-			var grp_det = r.message ? r.message : '';
-
-			parent.f_file_title.innerHTML = grp_det['Group Name']; 
-			if(has_common(grp_det['Can Edit'].split(','),user_roles) || user==grp_det['Owner']){ $ds(pscript.grp_div); }
-			else{ $dh(pscript.grp_div); }
-			
-			pscript.n_file_grp.show(grp_det);
-		}
-		$c_obj('File Browser Control','get_fg_details',grp,callback);
-	}
-	$ds(parent); $ds(parent.f_file_content);
-}
-
-//share privileges.
-pscript.fb_share = function(){
-	var callback = function(r,rt){
-		pscript.fg_edit_roles = r.message[0][0] ? r.message[0][0].split(',') : '';
-		pscript.fg_view_roles = r.message[0][1] ? r.message[0][1].split(',') : '';
-		
-		pscript.fg_share.assign(pscript.fg_all_roles,pscript.fg_edit_roles,pscript.fg_view_roles);
-		pscript.fg_share.show();
-	}
-	var args = {};
-	args.dt = pscript.f_cur_node_type;
-	args.dn = pscript.f_cur_node_name;
-	$c_obj('File Browser Control','get_privileges',docstring(args),callback);
-}
-
-// delete group
-pscript.fb_delete = function(){
-	pscript.delete_node('File Browser Control',pscript.f_cur_node_type,pscript.f_cur_node_name,'');
-	$dh(pscript.f_file_display);
-}
-
-// Create a new file.
-pscript.fb_create_new_file = function(){
-	var parent = pscript.f_file_display;
-	
-	pscript.f_cur_parent = pscript.f_cur_node;
-	
-	parent.f_file_title.innerHTML = 'New File';
-	pscript.n_file.show(0,'frm_node');
-}
-
-// If file other than image then download file.
-pscript.fb_show_txt_file = function(){
-	$i('file_link').href = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
-	$i('file_link').target = "_blank";
-}
-
-// Area to display content.
-pscript.create_display_div = function(){
-
-	var d = $a($i('fb_display_div'),'div');
-	
-	d.f_file_title = $a(d,'div','',{fontSize:'14px',fontWeight:'bold'});
-	$y($a(d,'div'),{margin:'5px 0px 5px 0px',borderBottom:'1px solid #333'});
-
-	d.f_file_content = $a(d,'div','',{marginTop:'20px'});
-	pscript.f_file_display = d;
-	$dh(d);
-}
-
-// function to create a new File Group object.
-pscript.create_n_file_grp_obj = function(){
-	var n_file_grp = new pscript.n_file_grp_Obj();
-	pscript.n_file_grp = n_file_grp;
-}
-
-// Create a new File object.
-pscript.create_n_file_obj = function(){
-	var n_file = new pscript.n_file_Obj();
-	pscript.n_file = n_file;
-}
-
-// Create a new Attachement object.
-pscript.create_attach_obj = function(){
-	var attach_obj = new pscript.attach_Obj();
-	pscript.attach_obj = attach_obj;
-}
-
-// File Group object.
-pscript.n_file_grp_Obj = function() {
-  
-	this.inputs = {}; var me = this; this.fg_field_lst = [];
-	
-	this.make_section = function(label, tp, css) {
-
-		var div = $a(this.wrapper,'div','',{marginBottom:'8px'});
-		var t = make_table(div,1,2,'90%',['35%','65%']);
-
-		if(tp=='button'){
-			var element = $a($td(t,0,1), 'button', 'button');
-			element.innerHTML = label;
-		}
-		else if(tp == 'link'){
-			var element = make_field({fieldtype:'link', 'label':label, 'options':'File Group'}, '', $td(t,0,1), this, 0, 1);
-			$y($td(t,0,1),{width:'100%'})
-			element.in_filter = 1; element.refresh();
-			
-			$td(t,0,0).innerHTML = label;
-			element.display_div = $a($td(t,0,1),'div', '', {width:'80%'});
-			me.fg_field_lst.push(label);
-		}
-		else {
-			var element = $a($td(t,0,1),tp, '', {width:'80%'});
-			$td(t,0,0).innerHTML = label;
-			
-			element.display_div = $a($td(t,0,1),'div', '', {width:'80%'});
-			$dh(element.display_div);
-			me.fg_field_lst.push(label);
-		}
-		
-		if(css){
-			$y($td(t,0,0),css);
-		}
-		
-		element.wrapper = div;
-		
-		if(label) me.inputs[label] = element;
-		return element;
-	}
-  
-	this.make = function() {
-
-		this.wrapper = document.createElement('div');
-
-		this.make_section('Group Name','input',{color:'red'});
-		this.make_section('Parent Group','link');
-		this.make_section('Description','textarea');
-		$y(this.inputs['Description'],{height:'140px'});
-		
-		this.make_section('Save','button');
-
-		// cancel
-		this.inputs['Cancel'] = $a(this.inputs['Save'].parentNode, 'button', 'button');
-		this.inputs['Cancel'].innerHTML = 'Cancel';
-		$y(this.inputs['Cancel'], {marginLeft:'8px'});
-	}
-  
-	this.show = function(grp_det){
-		
-		if(! me.wrapper) me.make();
-
-		var field_lst = me.fg_field_lst;
-
-		if(!grp_det || grp_det == undefined){
-			pscript.fg_edit_roles = ''; pscript.fg_view_roles = ''; me.inputs['Save'].disabled = false;
-		
-			for(i in field_lst){
-				var fld_nm = field_lst[i] ? field_lst[i] : '';
-				var fld = me.inputs[fld_nm] ? me.inputs[fld_nm] : '';
-				fld.display_div.innerHTML = '';
-				
-				if(fld_nm == 'Parent Group'){ fld.txt.value = ''; $ds(fld.input_area); }
-				else{ fld.value = ''; $ds(fld); }
-				
-				$dh(fld.display_div); 
-			}
-			me.inputs['Save'].onclick = function(){ me.save(''); }
-		}
-		else{
-			pscript.fg_edit_roles = grp_det['Can Edit'] ? grp_det['Can Edit'].split(',') : '';
-			pscript.fg_view_roles = grp_det['Can View'] ? grp_det['Can View'].split(',') : '';		
-			for(i in field_lst){
-				var fld_nm = field_lst[i] ? field_lst[i] : '';
-				var fld = me.inputs[fld_nm] ? me.inputs[fld_nm] : '';
-				fld.display_div.innerHTML = grp_det[fld_nm] ? grp_det[fld_nm] : '';
-
-				if(fld_nm == 'Parent Group') fld.txt.value = grp_det[fld_nm] ? grp_det[fld_nm] : '';
-				else fld.value = grp_det[fld_nm] ? grp_det[fld_nm] : '';
-									
-				if(has_common(pscript.fg_edit_roles,user_roles) || user == grp_det['Owner']){
-					if(fld_nm == 'Parent Group') $ds(fld.input_area); else $ds(fld); 
-					$dh(fld.display_div); me.inputs['Save'].disabled = false;
-				}
-				else{
-					if(fld_nm == 'Parent Group') $dh(fld.input_area); else $dh(fld);
-					$ds(fld.display_div); me.inputs['Save'].disabled = true;
-				}
-			}
-			me.inputs['Save'].onclick = function(){ me.save(grp_det['Name']); }
-		}
-		me.show_as();
-		me.inputs['Cancel'].onclick = function() { me.cancel(); me.hide();}
-	}
-  
-	this.save = function(name) {
-		var grp_nm = me.inputs['Group Name'].value; grp_nm = strip(grp_nm," ");
-		var parent_grp = me.inputs['Parent Group'].get_value(); parent_grp = strip(parent_grp," ");
-		var desc = me.inputs['Description'].value; desc = strip(desc," ");
-		
-		if(grp_nm == '') msgprint('Please enter group name');
-		else{ var args = {}; args.grp_nm = grp_nm; args.parent_grp = parent_grp; args.desc = desc; }
-		
-		if(!name || name == undefined){
-			args.name = '';
-			var callback = function(r,rt){
-				pscript.f_cur_node_name = r.message ? r.message : '';
-				pscript.fb_show_grp(pscript.f_cur_node_name);
-				pscript.fb_refresh();
-				//if(!pscript.f_cur_parent){ pscript.fb_refresh(); pscript.f_cur_node_name = }
-				//else{ pscript.load_child_nodes(); }
-			}
-			$c_obj('File Browser Control','create_new_grp',docstring(args),callback);
-		}
-		else{
-			args.name = name;
-			var callback = function(r,rt){
-				var grp = r.message ? r.message : '';
-				pscript.fb_show_grp(grp);
-				pscript.fb_refresh();
-			}
-			$c_obj('File Browser Control','update_grp',docstring(args),callback);
-		}
-		
-	}
-  
-	this.cancel = function(){
-		$dh(pscript.f_file_display);this.hide();
-	}
-  
-	this.show_as = function() {
-		if(me.wrapper.parentNode) me.wrapper.parentNode.removeChild(me.wrapper);
-		
-		var parent = pscript.f_file_display;
-		pscript.remove_child_nodes(parent.f_file_content);
-
-		parent.f_file_content.appendChild(me.wrapper);
-		$ds(pscript.f_file_display); $ds(me.wrapper);
-	}
-  
-	this.hide = function() {
-		$dh(me.wrapper); me.display = 0;
-	}
-}
-
-// File Object.
-pscript.n_file_Obj = function() {
-
-	this.inputs = {};
-	var me = this;
-	
-	this.make_section = function(label, tp, css) {
-
-		var div = $a(this.wrapper,'div','',{marginBottom:'8px'});
-		var t = make_table(div,1,2,'90%',['38%','62%']);
-		
-		if(tp=='button'){
-			var element = $a($td(t,0,1), 'button', 'button');
-			element.innerHTML = label;
-		}
-		else if(tp=='Note'){
-			var element = $a($td(t,0,1),'span','',{color:'red'});
-			element.innerHTML = 'Fields in red are mandatory.'
-		}
-		else if(tp=='link'){
-			var element = make_field({fieldtype:'link', 'label':label, 'options':'File Group'}, '', $td(t,0,1), this, 0, 1);
-			$y($td(t,0,1),{width:'100%'})
-			element.in_filter = 1; element.refresh();
-			
-			$td(t,0,0).innerHTML = label;
-			element.display_div = $a($td(t,0,1),'div', '', {width:'80%'});
-			element.txt.onchange = function(){ pscript.set_file_det_value(pscript.attach_obj,pscript.n_file); }
-		}
-		else {
-			var element = $a($td(t,0,1),tp, '', {width:'95%'});
-			$td(t,0,0).innerHTML = label;
-			element.onchange = function(){ pscript.set_file_det_value(pscript.attach_obj,pscript.n_file); }
-		}
-
-		//---css to label---
-		if(css){
-			$y($td(t,0,0),css);
-		}
-	
-		element.wrapper = div;
-		
-		if(label) me.inputs[label] = element;
-		return element;
-	}
-
-	this.make = function() {
-
-		this.wrapper = document.createElement('div');
-		
-		// note
-		this.make_section('','Note');
-		
-		// upload area
-		this.ul_area = $a(this.wrapper,'div','',{marginBottom:'8px'});
-		$dh(this.ul_area);
-		
-		// file group and description
-		this.make_section('File Group','link',{color:'red'});
-		this.make_section('Description','textarea');
-		$y(this.inputs['Description'],{height:'140px'});
-
-		//save
-		this.make_section('Save','button');$dh(this.inputs['Save']);
-
-		// cancel
-		this.inputs['Cancel'] = $a(this.inputs['Save'].parentNode, 'button', 'button');
-		this.inputs['Cancel'].innerHTML = 'Cancel'; $dh(this.inputs['Cancel']);
-		$y(this.inputs['Cancel'], {marginLeft:'8px'});
-	}
-  
-	this.show = function(edit,frm){
-		if(! me.wrapper) me.make();
-		
-		if(edit){
-			var callback1 = function(r,rt){
-				file_det = r.message;
-			
-				me.inputs['Description'].value = file_det['description'] ? file_det['description'] : '';
-				me.inputs['File Group'].txt.value = file_det['file_group'] ? file_det['file_group'] : '';
-
-				pscript.f_cur_node_file = file_det['file_list'] ? file_det['file_list'].split(NEWLINE)[0].split(',')[1] : '';
-
-				me.inputs['Save'].file_id = file_det['name'] ? file_det['name'] : '';
-				me.inputs['Save'].onclick = function(){ me.save(this.file_id);}
-				pscript.attach_obj.show(me, me.ul_area, 1, file_det);
-			}
-			$ds(me.ul_area); $di(me.inputs['Save']); $di(me.inputs['Cancel']);
-			$c_obj('File Browser Control','get_file_details',pscript.f_cur_node_name,callback1);
-		}
-		else{
-			$ds(me.ul_area); $dh(me.inputs['Save']); $dh(me.inputs['Cancel']);
-
-			me.inputs['Description'].value = '';
-			if(frm == 'frm_node') me.inputs['File Group'].txt.value = pscript.f_cur_node_label;
-			var parent = pscript.f_file_display;
-			parent.f_file_title.innerHTML = 'New File';
-			
-			$ds(parent);
-			me.inputs['Save'].onclick = function(){ me.save('');}
-			pscript.attach_obj.show(me,me.ul_area,0,'');
-		}
-		me.inputs['Cancel'].onclick = function() { me.cancel(); me.hide(); }
-	}
-  
-	this.save = function(name) {
-
-		var desc = me.inputs['Description'].value; desc = strip(desc," ");
-		file_grp = me.inputs['File Group'].txt.value; file_grp = strip(file_grp," ");
-		
-		if(file_grp == '') msgprint('Please select file group');
-
-		var args = {}; args.desc = desc; args.file_grp = file_grp;
-		
-		if(name){
-			args.name = name;
-			var callback = function(){
-				//pscript.fb_edit_file();
-				
-				//refreshing parent
-				pscript.load_child_nodes();
-			}
-			$c_obj('File Browser Control','update_file',docstring(args),callback);
-		}
-		else{
-			args.name = ''
-			var callback = function(r,rt){
-				var f = eval('var a='+r.message+';a');
-				
-				//refreshing node
-				pscript.load_child_nodes();
-				
-				//pscript.f_cur_node_name = f.name; pscript.f_cur_node_label = f.label;
-				//pscript.fb_edit_file();
-			}
-			$c_obj('File Browser Control','create_new_file',docstring(args),callback);
-		}
-	}
-  
-	this.cancel = function(){
-		$dh(pscript.f_file_display); this.hide();
-	}
-  
-	this.show_as = function(edit) {
-	    if(me.wrapper.parentNode) me.wrapper.parentNode.removeChild(me.wrapper);
-	
-		var parent = pscript.f_file_display;
-		pscript.remove_child_nodes(parent.f_file_content);
-
-		parent.f_file_content.appendChild(me.wrapper);
-		$ds(pscript.f_file_display); $ds(parent.f_file_content);
-		$ds(me.wrapper);
-	}
-  
-	this.hide = function() {
-		$dh(me.wrapper);
-		me.display = 0;
-	}
-}
-
-// File Attachement object.
-pscript.attach_Obj = function(){
-
-	var me = this;
-		
-	this.show = function(obj,parent,edit,dict){
-		var me = this;
-		if(!me.wrapper) { me.make(); }
-
-		me.show_as(obj,parent,edit,dict);
-		obj.show_as(edit);
-	}
-
-	this.make = function(){
-		var me = this;
-		this.wrapper = document.createElement('div');
-		
-		var div = $a(this.wrapper,'div',{marginBottom:'8px', border:'1px solid #AAA'});
-		
-		var t1 = make_table(div,1,2,'90%',['38%','62%']);
-		
-		lbl_area = $a($td(t1,0,0),'div');
-		lbl_area.innerHTML = '<img src="images/icons/paperclip.gif"><span style="margin-left4px; color:red;">File:</span><br>';
-	
-		main_area = $a($td(t1,0,1),'div');
-		
-		this.upload_div = $a(main_area,'div');
-		this.download_div = $a(main_area,'div');
-			
-		me.make_ul_area();
-		me.make_dl_area();
-	}
-	
-	//image upload area
-	this.make_ul_area = function(){
-		var me = this;
-		
-		this.upload_div.innerHTML = '';
-
-		var div = $a(this.upload_div,'div');
-		div.innerHTML = '<iframe id="fb_iframe" name="fb_iframe" src="blank1.html" style="width:0px; height:0px; border:0px"></iframe>';
-
-		var div = $a(this.upload_div,'div');
-		div.innerHTML = '<form method="POST" enctype="multipart/form-data" action="'+outUrl+'" target="fb_iframe"></form>';
-
-		var ul_form = div.childNodes[0];
-		
-		this.upload_div.ul_form = ul_form;
-		
-		var f_list = [];
-
-		// file data
-		var inp_fdata = $a_input($a(ul_form,'span'),'file',{name:'filedata'});
-
-		var inp_btn = $a_input($a(ul_form,'span'),'hidden',{name:'cmd'}); inp_btn.value = 'upload_many';
-		var inp = $a_input($a(ul_form,'span'),'hidden',{name:'form_name'}); inp.value = 'File Browser';
-		var inp = $a_input($a(ul_form,'span'),'submit'); inp.value = 'Upload';
-		
-		this.inp_file = $a_input($a(ul_form,'span'),'hidden',{name:'file_id'});
-		this.file_det = $a_input($a(ul_form,'span'),'hidden',{name:'file_det'});
-
-		inp_btn.onclick = function(){
-			pscript.set_file_det_value(pscript.attach_obj,pscript.n_file);
-		}
-	}
-	
-	//download link
-	this.make_dl_area = function(){
-		var me = this;
-		var download_tbl = make_table(this.download_div,1,2,'100%',['70%','30%']);
-		
-		var download_link = $a($td(download_tbl,0,0),'a','link_type');
-		
-		this.download_div.download_link = download_link;
-		
-		var remove_link = $a($td(download_tbl,0,1),'span','link_type',{textAlign:'right',marginLeft:'20px'});
-		remove_link.innerHTML = 'Remove';
-		
-		this.download_div.remove_link = remove_link;		
-	}
-	
-	this.show_as = function(obj,parent,edit,dict){
-		var me = this;
-		
-		// add to parent
-		if(me.wrapper.parentNode) me.wrapper.parentNode.removeChild(me.wrapper);
-		parent.appendChild(me.wrapper);
-		$ds(me.wrapper);
-		
-		if(edit){
-			pscript.set_file_det_value(pscript.attach_obj,pscript.n_file);
-			me.inp_file.value = dict.name ? dict.name : '';
-   
-			if(dict.file_list){ $dh(me.upload_div); $ds(me.download_div); }
-			else{ $ds(me.upload_div); $dh(me.download_div); }
-			
-			// download
-			me.download_div.download_link.innerHTML = dict.file_list ? dict.file_list.split(',')[0] : '';
-			me.download_div.download_link.onclick = function(){
-				this.href = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
-				this.target = "_blank";
-			}
-			
-			// remove
-			me.download_div.remove_link.onclick = function(){
-				$c_obj('File Browser Control','remove_file',docstring(dict),function(r,rt){
-					pscript.n_file.show(0,'frm_remove');
-				});
-				$ds(me.upload_div); $dh(me.download_div);
-			}
-		}
-		else{
-			$ds(me.upload_div); $dh(me.download_div);
-			me.inp_file.value = '';
-			pscript.set_file_det_value(pscript.attach_obj,pscript.n_file);
-		}
-	}
-}
-
-// Get all root file groups(where Parent Group is null).
-pscript.get_root_file_grps = function(){
-
-	if (pscript.fb_tree){
-		pscript.fb_tree.body.innerHTML = '';
-	}
-  
-	var callback1 = function(r,rt){
-		var cl = r.message ? r.message : ''; var n = pscript.fb_tree.allnodes[cl]; var has_children = true;
-		
-		for(var i=0; i<cl.length;i++){
-			if(!cl[i][2] || cl[i][2] == undefined) cl[i][2] = ''; if(!cl[i][3] || cl[i][3] == undefined) cl[i][3] = '';
-			if(has_common(cl[i][2].split(','),user_roles) || has_common(cl[i][3].split(','),user_roles) || user == cl[i][4]){
-				var r = pscript.fb_tree.addNode(null, cl[i][0],'', pscript.show_hide_link , has_children ? pscript.fb_get_children : null, null, cl[i][1]);
-				r.rec = cl[i]; r.rec.name = cl[i][0]; r.rec.label = cl[i][1]; r.rec.parent_grp = ''; r.rec.file_list = ''; r.rec.type = 'File Group';
-			}
-		}
-	}
-	$c_obj('File Browser Control','get_root_file_grps','',callback1);
-}
-
-// Onclick of a tree node will show / hide corresponding actions from action widget.
-pscript.show_hide_link = function(node){
-
-	$dh($i('unselect'));
-	$dh(pscript.f_file_display);
-	
-	pscript.f_cur_node = node;
-	
-	if(node.parent){
-		pscript.f_cur_parent = node.parent;
-	}
-	else{ pscript.f_cur_parent = ''; }
-	
-	pscript.f_cur_node_name = node.rec.name;
-
-	if(node.rec.label){ pscript.f_cur_node_label = node.rec.label; }
-	else{ pscript.f_cur_node_label = ''; }
-	
-	if(node.rec.type){ pscript.f_cur_node_type = node.rec.type; }
-	else{ pscript.f_cur_node_type = ''; }
-	
-	if(node.rec.file_list){ pscript.f_cur_node_file = node.rec.file_list.split(NEWLINE)[0].split(',')[1]; }
-	else{ pscript.f_cur_node_file = ''; }
-
-	img_extns = ['jpg','jpeg','gif','png','biff','cgm','dpof','exif','img','mng','pcx','pic','pict','raw','tga','wmf']
-	extn = node.rec.file_list ? node.rec.file_list.split(NEWLINE)[0].split(',')[0].split('.')[1] : '';
-
-	var dsp_div = pscript.f_file_display;
-	dsp_div.f_file_title.innerHTML = pscript.f_cur_node_label;
-
-	if(node.rec.type == 'File Group'){
-		$dh(pscript.file_div);
-		$ds(pscript.grp_div);
-		pscript.fb_show_grp(pscript.f_cur_node_name);
-	}
-	else if(node.rec.type == 'File'){
-		$dh(pscript.grp_div);
-		$ds(pscript.file_div);
-		if(pscript.f_cur_node_file){
-			if(inList(img_extns,extn)){
-				pscript.fb_show_img();
-			}
-			else{
-				// IE FIX
-				pscript.remove_child_nodes(dsp_div.f_file_content);
-				
-				var div = document.createElement('div');
-				div.innerHTML = '<a class="link_type" onclick="pscript.fb_show_txt_file()" id="file_link">Click to Open/ Download file.</span>';				
-				dsp_div.f_file_content.appendChild(div);
-				$ds(dsp_div);
-			}
-		}
-		else{
-			dsp_div.f_file_content.innerHTML = 'No attachement found.';
-			$ds(pscript.f_file_display);
-			
-			$ds(pscript.file_div);
-			$dh(pscript.grp_div);			
-		}
-		pscript.show_edit_file_link(node.rec.name);
-	}
-	else{
-		$dh(pscript.grp_div);
-		$dh(pscript.file_div);
-	}
-}
-
-// Onexpand of a tree node get all childrens(Files / File Groups).
-pscript.fb_get_children = function(node){
-	if(node.expanded_once) return;
-	$ds(node.loading_div);
-	
-	var callback = function(r,rt){
-		var p = pscript.fb_tree.allnodes[r.message.parent_grp];
-		$dh(node.loading_div);
-
-		var fl = r.message.fl ? r.message.fl : '';
-		if(fl){
-			for(var i=0; i<fl.length; i++){
-				if(fl[i][3] == undefined) fl[i][3] = '';
-				if(fl[i][4] == undefined) fl[i][4] = '';
-				
-				if(has_common(fl[i][3].split(','),user_roles) || has_common(fl[i][4].split(','),user_roles) || (user == fl[i][5])){
-					var imgsrc = 'images/icons/page.gif'; var has_children = false; 
-					if(fl[i][1]) var label = fl[i][1]; else var label = fl[i][0];
-
-					var n = pscript.fb_tree.addNode(p,fl[i][0],imgsrc,pscript.show_hide_link,has_children ? pscript.fb_get_children:null,null,label);
-					n.rec = fl[i]; n.rec.name = fl[i][0]; n.rec.parent_grp = r.message.parent_grp;
-					n.rec.label = fl[i][1]; n.rec.file_list = fl[i][2]; n.rec.type = 'File';
-				}
-			}
-		}
-		
-		var fl_grp = r.message.fl_grp ? r.message.fl_grp : '';
-		if(fl_grp){
-			for(var i=0;i<fl_grp.length;i++){
-				if(fl_grp[i][2] == undefined) fl_grp[i][2] = '';
-				if(fl_grp[i][3] == undefined) fl_grp[i][3] = '';
-
-				if(has_common(fl_grp[i][2].split(','),user_roles) || has_common(fl_grp[i][3].split(','),user_roles) || (user == fl_grp[i][4])){
-					var imgsrc = 'images/icons/folder.gif'; var has_children = true;
-					var label = fl_grp[i][1] ? fl_grp[i][1] : fl_grp[i][0];
-
-					var n = pscript.fb_tree.addNode(p,fl_grp[i][0],imgsrc,pscript.show_hide_link,has_children ? pscript.fb_get_children:null,null,label);
-					n.rec = fl_grp[i]; n.rec.name = fl_grp[i][0]; n.rec.parent_grp = r.message.parent_grp;
-					n.rec.label = fl_grp[i][1]; n.rec.file_list = ''; n.rec.type='File Group';
-				}
-			}
-		}
-	}
-	$c_obj('File Browser Control','get_children',node.rec.name,callback);
-}
-
-// If image file then display image.
-pscript.fb_show_img = function(){
-
-	var parent = pscript.f_file_display;
-
-	parent.f_file_title.innerHTML = pscript.f_cur_node_label;
-	pscript.remove_child_nodes(parent.f_file_content);
-
-	var a = $a(parent.f_file_content,'a');
-	
-	var img = $a(a,'img','',{textAlign:'center',cursor:'pointer'}); 
-	img.src = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s&thumbnail=300',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
-	$ds(pscript.f_file_display);
-
-	a.onclick = function(){
-		this.href = repl('cgi-bin/getfile.cgi?ac=%(acc)s&name=%(f_nm)s',{acc:session.account_name, f_nm:pscript.f_cur_node_file});
-		this.target = "_blank";
-	}
-}
-
-// Enable/ disable Edit File action.
-pscript.show_edit_file_link = function(){
-	
-	var callback = function(r,rt){
-			pscript.f_edit_roles = r.message[0][0] ? r.message[0][0].split(',') : '';
-			pscript.f_view_roles = r.message[0][1] ? r.message[0][1].split(',') : '';
-			
-			if(has_common(pscript.f_edit_roles,user_roles) || user == r.message[0][2]){
-				$ds(pscript.file_div);
-			}
-			else{ $dh(pscript.file_div); }
-	}
-	
-	var args = {};
-	args.dt = pscript.f_cur_node_type;
-	args.dn = pscript.f_cur_node_name;
-	$c_obj('File Browser Control','get_privileges',docstring(args),callback);
-}
-
-// Set file detail in attachement object.
-pscript.set_file_det_value = function(att,file){
-	if(file.inputs['Description'].value) file_desc = file.inputs['Description'].value; else file_desc = 'NIL';
-	if(file.inputs['File Group'].txt.value) file_grp = file.inputs['File Group'].txt.value; else file_grp = 'NIL';
-	att.file_det.value = file_desc + '~~' + file_grp;
-}
-
-// Edit selected file.
-pscript.fb_edit_file = function(){
-	var parent = pscript.f_file_display;
-	parent.f_file_title.innerHTML = pscript.f_cur_node_label;
-	pscript.n_file.show(1,'frm_node');
-}
-
-//delete dialog structure
-
-pscript.delete_node = function(sdt,dt,dn,callback){
-	if(!pscript.delete_dialog){
-		var delete_dialog = new Dialog(400,200);
-
-		delete_dialog.make_body([
-			['HTML','Message',''],
-			['HTML','Response',''],
-			['HTML','Delete Record','<div id="delete_record" style="height:25px"></div>']
-		]);
-		
-		delete_dialog.y_btn = $a($i('delete_record'),'button','button');
-		delete_dialog.y_btn.innerHTML = 'Ok';
-		delete_dialog.y_btn.onclick = function(){
-			delete_dialog.widgets['Response'].innerHTML = 'Deleting...';
-			var args = {};
-			args.dt = delete_dialog.dt; args.dn = delete_dialog.dn;
-			
-			var callback1 = function(r,rt){
-				delete_dialog.onhide = delete_dialog.callback;
-				delete_dialog.hide();
-				
-				//refreshing node
-				pscript.load_child_nodes();
-			}
-			$c_obj(sdt,'delete',docstring(args),callback1);
-		}
-		
-		delete_dialog.n_btn = $a($i('delete_record'),'button','button');
-		delete_dialog.n_btn.innerHTML = 'Cancel';
-		
-		delete_dialog.n_btn.onclick = function(){
-			delete_dialog.widgets['Response'].innerHTML = '';
-			delete_dialog.onhide = '';
-			delete_dialog.hide();
-		}
-
-		delete_dialog.widgets['Message'].innerHTML = 'Note: All data will be deleted permanantly. Do you want to continue?';
-		pscript.delete_dialog = delete_dialog;
-	}
-	//if(!delete_dialog.display) delete_dialog.show();
-	pscript.delete_dialog.show();
-	pscript.delete_dialog.widgets['Response'].innerHTML = '';
-	pscript.delete_dialog.sdt = sdt; pscript.delete_dialog.dt=dt; pscript.delete_dialog.dn=dn; pscript.delete_dialog.callback = callback;
-}
-
-pscript.remove_child_nodes = function(parent){
-	var len = parent.childNodes.length;
-	if(len){
-		for(l=0; l<len; l++){
-			var c = parent.childNodes[0];
-			parent.removeChild(c);
-		}
-	}
-}
-
-pscript.load_child_nodes = function(){
-	if(pscript.f_cur_parent){
-		pscript.f_cur_parent.clear_child_nodes();
-		pscript.f_cur_parent.expand();
-		pscript.f_cur_parent.select();
-	}
-	else{ pscript.fb_refresh(); }
-}
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/file_browser.txt b/erpnext/utilities/page/file_browser/file_browser.txt
deleted file mode 100644
index b4496f9..0000000
--- a/erpnext/utilities/page/file_browser/file_browser.txt
+++ /dev/null
@@ -1,121 +0,0 @@
-# Page, File Browser
-[
-
-	# These values are common in all dictionaries
-	{
-		'creation': '2010-10-12 15:19:31',
-		'docstatus': 0,
-		'modified': '2010-12-27 11:09:52',
-		'modified_by': 'Administrator',
-		'owner': 'Administrator'
-	},
-
-	# These values are common for all Page
-	{
-		'doctype': 'Page',
-		'module': 'Utilities',
-		'name': '__common__',
-		'page_name': 'File Browser',
-		'show_in_menu': 1,
-		'standard': 'Yes'
-	},
-
-	# These values are common for all Page Role
-	{
-		'doctype': 'Page Role',
-		'name': '__common__',
-		'parent': 'File Browser',
-		'parentfield': 'roles',
-		'parenttype': 'Page'
-	},
-
-	# Page, File Browser
-	{
-		'doctype': 'Page',
-		'name': 'File Browser'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 1,
-		'role': 'Administrator'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 2,
-		'role': 'Sales User'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 3,
-		'role': 'Sales Manager'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 4,
-		'role': 'System Manager'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 5,
-		'role': 'Purchase User'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 6,
-		'role': 'Purchase Manager'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 7,
-		'role': 'Accounts User'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 8,
-		'role': 'Accounts Manager'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 9,
-		'role': 'Production User'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 10,
-		'role': 'Production Manager'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 11,
-		'role': 'Material User'
-	},
-
-	# Page Role
-	{
-		'doctype': 'Page Role',
-		'idx': 12,
-		'role': 'Customer'
-	}
-]
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.css b/erpnext/utilities/page/messages/messages.css
new file mode 100644
index 0000000..81260ab
--- /dev/null
+++ b/erpnext/utilities/page/messages/messages.css
@@ -0,0 +1,35 @@
+#message-post-text {
+	height: 3em;
+}
+
+#message-list {
+	margin: 0px 40px;
+}
+
+.message {
+	border-radius: 5px;
+	max-width: 60%;
+	min-width: 40%;
+	padding: 7px;
+	margin-bottom: 7px;
+}
+
+.message .help {
+	margin-bottom: 0px;
+	padding-bottom: 0px;
+	color: #888;
+	font-size: 11px;
+}
+
+.message-other {
+	background-color: #EBFF9C;
+	border: 1px solid #C3CF78;
+	float: right;
+	text-align: right;
+}
+
+.message-self {
+	background-color: #eee;
+	border: 1px solid #ccc;
+	float: left;	
+}
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.html b/erpnext/utilities/page/messages/messages.html
index ded3393..b645d3f 100644
--- a/erpnext/utilities/page/messages/messages.html
+++ b/erpnext/utilities/page/messages/messages.html
@@ -1,2 +1,28 @@
-<div id="message_header" style="margin-bottom: 8px"></div>
-<div id="inbox_tabs"></div>
\ No newline at end of file
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>		
+		<h1>Messages</h1>
+		<div class="well">
+			<textarea id="message-post-text"></textarea>
+			<button disabled="disabled" id="message-post" class="btn btn-small"><i class="icon-play"></i> Post</button>
+		</div>
+		<div id="message-list">
+		</div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">
+					Messages By
+				</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a href="#!messages"><b>All messages</b></a>
+					</div>
+				</div>
+			</div>
+		</div>
+	</div>
+	<div style="clear: both;">
+	</div>	
+</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.js b/erpnext/utilities/page/messages/messages.js
index 43b4bd7..39f7974 100644
--- a/erpnext/utilities/page/messages/messages.js
+++ b/erpnext/utilities/page/messages/messages.js
@@ -1,931 +1,140 @@
-pscript.onload_Messages = function() {
-  var p = new PageHeader($i('message_header'),'Messages');
-  pscript.msg_struct = new Message();
+wn.provide('erpnext.messages');
+
+wn.pages.messages.onload = function(wrapper) {
+	erpnext.messages.show_active_users();
+	erpnext.messages.make_list();
+	
+	// post message
+	$('#message-post').click(function() {
+		var txt = $('#message-post-text').val();
+		if(txt) {
+			wn.call({
+				module:'utilities',
+				page:'messages',
+				method:'post',
+				args: {
+					txt: txt,
+					contact: erpnext.messages.contact
+				},
+				callback:function(r,rt) {
+					$('#message-post-text').val('')
+					erpnext.messages.list.run();
+				},
+				btn: this
+			});
+		}
+	});
+	
+	// enable, disable button
+	$('#message-post-text').keyup(function() {
+		if($(this).val()) {
+			$('#message-post').attr('disabled', false);
+		} else {
+			$('#message-post').attr('disabled', true);
+		}
+	})
 }
 
-pscript.onshow_Messages = function() {
-  pscript.msg_struct.show_inbox();
+wn.pages.messages.onshow = function(wrapper) {
+	erpnext.messages.show();
+	setTimeout(erpnext.messages.refresh, 5000);
+	$('#message-post-text').focus();
 }
 
-function Message(){
-  if(!this.mytabs) this.make_body();
+erpnext.messages = {
+	show: function() {
+		var contact = erpnext.messages.get_contact();
+
+		// can't send message to self
+		$(wn.pages.messages).find('.well').toggle(contact==user ? false : true);
+
+		$(wn.pages.messages).find('h1:first').html('Messages: ' 
+			+ (user==contact ? 'From everyone' : wn.boot.user_fullnames[contact]))
+
+		erpnext.messages.contact = contact;
+		erpnext.messages.list.opts.args.contact = contact;
+		erpnext.messages.list.run();
+		
+	},
+	// check for updates every 5 seconds if page is active
+	refresh: function() {
+		setTimeout(erpnext.messages.refresh, 10000);
+		if(page_body.cur_page_label != 'messages') return;
+		erpnext.messages.show();
+	},
+	get_contact: function() {
+		var route = location.hash;
+		if(route.indexOf('/')!=-1) {
+			var name = decodeURIComponent(route.split('/')[1]);
+			if(name.indexOf('__at__')!=-1) {
+				name = name.replace('__at__', '@');
+			}
+			return name;
+		}
+		return user;	
+	},
+	make_list: function() {
+		erpnext.messages.list = new wn.widgets.Listing({
+			parent: $('#message-list').get(0),
+			method: 'utilities.page.messages.messages.get_list',
+			args: {
+				contact: null
+			},
+			render_row: function(wrapper, data) {
+				data.creation = dateutil.comment_when(data.creation);
+				data.comment_by_fullname = wn.boot.user_fullnames[data.owner];
+
+				data.reply_html = '';
+				if(data.owner==user) {
+					data.cls = 'message-self';
+					data.comment_by_fullname = 'You';	
+					data.delete_html = repl('<a class="close" \
+						onclick="erpnext.messages.delete(this)"\
+						data-name="%(name)s">&times;</a>', data);
+				} else {
+					data.cls = 'message-other';
+					data.delete_html = '';
+					if(erpnext.messages.contact==user) {
+						data.reply_html = repl('<a href="#!messages/%(owner)s">\
+							<i class="icon-share-alt"></i> Reply</a>', data)
+					}
+				}
+
+				wrapper.innerHTML = repl('<div class="message %(cls)s">%(delete_html)s\
+						<b>%(comment)s</b>\
+						<div class="help">by %(comment_by_fullname)s, %(creation)s</div>\
+						%(reply_html)s</div>\
+					<div style="clear: both;"></div>', data);
+			}
+		});
+	},
+	delete: function(ele) {
+		$(ele).parent().css('opacity', 0.6);
+		wn.call({
+			method:'utilities.page.messages.messages.delete',
+			args: {name : $(ele).attr('data-name')},
+			callback: function() {
+				$(ele).parent().toggle(false);
+			}
+		});
+	},
+	show_active_users: function() {
+		wn.call({
+			module:'utilities',
+			page:'messages',
+			method:'get_active_users',
+			callback: function(r,rt) {
+				var $body = $(wn.pages.messages).find('.section-body');
+				for(var i in r.message) {
+					var p = r.message[i];
+					p.fullname = wn.boot.user_fullnames[p.name];
+					p.name = p.name.replace('@', '__at__');
+					$body.append(repl('<div class="section-item">\
+						<a href="#!messages/%(name)s">%(fullname)s</a></div>', p))
+				}
+			}
+		});
+	}
 }
 
-Message.prototype.make_body = function() {
-  var me = this;
-  this.mytabs = new TabbedPage($i('inbox_tabs'));
-  $y(this.mytabs.body_area, {padding:'16px'})
 
-  me.make_inbox();
-  me.make_compose();
-  me.make_sent();
-  
-  this.mytabs.tabs['Inbox'].show();
-}
-
-Message.prototype.make_inbox = function() {
-  var me = this;
-  
-  //inbox tab
-  me.mytabs.add_tab('Inbox', function() { 
-    me.inbox_lst.generate_unread_lst();
-    me.inbox_lst.msg_li.run(); 
-    me.cur_inbox_list = me.inbox_lst.msg_li; // for refresh
-  });
-  
-  if(!this.inbox_lst) this.inbox_lst = new MessageList(me.mytabs.tabs['Inbox'].tab_body, 'inbox msg');
-  this.inbox_lst.msg_li.get_query = function() {
-    //me.checked_msg_lst = [];
-    me.all_msg = {};
-    this.query = repl("select distinct t1.name, t1.last_updated_on, t1.last_updated_by, t1.subject, t3.first_name, t3.file_list, t1.message_date, t1.owner, t1.message, t1.previous_updated_by from `tabMail` t1, `tabMail Participant Details` t2, `tabProfile` t3 where t1.is_main_thread='Yes' and t2.participant_name='%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t1.name = t2.parent and ((t1.last_updated_by = t3.name and t1.last_updated_by!='%(user)s') or (t1.previous_updated_by = t3.name and t1.previous_updated_by!='%(user)s')) order by t1.modified desc", {'user':user});
-    
-    this.query_max = repl("select distinct count(t1.name) from `tabMail` t1, `tabMail Participant Details` t2, `tabProfile` t3 where t1.is_main_thread='Yes' and t2.participant_name='%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t1.name = t2.parent and ((t1.last_updated_by = t3.name and t1.last_updated_by!='%(user)s') or (t1.previous_updated_by = t3.name and t1.previous_updated_by!='%(user)s')) order by t1.modified desc", {'user':user});
-  }
-  
-  this.inbox_lst.generate_unread_lst();  
-  this.inbox_lst.msg_li.run();
-  this.inbox_lst.msg_li.onrun = function(){ me.inbox_lst.show_if_no_msg(me.inbox_lst.msg_li); }
-}
-
-Message.prototype.make_compose = function() {
-  var me = this;
-  
-  me.mytabs.add_tab('Compose', function() { 
-    if(!pscript.compose_msg_obj){
-      pscript.compose_msg_obj = new MessageThread(me.mytabs.tabs['Compose'].tab_body, me.mytabs.tabs['Inbox'], me.inbox_lst.lst_wrapper, 'My Inbox'); 
-      //pscript.compose_msg_obj.show_msg(0, me.mytabs.tabs['Compose'].tab_body, me.mytabs.tabs['Inbox'], me.inbox_lst.lst_wrapper, 'My Inbox', me.mytabs.tabs['Sent'], me.sent_lst.lst_wrapper);
-    }
-    pscript.compose_msg_obj.show_msg(0, me.mytabs.tabs['Compose'].tab_body, me.mytabs.tabs['Inbox'], me.inbox_lst.lst_wrapper, 'My Inbox', me.mytabs.tabs['Sent'], me.sent_lst.lst_wrapper);
-    
-    this.cur_inbox_list = null;
-  });
-}
-
-Message.prototype.make_sent = function() {
-  var me = this;
-  
-  // sent msg tab
-  me.mytabs.add_tab('Sent', function() { 
-    me.sent_lst.msg_li.run(); 
-    me.cur_inbox_list = me.sent_lst.msg_li; // for refresh
-  });
-  
-  if(!this.sent_lst) this.sent_lst = new MessageList(me.mytabs.tabs['Sent'].tab_body, 'sent msg');
-  this.sent_lst.msg_li.get_query = function() {
-    //me.checked_msg_lst = [];
-    me.all_msg = {};
-    
-    this.query = repl("select distinct t1.name, t1.last_updated_on, t1.last_updated_by, t1.subject, t3.first_name, t3.file_list, t1.message_date, t1.owner, t1.message from `tabMail` t1, `tabProfile` t3, `tabMail Participant Details` t2 where t1.is_main_thread='Yes' and t1.last_updated_by='%(user)s' and t1.last_updated_by = t3.name and t2.participant_name = '%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t2.parent = t1.name order by t1.modified desc", {'user':user});
-    this.query_max = repl("select distinct count(t1.name) from `tabMail` t1, `tabProfile` t3, `tabMail Participant Details` t2 where t1.is_main_thread='Yes' and t1.last_updated_by='%(user)s' and t1.last_updated_by = t3.name and t2.participant_name = '%(user)s' and (t2.delete_status is NULL or t2.delete_status = 'No') and t2.parent = t1.name order by t1.modified desc", {'user':user});
-  }
-  this.sent_lst.msg_li.run();
-  this.sent_lst.msg_li.onrun = function(){ me.sent_lst.show_if_no_msg(me.sent_lst.msg_li); }
-}
-
-Message.prototype.show_inbox = function(){
-  var me = this;
-  if(me.inbox_lst){
-    me.inbox_lst.msg_li.run();
-  }
-  me.mytabs.tabs['Inbox'].show();
-}
-
-MessageList = function(parent_tab, req_frm) {
-  this.checked_msg_lst = [];
-  this.unread_msg_lst = [];
-  this.all_msg = {};
-  this.parent_tab = parent_tab;
-  this.req_frm = req_frm;
-  this.make();
-}
-
-MessageList.prototype.make = function(){
-  var me = this;
-  
-  this.lst_wrapper = $a(me.parent_tab, 'div');
-  
-  //toolbar
-  this.toolbar_area = $a(this.lst_wrapper, 'div', '', {paddingTop:'12px'});
-  this.create_toolbar();
-  
-  //no inbox msg div
-  this.no_lst_wrapper = $a(me.parent_tab, 'div', '', {padding:'8px',backgroundColor:'#FFE4AA'});
-  $dh(this.no_lst_wrapper);
-  
-  //view inbox msg div
-  this.view_msg_wrapper = $a(me.parent_tab, 'div');
-  
-  this.msg_li = new Listing("Recent Messages",1);
-  this.msg_li.colwidths = ['90%'];
-  this.msg_li.opts.no_border = 1;
-  this.msg_li.opts.show_empty_tab = 0;
-  this.msg_li.opts.no_border = 1;
-  
-  this.msg_li.show_cell = function(cell,ri,ci,d) {
-    if(ri % 2)$y(cell,{backgroundColor:'#E1E3DE'});
-    if(ci ==0){
-      this.msg_lst = new MessagePreview(cell, me.req_frm, d[ri][0], d[ri][1], d[ri][2], d[ri][3], d[ri][4], d[ri][5], d[ri][6], d[ri][7], d[ri][8], d[ri][9], me.lst_wrapper, me.view_msg_wrapper, me.unread_msg_lst, me.all_msg);
-    }
-  }
-  this.msg_li.make(this.lst_wrapper);
-  $dh(this.msg_li.btn_area);
-}
-
-MessageList.prototype.create_toolbar = function(){
-  var me = this;
-  
-  this.toolbar_tbl = make_table(me.toolbar_area, 1, 2, '100%', ['85%', '15%']);
-  
-  this.select_all_lnk = $a($td(this.toolbar_tbl, 0, 0), 'span', 'link_type');
-  this.select_all_lnk.innerHTML = 'Select All';
-  $dh(this.select_all_lnk);
-  
-  this.unselect_all_lnk = $a($td(this.toolbar_tbl, 0, 0), 'span', 'link_type');
-  this.unselect_all_lnk.innerHTML = 'Unselect All';
-  $dh(this.unselect_all_lnk);
-  
-  this.select_all_lnk.onclick = function(){
-    $ds(me.unselect_all_lnk);
-    $dh(me.select_all_lnk);
-    for(m in me.all_msg){
-      me.all_msg[m].checked = true;
-    }
-  }
-  
-  this.unselect_all_lnk.onclick = function(){
-    $ds(me.select_all_lnk);
-    $dh(me.unselect_all_lnk);
-    for(m in me.all_msg){
-      me.all_msg[m].checked = false;
-    }
-  }
-  
-  this.delete_selected_btn = $a($td(this.toolbar_tbl, 0, 1), 'button', 'button', {align:'right'});
-  this.delete_selected_btn.innerHTML = 'Delete Selected';
-  $dh(this.delete_selected_btn);
-  this.delete_selected_btn.onclick = function(){
-    me.checked_msg_lst = [];    
-    for(m in me.all_msg){
-      if(me.all_msg[m].checked == true)
-        me.checked_msg_lst.push(m);
-    }
-    me.delete_selected();
-  }
-}
-
-MessageList.prototype.show_if_no_msg = function(lst_data){
-  var me = this;
-  $dh(me.view_msg_wrapper);
-  
-  if(!lst_data.has_data()){  
-    $ds(me.no_lst_wrapper);
-    $dh(me.lst_wrapper);
-    if(me.req_frm == 'inbox msg'){
-      me.no_lst_wrapper.innerHTML = "You have no messages in your Inbox.";      
-    }
-    else if(me.req_frm == 'sent msg'){
-      me.no_lst_wrapper.innerHTML = "You have no messages in your Sent messages list.";
-    }
-  } else {    
-    $dh(me.no_lst_wrapper); 
-    $ds(me.lst_wrapper);
-    $dh(me.no_lst_wrapper); 
-    $ds(me.lst_wrapper);
-    $dh(this.unselect_all_lnk);
-    $ds(this.select_all_lnk);
-    $ds(this.delete_selected_btn);
-  }
-}
-
-MessageList.prototype.generate_unread_lst = function(){
-  var me = this;
-  
-  var msg_callback = function(r, rt){
-    if(r.message.ur_lst){
-      me.unread_msg_lst = r.message.ur_lst;
-    }
-  }
-  $c('runserverobj', {doctype:'Message Control',method:'get_unread_msg_lst',arg:user}, msg_callback);
-}
-
-MessageList.prototype.delete_selected = function(){
-  var me = this;
-  
-  if(me.checked_msg_lst.length >= 1) me.msg_li.msg_lst.delete_msg(me.checked_msg_lst);
-  else  msgprint("error:Please select the message to delete");
-}
-
-function MessagePreview(parent, req_frm, msg_id, last_updated_on, last_updated_by, subject, first_name, profile_pic, msg_date, msg_owner, message, previous_updated_by, lst_wrapper, view_msg_wrapper, unread_msg_lst, all_msg_dict) { 
-  this.create_structure(parent);
-  
-  if(req_frm) this.req_frm = req_frm;
-  this.msg_id = msg_id;
-  this.subject = subject;
-  this.message = message;
-  this.msg_date = msg_date;
-  this.msg_owner = msg_owner;
-  this.first_name = first_name;
-  this.lst_wrapper = lst_wrapper;
-  this.view_msg_wrapper = view_msg_wrapper;
-  if(profile_pic) this.profile_pic = profile_pic;
-  if(last_updated_on) this.last_updated_on = last_updated_on;
-  if(last_updated_by) this.last_updated_by = last_updated_by;
-  if(previous_updated_by) this.previous_updated_by = previous_updated_by;
-	this.unread_msg_lst = unread_msg_lst;
-  this.all_msg = all_msg_dict;
-  
-  this.show_msg_sender();
-  this.show_msg_subject();
-  this.show_delete_lnk();
-}
-
-MessagePreview.prototype.create_structure = function(parent){
-  this.wrapper = $a(parent,'div');
-  this.t = make_table(this.wrapper, 1, 4, '100%', ['5%','10%','80%','5%']);
-}
-
-MessagePreview.prototype.show_msg_sender = function(){
-  var me = this;
-  
-  // checkbox
-  var chk_box = $a($td(this.t, 0, 0),'div');
-  if(isIE) {
-    chk_box.innerHTML = '<input type="checkbox" style="border: 0px">'; // IE fix
-    this.inp = chk_box.childNodes[0];
-  } else {
-    this.inp = $a(chk_box, 'input');
-    this.inp.type = 'checkbox';
-  }
-  
-  this.inp.onclick = function() { 
-    for(m in me.all_msg){
-      if(m == me.msg_id)
-        me.all_msg[m].checked = me.inp.checked;
-    }
-  }
-  
-  me.all_msg[me.msg_id] = this.inp;
-  
-  //sender or receiver
-  // photo
-  if(this.profile_pic) {
-    var img = $a($td(this.t, 0, 1),'img');
-    var img_src = this.profile_pic.split(NEWLINE)[0].split(',')[0]
-    img.src = repl('cgi-bin/getfile.cgi?name=%(fn)s&thumbnail=32',{fn:img_src})
-  }
-  //name
-  var div = $a($td(this.t, 0, 1),'div');
-  div.innerHTML = this.first_name;
-}
-
-MessagePreview.prototype.show_msg_subject = function() {
-  var me = this;
-  // message
-  var div1 = $a($td(this.t, 0, 2),'div', '', {paddingBottom:'4px'});
-  var sp = $a(div1,'span','link_type', {fontSize:'12px'});
-  sp.innerHTML = 'Sub : ' +me.subject;
-  
-  var div = $a($td(this.t, 0, 2),'div', 'comment',{paddingBottom:'8px'});
-  div.innerHTML = 'created by: ' + me.msg_owner +' | created on: ' + dateutil.str_to_user(me.msg_date)+ ' | last updated on: ' + dateutil.str_to_user(me.last_updated_on);
-  
-  if (me.req_frm == 'inbox msg' && inList(me.unread_msg_lst, me.msg_id)) {
-    $y(sp,{fontWeight:'bold',color:'Black'});
-    $y(div,{fontWeight:'bold',color:'Black'});
-  }
-  
-  sp.style.cursor = 'pointer';
-  sp.msg_id = me.msg_id; sp.req_frm = me.req_frm;
-  
-  sp.onclick = function() {
-    $dh(me.lst_wrapper);
-    if(this.req_frm == 'inbox msg'){
-      if(!pscript.inbox_msg_obj){
-        pscript.inbox_msg_obj = new MessageThread(me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Inbox'], me.lst_wrapper, 'My Inbox'); 
-      }
-      pscript.inbox_msg_obj.show_msg(this.msg_id, me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Inbox'], me.lst_wrapper, 'My Inbox', pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper);
-      
-      //mark for already read
-      if (this.req_frm == 'inbox msg' && inList(me.unread_msg_lst,this.msg_id)) {
-        me.mark_as_read(this.msg_id);
-      }
-    }
-    else if(this.req_frm == 'sent msg'){
-      if(!pscript.sent_msg_obj){
-        pscript.sent_msg_obj = new MessageThread(me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper, 'My Inbox'); 
-      }
-      pscript.sent_msg_obj.show_msg(this.msg_id, me.view_msg_wrapper, pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper, 'My Inbox', pscript.msg_struct.mytabs.tabs['Sent'], me.lst_wrapper); 
-    }
-  }
-}
-
-MessagePreview.prototype.mark_as_read = function(msg_id){
-  this.msg_id = msg_id;
-  var me = this;
-  
-  args = {'user' : user, 'msg':this.msg_id,'read':'Yes'}
-  $c_obj('Message Control','read_unread_message',docstring(args),function(r,rt){
-    me.remove_element(me.unread_msg_lst, me.msg_id);
-  });
-}
-
-MessagePreview.prototype.delete_msg = function(msg_nm_lst){
-  this.msg_nm_lst = msg_nm_lst;
-  var me = this; 
-  var delete_msg_dialog;
-  
-  set_delete_msg_dialog = function() {
-    delete_msg_dialog = new Dialog(400, 200, 'Delete Message');
-    delete_msg_dialog.make_body([
-      ['HTML', 'Message', '<div class = "comment">Are you sure, you want to delete message(s) ?</div>'],
-      ['HTML', 'Response', '<div class = "comment" id="delete_msg_dialog_response"></div>'],
-      ['HTML', 'Delete Msg', '<div></div>']
-    ]);
-    
-    var delete_msg_btn1 = $a($i(delete_msg_dialog.widgets['Delete Msg']), 'button', 'button');
-    delete_msg_btn1.innerHTML = 'Yes';
-    delete_msg_btn1.onclick = function(){ delete_msg_dialog.add(); }
-    
-    var delete_msg_btn2 = $a($i(delete_msg_dialog.widgets['Delete Msg']), 'button', 'button');
-    delete_msg_btn2.innerHTML = 'No';
-    $y(delete_msg_btn2,{marginLeft:'4px'});
-    delete_msg_btn2.onclick = function(){ delete_msg_dialog.hide();}
-    
-    delete_msg_dialog.onshow = function() {
-      $i('delete_msg_dialog_response').innerHTML = '';
-    }
-    
-    delete_msg_dialog.add = function() {
-      // sending...
-      $i('delete_msg_dialog_response').innerHTML = 'Processing...';
-      var m_arg = user+ '~~' + this.msg_nm_lst;
-      
-      var call_back = function(r,rt) { 
-        if(r.message == 'true'){
-          $i('delete_msg_dialog_response').innerHTML = 'Message Deleted';
-          delete_msg_dialog.hide();
-          
-          for(m=0; m<me.msg_nm_lst.length; m++){
-            if(inList(me.unread_msg_lst, me.msg_nm_lst[m]))
-              me.remove_element(me.unread_msg_lst, me.msg_nm_lst[m]);
-          }
-          pscript.msg_struct.inbox_lst.msg_li.run();
-          pscript.msg_struct.sent_lst.msg_li.run();
-        }
-      }
-      $c('runserverobj', {doctype:'Message Control',method:'delete_message',arg:m_arg}, call_back); 
-    }
-  }  
-  
-  if(!delete_msg_dialog){
-    set_delete_msg_dialog();
-  }  
-  delete_msg_dialog.msg_nm_lst = this.msg_nm_lst;
-  delete_msg_dialog.show();
-}
-
-MessagePreview.prototype.remove_element = function(arrayName, arrayElement){
-  for(var i=0; i<arrayName.length;i++ )
-  { 
-    if(arrayName[i]==arrayElement)
-    arrayName.splice(i,1); 
-  }
-}
-
-MessagePreview.prototype.show_delete_lnk = function() {
-  var me = this;
-  var div = $a($td(this.t, 0, 3), 'span', 'link_type');
-  div.innerHTML = 'Delete';
-  div.msg_id = me.msg_id;
-  
-  div.onclick = function() {
-    me.delete_msg(me.msg_id);
-  }
-}
-
-MessagePart = function(parent){
-  var me = this;
-  
-  this.parent = parent;
-  this.inputs = {};
-  
-  me.make_header();
-  me.make_reply();
-  me.make_post();
-}
-
-MessagePart.prototype.make = function(label, ele, comment){
-  var me = this;
-  
-  var div = $a(this.parent,'div','',{marginBottom:'12px'});
-  var t = make_table(div,2,1,'70%',['100%']);
-  
-  if( ele == 'button'){
-    var element = $a($td(t,0,0), 'button');
-    element.innerHTML = label;
-  }
-  else {
-    var element = $a($td(t,1,0),ele);
-
-    // large fonts for inputs
-    if(in_list(['input','textarea'],ele.toLowerCase())) {
-      $y(element,{fontSize:'14px', width:'100%'})
-    }
-    $td(t,0,0).innerHTML = label;
-  }
-
-  if(comment) {
-    var div2 = $a(div,'div','',{fontSize:'11px', color:'#888', marginTop:'2px'});
-    div2.innerHTML = comment;
-  }
-  
-  element.wrapper = div;
-  if(label) me.inputs[label] = element;
-  return element;
-}
-
-MessagePart.prototype.make_header = function(){
-  var me = this;
-  
-  this.back_link_div = $a(me.make('','div'),'span', 'link_type', {paddingTop:'12px'});
-  this.back_link_div.innerHTML = 'Back to List';
-  
-  me.make('To','textarea','Enter Email Ids separated by commas (,)');
-  $y(me.inputs['To'],{overflow :'auto', height : '50px'});
-  me.make('Subject','input');
-}
-
-MessagePart.prototype.make_reply = function(){
-  var me = this;
-  this.inputs.Thread = $a(this.parent, 'div', '', {margin:'16px 0px'})
-}
-
-MessagePart.prototype.make_post = function(){
-  var me = this;
-  
-  me.make('Message','textarea');
-  $y(me.inputs['Message'],{height:'240px'});
-
-  // send + cancel
-  var d = $a(this.parent, 'div');
-  me.inputs.Send = $btn(d, 'Send');
-  me.inputs.Reply = $a(d, 'Reply')
-}
-
-MessagePart.prototype.add_header_values = function(to_list, subject){
-  var me = this;
-  
-  //thread_participants
-  me.inputs['To'].value = to_list.join(',');
-  me.inputs['To'].disabled = true;
-  
-  // subject
-  me.inputs['Subject'].value = subject;
-  me.inputs['Subject'].disabled = true;
-}
-
-MessagePart.prototype.add_reply_thread = function(thread){
-  var me = this;
-  // prev messages
-  var t = me.inputs['Thread'];
-  t.innerHTML = ''; // clear previous threads
-  
-  var w = $a(t,'div','',{width:'70%'});
-  var tab = make_table(w,thread.length,2,'100%',['20%','80%'], {padding:'8px 0px', borderBottom:'1px solid #AAA'});
-  
-  for(i=0;i<thread.length;i++) {
-    // ---- photo ---- 
-    if(thread[i][6]) {
-      var img = $a($td(tab,i,0),'img');
-      var img_src = thread[i][6].split(NEWLINE)[0].split(',')[0];
-      img.src = repl('cgi-bin/getfile.cgi?name=%(fn)s&thumbnail=32',{fn:img_src});
-    }
-    
-    // ---- sender name ---- 
-    var d = $a($td(tab,i,0),'div','',{fontSize:'11px'});
-    d.innerHTML = thread[i][5];
-    
-    //----- date ----
-    var d = $a($td(tab,i,1),'div', 'comment', {marginLeft:'8px', color:'#888', fontSize:'11px'}); 
-    d.innerHTML = dateutil.str_to_user(thread[i][3]);
-    
-    //------ message ------
-    var d = $a($td(tab,i,1),'div', 'comment', {fontSize:'14px', marginLeft:'8px'}); 
-    d.innerHTML = replace_newlines(thread[i][1]);
-    $y($td(tab,i,1), {paddingBottom: '8px'});
-  }
-}
-
-//++++++++++++++++++++++++ Message  ++++++++++++++++++++++++
-
-MessageThread = function(parent, view_list_tab, view_list_div, req_frm) {
-  var me = this;
-  this.wrapper = $a(parent,'div');
-  if(!this.msg_parts) this.make(view_list_tab, view_list_div, req_frm);
-}
-
- 
-MessageThread.prototype.add_autosuggest = function() {
-  var me = this;
-  
-  // ---- add auto suggest ---- 
-  var opts = { script: '', json: true, maxresults: 10, timeout: 10000, delay:250, maxentries:500, cache:false};
-
-  wn.require('lib/js/legacy/widgets/autosuggest.js');
-  
-  var as = new AutoSuggest(me.msg_parts.inputs['To'], opts);
-  as.custom_select = function(txt, sel) {
-    // ---- add to the last comma ---- 
-    
-    var r = '';
-    var tl = txt.split(',');
-    for(var i=0;i<tl.length-1;i++) r=r+tl[i]+',';
-    r = r+(r?' ':'')+sel+',';
-    if(r[r.length-1]==NEWLINE) { r=substr(0,r.length-1);}
-    return r;
-  }
-  
-  // ---- override server call ---- 
-  as.doAjaxRequest = function(txt) {
-    var pointer = as; var q = '';
-    
-    // ---- get last few letters typed ---- 
-    var last_txt = txt.split(',');
-    last_txt = last_txt[last_txt.length-1];
-    
-    // ---- show options ---- 
-    var call_back = function(r,rt) {
-      as.aSug = [];
-      var jsondata = r.message;  
-      for (var i=0;i<jsondata.results.length;i++) {
-        as.aSug.push({'id':jsondata.results[i].id, 'value':jsondata.results[i].value, 'info':jsondata.results[i].info});
-      }
-      as.idAs = "as_for_to_message";
-      
-      //old create list
-      as.createList(as.aSug);        
-    }
-    
-    $c_obj('Message Control', 'get_to_list', (last_txt ? last_txt : '%'), call_back);
-    return;
-  }  
-}
-  
-MessageThread.prototype.make = function(view_list_tab, view_list_div, req_frm) {
-  var me = this;
-  
-  me.view_list_tab = view_list_tab;
-  me.view_list_div = view_list_div;
-  me.req_frm = req_frm;
-  
-  this.msg_parts = new MessagePart(me.wrapper);
-
-  this.msg_parts.back_link_div.onclick = function() { 
-    me.hide(); 
-    
-    if(me.in_compose) {
-      if(me.req_frm == 'My Inbox') { me.view_list_tab.show(); $ds(me.view_list_div); }
-    }
-  }
-  
-  // autosuggest
-  me.add_autosuggest();
-}
-
-MessageThread.prototype.set_inbox_editor = function(editor) { 
-  pscript.inbox_text_editor_set = 1;
-}
-
-MessageThread.prototype.view_existing_msg = function(args){
-  var me = this;
-  
-  $c_obj('Message Control', 'get_thread_details', docstring(args), 
-    function(r, rt){
-      var tl = r.message.tl;
-      var to_list = r.message.to_list;
-      
-      //to and subject
-      me.msg_parts.add_header_values(to_list, tl[0][0]);
-      
-      //reply thread
-      me.msg_parts.add_reply_thread(tl);
-      
-      //post area
-      if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
-        me.inbox_editor.editor.setContent('');
-      }
-      else{
-        me.msg_parts.inputs['Message'].value = '';
-      }
-      me.show_as(true);
-    }
-  );
-}
-
-MessageThread.prototype.view_blank_form = function(){
-  var me = this;
-  
-  $ds(me.msg_parts.inputs['To'].wrapper);
-  
-  me.msg_parts.inputs['To'].disabled = false;
-  me.msg_parts.inputs['To'].value = '';    
-  
-  me.msg_parts.inputs['Subject'].disabled = false;    
-  me.msg_parts.inputs['Subject'].value = '';
-  
-  me.msg_parts.inputs['Thread'].innerHTML = '';
-  
-  if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
-    me.inbox_editor.editor.setContent('');
-  }
-  else{
-    me.msg_parts.inputs['Message'].value = '';
-  }    
-  me.show_as(false);
-}
-  
-//  msg_id = mesage id, 
-//  parent = div/tab from where msg will be shown, 
-//  view_list_tab = name of tab in which list will be viewed, 
-//  view_list_div = name of div in which list will be viewed, 
-//  req_frm = my inbox / group / event, 
-//  show_on_send_tab = tab to be viewed on sending/replying to msg, 
-//  show_on_send_div = div to be viewed on sending/replying to msg, 
-//  receiver_lst = list of msg receiver
-
-MessageThread.prototype.show_msg = function(msg_id, parent, view_list_tab, view_list_div, req_frm, show_on_send_tab, show_on_send_div, receiver_lst) {
-  var me = this;
-  
-  // set tinymce editor
-  if(!me.inbox_editor) {
-    pscript.inbox_text_editor_set = 0;
-    var theme_adv_btn1 ="fontselect,fontsizeselect,formatselect,indicime,indicimehelp,emotions";
-    var theme_adv_btn2 ="bold,italic,underline,|,undo,redo,|,code,forecolor,backcolor,link,unlink,hr,|,sub,sup,|,charmap";
-    var theme_adv_btn3 = "";
-    
-    me.inbox_editor = new TextAreaEditor(me.msg_parts.inputs["Message"], null, me.set_inbox_editor, theme_adv_btn1, theme_adv_btn2, theme_adv_btn3, '300px');
-  }
-  
-  me.req_frm = req_frm;
-  me.receiver_lst = receiver_lst;
-  me.parent = parent;
-  me.view_list_tab = view_list_tab;
-  me.view_list_div = view_list_div;
-  me.show_on_send_tab = show_on_send_tab;
-  me.show_on_send_div = show_on_send_div;
-  me.msg_parts.inputs['Send'].btn_click = 0;
-  me.msg_parts.inputs['Reply'].btn_click = 0;
-  
-  if(msg_id) {
-    this.cur_message_id = msg_id;
-    var args = {'user_name':user, 'cur_msg_id': this.cur_message_id};
-    me.view_existing_msg(args);      
-  } 
-  else {
-    this.cur_message_id = null;
-    me.view_blank_form();
-  }  
-  $ds(me.parent);
-  
-  // reply or send btn
-  me.msg_parts.inputs['Send'].onclick = function(){ 
-    if(!this.btn_click){
-      this.btn_click = 1;
-      me.send(me.req_frm, me.receiver_lst, me.show_on_send_tab, me.show_on_send_div); 
-    }
-  }
-  me.msg_parts.inputs['Reply'].onclick = me.msg_parts.inputs['Send'].onclick;
-}
-
-MessageThread.prototype.hide = function() {
-  var me = this;
-  
-  $dh(me.wrapper);
-  $ds(me.view_list_div);
-  me.display = 0;
-}
-
-MessageThread.prototype.show_as = function(reply) {
-  var me = this;
-  
-  if(!reply) {
-    $dh(me.msg_parts.inputs['Thread'].wrapper);
-    $dh(me.msg_parts.inputs['Reply']);
-    $ds(me.msg_parts.inputs['Send']);
-    me.in_compose = 1;
-  }
-  else {
-    $ds(me.msg_parts.inputs['Thread'].wrapper);
-    $ds(me.msg_parts.inputs['Reply']);
-    $dh(me.msg_parts.inputs['Send']);
-    $dh(me.view_list_div);
-    me.in_compose = 1;
-  } 
-  $ds(me.wrapper);
-  me.display = 1;
-}
-
-MessageThread.prototype.send_msg = function(arg){
-  var me = this;
-  var args = arg;
-  
-  var send_call_back = function(r, rt){
-    //var me = this;
-    if(r.message == 'true'){
-      me.msg_parts.inputs['To'].value = '';
-      me.msg_parts.inputs['Subject'].value = '';
-      me.msg_parts.inputs['Thread'].innerHTML = '';
-      
-      if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
-        me.inbox_editor.editor.setContent('');
-      }
-      else{
-        me.msg_parts.inputs['Message'].value = '';
-      }
-      
-      if(me.req_frm == 'My Inbox'){
-        pscript.msg_struct.sent_lst.msg_li.run();
-        me.show_on_send_tab.show();
-        $ds(me.show_on_send_div);
-        $dh(me.parent);
-      }
-    }
-  }
-  
-  if(me.cur_message_id==null){
-    $c_obj('Message Control','send_message',docstring(args), send_call_back);
-  }
-  else{  
-    $c_obj('Message Control','send_reply',docstring(args), send_call_back);
-  }
-}
-
-MessageThread.prototype.send = function(req_frm, receiver_lst, show_on_send_tab, show_on_send_div) {
-  var me = this;
-  me.req_frm = req_frm;
-  me.show_on_send_tab = show_on_send_tab;
-  me.show_on_send_div = show_on_send_div;
-  var args = {'user_name':user};
-  
-  if(me.inbox_editor && pscript.inbox_text_editor_set == 1){
-    args.message = me.inbox_editor.editor.getContent();
-  }
-  else{
-    args.message = me.msg_parts.inputs['Message'].value;
-  }
-  
-  if(me.cur_message_id==null){
-    args.subject = me.msg_parts.inputs['Subject'].value;
-    args.to_list = me.msg_parts.inputs['To'].value;
-    if(!args.to_list) {msgprint('error:Must enter "To:"'); }
-    else if(!args.subject) {msgprint('error:Must enter "Subject"'); }
-    else me.send_msg(args);
-  }
-  else{
-    var subj = me.msg_parts.inputs['Subject'].value;
-    if(!subj.substr(0,3).toLowerCase()=='re:')
-      subj = 'Re: ' + subj;
-    args.subject = subj;
-    args.message_id = me.cur_message_id;
-    
-    me.send_msg(args);
-  }
-}
-
-MessageThread.prototype.delete_msg = function(req_frm, parent, view_list_tab, view_list_div) {
-  var me = this;
-  
-  var msg_lst = [];
-  var delete_message_dialog;
-  me.parent = parent;
-  
-  if(me.cur_message_id)
-    msg_lst.push(me.cur_message_id);
-  
-  if(msg_lst.length >= 1){
-    function set_delete_message_dialog() {
-      delete_message_dialog = new Dialog(400, 400, 'Delete Message');
-      delete_message_dialog.make_body([
-        ['HTML', 'Message', '<div class = "comment">Are you sure, you want to delete this message ?</div>'],
-        ['HTML', 'Response', '<div class = "comment" id="delete_message_dialog_response"></div>'],
-        ['HTML', 'Delete Message', '<div id="delete_message_btn" style ="height:25px;"></div>']
-      ]);
-      
-      var delete_message_btn1 = $a($i('delete_message_btn'), 'button', 'button');
-      delete_message_btn1.innerHTML = 'Yes';
-      delete_message_btn1.onclick = function(){ delete_message_dialog.add();}
-      
-      var delete_message_btn2 = $a($i('delete_message_btn'), 'button', 'button');
-      delete_message_btn2.innerHTML = 'No';
-      $y(delete_message_btn2,{marginLeft:'4px'});
-      
-      delete_message_btn2.onclick = function(){ delete_message_dialog.hide();}
-      
-      delete_message_dialog.onshow = function() {
-        $i('delete_message_dialog_response').innerHTML = '';
-      }
-      
-      delete_message_dialog.add = function() {
-        if(this.req_frm == 'My Inbox'){
-          var args = user + '~~' + this.msg_lst;
-          $c_obj('Message Control', 'delete_message', args, function(r, rt){
-            if(r.message == 'true'){
-              me.hide();
-              me.view_list_tab.show(); 
-              $ds(me.view_list_div);
-              delete_message_dialog.hide();
-            }
-          });  
-        }
-      }
-    }  
-    
-    if(!delete_message_dialog)
-      set_delete_message_dialog();
-    delete_message_dialog.req_frm = req_frm;
-    delete_message_dialog.msg_lst = msg_lst;
-    delete_message_dialog.view_list_tab = view_list_tab;
-    delete_message_dialog.view_list_div = view_list_div;
-    delete_message_dialog.show();
-  }
-}
-
-// ---------------- editor---------------------
-
-var editor_count = 0;
-
-function TextAreaEditor(txt, parent, callback, theme_advanced_btn1, theme_advanced_btn2, theme_advanced_btn3, editor_ht) {
-
-  this.txt = txt;
-  this.parent = parent;
-  this.callback = callback;
-  if(theme_advanced_btn1) this.theme_advanced_btn1 = theme_advanced_btn1;
-  if(theme_advanced_btn2) this.theme_advanced_btn2 = theme_advanced_btn2;
-  if(theme_advanced_btn3) this.theme_advanced_btn3 = theme_advanced_btn3;
-  if(editor_ht) this.editor_ht = editor_ht;
-
-  // load tinyMCE library
-  this.load_tiny_mce_library();
-}
-
-TextAreaEditor.prototype.load_tiny_mce_library = function() {
-
-  var me = this;
-  
-  if(!tinymce_loaded) {
-    tinymce_loaded = 1;
-    tinyMCE_GZ.init(
-      {
-        themes : "advanced",
-        plugins : "style,table,inlinepopups,indicime,emotions",
-        languages : "en",
-        disk_cache : true
-      }, function(){ me.setup_text_area() });
-  }
-  else {
-    me.setup_text_area();
-  }
-}
-
-TextAreaEditor.prototype.setup_text_area = function() {
-
-  var me = this;
-  if(!me.txt) {
-    me.txt = $a(me.parent, 'textarea');
-  }
-  
-  editor_count++;
-  me.id = 'editor_text_' + editor_count;
-  me.txt.setAttribute('id', me.id);
-  
-  tinyMCE.init({
-    theme : "advanced",
-    mode : "exact",
-    elements: me.id,
-    plugins:"table,style,inlinepopups,indicime,emotions",
-    theme_advanced_toolbar_location : "top",
-    theme_advanced_statusbar_location : "bottom",
-    extended_valid_elements: "div[id|dir|class|align|style]",
-    
-    // w/h
-    width: '100%',
-    height: me.editor_ht?me.editor_ht:'50px',
-    
-    // buttons
-    //theme_advanced_buttons1 :"bold,italic,underline,strikethrough,blockquote,forecolor,backcolor,bullist,numlist,|,undo,redo,|,image,code,indicime,indicimehelp,emotions",
-    theme_advanced_buttons1 : me.theme_advanced_btn1?me.theme_advanced_btn1:"bold,italic,underline,forecolor,backcolor,|,undo,redo,|,link,unlink,indicime,indicimehelp,emotions",
-    theme_advanced_buttons2 : me.theme_advanced_btn2?me.theme_advanced_btn2:"",
-    theme_advanced_buttons3 : me.theme_advanced_btn3?me.theme_advanced_btn3:"",
-    
-    // callback function with editor instance.
-    init_instance_callback : "editor_init_callback"
-  });  
-
-  editor_init_callback = function(inst) {
-    me.editor = tinyMCE.get(me.id);
-    me.editor.focus();
-    
-    if(me.callback){
-      me.callback(me.editor);
-    }
-  }  
-}
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.py b/erpnext/utilities/page/messages/messages.py
new file mode 100644
index 0000000..d7c6026
--- /dev/null
+++ b/erpnext/utilities/page/messages/messages.py
@@ -0,0 +1,55 @@
+import webnotes
+
+@webnotes.whitelist()
+def get_list(arg=None):
+	"""get list of messages"""
+	webnotes.form_dict['limit_start'] = int(webnotes.form_dict['limit_start'])
+	webnotes.form_dict['limit_page_length'] = int(webnotes.form_dict['limit_page_length'])
+	webnotes.form_dict['user'] = webnotes.session['user']
+
+	if webnotes.form_dict['contact'] == webnotes.session['user']:
+		# set all messages as read
+		webnotes.conn.sql("""UPDATE `tabComment Widget Record`
+		set docstatus = 1 where comment_doctype in ('My Company', 'Message')
+		and comment_docname = %s
+		""", webnotes.user.name)
+				
+		# return messages
+		return webnotes.conn.sql("""select * from `tabComment Widget Record` 
+		where (owner=%(contact)s or comment_docname=%(user)s)
+		and comment_doctype in ('My Company', 'Message')
+		order by creation desc
+		limit %(limit_start)s, %(limit_page_length)s""", webnotes.form_dict, as_dict=1)		
+	else:
+		return webnotes.conn.sql("""select * from `tabComment Widget Record` 
+		where (owner=%(contact)s and comment_docname=%(user)s)
+		or (owner=%(user)s and comment_docname=%(contact)s)
+		and comment_doctype in ('My Company', 'Message')
+		order by creation desc
+		limit %(limit_start)s, %(limit_page_length)s""", webnotes.form_dict, as_dict=1)
+		
+
+@webnotes.whitelist()
+def get_active_users(arg=None):
+	return webnotes.conn.sql("""select name from tabProfile 
+		where enabled=1 and
+		name not in ('Administrator', 'Guest') 
+		order by first_name""", as_dict=1)
+
+@webnotes.whitelist()
+def post(arg=None):
+	"""post message"""
+	import json
+	arg = json.loads(arg)
+	from webnotes.model.doc import Document
+	d = Document('Comment Widget Record')
+	d.comment = arg['txt']
+	d.comment_docname = arg['contact']
+	d.comment_doctype = 'Message'
+	d.save()
+	
+@webnotes.whitelist()
+def delete(arg=None):
+	webnotes.conn.sql("""delete from `tabComment Widget Record` where name=%s""", 
+		webnotes.form_dict['name']);
+	
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages.txt b/erpnext/utilities/page/messages/messages.txt
index 8369afe..4ea71b2 100644
--- a/erpnext/utilities/page/messages/messages.txt
+++ b/erpnext/utilities/page/messages/messages.txt
@@ -1 +1,28 @@
-[{'creation': '2010-06-07 10:34:37', 'module': 'Tools', 'doctype': 'Page', 'owner': 'Administrator', 'style': None, 'modified_by': 'nabin@webnotestech.com', 'script': None, 'show_in_menu': 1, 'content': None, 'page_name': 'Messages', 'menu_index': None, 'docstatus': 0, 'parent': None, 'standard': 'Yes', 'icon': None, 'name': 'Messages', 'idx': None, 'static_content': None, 'modified': '2010-09-25 00:00:00', 'parenttype': None, 'parent_node': None, 'parentfield': None}, {'modified_by': 'nabin@webnotestech.com', 'name': 'PR000137', 'parent': 'Messages', 'creation': '2010-06-07 10:34:37', 'modified': '2010-09-01 14:56:20', 'doctype': 'Page Role', 'idx': 1, 'parenttype': 'Page', 'role': 'Administrator', 'owner': 'Administrator', 'docstatus': 0, 'parentfield': 'roles'}, {'modified_by': 'nabin@webnotestech.com', 'name': 'PR000138', 'parent': 'Messages', 'creation': '2010-06-07 13:35:43', 'modified': '2010-09-01 14:56:20', 'doctype': 'Page Role', 'idx': 2, 'parenttype': 'Page', 'role': 'All', 'owner': 'Administrator', 'docstatus': 0, 'parentfield': 'roles'}]
\ No newline at end of file
+# Page, messages
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-24 11:21:57',
+		'docstatus': 0,
+		'modified': '2012-02-24 11:21:57',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Utilities',
+		'name': '__common__',
+		'page_name': u'messages',
+		'standard': u'Yes',
+		'title': u'Messages'
+	},
+
+	# Page, messages
+	{
+		'doctype': 'Page',
+		'name': u'messages'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/utilities/page/messages/messages_static.html b/erpnext/utilities/page/messages/messages_static.html
deleted file mode 100644
index 094418b..0000000
--- a/erpnext/utilities/page/messages/messages_static.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<div>
-</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/file_browser/__init__.py b/erpnext/utilities/page/todo/__init__.py
similarity index 100%
copy from erpnext/utilities/page/file_browser/__init__.py
copy to erpnext/utilities/page/todo/__init__.py
diff --git a/erpnext/utilities/page/todo/todo.css b/erpnext/utilities/page/todo/todo.css
new file mode 100644
index 0000000..4ac49d6
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.css
@@ -0,0 +1,31 @@
+.todoitem {
+	padding-bottom: 11px;
+	border-bottom: 1px solid #DEB85F;
+	margin-bottom: 5px;
+	height: 14px;
+}
+
+.todoitem .label {
+	width: 50px;
+	display: inline-block;
+	text-align: center;
+	margin-right: 7px;
+}
+
+.todoitem .close {
+	margin-left: 14px;
+	font-size: 14px;
+	float: left;
+}
+
+.todoitem .ref_link {
+	float: left;
+	margin-left: 14px;
+	display: inline-block;
+	line-height: 18px;
+}
+
+.todoitem .description {
+	cursor: pointer;
+	float: left;
+}
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.html b/erpnext/utilities/page/todo/todo.html
new file mode 100644
index 0000000..3400455
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.html
@@ -0,0 +1,10 @@
+<div class="layout-wrapper" style="min-height: 300px; background-color: #FFFDC9">	
+	<a class="close" onclick="window.history.back();">&times;</a>
+	<h1>To Do</h1>
+	<br>
+	<div id="todo-list">
+	</div>
+	<div style="margin-top: 21px">
+		<button id="add-todo" class="btn btn-small"><i class="icon-plus"></i> Add</button>
+	</div>
+</div>
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.js b/erpnext/utilities/page/todo/todo.js
new file mode 100644
index 0000000..77e4625
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.js
@@ -0,0 +1,132 @@
+wn.provide('erpnext.todo');
+
+erpnext.todo.refresh = function() {
+	wn.call({
+		method: 'utilities.page.todo.todo.get',
+		callback: function(r,rt) {
+			$('#todo-list').empty();
+			if(r.message) {
+				for(var i in r.message) {
+					new erpnext.todo.ToDoItem(r.message[i]);
+				}
+			} else {
+				$('#todo-list').html('<div class="help-box">Nothing to do :)</div>');
+			}
+		}
+	});
+	
+	$('#add-todo').click(function() {
+		erpnext.todo.make_dialog({
+			date:get_today(), priority:'Medium', checked:0, description:''});
+	})
+}
+
+erpnext.todo.ToDoItem = Class.extend({
+	init: function(todo) {
+		label_map = {
+			'High': 'label-important',
+			'Medium': 'label-info',
+			'Low':''
+		}
+		todo.labelclass = label_map[todo.priority];
+		todo.userdate = dateutil.str_to_user(todo.date);
+		$('#todo-list').append(repl('<div class="todoitem">\
+				<span class="description">\
+					<span class="label %(labelclass)s">%(priority)s</span>\
+					<span class="help" style="margin-right: 7px">%(userdate)s</span>\
+					%(description)s</span>\
+					<span class="ref_link">&rarr;\
+					<a href="#!Form/%(reference_type)s/%(reference_name)s">\
+						[%(reference_name)s]</a></span>\
+					<a href="#" class="close">&times;</a>\
+		</div>', todo));
+		$todo = $('div.todoitem:last');
+		
+		if(todo.checked) {
+			$todo.find('.description').css('text-decoration', 'line-through');
+		}
+		
+		if(!todo.reference_name)
+			$todo.find('.ref_link').toggle(false);
+		
+		$todo.find('.description')
+			.data('todo', todo)
+			.click(function() {
+				erpnext.todo.make_dialog($(this).data('todo'));
+				return false;
+			});
+			
+		$todo.find('.close')
+			.data('name', todo.name)
+			.click(function() {
+				$(this).parent().css('opacity', 0.5);
+				wn.call({
+					method:'utilities.page.todo.todo.delete',
+					args: {name: $(this).data('name')},
+					callback: function() {
+						erpnext.todo.refresh();
+					}
+				});
+				return false;
+			})
+	}
+});
+
+erpnext.todo.make_dialog = function(det) {
+	if(!erpnext.todo.dialog) {
+		var dialog = new wn.widgets.Dialog();
+		dialog.make({
+			width: 480,
+			title: 'To Do', 
+			fields: [
+				{fieldtype:'Date', fieldname:'date', label:'Event Date', reqd:1},
+				{fieldtype:'Text', fieldname:'description', label:'Description', reqd:1},
+				{fieldtype:'Check', fieldname:'checked', label:'Completed'},
+				{fieldtype:'Select', fieldname:'priority', label:'Priority', reqd:1, 'options':['Medium','High','Low'].join('\n')},
+				{fieldtype:'Button', fieldname:'save', label:'Save'}
+			]
+		});
+		
+		dialog.fields_dict.save.input.onclick = function() {
+			erpnext.todo.save(this);	
+		}
+		erpnext.todo.dialog = dialog;
+	}
+
+	if(det) {
+		erpnext.todo.dialog.set_values({
+			date: det.date,
+			priority: det.priority,
+			description: det.description,
+			checked: det.checked
+		});
+		erpnext.todo.dialog.det = det;		
+	}
+	erpnext.todo.dialog.show();
+	
+}
+
+erpnext.todo.save = function(btn) {
+	var d = erpnext.todo.dialog;
+	var det = d.get_values();
+	
+	if(!det) {
+	 	return;
+	}
+	
+	det.name = d.det.name || '';
+	wn.call({
+		method:'utilities.page.todo.todo.edit',
+		args: det,
+		btn: btn,
+		callback: function() {
+			erpnext.todo.dialog.hide();
+			erpnext.todo.refresh();
+		}
+	});
+}
+
+wn.pages.todo.onload = function() {
+	// load todos
+	erpnext.todo.refresh();
+}
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.py b/erpnext/utilities/page/todo/todo.py
new file mode 100644
index 0000000..c10809e
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.py
@@ -0,0 +1,46 @@
+import webnotes
+from webnotes.model.doc import Document
+
+@webnotes.whitelist()
+def get(arg=None):
+	"""get todo list"""
+	return webnotes.conn.sql("""select name, owner, description, date,
+		priority, checked, reference_type, reference_name, assigned_by
+		from `tabToDo Item` where owner=%s 
+		order by field(priority, 'High', 'Medium', 'Low') asc, date asc""",
+		webnotes.session['user'], as_dict=1)
+
+@webnotes.whitelist()		
+def edit(arg=None):
+	args = webnotes.form_dict
+
+	d = Document('ToDo Item', args.get('name') or None)
+	d.description = args['description']
+	d.date = args['date']
+	d.priority = args['priority']
+	d.checked = args.get('checked', 0)
+	d.owner = webnotes.session['user']
+	d.save(not args.get('name') and 1 or 0)
+
+	if args.get('name') and d.checked:
+		notify_assignment(d)
+
+	return d.name
+
+@webnotes.whitelist()
+def delete(arg=None):
+	name = webnotes.form_dict['name']
+	d = Document('ToDo Item', name)
+	if d and d.name:
+		notify_assignment(d)
+	webnotes.conn.sql("delete from `tabToDo Item` where name = %s", name)
+
+def notify_assignment(d):
+	doc_type = d.reference_type
+	doc_name = d.reference_name
+	assigned_by = d.assigned_by
+	
+	if doc_type and doc_name and assigned_by:
+		from webnotes.widgets.form import assign_to
+		assign_to.notify_assignment(assigned_by, d.owner, doc_type, doc_name)
+		
\ No newline at end of file
diff --git a/erpnext/utilities/page/todo/todo.txt b/erpnext/utilities/page/todo/todo.txt
new file mode 100644
index 0000000..7310906
--- /dev/null
+++ b/erpnext/utilities/page/todo/todo.txt
@@ -0,0 +1,28 @@
+# Page, todo
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-23 13:59:03',
+		'docstatus': 0,
+		'modified': '2012-02-23 13:59:03',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Utilities',
+		'name': '__common__',
+		'page_name': u'todo',
+		'standard': u'Yes',
+		'title': u'To Do'
+	},
+
+	# Page, todo
+	{
+		'doctype': 'Page',
+		'name': u'todo'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/utilities/page/trash/trash.js b/erpnext/utilities/page/trash/trash.js
index a1b44d4..b30626d 100644
--- a/erpnext/utilities/page/trash/trash.js
+++ b/erpnext/utilities/page/trash/trash.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_Trash'] = function() {
 
   // header and toolbar
diff --git a/erpnext/utilities/page/wip_monitor/wip_monitor.js b/erpnext/utilities/page/wip_monitor/wip_monitor.js
index f5a2a62..9e7bdd0 100644
--- a/erpnext/utilities/page/wip_monitor/wip_monitor.js
+++ b/erpnext/utilities/page/wip_monitor/wip_monitor.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript['onload_WIP Monitor'] = function(){
 	wip = new WIP_Monitor();
 
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 7cb7479..b78bed1 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.utils import load_json, cint, cstr, flt, get_defaults
 from webnotes.model.doc import Document, addchild, removechild, getchildren
diff --git a/erpnext/website/css/website.css b/erpnext/website/css/website.css
index 9fd7f12..693b8fb 100644
--- a/erpnext/website/css/website.css
+++ b/erpnext/website/css/website.css
@@ -1,8 +1,3 @@
-#body_div {
-	width: 900px;
-	margin: auto;
-}
-
 .layout_wrapper {
 	padding: 20px;
 }
@@ -30,15 +25,6 @@
 	margin-bottom: 9px;
 }
 
-footer {
-	width: 900px;
-	margin: auto;
-}
-header .topbar .container {
-	width: 900px;
-	margin: auto;
-}
-
 .web-content input[type="text"], .web-content input[type="password"], .web-content select {
 	min-width: 180px;
 }
diff --git a/erpnext/website/doctype/about_us_settings/about_us_settings.py b/erpnext/website/doctype/about_us_settings/about_us_settings.py
index 770f1d2..d3cca17 100644
--- a/erpnext/website/doctype/about_us_settings/about_us_settings.py
+++ b/erpnext/website/doctype/about_us_settings/about_us_settings.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 generate html
 """
diff --git a/erpnext/website/doctype/blog/blog.py b/erpnext/website/doctype/blog/blog.py
index 5e50327..1f1b98b 100644
--- a/erpnext/website/doctype/blog/blog.py
+++ b/erpnext/website/doctype/blog/blog.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 record of files
 
@@ -23,10 +39,10 @@
 		from jinja2 import Template
 		import markdown2
 		import os
-		from webnotes.utils import global_date_format, get_full_name
+		from webnotes.utils import global_date_format, get_fullname
 		
 		self.doc.content_html = markdown2.markdown(self.doc.content or '')
-		self.doc.full_name = get_full_name(self.doc.owner)
+		self.doc.full_name = get_fullname(self.doc.owner)
 		self.doc.updated = global_date_format(self.doc.modified)
 		
 		with open(os.path.join(os.path.dirname(__file__), 'template.html'), 'r') as f:
diff --git a/erpnext/website/doctype/blog/blog_page.js b/erpnext/website/doctype/blog/blog_page.js
index d8c4076..76cbf81 100644
--- a/erpnext/website/doctype/blog/blog_page.js
+++ b/erpnext/website/doctype/blog/blog_page.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // js inside blog page
 
 pscript['onload_{{ doc.name }}'] = function(wrapper) {
diff --git a/erpnext/website/doctype/contact_us_settings/contact_us_settings.py b/erpnext/website/doctype/contact_us_settings/contact_us_settings.py
index d2fc3c4..9914ade 100644
--- a/erpnext/website/doctype/contact_us_settings/contact_us_settings.py
+++ b/erpnext/website/doctype/contact_us_settings/contact_us_settings.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 """
 generate html
 """
diff --git a/erpnext/website/doctype/product/product.js b/erpnext/website/doctype/product/product.js
index c0b507e..ebdc90a 100644
--- a/erpnext/website/doctype/product/product.js
+++ b/erpnext/website/doctype/product/product.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 $.extend(cur_frm.cscript, {
 	onload: function() {
 		cur_frm.add_fetch('item', 'description', 'short_description');
diff --git a/erpnext/website/doctype/product/product.py b/erpnext/website/doctype/product/product.py
index 223a790..4abddc0 100644
--- a/erpnext/website/doctype/product/product.py
+++ b/erpnext/website/doctype/product/product.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 class DocType:
diff --git a/erpnext/website/doctype/product/product_page.js b/erpnext/website/doctype/product/product_page.js
index 35359cc..0f0c56b 100644
--- a/erpnext/website/doctype/product/product_page.js
+++ b/erpnext/website/doctype/product/product_page.js
@@ -1,3 +1,19 @@
+// 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.require('erpnext/website/js/product_category.js');
 
 pscript["onload_{{ doc.page_name }}"] = function(wrapper) {
diff --git a/erpnext/website/doctype/products_settings/products_settings.py b/erpnext/website/doctype/products_settings/products_settings.py
index 118ba4f..23c247d 100644
--- a/erpnext/website/doctype/products_settings/products_settings.py
+++ b/erpnext/website/doctype/products_settings/products_settings.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 class DocType:
diff --git a/erpnext/website/doctype/style_settings/style_settings.js b/erpnext/website/doctype/style_settings/style_settings.js
index 95c4143..0d0bf9e 100644
--- a/erpnext/website/doctype/style_settings/style_settings.js
+++ b/erpnext/website/doctype/style_settings/style_settings.js
@@ -1,3 +1,19 @@
+// 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.require('lib/js/lib/jscolor/jscolor.js');
 
 cur_frm.cscript.onload_post_render = function() {
diff --git a/erpnext/website/doctype/style_settings/style_settings.py b/erpnext/website/doctype/style_settings/style_settings.py
index 4aefbf6..83961e0 100644
--- a/erpnext/website/doctype/style_settings/style_settings.py
+++ b/erpnext/website/doctype/style_settings/style_settings.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 class DocType:
 	def __init__(self, d, dl):
 		self.doc, self.doclist = d, dl
diff --git a/erpnext/website/doctype/web_page/web_page.py b/erpnext/website/doctype/web_page/web_page.py
index 6d64c7d..6b0f074 100644
--- a/erpnext/website/doctype/web_page/web_page.py
+++ b/erpnext/website/doctype/web_page/web_page.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 import website.utils
 
diff --git a/erpnext/website/doctype/website_settings/website_settings.js b/erpnext/website/doctype/website_settings/website_settings.js
index 9aaba62..cbed609 100644
--- a/erpnext/website/doctype/website_settings/website_settings.js
+++ b/erpnext/website/doctype/website_settings/website_settings.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // update parent select
 
 $.extend(cur_frm.cscript, {
diff --git a/erpnext/website/doctype/website_settings/website_settings.py b/erpnext/website/doctype/website_settings/website_settings.py
index fb30f7b..53bf6c8 100644
--- a/erpnext/website/doctype/website_settings/website_settings.py
+++ b/erpnext/website/doctype/website_settings/website_settings.py
@@ -1,3 +1,19 @@
+# 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/>.
+
 class DocType:
 	def __init__(self, d, dl):
 		self.doc, self.doclist = d, dl
diff --git a/erpnext/website/js/product_category.js b/erpnext/website/js/product_category.js
index 076578a..9e0c7f0 100644
--- a/erpnext/website/js/product_category.js
+++ b/erpnext/website/js/product_category.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 // make sidelisting of categories
 erpnext.product_item_group = {}
 
diff --git a/erpnext/website/js/topbar.js b/erpnext/website/js/topbar.js
index 8b70d1e..90ad3e8 100644
--- a/erpnext/website/js/topbar.js
+++ b/erpnext/website/js/topbar.js
@@ -1,4 +1,20 @@
-wn.provide('erpnext.topbar');
+// 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.provide('erpnext.navbar');
 
 /*
 <li class="dropdown">\
@@ -8,22 +24,22 @@
 </li>\
 */
 
-erpnext.topbar.TopBar = Class.extend({
+erpnext.navbar.navbar = Class.extend({
 	init: function() {
 		this.make();
 		$('.brand').html(wn.boot.website_settings.brand_html);
 		this.make_items();
-		$('.topbar').dropdown();
+		$('.dropdown-toggle').dropdown();
 	},
 	make: function() {
-		$('header').append('<div class="topbar">\
-			<div class="topbar-inner">\
+		$('header').append('<div class="navbar navbar-fixed-top">\
+			<div class="navbar-inner">\
 			<div class="container">\
 				<a class="brand">[brand]</a>\
 				<ul class="nav">\
 				</ul>\
 				<img src="lib/images/ui/spinner.gif" id="spinner"/>\
-				<ul class="nav secondary-nav">\
+				<ul class="nav pull-right">\
 					<li><a href="#!Login Page">Login</a></li>\
 				</ul>\
 			</div>\
@@ -52,7 +68,13 @@
 				$parent_li = $(repl('header li[data-label="%(parent_label)s"]', item));
 				if(!$parent_li.hasClass('dropdown')) {
 					$parent_li.addClass('dropdown');
-					$parent_li.find('a:first').addClass('dropdown-toggle');
+					$parent_li.find('a:first').addClass('dropdown-toggle')
+						.attr('data-toggle', 'dropdown')
+						.attr('href', '')
+						.append('<b class="caret"></b>')
+						.click(function() {
+							return false;
+						});
 					$parent_li.append('<ul class="dropdown-menu"></ul>');
 				}
 				item.route = item.url || item.custom_page;
@@ -91,5 +113,5 @@
 
 $(document).bind('startup', function() {
 	erpnext.footer = new erpnext.Footer();
-	erpnext.topbar.topbar = new erpnext.topbar.TopBar();	
+	erpnext.navbar.navbar = new erpnext.navbar.navbar();	
 })
diff --git a/erpnext/website/page/blog/blog.js b/erpnext/website/page/blog/blog.js
index 9e89acd..9ca7392 100644
--- a/erpnext/website/page/blog/blog.js
+++ b/erpnext/website/page/blog/blog.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 
 pscript.onload_blog = function(wrapper) {
 	wrapper.blog_list = new wn.widgets.Listing({
diff --git a/erpnext/website/page/blog/blog.py b/erpnext/website/page/blog/blog.py
index 2773624..9790114 100644
--- a/erpnext/website/page/blog/blog.py
+++ b/erpnext/website/page/blog/blog.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 @webnotes.whitelist()
diff --git a/erpnext/website/page/contact/contact.js b/erpnext/website/page/contact/contact.js
index e05023b..c794325 100644
--- a/erpnext/website/page/contact/contact.js
+++ b/erpnext/website/page/contact/contact.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript.onload_contact = function(wrapper) {
 	$('#content-contact-us .btn.primary').click(function() {
 		var me = this;
diff --git a/erpnext/website/page/contact/contact.py b/erpnext/website/page/contact/contact.py
index a8a9133..1ee3ab9 100644
--- a/erpnext/website/page/contact/contact.py
+++ b/erpnext/website/page/contact/contact.py
@@ -1,3 +1,19 @@
+# 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 json, webnotes
 
 @webnotes.whitelist(allow_guest=True)
diff --git a/erpnext/website/page/products/products.js b/erpnext/website/page/products/products.js
index 4877eee..7af551e 100644
--- a/erpnext/website/page/products/products.js
+++ b/erpnext/website/page/products/products.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 erpnext.products = {}
 
 wn.require('erpnext/website/js/product_category.js');
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.js b/erpnext/website/page/unsubscribe/unsubscribe.js
index 7cbed37..9e83020 100644
--- a/erpnext/website/page/unsubscribe/unsubscribe.js
+++ b/erpnext/website/page/unsubscribe/unsubscribe.js
@@ -1,3 +1,19 @@
+// 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/>.
+
 pscript.onload_unsubscribe = function(wrapper) {
 	var email = window.location.hash.split('/').splice(-1);
 	$(wrapper).find('input[name="unsubscribe"]').val(email)
diff --git a/erpnext/website/page/unsubscribe/unsubscribe.py b/erpnext/website/page/unsubscribe/unsubscribe.py
index c310c61..9985ded 100644
--- a/erpnext/website/page/unsubscribe/unsubscribe.py
+++ b/erpnext/website/page/unsubscribe/unsubscribe.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 
 @webnotes.whitelist()
diff --git a/erpnext/setup/doctype/role/__init__.py b/erpnext/website/page/website_home/__init__.py
similarity index 100%
copy from erpnext/setup/doctype/role/__init__.py
copy to erpnext/website/page/website_home/__init__.py
diff --git a/erpnext/website/page/website_home/website_home.html b/erpnext/website/page/website_home/website_home.html
new file mode 100644
index 0000000..747ca5a
--- /dev/null
+++ b/erpnext/website/page/website_home/website_home.html
@@ -0,0 +1,52 @@
+<div class="layout-wrapper layout-wrapper-background">
+	<div class="layout-main-section">
+		<a class="close" onclick="window.history.back();">&times;</a>
+		<h1>Support</h1>
+		<hr>
+		<div style="width: 48%; float: left;">
+			<h4><a ahref="#!List/Web Page">Web Page</a></h4>
+			<p class="help">Static (content) web page</p>
+			<h4><a href="#!List/Product">Product</a></h4>
+			<p class="help">Product listed in catolog</p>
+			<h4><a href="#!List/Blog">Blog</a></h4>
+			<p class="help">Weblog (blog) entry</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!Form/Website Settings/Website Settings">Website Settings</a></h4>
+			<p class="help">Setup of top navigation bar, footer and logo</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!Form/Style Settings/Style Settings">Style Settings</a></h4>
+			<p class="help">Setup of fonts and background</p>
+		</div>
+		<div style="width: 48%; float: right;">
+			<h4><a href="#!Form/Products Settings/Products Settings">Products Settings</a></h4>
+			<p class="help">Setup product categories</p>
+		</div>
+		<div style="clear: both"></div>
+		<hr>
+		<h3>Reports</h3>
+		<div class="reports-list"></div>
+	</div>
+	<div class="layout-side-section">
+		<div class="psidebar">
+			<div class="section">
+				<div class="section-head">Tools</div>
+				<div class="section-body">
+					<div class="section-item">
+						<a class="section-link" 
+							title = "About Us page"
+							href="#!Form/About Us Settings/About Us Settings">About Us Settings</a>
+					</div>
+					<div class="section-item">
+						<a class="section-link" 
+							title = "Contact Us page"
+							href="#!Form/Contact Us Settings/Contact Us Settings">Contact Us Settings</a>
+					</div>
+				</div>
+			</div>
+		</div>
+
+	</div>
+	<div style="clear: both;"></div>
+</div>
\ No newline at end of file
diff --git a/erpnext/website/page/website_home/website_home.js b/erpnext/website/page/website_home/website_home.js
new file mode 100644
index 0000000..ec6053f
--- /dev/null
+++ b/erpnext/website/page/website_home/website_home.js
@@ -0,0 +1,19 @@
+// 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/>.
+
+pscript['onload_website-home'] = function(wrapper) {
+	erpnext.module_page.setup_page('Website', wrapper);
+}
\ No newline at end of file
diff --git a/erpnext/website/page/website_home/website_home.txt b/erpnext/website/page/website_home/website_home.txt
new file mode 100644
index 0000000..a9af308
--- /dev/null
+++ b/erpnext/website/page/website_home/website_home.txt
@@ -0,0 +1,28 @@
+# Page, website-home
+[
+
+	# These values are common in all dictionaries
+	{
+		'creation': '2012-02-21 13:23:51',
+		'docstatus': 0,
+		'modified': '2012-02-21 13:23:51',
+		'modified_by': u'Administrator',
+		'owner': u'Administrator'
+	},
+
+	# These values are common for all Page
+	{
+		'doctype': 'Page',
+		'module': u'Website',
+		'name': '__common__',
+		'page_name': u'website-home',
+		'standard': u'Yes',
+		'title': u'Website Home'
+	},
+
+	# Page, website-home
+	{
+		'doctype': 'Page',
+		'name': u'website-home'
+	}
+]
\ No newline at end of file
diff --git a/erpnext/website/utils.py b/erpnext/website/utils.py
index 66be4d2..971b0bc 100644
--- a/erpnext/website/utils.py
+++ b/erpnext/website/utils.py
@@ -1,3 +1,19 @@
+# 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 webnotes
 from webnotes.model.doc import Document
 
diff --git a/images/sprite-desktop.png b/images/sprite-desktop.png
new file mode 100644
index 0000000..cb8fc6e
--- /dev/null
+++ b/images/sprite-desktop.png
Binary files differ
diff --git a/index.cgi b/index.cgi
index 686ce05..e7a1d57 100755
--- a/index.cgi
+++ b/index.cgi
@@ -1,5 +1,21 @@
 #!/usr/bin/python
-# main handler file
+
+# 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 cgi, cgitb, os, sys
 cgitb.enable()
diff --git a/js/all-app.js b/js/all-app.js
index e04e361..952f248 100644
--- a/js/all-app.js
+++ b/js/all-app.js
Binary files differ
diff --git a/js/all-web.js b/js/all-web.js
index f12d3d1..b759ec0 100644
--- a/js/all-web.js
+++ b/js/all-web.js
@@ -1,24 +1,10 @@
 
 /*
  *	lib/js/lib/jquery.min.js
- *//*!
- * jQuery JavaScript Library v1.6.2
- * http://jquery.com/
- *
- * Copyright 2011, John Resig
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- * Copyright 2011, The Dojo Foundation
- * Released under the MIT, BSD, and GPL Licenses.
- *
- * Date: Thu Jun 30 14:16:56 2011 -0400
- */
-(function(a,b){function cv(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cs(a){if(!cg[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ch||(ch=c.createElement("iframe"),ch.frameBorder=ch.width=ch.height=0),b.appendChild(ch);if(!ci||!ch.createElement)ci=(ch.contentWindow||ch.contentDocument).document,ci.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),ci.close();d=ci.createElement(a),ci.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ch)}cg[a]=e}return cg[a]}function cr(a,b){var c={};f.each(cm.concat.apply([],cm.slice(0,b)),function(){c[this]=a});return c}function cq(){cn=b}function cp(){setTimeout(cq,0);return cn=f.now()}function cf(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ce(){try{return new a.XMLHttpRequest}catch(b){}}function b$(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function bZ(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function bY(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bC.test(a)?d(a,e):bY(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)bY(a+"["+e+"]",b[e],c,d);else d(a,b)}function bX(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bR,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bX(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bX(a,c,d,e,"*",g));return l}function bW(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bN),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bA(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bv:bw;if(d>0){c!=="border"&&f.each(e,function(){c||(d-=parseFloat(f.css(a,"padding"+this))||0),c==="margin"?d+=parseFloat(f.css(a,c+this))||0:d-=parseFloat(f.css(a,"border"+this+"Width"))||0});return d+"px"}d=bx(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0,c&&f.each(e,function(){d+=parseFloat(f.css(a,"padding"+this))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+this+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+this))||0)});return d+"px"}function bm(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(be,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bl(a){f.nodeName(a,"input")?bk(a):"getElementsByTagName"in a&&f.grep(a.getElementsByTagName("input"),bk)}function bk(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bj(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function bi(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bh(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c=f.expando,d=f.data(a),e=f.data(b,d);if(d=d[c]){var g=d.events;e=e[c]=f.extend({},d);if(g){delete e.handle,e.events={};for(var h in g)for(var i=0,j=g[h].length;i<j;i++)f.event.add(b,h+(g[h][i].namespace?".":"")+g[h][i].namespace,g[h][i],g[h][i].data)}}}}function bg(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function W(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(R.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function V(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function N(a,b){return(a&&a!=="*"?a+".":"")+b.replace(z,"`").replace(A,"&")}function M(a){var b,c,d,e,g,h,i,j,k,l,m,n,o,p=[],q=[],r=f._data(this,"events");if(!(a.liveFired===this||!r||!r.live||a.target.disabled||a.button&&a.type==="click")){a.namespace&&(n=new RegExp("(^|\\.)"+a.namespace.split(".").join("\\.(?:.*\\.)?")+"(\\.|$)")),a.liveFired=this;var s=r.live.slice(0);for(i=0;i<s.length;i++)g=s[i],g.origType.replace(x,"")===a.type?q.push(g.selector):s.splice(i--,1);e=f(a.target).closest(q,a.currentTarget);for(j=0,k=e.length;j<k;j++){m=e[j];for(i=0;i<s.length;i++){g=s[i];if(m.selector===g.selector&&(!n||n.test(g.namespace))&&!m.elem.disabled){h=m.elem,d=null;if(g.preType==="mouseenter"||g.preType==="mouseleave")a.type=g.preType,d=f(a.relatedTarget).closest(g.selector)[0],d&&f.contains(h,d)&&(d=h);(!d||d!==h)&&p.push({elem:h,handleObj:g,level:m.level})}}}for(j=0,k=p.length;j<k;j++){e=p[j];if(c&&e.level>c)break;a.currentTarget=e.elem,a.data=e.handleObj.data,a.handleObj=e.handleObj,o=e.handleObj.origHandler.apply(e.elem,arguments);if(o===!1||a.isPropagationStopped()){c=e.level,o===!1&&(b=!1);if(a.isImmediatePropagationStopped())break}}return b}}function K(a,c,d){var e=f.extend({},d[0]);e.type=a,e.originalEvent={},e.liveFired=b,f.event.handle.call(c,e),e.isDefaultPrevented()&&d[0].preventDefault()}function E(){return!0}function D(){return!1}function m(a,c,d){var e=c+"defer",g=c+"queue",h=c+"mark",i=f.data(a,e,b,!0);i&&(d==="queue"||!f.data(a,g,b,!0))&&(d==="mark"||!f.data(a,h,b,!0))&&setTimeout(function(){!f.data(a,g,b,!0)&&!f.data(a,h,b,!0)&&(f.removeData(a,e,!0),i.resolve())},0)}function l(a){for(var b in a)if(b!=="toJSON")return!1;return!0}function k(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(j,"$1-$2").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNaN(d)?i.test(d)?f.parseJSON(d):d:parseFloat(d)}catch(g){}f.data(a,c,d)}else d=b}return d}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/\d/,n=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,o=/^[\],:{}\s]*$/,p=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,q=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/(webkit)[ \/]([\w.]+)/,t=/(opera)(?:.*version)?[ \/]([\w.]+)/,u=/(msie) ([\w.]+)/,v=/(mozilla)(?:.*? rv:([\w.]+))?/,w=/-([a-z])/ig,x=function(a,b){return b.toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=n.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.6.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.done(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.resolveWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").unbind("ready")}},bindReady:function(){if(!A){A=e._Deferred();if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNaN:function(a){return a==null||!m.test(a)||isNaN(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1;var c;for(c in a);return c===b||D.call(a,c)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw a},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(o.test(b.replace(p,"@").replace(q,"]").replace(r,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(b,c,d){a.DOMParser?(d=new DOMParser,c=d.parseFromString(b,"text/xml")):(c=new ActiveXObject("Microsoft.XMLDOM"),c.async="false",c.loadXML(b)),d=c.documentElement,(!d||!d.nodeName||d.nodeName==="parsererror")&&e.error("Invalid XML: "+b);return c},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b){if(H)return H.call(b,a);for(var c=0,d=b.length;c<d;c++)if(b[c]===a)return c;return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=s.exec(a)||t.exec(a)||u.exec(a)||a.indexOf("compatible")<0&&v.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g="done fail isResolved isRejected promise then always pipe".split(" "),h=[].slice;f.extend({_Deferred:function(){var a=[],b,c,d,e={done:function(){if(!d){var c=arguments,g,h,i,j,k;b&&(k=b,b=0);for(g=0,h=c.length;g<h;g++)i=c[g],j=f.type(i),j==="array"?e.done.apply(e,i):j==="function"&&a.push(i);k&&e.resolveWith(k[0],k[1])}return this},resolveWith:function(e,f){if(!d&&!b&&!c){f=f||[],c=1;try{while(a[0])a.shift().apply(e,f)}finally{b=[e,f],c=0}}return this},resolve:function(){e.resolveWith(this,arguments);return this},isResolved:function(){return!!c||!!b},cancel:function(){d=1,a=[];return this}};return e},Deferred:function(a){var b=f._Deferred(),c=f._Deferred(),d;f.extend(b,{then:function(a,c){b.done(a).fail(c);return this},always:function(){return b.done.apply(b,arguments).fail.apply(this,arguments)},fail:c.done,rejectWith:c.resolveWith,reject:c.resolve,isRejected:c.isResolved,pipe:function(a,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[c,"reject"]},function(a,c){var e=c[0],g=c[1],h;f.isFunction(e)?b[a](function(){h=e.apply(this,arguments),h&&f.isFunction(h.promise)?h.promise().then(d.resolve,d.reject):d[g](h)}):b[a](d[g])})}).promise()},promise:function(a){if(a==null){if(d)return d;d=a={}}var c=g.length;while(c--)a[g[c]]=b[g[c]];return a}}),b.done(c.cancel).fail(b.cancel),delete b.cancel,a&&a.call(b,b);return b},when:function(a){function i(a){return function(c){b[a]=arguments.length>1?h.call(arguments,0):c,--e||g.resolveWith(g,h.call(b,0))}}var b=arguments,c=0,d=b.length,e=d,g=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred();if(d>1){for(;c<d;c++)b[c]&&f.isFunction(b[c].promise)?b[c].promise().then(i(c),g.reject):--e;e||g.resolveWith(g,b)}else g!==a&&g.resolveWith(g,d?[a]:[]);return g.promise()}}),f.support=function(){var a=c.createElement("div"),b=c.documentElement,d,e,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u;a.setAttribute("className","t"),a.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=a.getElementsByTagName("*"),e=a.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=a.getElementsByTagName("input")[0],k={leadingWhitespace:a.firstChild.nodeType===3,tbody:!a.getElementsByTagName("tbody").length,htmlSerialize:!!a.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55$/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:a.className!=="t",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,k.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,k.optDisabled=!h.disabled;try{delete a.test}catch(v){k.deleteExpando=!1}!a.addEventListener&&a.attachEvent&&a.fireEvent&&(a.attachEvent("onclick",function(){k.noCloneEvent=!1}),a.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),k.radioValue=i.value==="t",i.setAttribute("checked","checked"),a.appendChild(i),l=c.createDocumentFragment(),l.appendChild(a.firstChild),k.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,a.innerHTML="",a.style.width=a.style.paddingLeft="1px",m=c.getElementsByTagName("body")[0],o=c.createElement(m?"div":"body"),p={visibility:"hidden",width:0,height:0,border:0,margin:0},m&&f.extend(p,{position:"absolute",left:-1e3,top:-1e3});for(t in p)o.style[t]=p[t];o.appendChild(a),n=m||b,n.insertBefore(o,n.firstChild),k.appendChecked=i.checked,k.boxModel=a.offsetWidth===2,"zoom"in a.style&&(a.style.display="inline",a.style.zoom=1,k.inlineBlockNeedsLayout=a.offsetWidth===2,a.style.display="",a.innerHTML="<div style='width:4px;'></div>",k.shrinkWrapBlocks=a.offsetWidth!==2),a.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",q=a.getElementsByTagName("td"),u=q[0].offsetHeight===0,q[0].style.display="",q[1].style.display="none",k.reliableHiddenOffsets=u&&q[0].offsetHeight===0,a.innerHTML="",c.defaultView&&c.defaultView.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",a.appendChild(j),k.reliableMarginRight=(parseInt((c.defaultView.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0),o.innerHTML="",n.removeChild(o);if(a.attachEvent)for(t in{submit:1,change:1,focusin:1})s="on"+t,u=s in a,u||(a.setAttribute(s,"return;"),u=typeof a[s]=="function"),k[t+"Bubbles"]=u;o=l=g=h=m=j=a=i=null;return k}(),f.boxModel=f.support.boxModel;var i=/^(?:\{.*\}|\[.*\])$/,j=/([a-z])([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!l(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g=f.expando,h=typeof c=="string",i,j=a.nodeType,k=j?f.cache:a,l=j?a[f.expando]:a[f.expando]&&f.expando;if((!l||e&&l&&!k[l][g])&&h&&d===b)return;l||(j?a[f.expando]=l=++f.uuid:l=f.expando),k[l]||(k[l]={},j||(k[l].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?k[l][g]=f.extend(k[l][g],c):k[l]=f.extend(k[l],c);i=k[l],e&&(i[g]||(i[g]={}),i=i[g]),d!==b&&(i[f.camelCase(c)]=d);if(c==="events"&&!i[c])return i[g]&&i[g].events;return h?i[f.camelCase(c)]||i[c]:i}},removeData:function(b,c,d){if(!!f.acceptData(b)){var e=f.expando,g=b.nodeType,h=g?f.cache:b,i=g?b[f.expando]:f.expando;if(!h[i])return;if(c){var j=d?h[i][e]:h[i];if(j){delete j[c];if(!l(j))return}}if(d){delete h[i][e];if(!l(h[i]))return}var k=h[i][e];f.support.deleteExpando||h!=a?delete h[i]:h[i]=null,k?(h[i]={},g||(h[i].toJSON=f.noop),h[i][e]=k):g&&(f.support.deleteExpando?delete b[f.expando]:b.removeAttribute?b.removeAttribute(f.expando):b[f.expando]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d=null;if(typeof a=="undefined"){if(this.length){d=f.data(this[0]);if(this[0].nodeType===1){var e=this[0].attributes,g;for(var h=0,i=e.length;h<i;h++)g=e[h].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),k(this[0],g,d[g]))}}return d}if(typeof a=="object")return this.each(function(){f.data(this,a)});var j=a.split(".");j[1]=j[1]?"."+j[1]:"";if(c===b){d=this.triggerHandler("getData"+j[1]+"!",[j[0]]),d===b&&this.length&&(d=f.data(this[0],a),d=k(this[0],a,d));return d===b&&j[1]?this.data(j[0]):d}return this.each(function(){var b=f(this),d=[j[0],c];b.triggerHandler("setData"+j[1]+"!",d),f.data(this,a,c),b.triggerHandler("changeData"+j[1]+"!",d)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,c){a&&(c=(c||"fx")+"mark",f.data(a,c,(f.data(a,c,b,!0)||0)+1,!0))},_unmark:function(a,c,d){a!==!0&&(d=c,c=a,a=!1);if(c){d=d||"fx";var e=d+"mark",g=a?0:(f.data(c,e,b,!0)||1)-1;g?f.data(c,e,g,!0):(f.removeData(c,e,!0),m(c,d,"mark"))}},queue:function(a,c,d){if(a){c=(c||"fx")+"queue";var e=f.data(a,c,b,!0);d&&(!e||f.isArray(d)?e=f.data(a,c,f.makeArray(d),!0):e.push(d));return e||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e;d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),d.call(a,function(){f.dequeue(a,b)})),c.length||(f.removeData(a,b+"queue",!0),m(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(){var c=this;setTimeout(function(){f.dequeue(c,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f._Deferred(),!0))h++,l.done(m);m();return d.promise()}});var n=/[\n\t\r]/g,o=/\s+/,p=/\r/g,q=/^(?:button|input)$/i,r=/^(?:button|input|object|select|textarea)$/i,s=/^a(?:rea)?$/i,t=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,u=/\:|^on/,v,w;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(o);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(o);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(n," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(o);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ";for(var c=0,d=this.length;c<d;c++)if((" "+this[c].className+" ").replace(n," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e=this[0];if(!arguments.length){if(e){c=f.valHooks[e.nodeName.toLowerCase()]||f.valHooks[e.type];if(c&&"get"in c&&(d=c.get(e,"value"))!==b)return d;d=e.value;return typeof d=="string"?d.replace(p,""):d==null?"":d}return b}var g=f.isFunction(a);return this.each(function(d){var e=f(this),h;if(this.nodeType===1){g?h=a.call(this,d,e.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c=a.selectedIndex,d=[],e=a.options,g=a.type==="select-one";if(c<0)return null;for(var h=g?c:0,i=g?c+1:e.length;h<i;h++){var j=e[h];if(j.selected&&(f.support.optDisabled?!j.disabled:j.getAttribute("disabled")===null)&&(!j.parentNode.disabled||!f.nodeName(j.parentNode,"optgroup"))){b=f(j).val();if(g)return b;d.push(b)}}if(g&&!d.length&&e.length)return f(e[c]).val();return d},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attrFix:{tabindex:"tabIndex"},attr:function(a,c,d,e){var g=a.nodeType;if(!a||g===3||g===8||g===2)return b;if(e&&c in f.attrFn)return f(a)[c](d);if(!("getAttribute"in a))return f.prop(a,c,d);var h,i,j=g!==1||!f.isXMLDoc(a);j&&(c=f.attrFix[c]||c,i=f.attrHooks[c],i||(t.test(c)?i=w:v&&c!=="className"&&(f.nodeName(a,"form")||u.test(c))&&(i=v)));if(d!==b){if(d===null){f.removeAttr(a,c);return b}if(i&&"set"in i&&j&&(h=i.set(a,d,c))!==b)return h;a.setAttribute(c,""+d);return d}if(i&&"get"in i&&j&&(h=i.get(a,c))!==null)return h;h=a.getAttribute(c);return h===null?b:h},removeAttr:function(a,b){var c;a.nodeType===1&&(b=f.attrFix[b]||b,f.support.getSetAttribute?a.removeAttribute(b):(f.attr(a,b,""),a.removeAttributeNode(a.getAttributeNode(b))),t.test(b)&&(c=f.propFix[b]||b)in a&&(a[c]=!1))},attrHooks:{type:{set:function(a,b){if(q.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},tabIndex:{get:function(a){var c=a.getAttributeNode("tabIndex");return c&&c.specified?parseInt(c.value,10):r.test(a.nodeName)||s.test(a.nodeName)&&a.href?0:b}},value:{get:function(a,b){if(v&&f.nodeName(a,"button"))return v.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(v&&f.nodeName(a,"button"))return v.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e=a.nodeType;if(!a||e===3||e===8||e===2)return b;var g,h,i=e!==1||!f.isXMLDoc(a);i&&(c=f.propFix[c]||c,h=f.propHooks[c]);return d!==b?h&&"set"in h&&(g=h.set(a,d,c))!==b?g:a[c]=d:h&&"get"in h&&(g=h.get(a,c))!==b?g:a[c]},propHooks:{}}),w={get:function(a,c){return f.prop(a,c)?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},f.support.getSetAttribute||(f.attrFix=f.propFix,v=f.attrHooks.name=f.attrHooks.title=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&d.nodeValue!==""?d.nodeValue:b},set:function(a,b,c){var d=a.getAttributeNode(c);if(d){d.nodeValue=b;return b}}},f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})})),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex)}})),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var x=/\.(.*)$/,y=/^(?:textarea|input|select)$/i,z=/\./g,A=/ /g,B=/[^\w\s.|`]/g,C=function(a){return a.replace(B,"\\$&")};f.event={add:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){if(d===!1)d=D;else if(!d)return;var g,h;d.handler&&(g=d,d=g.handler),d.guid||(d.guid=f.guid++);var i=f._data(a);if(!i)return;var j=i.events,k=i.handle;j||(i.events=j={}),k||(i.handle=k=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.handle.apply(k.elem,arguments):b}),k.elem=a,c=c.split(" ");var l,m=0,n;while(l=c[m++]){h=g?f.extend({},g):{handler:d,data:e},l.indexOf(".")>-1?(n=l.split("."),l=n.shift(),h.namespace=n.slice(0).sort().join(".")):(n=[],h.namespace=""),h.type=l,h.guid||(h.guid=d.guid);var o=j[l],p=f.event.special[l]||{};if(!o){o=j[l]=[];if(!p.setup||p.setup.call(a,e,n,k)===!1)a.addEventListener?a.addEventListener(l,k,!1):a.attachEvent&&a.attachEvent("on"+l,k)}p.add&&(p.add.call(a,h),h.handler.guid||(h.handler.guid=d.guid)),o.push(h),f.event.global[l]=!0}a=null}},global:{},remove:function(a,c,d,e){if(a.nodeType!==3&&a.nodeType!==8){d===!1&&(d=D);var g,h,i,j,k=0,l,m,n,o,p,q,r,s=f.hasData(a)&&f._data(a),t=s&&s.events;if(!s||!t)return;c&&c.type&&(d=c.handler,c=c.type);if(!c||typeof c=="string"&&c.charAt(0)==="."){c=c||"";for(h in t)f.event.remove(a,h+c);return}c=c.split(" ");while(h=c[k++]){r=h,q=null,l=h.indexOf(".")<0,m=[],l||(m=h.split("."),h=m.shift(),n=new RegExp("(^|\\.)"+f.map(m.slice(0).sort(),C).join("\\.(?:.*\\.)?")+"(\\.|$)")),p=t[h];if(!p)continue;if(!d){for(j=0;j<p.length;j++){q=p[j];if(l||n.test(q.namespace))f.event.remove(a,r,q.handler,j),p.splice(j--,1)}continue}o=f.event.special[h]||{};for(j=e||0;j<p.length;j++){q=p[j];if(d.guid===q.guid){if(l||n.test(q.namespace))e==null&&p.splice(j--,1),o.remove&&o.remove.call(a,q);if(e!=null)break}}if(p.length===0||e!=null&&p.length===1)(!o.teardown||o.teardown.call(a,m)===!1)&&f.removeEvent(a,h,s.handle),g=null,delete t[h]}if(f.isEmptyObject(t)){var u=s.handle;u&&(u.elem=null),delete s.events,delete s.handle,f.isEmptyObject(s)&&f.removeData(a,b,!0)}}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){var h=c.type||c,i=[],j;h.indexOf("!")>=0&&(h=h.slice(0,-1),j=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.
-shift(),i.sort());if(!!e&&!f.event.customEvent[h]||!!f.event.global[h]){c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.exclusive=j,c.namespace=i.join("."),c.namespace_re=new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)");if(g||!e)c.preventDefault(),c.stopPropagation();if(!e){f.each(f.cache,function(){var a=f.expando,b=this[a];b&&b.events&&b.events[h]&&f.event.trigger(c,d,b.handle.elem)});return}if(e.nodeType===3||e.nodeType===8)return;c.result=b,c.target=e,d=d!=null?f.makeArray(d):[],d.unshift(c);var k=e,l=h.indexOf(":")<0?"on"+h:"";do{var m=f._data(k,"handle");c.currentTarget=k,m&&m.apply(k,d),l&&f.acceptData(k)&&k[l]&&k[l].apply(k,d)===!1&&(c.result=!1,c.preventDefault()),k=k.parentNode||k.ownerDocument||k===c.target.ownerDocument&&a}while(k&&!c.isPropagationStopped());if(!c.isDefaultPrevented()){var n,o=f.event.special[h]||{};if((!o._default||o._default.call(e.ownerDocument,c)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)){try{l&&e[h]&&(n=e[l],n&&(e[l]=null),f.event.triggered=h,e[h]())}catch(p){}n&&(e[l]=n),f.event.triggered=b}}return c.result}},handle:function(c){c=f.event.fix(c||a.event);var d=((f._data(this,"events")||{})[c.type]||[]).slice(0),e=!c.exclusive&&!c.namespace,g=Array.prototype.slice.call(arguments,0);g[0]=c,c.currentTarget=this;for(var h=0,i=d.length;h<i;h++){var j=d[h];if(e||c.namespace_re.test(j.namespace)){c.handler=j.handler,c.data=j.data,c.handleObj=j;var k=j.handler.apply(this,g);k!==b&&(c.result=k,k===!1&&(c.preventDefault(),c.stopPropagation()));if(c.isImmediatePropagationStopped())break}}return c.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),fix:function(a){if(a[f.expando])return a;var d=a;a=f.Event(d);for(var e=this.props.length,g;e;)g=this.props[--e],a[g]=d[g];a.target||(a.target=a.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),!a.relatedTarget&&a.fromElement&&(a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement);if(a.pageX==null&&a.clientX!=null){var h=a.target.ownerDocument||c,i=h.documentElement,j=h.body;a.pageX=a.clientX+(i&&i.scrollLeft||j&&j.scrollLeft||0)-(i&&i.clientLeft||j&&j.clientLeft||0),a.pageY=a.clientY+(i&&i.scrollTop||j&&j.scrollTop||0)-(i&&i.clientTop||j&&j.clientTop||0)}a.which==null&&(a.charCode!=null||a.keyCode!=null)&&(a.which=a.charCode!=null?a.charCode:a.keyCode),!a.metaKey&&a.ctrlKey&&(a.metaKey=a.ctrlKey),!a.which&&a.button!==b&&(a.which=a.button&1?1:a.button&2?3:a.button&4?2:0);return a},guid:1e8,proxy:f.proxy,special:{ready:{setup:f.bindReady,teardown:f.noop},live:{add:function(a){f.event.add(this,N(a.origType,a.selector),f.extend({},a,{handler:M,guid:a.handler.guid}))},remove:function(a){f.event.remove(this,N(a.origType,a.selector),a)}},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}}},f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!this.preventDefault)return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?E:D):this.type=a,b&&f.extend(this,b),this.timeStamp=f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=E;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=E;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=E,this.stopPropagation()},isDefaultPrevented:D,isPropagationStopped:D,isImmediatePropagationStopped:D};var F=function(a){var b=a.relatedTarget,c=!1,d=a.type;a.type=a.data,b!==this&&(b&&(c=f.contains(this,b)),c||(f.event.handle.apply(this,arguments),a.type=d))},G=function(a){a.type=a.data,f.event.handle.apply(this,arguments)};f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={setup:function(c){f.event.add(this,b,c&&c.selector?G:F,a)},teardown:function(a){f.event.remove(this,b,a&&a.selector?G:F)}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(a,b){if(!f.nodeName(this,"form"))f.event.add(this,"click.specialSubmit",function(a){var b=a.target,c=b.type;(c==="submit"||c==="image")&&f(b).closest("form").length&&K("submit",this,arguments)}),f.event.add(this,"keypress.specialSubmit",function(a){var b=a.target,c=b.type;(c==="text"||c==="password")&&f(b).closest("form").length&&a.keyCode===13&&K("submit",this,arguments)});else return!1},teardown:function(a){f.event.remove(this,".specialSubmit")}});if(!f.support.changeBubbles){var H,I=function(a){var b=a.type,c=a.value;b==="radio"||b==="checkbox"?c=a.checked:b==="select-multiple"?c=a.selectedIndex>-1?f.map(a.options,function(a){return a.selected}).join("-"):"":f.nodeName(a,"select")&&(c=a.selectedIndex);return c},J=function(c){var d=c.target,e,g;if(!!y.test(d.nodeName)&&!d.readOnly){e=f._data(d,"_change_data"),g=I(d),(c.type!=="focusout"||d.type!=="radio")&&f._data(d,"_change_data",g);if(e===b||g===e)return;if(e!=null||g)c.type="change",c.liveFired=b,f.event.trigger(c,arguments[1],d)}};f.event.special.change={filters:{focusout:J,beforedeactivate:J,click:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(c==="radio"||c==="checkbox"||f.nodeName(b,"select"))&&J.call(this,a)},keydown:function(a){var b=a.target,c=f.nodeName(b,"input")?b.type:"";(a.keyCode===13&&!f.nodeName(b,"textarea")||a.keyCode===32&&(c==="checkbox"||c==="radio")||c==="select-multiple")&&J.call(this,a)},beforeactivate:function(a){var b=a.target;f._data(b,"_change_data",I(b))}},setup:function(a,b){if(this.type==="file")return!1;for(var c in H)f.event.add(this,c+".specialChange",H[c]);return y.test(this.nodeName)},teardown:function(a){f.event.remove(this,".specialChange");return y.test(this.nodeName)}},H=f.event.special.change.filters,H.focus=H.beforeactivate}f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){function e(a){var c=f.event.fix(a);c.type=b,c.originalEvent={},f.event.trigger(c,null,c.target),c.isDefaultPrevented()&&a.preventDefault()}var d=0;f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.each(["bind","one"],function(a,c){f.fn[c]=function(a,d,e){var g;if(typeof a=="object"){for(var h in a)this[c](h,d,a[h],e);return this}if(arguments.length===2||d===!1)e=d,d=b;c==="one"?(g=function(a){f(this).unbind(a,g);return e.apply(this,arguments)},g.guid=e.guid||f.guid++):g=e;if(a==="unload"&&c!=="one")this.one(a,d,e);else for(var i=0,j=this.length;i<j;i++)f.event.add(this[i],a,g,d);return this}}),f.fn.extend({unbind:function(a,b){if(typeof a=="object"&&!a.preventDefault)for(var c in a)this.unbind(c,a[c]);else for(var d=0,e=this.length;d<e;d++)f.event.remove(this[d],a,b);return this},delegate:function(a,b,c,d){return this.live(b,c,d,a)},undelegate:function(a,b,c){return arguments.length===0?this.unbind("live"):this.die(b,null,c,a)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f.data(this,"lastToggle"+a.guid)||0)%d;f.data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});var L={focus:"focusin",blur:"focusout",mouseenter:"mouseover",mouseleave:"mouseout"};f.each(["live","die"],function(a,c){f.fn[c]=function(a,d,e,g){var h,i=0,j,k,l,m=g||this.selector,n=g?this:f(this.context);if(typeof a=="object"&&!a.preventDefault){for(var o in a)n[c](o,d,a[o],m);return this}if(c==="die"&&!a&&g&&g.charAt(0)==="."){n.unbind(g);return this}if(d===!1||f.isFunction(d))e=d||D,d=b;a=(a||"").split(" ");while((h=a[i++])!=null){j=x.exec(h),k="",j&&(k=j[0],h=h.replace(x,""));if(h==="hover"){a.push("mouseenter"+k,"mouseleave"+k);continue}l=h,L[h]?(a.push(L[h]+k),h=h+k):h=(L[h]||h)+k;if(c==="live")for(var p=0,q=n.length;p<q;p++)f.event.add(n[p],"live."+N(h,m),{data:d,selector:m,handler:e,origType:h,origHandler:e,preType:l});else n.unbind("live."+N(h,m),e)}return this}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0)}),function(){function u(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}if(i.nodeType===1){f||(i.sizcache=c,i.sizset=g);if(typeof b!="string"){if(i===b){j=!0;break}}else if(k.filter(b,[i]).length>0){j=i;break}}i=i[a]}d[g]=j}}}function t(a,b,c,d,e,f){for(var g=0,h=d.length;g<h;g++){var i=d[g];if(i){var j=!1;i=i[a];while(i){if(i.sizcache===c){j=d[i.sizset];break}i.nodeType===1&&!f&&(i.sizcache=c,i.sizset=g);if(i.nodeName.toLowerCase()===b){j=i;break}i=i[a]}d[g]=j}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d=0,e=Object.prototype.toString,g=!1,h=!0,i=/\\/g,j=/\W/;[0,0].sort(function(){h=!1;return 0});var k=function(b,d,f,g){f=f||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return f;var i,j,n,o,q,r,s,t,u=!0,w=k.isXML(d),x=[],y=b;do{a.exec(""),i=a.exec(y);if(i){y=i[3],x.push(i[1]);if(i[2]){o=i[3];break}}}while(i);if(x.length>1&&m.exec(b))if(x.length===2&&l.relative[x[0]])j=v(x[0]+x[1],d);else{j=l.relative[x[0]]?[d]:k(x.shift(),d);while(x.length)b=x.shift(),l.relative[b]&&(b+=x.shift()),j=v(b,j)}else{!g&&x.length>1&&d.nodeType===9&&!w&&l.match.ID.test(x[0])&&!l.match.ID.test(x[x.length-1])&&(q=k.find(x.shift(),d,w),d=q.expr?k.filter(q.expr,q.set)[0]:q.set[0]);if(d){q=g?{expr:x.pop(),set:p(g)}:k.find(x.pop(),x.length===1&&(x[0]==="~"||x[0]==="+")&&d.parentNode?d.parentNode:d,w),j=q.expr?k.filter(q.expr,q.set):q.set,x.length>0?n=p(j):u=!1;while(x.length)r=x.pop(),s=r,l.relative[r]?s=x.pop():r="",s==null&&(s=d),l.relative[r](n,s,w)}else n=x=[]}n||(n=j),n||k.error(r||b);if(e.call(n)==="[object Array]")if(!u)f.push.apply(f,n);else if(d&&d.nodeType===1)for(t=0;n[t]!=null;t++)n[t]&&(n[t]===!0||n[t].nodeType===1&&k.contains(d,n[t]))&&f.push(j[t]);else for(t=0;n[t]!=null;t++)n[t]&&n[t].nodeType===1&&f.push(j[t]);else p(n,f);o&&(k(o,h,f,g),k.uniqueSort(f));return f};k.uniqueSort=function(a){if(r){g=h,a.sort(r);if(g)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},k.matches=function(a,b){return k(a,null,null,b)},k.matchesSelector=function(a,b){return k(b,null,null,[a]).length>0},k.find=function(a,b,c){var d;if(!a)return[];for(var e=0,f=l.order.length;e<f;e++){var g,h=l.order[e];if(g=l.leftMatch[h].exec(a)){var j=g[1];g.splice(1,1);if(j.substr(j.length-1)!=="\\"){g[1]=(g[1]||"").replace(i,""),d=l.find[h](g,b,c);if(d!=null){a=a.replace(l.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},k.filter=function(a,c,d,e){var f,g,h=a,i=[],j=c,m=c&&c[0]&&k.isXML(c[0]);while(a&&c.length){for(var n in l.filter)if((f=l.leftMatch[n].exec(a))!=null&&f[2]){var o,p,q=l.filter[n],r=f[1];g=!1,f.splice(1,1);if(r.substr(r.length-1)==="\\")continue;j===i&&(i=[]);if(l.preFilter[n]){f=l.preFilter[n](f,j,d,i,e,m);if(!f)g=o=!0;else if(f===!0)continue}if(f)for(var s=0;(p=j[s])!=null;s++)if(p){o=q(p,f,s,j);var t=e^!!o;d&&o!=null?t?g=!0:j[s]=!1:t&&(i.push(p),g=!0)}if(o!==b){d||(j=i),a=a.replace(l.match[n],"");if(!g)return[];break}}if(a===h)if(g==null)k.error(a);else break;h=a}return j},k.error=function(a){throw"Syntax error, unrecognized expression: "+a};var l=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!j.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&k.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!j.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&k.filter(b,a,!0)}},"":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("parentNode",b,f,a,e,c)},"~":function(a,b,c){var e,f=d++,g=u;typeof b=="string"&&!j.test(b)&&(b=b.toLowerCase(),e=b,g=t),g("previousSibling",b,f,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(i,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(i,"")},TAG:function(a,b){return a[1].replace(i,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||k.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&k.error(a[0]);a[0]=d++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(i,"");!f&&l.attrMap[g]&&(a[1]=l.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(i,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=k(b[3],null,null,c);else{var g=k.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(l.match.POS.test(b[0])||l.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!k(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=l.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||k.getText([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}k.error(e)},CHILD:function(a,b){var c=b[1],d=a;switch(c){case"only":case"first":while(d=d.previousSibling)if(d.nodeType===1)return!1;if(c==="first")return!0;d=a;case"last":while(d=d.nextSibling)if(d.nodeType===1)return!1;return!0;case"nth":var e=b[2],f=b[3];if(e===1&&f===0)return!0;var g=b[0],h=a.parentNode;if(h&&(h.sizcache!==g||!a.nodeIndex)){var i=0;for(d=h.firstChild;d;d=d.nextSibling)d.nodeType===1&&(d.nodeIndex=++i);h.sizcache=g}var j=a.nodeIndex-f;return e===0?j===0:j%e===0&&j/e>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=l.attrHandle[c]?l.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=l.setFilters[e];if(f)return f(a,c,b,d)}}},m=l.match.POS,n=function(a,b){return"\\"+(b-0+1)};for(var o in l.match)l.match[o]=new RegExp(l.match[o].source+/(?![^\[]*\])(?![^\(]*\))/.source),l.leftMatch[o]=new RegExp(/(^(?:.|\r|\n)*?)/.source+l.match[o].source.replace(/\\(\d+)/g,n));var p=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(q){p=function(a,b){var c=0,d=b||[];if(e.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var f=a.length;c<f;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var r,s;c.documentElement.compareDocumentPosition?r=function(a,b){if(a===b){g=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(r=function(a,b){if(a===b){g=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],h=a.parentNode,i=b.parentNode,j=h;if(h===i)return s(a,b);if(!h)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return s(e[k],f[k]);return k===c?s(a,f[k],-1):s(e[k],b,1)},s=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),k.getText=function(a){var b="",c;for(var d=0;a[d];d++)c=a[d],c.nodeType===3||c.nodeType===4?b+=c.nodeValue:c.nodeType!==8&&(b+=k.getText(c.childNodes));return b},function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(l.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},l.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(l.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(l.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=k,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){k=function(b,e,f,g){e=e||c;if(!g&&!k.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return p(e.getElementsByTagName(b),f);if(h[2]&&l.find.CLASS&&e.getElementsByClassName)return p(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return p([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return p([],f);if(i.id===h[3])return p([i],f)}try{return p(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var m=e,n=e.getAttribute("id"),o=n||d,q=e.parentNode,r=/^\s*[+~]/.test(b);n?o=o.replace(/'/g,"\\$&"):e.setAttribute("id",o),r&&q&&(e=e.parentNode);try{if(!r||q)return p(e.querySelectorAll("[id='"+o+"'] "+b),f)}catch(s){}finally{n||m.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)k[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}k.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!k.isXML(a))try{if(e||!l.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return k(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;l.order.splice(1,0,"CLASS"),l.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?k.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?k.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:k.contains=function(){return!1},k.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var v=function(a,b){var c,d=[],e="",f=b.nodeType?[b]:b;while(c=l.match.PSEUDO.exec(a))e+=c[0],a=a.replace(l.match.PSEUDO,"");a=l.relative[a]?a+"*":a;for(var g=0,h=f.length;g<h;g++)k(a,f[g],d);return k.filter(e,d)};f.find=k,f.expr=k.selectors,f.expr[":"]=f.expr.filters,f.unique=k.uniqueSort,f.text=k.getText,f.isXMLDoc=k.isXML,f.contains=k.contains}();var O=/Until$/,P=/^(?:parents|prevUntil|prevAll)/,Q=/,/,R=/^.[^:#\[\.,]*$/,S=Array.prototype.slice,T=f.expr.match.POS,U={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(W(this,a,!1),"not",a)},filter:function(a){return this.pushStack(W(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h,i,j={},k=1;if(g&&a.length){for(d=0,e=a.length;d<e;d++)i=a[d],j[i]||(j[i]=T.test(i)?f(i,b||this.context):i);while(g&&g.ownerDocument&&g!==b){for(i in j)h=j[i],(h.jquery?h.index(g)>-1:f(g).is(h))&&c.push({selector:i,elem:g,level:k});g=g.parentNode,k++}}return c}var l=T.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(l?l.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a||typeof a=="string")return f.inArray(this[0],a?f(a):this.parent().children());return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(V(c[0])||V(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c),g=S.call(arguments);O.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!U[a]?f.unique(e):e,(this.length>1||Q.test(d))&&P.test(a)&&(e=e.reverse());return this.pushStack(e,a,g.join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var X=/ jQuery\d+="(?:\d+|null)"/g,Y=/^\s+/,Z=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,$=/<([\w:]+)/,_=/<tbody/i,ba=/<|&#?\w+;/,bb=/<(?:script|object|embed|option|style)/i,bc=/checked\s*(?:[^=]|=\s*.checked.)/i,bd=/\/(java|ecma)script/i,be=/^\s*<!(?:\[CDATA\[|\-\-)/,bf={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};bf.optgroup=bf.option,bf.tbody=bf.tfoot=bf.colgroup=bf.caption=bf.thead,bf.th=bf.td,f.support.htmlSerialize||(bf._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){f(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f(arguments[0]).toArray());return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(X,""):null;if(typeof a=="string"&&!bb.test(a)&&(f.support.leadingWhitespace||!Y.test(a))&&!bf[($.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Z,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bc.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bg(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bm)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i;b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof a[0]=="string"&&a[0].length<512&&i===c&&a[0].charAt(0)==="<"&&!bb.test(a[0])&&(f.support.checkClone||!bc.test(a[0]))&&(g=!0,h=f.fragments[a[0]],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[a[0]]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j
-)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d=a.cloneNode(!0),e,g,h;if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bi(a,d),e=bj(a),g=bj(d);for(h=0;e[h];++h)bi(e[h],g[h])}if(b){bh(a,d);if(c){e=bj(a),g=bj(d);for(h=0;e[h];++h)bh(e[h],g[h])}}e=g=null;return d},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!ba.test(k))k=b.createTextNode(k);else{k=k.replace(Z,"<$1></$2>");var l=($.exec(k)||["",""])[1].toLowerCase(),m=bf[l]||bf._default,n=m[0],o=b.createElement("div");o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=_.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&Y.test(k)&&o.insertBefore(b.createTextNode(Y.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bl(k[i]);else bl(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||bd.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.expando,g=f.event.special,h=f.support.deleteExpando;for(var i=0,j;(j=a[i])!=null;i++){if(j.nodeName&&f.noData[j.nodeName.toLowerCase()])continue;c=j[f.expando];if(c){b=d[c]&&d[c][e];if(b&&b.events){for(var k in b.events)g[k]?f.event.remove(j,k):f.removeEvent(j,k,b.handle);b.handle&&(b.handle.elem=null)}h?delete j[f.expando]:j.removeAttribute&&j.removeAttribute(f.expando),delete d[c]}}}});var bn=/alpha\([^)]*\)/i,bo=/opacity=([^)]*)/,bp=/([A-Z]|^ms)/g,bq=/^-?\d+(?:px)?$/i,br=/^-?\d/,bs=/^[+\-]=/,bt=/[^+\-\.\de]+/g,bu={position:"absolute",visibility:"hidden",display:"block"},bv=["Left","Right"],bw=["Top","Bottom"],bx,by,bz;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bx(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d;if(h==="number"&&isNaN(d)||d==null)return;h==="string"&&bs.test(d)&&(d=+d.replace(bt,"")+parseFloat(f.css(a,c)),h="number"),h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bx)return bx(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bA(a,b,d);f.swap(a,bu,function(){e=bA(a,b,d)});return e}},set:function(a,b){if(!bq.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bo.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle;c.zoom=1;var e=f.isNaN(b)?"":"alpha(opacity="+b*100+")",g=d&&d.filter||c.filter||"";c.filter=bn.test(g)?g.replace(bn,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bx(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(by=function(a,c){var d,e,g;c=c.replace(bp,"-$1").toLowerCase();if(!(e=a.ownerDocument.defaultView))return b;if(g=e.getComputedStyle(a,null))d=g.getPropertyValue(c),d===""&&!f.contains(a.ownerDocument.documentElement,a)&&(d=f.style(a,c));return d}),c.documentElement.currentStyle&&(bz=function(a,b){var c,d=a.currentStyle&&a.currentStyle[b],e=a.runtimeStyle&&a.runtimeStyle[b],f=a.style;!bq.test(d)&&br.test(d)&&(c=f.left,e&&(a.runtimeStyle.left=a.currentStyle.left),f.left=b==="fontSize"?"1em":d||0,d=f.pixelLeft+"px",f.left=c,e&&(a.runtimeStyle.left=e));return d===""?"auto":d}),bx=by||bz,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bB=/%20/g,bC=/\[\]$/,bD=/\r?\n/g,bE=/#.*$/,bF=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bG=/^(?:color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bH=/^(?:about|app|app\-storage|.+\-extension|file|widget):$/,bI=/^(?:GET|HEAD)$/,bJ=/^\/\//,bK=/\?/,bL=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bM=/^(?:select|textarea)/i,bN=/\s+/,bO=/([?&])_=[^&]*/,bP=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bQ=f.fn.load,bR={},bS={},bT,bU;try{bT=e.href}catch(bV){bT=c.createElement("a"),bT.href="",bT=bT.href}bU=bP.exec(bT.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bQ)return bQ.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bL,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bM.test(this.nodeName)||bG.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bD,"\r\n")}}):{name:b.name,value:c.replace(bD,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.bind(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?f.extend(!0,a,f.ajaxSettings,b):(b=a,a=f.extend(!0,f.ajaxSettings,b));for(var c in{context:1,url:1})c in b?a[c]=b[c]:c in f.ajaxSettings&&(a[c]=f.ajaxSettings[c]);return a},ajaxSettings:{url:bT,isLocal:bH.test(bU[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":"*/*"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML}},ajaxPrefilter:bW(bR),ajaxTransport:bW(bS),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a?4:0;var o,r,u,w=l?bZ(d,v,l):b,x,y;if(a>=200&&a<300||a===304){if(d.ifModified){if(x=v.getResponseHeader("Last-Modified"))f.lastModified[k]=x;if(y=v.getResponseHeader("Etag"))f.etag[k]=y}if(a===304)c="notmodified",o=!0;else try{r=b$(d,w),c="success",o=!0}catch(z){c="parsererror",u=z}}else{u=c;if(!c||a)c="error",a<0&&(a=0)}v.status=a,v.statusText=c,o?h.resolveWith(e,[r,c,v]):h.rejectWith(e,[v,c,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.resolveWith(e,[v,c]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f._Deferred(),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bF.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.done,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bE,"").replace(bJ,bU[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bN),d.crossDomain==null&&(r=bP.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bU[1]&&r[2]==bU[2]&&(r[3]||(r[1]==="http:"?80:443))==(bU[3]||(bU[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bX(bR,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bI.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bK.test(d.url)?"&":"?")+d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bO,"$1_="+x);d.url=y+(y===d.url?(bK.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", */*; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bX(bS,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){status<2?w(-1,z):f.error(z)}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)bY(g,a[g],c,e);return d.join("&").replace(bB,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var b_=f.now(),ca=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+b_++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ca.test(b.url)||e&&ca.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ca,l),b.url===j&&(e&&(k=k.replace(ca,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cb=a.ActiveXObject?function(){for(var a in cd)cd[a](0,1)}:!1,cc=0,cd;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ce()||cf()}:ce,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cb&&delete cd[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cc,cb&&(cd||(cd={},f(a).unload(cb)),cd[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cg={},ch,ci,cj=/^(?:toggle|show|hide)$/,ck=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cl,cm=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cn,co=a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cr("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cs(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cr("hide",3),a,b,c);for(var d=0,e=this.length;d<e;d++)if(this[d].style){var g=f.css(this[d],"display");g!=="none"&&!f._data(this[d],"olddisplay")&&f._data(this[d],"olddisplay",g)}for(d=0;d<e;d++)this[d].style&&(this[d].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cr("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return this[e.queue===!1?"each":"queue"](function(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(f.support.inlineBlockNeedsLayout?(j=cs(this.nodeName),j==="inline"?this.style.display="inline-block":(this.style.display="inline",this.style.zoom=1)):this.style.display="inline-block"))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)k=new f.fx(this,b,i),h=a[i],cj.test(h)?k[h==="toggle"?d?"show":"hide":h]():(l=ck.exec(h),m=k.cur(),l?(n=parseFloat(l[2]),o=l[3]||(f.cssNumber[i]?"":"px"),o!=="px"&&(f.style(this,i,(n||1)+o),m=(n||1)/k.cur()*m,f.style(this,i,m+o)),l[1]&&(n=(l[1]==="-="?-1:1)*n+m),k.custom(m,n,o)):k.custom(m,h,""));return!0})},stop:function(a,b){a&&this.queue([]),this.each(function(){var a=f.timers,c=a.length;b||f._unmark(!0,this);while(c--)a[c].elem===this&&(b&&a[c](!0),a.splice(c,1))}),b||this.dequeue();return this}}),f.each({slideDown:cr("show",1),slideUp:cr("hide",1),slideToggle:cr("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default,d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue!==!1?f.dequeue(this):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,b,c){function h(a){return d.step(a)}var d=this,e=f.fx,g;this.startTime=cn||cp(),this.start=a,this.end=b,this.unit=c||this.unit||(f.cssNumber[this.prop]?"":"px"),this.now=this.start,this.pos=this.state=0,h.elem=this.elem,h()&&f.timers.push(h)&&!cl&&(co?(cl=!0,g=function(){cl&&(co(g),e.tick())},co(g)):cl=setInterval(e.tick,e.interval))},show:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.show=!0,this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b=cn||cp(),c=!0,d=this.elem,e=this.options,g,h;if(a||b>=e.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),e.animatedProperties[this.prop]=!0;for(g in e.animatedProperties)e.animatedProperties[g]!==!0&&(c=!1);if(c){e.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){d.style["overflow"+b]=e.overflow[a]}),e.hide&&f(d).hide();if(e.hide||e.show)for(var i in e.animatedProperties)f.style(d,i,e.orig[i]);e.complete.call(d)}return!1}e.duration==Infinity?this.now=b:(h=b-this.startTime,this.state=h/e.duration,this.pos=f.easing[e.animatedProperties[this.prop]](this.state,h,0,1,e.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){for(var a=f.timers,b=0;b<a.length;++b)a[b]()||a.splice(b--,1);a.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cl),cl=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit:a.elem[a.prop]=a.now}}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var ct=/^t(?:able|d|h)$/i,cu=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cv(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);f.offset.initialize();var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.offset.supportsFixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.offset.doesNotAddBorder&&(!f.offset.doesAddBorderForTableAndCells||!ct.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.offset.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.offset.supportsFixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={initialize:function(){var a=c.body,b=c.createElement("div"),d,e,g,h,i=parseFloat(f.css(a,"marginTop"))||0,j="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";f.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),d=b.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,this.doesNotAddBorder=e.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,e.style.position="fixed",e.style.top="20px",this.supportsFixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",this.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),f.offset.initialize=f.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.offset.initialize(),f.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cu.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cu.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cv(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cv(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a&&a.style?parseFloat(f.css(a,d,"padding")):null},f.fn["outer"+c]=function(a){var b=this[0];return b&&b.style?parseFloat(f.css(b,d,a?"margin":"border")):null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c];return e.document.compatMode==="CSS1Compat"&&g||e.document.body["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var h=f.css(e,d),i=parseFloat(h);return f.isNaN(i)?h:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f})(window);
+ *//*! jQuery v1.7.1 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"<!doctype html>":"")+"<html><body>"),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function cb(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function ca(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bE.test(a)?d(a,e):ca(a+"["+(typeof e=="object"||f.isArray(e)?b:"")+"]",e,c,d)});else if(!c&&b!=null&&typeof b=="object")for(var e in b)ca(a+"["+e+"]",b[e],c,d);else d(a,b)}function b_(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function b$(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bT,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=b$(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=b$(a,c,d,e,"*",g));return l}function bZ(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bP),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bC(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?bx:by,g=0,h=e.length;if(d>0){if(c!=="border")for(;g<h;g++)c||(d-=parseFloat(f.css(a,"padding"+e[g]))||0),c==="margin"?d+=parseFloat(f.css(a,c+e[g]))||0:d-=parseFloat(f.css(a,"border"+e[g]+"Width"))||0;return d+"px"}d=bz(a,b,b);if(d<0||d==null)d=a.style[b]||0;d=parseFloat(d)||0;if(c)for(;g<h;g++)d+=parseFloat(f.css(a,"padding"+e[g]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+e[g]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+e[g]))||0);return d+"px"}function bp(a,b){b.src?f.ajax({url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;if(b.nodeType===1){b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase();if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(f.expando)}}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c+(i[c][d].namespace?".":"")+i[c][d].namespace,i[c][d],i[c][d].data)}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typeof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h){var i=a.length;if(typeof c=="object"){for(var j in c)e.access(a,j,c[j],f,g,d);return a}if(d!==b){f=!h&&f&&e.isFunction(d);for(var k=0;k<i;k++)g(a[k],c,f?d.call(a[k],k,g(a[k],c)):d,h);return a}return i?g(a[0],c):b},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?m(g):h==="function"&&(!a.unique||!o.has(g))&&c.push(g)},n=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,l=j||0,j=0,k=c.length;for(;c&&l<k;l++)if(c[l].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}i=!1,c&&(a.once?e===!0?o.disable():c=[]:d&&d.length&&(e=d.shift(),o.fireWith(e[0],e[1])))},o={add:function(){if(c){var a=c.length;m(arguments),i?k=c.length:e&&e!==!0&&(j=a,n(e[0],e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){i&&f<=k&&(k--,f<=l&&l--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&o.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(i?a.once||d.push([b,c]):(!a.once||!e)&&n(b,c));return this},fire:function(){o.fireWith(this,arguments);return this},fired:function(){return!!e}};return o};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);return this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p,q=c.createElement("div"),r=c.documentElement;q.setAttribute("className","t"),q.innerHTML="   <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="<div "+n+"><div></div></div>"+"<table "+n+" cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="<div style='width:4px;'></div>",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h=null;if(typeof a=="undefined"){if(this.length){h=f.data(this[0]);if(this[0].nodeType===1&&!f._data(this[0],"parsedAttrs")){e=this[0].attributes;for(var i=0,j=e.length;i<j;i++)g=e[i].name,g.indexOf("data-")===0&&(g=f.camelCase(g.substring(5)),l(this[0],g,h[g]));f._data(this[0],"parsedAttrs",!0)}}return h}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split("."),d[1]=d[1]?"."+d[1]:"";if(c===b){h=this.triggerHandler("getData"+d[1]+"!",[d[0]]),h===b&&this.length&&(h=f.data(this[0],a),h=l(this[0],a,h));return h===b&&d[1]?this.data(d[0]):h}return this.each(function(){var b=f(this),e=[d[0],c];b.triggerHandler("setData"+d[1]+"!",e),f.data(this,a,c),b.triggerHandler("changeData"+d[1]+"!",e)})},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){typeof a!="string"&&(c=a,a="fx");if(c===b)return f.queue(this[0],a);return this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=this,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise()}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,a,b,!0,f.attr)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,a,b,!0,f.prop)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeClass"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h<g;h++)e=d[h],e&&(c=f.propFix[e]||e,f.attr(a,e,""),a.removeAttribute(v?e:c),u.test(e)&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b},set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["radio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};
+f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.guid,selector:g,quick:G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remove.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.namespace,i=[],j,k,l,m,n,o,p,q,r,s,t;g[0]=c,c.delegateTarget=this;if(e&&!c.target.disabled&&(!c.button||c.type!=="click")){m=f(this),m.context=this.ownerDocument||this;for(l=c.target;l!=this;l=l.parentNode||this){o={},q=[],m[0]=l;for(j=0;j<e;j++)r=d[j],s=r.selector,o[s]===b&&(o[s]=r.quick?H(l,r.quick):m.is(s)),o[s]&&q.push(r);q.length&&i.push({elem:l,matches:q})}}d.length>e&&i.push({elem:this,matches:d.slice(e)});for(j=0;j<i.length&&!c.isPropagationStopped();j++){p=i[j],c.currentTarget=p.elem;for(k=0;k<p.matches.length&&!c.isImmediatePropagationStopped();k++){r=p.matches[k];if(h||!c.namespace&&!r.namespace||c.namespace_re&&c.namespace_re.test(r.namespace))c.data=r.data,c.handleObj=r,n=((f.event.special[r.origType]||{}).handle||r.handler).apply(p.elem,g),n!==b&&(c.result=n,n===!1&&(c.preventDefault(),c.stopPropagation()))}}return c.result},props:"attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.props?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0)}),d._submit_attached=!0)})},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("change",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e==null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on.call(this,a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.type+"."+e.namespace:e.type,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFilter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode===b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nodeType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.selectors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.POS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.context).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function()
+{for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(var c=0,d=this.length;c<d;c++)this[c].nodeType===1&&(f.cleanData(this[c].getElementsByTagName("*")),this[c].innerHTML=a)}catch(e){this.empty().append(a)}}else f.isFunction(a)?this.each(function(b){var c=f(this);c.html(a.call(this,b,c.html()))}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(function(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,bp)}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h)),e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1></$2>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]==="<table>"&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i<r;i++)bn(k[i]);else bn(k);k.nodeType?h.push(k):h=f.merge(h,k)}if(d){g=function(a){return!a.type||be.test(a.type)};for(j=0;h[j];j++)if(e&&f.nodeName(h[j],"script")&&(!h[j].type||h[j].type.toLowerCase()==="text/javascript"))e.push(h[j].parentNode?h[j].parentNode.removeChild(h[j]):h[j]);else{if(h[j].nodeType===1){var s=f.grep(h[j].getElementsByTagName("script"),g);h.splice.apply(h,[j+1,0].concat(s))}d.appendChild(h[j])}}return h},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bq=/alpha\([^)]*\)/i,br=/opacity=([^)]*)/,bs=/([A-Z]|^ms)/g,bt=/^-?\d+(?:px)?$/i,bu=/^-?\d/,bv=/^([\-+])=([\-+.\de]+)/,bw={position:"absolute",visibility:"hidden",display:"block"},bx=["Left","Right"],by=["Top","Bottom"],bz,bA,bB;f.fn.css=function(a,c){if(arguments.length===2&&c===b)return this;return f.access(this,a,c,!0,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)})},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=bz(a,"opacity","opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bv.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(bz)return bz(a,c)},swap:function(a,b,c){var d={};for(var e in b)d[e]=a.style[e],a.style[e]=b[e];c.call(a);for(e in b)a.style[e]=d[e]}}),f.curCSS=f.css,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){var e;if(c){if(a.offsetWidth!==0)return bC(a,b,d);f.swap(a,bw,function(){e=bC(a,b,d)});return e}},set:function(a,b){if(!bt.test(b))return b;b=parseFloat(b);if(b>=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),e===""&&f.css(d,"display")==="none"&&f._data(d,"olddisplay",cv(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(cu("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(cu("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]),h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cv(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cn.test(h)?(o=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),o?(f._data(this,"toggle"+i,o==="show"?"hide":"show"),j[o]()):j[h]()):(k=co.exec(h),l=j.cur(),k?(m=parseFloat(k[2]),n=k[3]||(f.cssNumber[i]?"":"px"),n!=="px"&&(f.style(this,i,(m||1)+n),l=(m||1)/j.cur()*l,f.style(this,i,l+n)),k[1]&&(m=(k[1]==="-="?-1:1)*m+l),j.custom(l,m,n)):j.custom(l,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:cu("show",1),slideUp:cu("hide",1),slideToggle:cu("toggle",1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a,b,c,d){return c+d*a},swing:function(a,b,c,d){return(-Math.cos(a*Math.PI)/2+.5)*d+c}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cr||cs(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){e.options.hide&&f._data(e.elem,"fxshow"+e.prop)===b&&f._data(e.elem,"fxshow"+e.prop,e.start)},h()&&f.timers.push(h)&&!cp&&(cp=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.elem).show()},hide:function(){this.options.orig[this.prop]=f._data(this.elem,"fxshow"+this.prop)||f.style(this.elem,this.prop),this.options.hide=!0,this.custom(this.cur(),0)},step:function(a){var b,c,d,e=cr||cs(),g=!0,h=this.elem,i=this.options;if(a||e>=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c<b.length;c++)a=b[c],!a()&&b[c]===a&&b.splice(c--,1);b.length||f.fx.stop()},interval:13,stop:function(){clearInterval(cp),cp=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){f.style(a.elem,"opacity",a.now)},_default:function(a){a.elem.style&&a.elem.style[a.prop]!=null?a.elem.style[a.prop]=a.now+a.unit:a.elem[a.prop]=a.now}}}),f.each(["width","height"],function(a,b){f.fx.step[b]=function(a){f.style(a.elem,b,Math.max(0,a.now)+a.unit)}}),f.expr&&f.expr.filters&&(f.expr.filters.animated=function(a){return f.grep(f.timers,function(b){return a===b.elem}).length});var cw=/^t(?:able|d|h)$/i,cx=/^(?:body|html)$/i;"getBoundingClientRect"in c.documentElement?f.fn.offset=function(a){var b=this[0],c;if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);try{c=b.getBoundingClientRect()}catch(d){}var e=b.ownerDocument,g=e.documentElement;if(!c||!f.contains(g,b))return c?{top:c.top,left:c.left}:{top:0,left:0};var h=e.body,i=cy(e),j=g.clientTop||h.clientTop||0,k=g.clientLeft||h.clientLeft||0,l=i.pageYOffset||f.support.boxModel&&g.scrollTop||h.scrollTop,m=i.pageXOffset||f.support.boxModel&&g.scrollLeft||h.scrollLeft,n=c.top+l-j,o=c.left+m-k;return{top:n,left:o}}:f.fn.offset=function(a){var b=this[0];if(a)return this.each(function(b){f.offset.setOffset(this,a,b)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return f.offset.bodyOffset(b);var c,d=b.offsetParent,e=b,g=b.ownerDocument,h=g.documentElement,i=g.body,j=g.defaultView,k=j?j.getComputedStyle(b,null):b.currentStyle,l=b.offsetTop,m=b.offsetLeft;while((b=b.parentNode)&&b!==i&&b!==h){if(f.support.fixedPosition&&k.position==="fixed")break;c=j?j.getComputedStyle(b,null):b.currentStyle,l-=b.scrollTop,m-=b.scrollLeft,b===d&&(l+=b.offsetTop,m+=b.offsetLeft,f.support.doesNotAddBorder&&(!f.support.doesAddBorderForTableAndCells||!cw.test(b.nodeName))&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),e=d,d=b.offsetParent),f.support.subtractsBorderForOverflowNotVisible&&c.overflow!=="visible"&&(l+=parseFloat(c.borderTopWidth)||0,m+=parseFloat(c.borderLeftWidth)||0),k=c}if(k.position==="relative"||k.position==="static")l+=i.offsetTop,m+=i.offsetLeft;f.support.fixedPosition&&k.position==="fixed"&&(l+=Math.max(h.scrollTop,i.scrollTop),m+=Math.max(h.scrollLeft,i.scrollLeft));return{top:l,left:m}},f.offset={bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;f.support.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(f.css(a,"marginTop"))||0,c+=parseFloat(f.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var d=f.css(a,"position");d==="static"&&(a.style.position="relative");var e=f(a),g=e.offset(),h=f.css(a,"top"),i=f.css(a,"left"),j=(d==="absolute"||d==="fixed")&&f.inArray("auto",[h,i])>-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);
 /*
  *	lib/js/lib/history/history.min.js
  *//*
@@ -49,6 +35,9 @@
 })
 
 /*
+ *	lib/js/lib/bootstrap.min.js
+ */!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active"),this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api","[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdrop.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=a.extend({},a.fn.modal.defaults,c),this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=typeof c=="object"&&c;e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouseenter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}var b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){function b(b,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.selector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),setTimeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery);
+/*
  *	lib/js/core.min.js
  */
 /*
@@ -74,7 +63,7 @@
 /*
  *	lib/js/wn/versions.js
  */
-wn.versions={check:function(){if(localStorage){if(window._version_number==-1||parseInt(localStorage._version_number)!=parseInt(window._version_number)){var localversion=localStorage._version_number;localStorage.clear();console.log("Cache cleared - version: "+localversion
+wn.versions={check:function(){if(window.localStorage){if(window._version_number==-1||parseInt(localStorage._version_number)!=parseInt(window._version_number)){var localversion=localStorage._version_number;localStorage.clear();console.log("Cache cleared - version: "+localversion
 +' to '+_version_number)}
 localStorage.setItem('_version_number',window._version_number);}}}
 /*
@@ -148,8 +137,7 @@
  *	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 hide_autosuggest=null;var page_body=null;var pscript={};var selector=null;var top_index=91;var _f={};var _p={};var _e={};var _r={};var FILTER_SEP='\1';var _c={};var widget_files={'_f.FrmContainer':'form.compressed.js','_c.CalendarPopup':'widgets/form/date_picker.js','_r.ReportContainer':'report.compressed.js','_p.PrintQuery':'widgets/print_query.js','Calendar':'widgets/calendar.js','Recommendation':'widgets/recommend.js','RatingWidget':'widgets/rating.js'}
-var frms={};var cur_frm=null;var pscript={};var validated=true;var validation_message='';var tinymce_loaded=null;var cur_autosug=null;
+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 hide_autosuggest=null;var page_body=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;var cur_autosug=null;
 /*
  *	lib/js/legacy/utils/datatype.js
  */
@@ -275,7 +263,7 @@
 span.done_working=function(){this.disabled=0;$dh(this.loading_img);}
 return span;}}
 function $ln(parent,label,onclick,style){return wn.ele.link({parent:parent,label:label,onclick:onclick,style:style})}
-function $btn(parent,label,onclick,style,css_class,is_ajax){wn.require('lib/js/wn/ui/button.js');if(css_class==='green')css_class='primary';return new wn.ui.Button({parent:parent,label:label,onclick:onclick,style:style,is_ajax:is_ajax,css_class:css_class}).btn;}
+function $btn(parent,label,onclick,style,css_class,is_ajax){wn.require('lib/js/wn/ui/button.js');if(css_class==='green')css_class='btn-primary';return new wn.ui.Button({parent:parent,label:label,onclick:onclick,style:style,is_ajax:is_ajax,css_class:css_class}).btn;}
 $item_normal=function(ele){$y(ele,{padding:'6px 8px',cursor:'pointer',marginRight:'8px',whiteSpace:'nowrap',overflow:'hidden',borderBottom:'1px solid #DDD'});$bg(ele,'#FFF');$fg(ele,'#000');}
 $item_active=function(ele){$bg(ele,'#FE8');$fg(ele,'#000');}
 $item_selected=function(ele){$bg(ele,'#777');$fg(ele,'#FFF');}
@@ -291,7 +279,7 @@
 if(sel_val)s.inp.value=sel_val;return;}
 if(s.inp)s=s.inp;for(var i=0,len=list.length;i<len;i++){var o=new Option(list[i],list[i],false,(list[i]==sel_val?true:false));if(o_style)$y(o,o_style);s.options[s.options.length]=o;}}
 function cint(v,def){v=v+'';v=lstrip(v,['0']);v=parseInt(v);if(isNaN(v))v=def?def:0;return v;}
-function validate_email(id){if(strip(id).search("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?")==-1)return 0;else return 1;}
+function validate_email(id){if(strip(id.toLowerCase()).search("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?")==-1)return 0;else return 1;}
 function validate_spl_chars(txt){if(txt.search(/^[a-zA-Z0-9_\- ]*$/)==-1)return 1;else return 0;}
 function d2h(d){return cint(d).toString(16);}
 function h2d(h){return parseInt(h,16);}
@@ -383,7 +371,7 @@
 if(typeof doclist=='string')args.doctype=doclist;else args.docs=compress_doclist(doclist)
 $c('runserverobj',args,call_back,null,no_spinner,freeze_msg,btn);}
 function $c_page(module,page,method,arg,call_back,no_spinner,freeze_msg,btn){if(arg&&!arg.substr)arg=JSON.stringify(arg);$c(module+'.page.'+page+'.'+page+'.'+method,{'arg':arg},call_back,null,no_spinner,freeze_msg,btn);}
-wn.call=function(args){if(args.module&&args.page){$c_page(args.module,args.page,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else if(args.docs){$c_obj(args.doc,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else{$c(args.method,args.args,args.callback,false,args.no_spinner,false,args.btn);}}
+wn.call=function(args){if(!args.args)args.args={};if(args.module&&args.page){$c_page(args.module,args.page,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else if(args.docs){$c_obj(args.doc,args.method,args.args,args.callback,args.no_spinner,false,args.btn);}else{$c(args.method,args.args,args.callback,false,args.no_spinner,false,args.btn);}}
 function $c_obj_csv(doclist,method,arg){var args={}
 args.cmd='runserverobj';args.as_csv=1;args.method=method;args.arg=arg;if(doclist.substr)
 args.doctype=doclist;else
@@ -408,7 +396,7 @@
 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 wrapper=$a(growl_area,'div','',{position:'relative'});var body=$a(wrapper,'div','notice');var c=$a(body,'div','wn-icon ic-round_delete',{cssFloat:'right'});$(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);}
+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);}
 /*
  *	lib/js/legacy/utils/shortcut.js
@@ -451,13 +439,13 @@
 Field.prototype.refresh_mandatory=function(){if(this.in_filter)return;if(this.df.reqd){if(this.label_area)this.label_area.style.color="#d22";this.set_style_mandatory(1);}else{if(this.label_area)this.label_area.style.color="#222";this.set_style_mandatory(0);}
 this.refresh_label_icon()
 this.set_reqd=this.df.reqd;}
-Field.prototype.refresh_display=function(){if(!this.set_status||this.set_status!=this.disp_status){if(this.disp_status=='Write'){if(this.make_input&&(!this.input)){this.make_input();if(this.onmake_input)this.onmake_input();}
+Field.prototype.refresh_display=function(){if(!this.current_status||this.current_status!=this.disp_status){if(this.disp_status=='Write'){if(this.make_input&&(!this.input)){this.make_input();if(this.onmake_input)this.onmake_input();}
 if(this.show)this.show()
 else{$ds(this.wrapper);}
 if(this.input){$ds(this.input_area);$dh(this.disp_area);if(this.input.refresh)this.input.refresh();}else{$dh(this.input_area);$ds(this.disp_area);}}else if(this.disp_status=='Read'){if(this.show)this.show()
 else{$ds(this.wrapper);}
 $dh(this.input_area);$ds(this.disp_area);}else{if(this.hide)this.hide();else $dh(this.wrapper);}
-this.set_status=this.disp_status;}}
+this.current_status=this.disp_status;}}
 Field.prototype.refresh=function(){this.disp_status=this.get_status();if(this.in_grid&&this.table_refresh&&this.disp_status=='Write')
 {this.table_refresh();return;}
 this.set_label();this.refresh_display();if(this.onrefresh)
@@ -518,7 +506,8 @@
 var t=v.split('-');if(t.length!=3){return this.clear();}
 else if(cint(t[1])>12||cint(t[1])<1){return this.clear();}
 else if(cint(t[2])>31||cint(t[2])<1){return this.clear();}
-return v;};var _link_onchange_flag=null;function LinkField(){}LinkField.prototype=new Field();LinkField.prototype.make_input=function(){var me=this;if(me.df.no_buttons){this.txt=$a(this.input_area,'input');this.input=this.txt;}else{makeinput_popup(this,'ic-zoom','ic-sq_next','ic-sq_plus');me.setup_buttons();me.onrefresh=function(){if(me.can_create&&cur_frm.doc.docstatus==0)$ds(me.btn2);else $dh(me.btn2);}}
+return v;};var _link_onchange_flag=null;function LinkField(){}LinkField.prototype=new Field();LinkField.prototype.make_input=function(){var me=this;if(me.df.no_buttons){this.txt=$a(this.input_area,'input');this.input=this.txt;}else{makeinput_popup(this,'icon-search','icon-play','icon-plus');me.setup_buttons();me.onrefresh=function(){if(me.can_create&&cur_frm.doc.docstatus==0)
+$(me.btn2).css('display','inline-block');else $dh(me.btn2);}}
 me.txt.field_object=this;me.set_onchange();me.input.set_input=function(val){if(val==undefined)val='';me.txt.value=val;}
 me.get_value=function(){return me.txt.value;}
 wn.require('lib/js/legacy/widgets/autosuggest.js');var opts={script:'',json:true,maxresults:10,link_field:me};this.as=new AutoSuggest(me.txt,opts);}
@@ -602,12 +591,15 @@
 this.get_value=function(){return this.get_time();}
 this.refresh();}
 TimeField.prototype.set_disp=function(v){var t=time_to_ampm(v);var t=t[0]+':'+t[1]+' '+t[2];this.set_disp_html(t);}
-function makeinput_popup(me,iconsrc,iconsrc1,iconsrc2){me.input=$a(me.input_area,'div');if(!me.not_in_form)
+function makeinput_popup(me,iconsrc,iconsrc1,iconsrc2){var icon_style={cursor:'pointer',width:'16px',verticalAlign:'middle',marginBottom:'-3px'};me.input=$a(me.input_area,'div');if(!me.not_in_form)
 $y(me.input,{width:'80%'});me.input.set_width=function(w){$y(me.input,{width:(w-2)+'px'});}
-var tab=$a(me.input,'table');me.tab=tab;$y(tab,{width:'100%',borderCollapse:'collapse',tableLayout:'fixed'});var c0=tab.insertRow(0).insertCell(0);var c1=tab.rows[0].insertCell(1);$y(c1,{width:'20px'});me.txt=$a($a($a(c0,'div','',{paddingRight:'8px'}),'div'),'input','',{width:'100%'});me.btn=$a(c1,'div','wn-icon '+iconsrc,{width:'16px'});if(iconsrc1)
+var tab=$a(me.input,'table');me.tab=tab;$y(tab,{width:'100%',borderCollapse:'collapse',tableLayout:'fixed'});var c0=tab.insertRow(0).insertCell(0);var c1=tab.rows[0].insertCell(1);$y(c1,{width:'20px'});me.txt=$a($a($a(c0,'div','',{paddingRight:'8px'}),'div'),'input','',{width:'100%'});me.btn=$a(c1,'i',iconsrc,icon_style)
+if(iconsrc1)
 me.btn.setAttribute('title','Search');else
-me.btn.setAttribute('title','Select Date');if(iconsrc1){var c2=tab.rows[0].insertCell(2);$y(c2,{width:'20px'});me.btn1=$a(c2,'div','wn-icon '+iconsrc1,{width:'16px'});me.btn1.setAttribute('title','Open Link');}
-if(iconsrc2){var c3=tab.rows[0].insertCell(3);$y(c3,{width:'20px'});me.btn2=$a(c3,'div','wn-icon '+iconsrc2,{width:'16px'});me.btn2.setAttribute('title','Create New');$dh(me.btn2);}
+me.btn.setAttribute('title','Select Date');if(iconsrc1){var c2=tab.rows[0].insertCell(2);$y(c2,{width:'20px'});me.btn1=$a(c2,'i',iconsrc1,icon_style)
+me.btn1.setAttribute('title','Open Link');}
+if(iconsrc2){var c3=tab.rows[0].insertCell(3);$y(c3,{width:'20px'});me.btn2=$a(c3,'i',iconsrc2,icon_style)
+me.btn2.setAttribute('title','Create New');$dh(me.btn2);}
 if(me.df.colour)
 me.txt.style.background='#'+me.df.colour.split(':')[1];me.txt.name=me.df.fieldname;me.setdisabled=function(tf){me.txt.disabled=tf;}}
 var tmpid=0;_f.ButtonField=function(){};_f.ButtonField.prototype=new Field();_f.ButtonField.prototype.with_label=0;_f.ButtonField.prototype.init=function(){this.prev_button=null;if(!this.frm)return;if(cur_frm&&cur_frm.fields[cur_frm.fields.length-1]&&cur_frm.fields[cur_frm.fields.length-1].df.fieldtype=='Button'){this.make_body=function(){this.prev_button=cur_frm.fields[cur_frm.fields.length-1];if(!this.prev_button.prev_button){this.prev_button.button_area=$a(this.prev_button.input_area,'span');}
@@ -629,7 +621,7 @@
  */
 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'})
 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('primary');this.first_button=true;}}}
+f.refresh();if(df.fieldtype=='Button'&&!this.first_button){$(f.input).addClass('btn-primary');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)
 errors.push(f.df.label+' is mandatory');if(v)ret[f.df.fieldname]=v;}
 if(errors.length){msgprint('<b>Please check the following Errors</b>\n'+errors.join('\n'));return null;}
@@ -669,28 +661,33 @@
 else if(d[0]=='Select'){c1.innerHTML=d[1];this.widgets[d[1]]=$a(c2,'select','',{width:'160px'})
 if(d[2])$a(c2,'div','field_description').innerHTML=d[2];if(d[3])add_sel_options(this.widgets[d[1]],d[3],d[3][0]);}
 else if(d[0]=='Text'){c1.innerHTML=d[1];c2.style.overflow='auto';this.widgets[d[1]]=$a(c2,'textarea');if(d[2])$a(c2,'div','field_description').innerHTML=d[2];}
-else if(d[0]=='Button'){c2.style.height='32px';var b=$btn(c2,d[1],function(btn){if(btn._onclick)btn._onclick(me)},null,null,1);b.dialog=me;if(!this.first_button){$(b).addClass('primary');this.first_button=true;}
+else if(d[0]=='Button'){c2.style.height='32px';var b=$btn(c2,d[1],function(btn){if(btn._onclick)btn._onclick(me)},null,null,1);b.dialog=me;if(!this.first_button){$(b).addClass('btn-primary');this.first_button=true;}
 if(d[2]){b._onclick=d[2];}
 this.widgets[d[1]]=b;}}
 /*
  *	lib/js/wn/ui/listing.js
  */
-wn.widgets.Listing=function(opts){this.opts=opts;this.page_length=20;this.btns={};this.start=0;var me=this;this.make=function(opts){this.wrapper=$a(this.opts.parent,'div');this.filters_area=$a(this.wrapper,'div','listing-filters');this.toolbar_area=$a(this.wrapper,'div','listing-toolbar');this.results_area=$a(this.wrapper,'div','listing-results');this.more_button_area=$a(this.wrapper,'div','listing-more');this.no_results_area=$a(this.wrapper,'div','help_box',{display:'none'},(this.opts.no_result_message?this.opts.no_result_message:'No results'));if(opts)this.opts=opts;this.page_length=this.opts.page_length?this.opts.page_length:this.page_length;this.make_toolbar();this.make_filters();this.make_more_button();}
+wn.widgets.Listing=function(opts){this.opts=opts;this.page_length=20;this.btns={};this.start=0;var me=this;this.make=function(opts){if(this.opts.parent.jquery)
+this.opts.parent=this.opts.parent.get(0);this.wrapper=$a(this.opts.parent,'div');this.filters_area=$a(this.wrapper,'div','listing-filters');this.toolbar_area=$a(this.wrapper,'div','listing-toolbar');this.results_area=$a(this.wrapper,'div','listing-results');this.more_button_area=$a(this.wrapper,'div','listing-more');this.no_results_area=$a(this.wrapper,'div','help_box',{display:'none'},(this.opts.no_result_message?this.opts.no_result_message:'No results'));if(opts)this.opts=opts;this.page_length=this.opts.page_length?this.opts.page_length:this.page_length;this.make_toolbar();this.make_filters();this.make_more_button();}
 this.make_filters=function(){if(this.opts.filters){$ds(this.filters_area);this.filters=new wn.widgets.FieldGroup(this.filters_area,this.opts.fields);}}
-this.make_toolbar=function(){if(!this.opts.hide_refresh){this.ref_img=$a(this.toolbar_area,'span','link_type',{color:'#888'},'[refresh]');this.ref_img.onclick=function(){me.run();}
+this.make_toolbar=function(){if(!(this.opts.hide_refresh||this.opts.no_refresh)){if(this.opts.title){$a(this.toolbar_area,'h3','',{display:'inline-block',marginRight:'15px'},this.opts.title);}
+this.ref_img=$a(this.toolbar_area,'span','link_type',{color:'#888'},'[refresh]');this.ref_img.onclick=function(){me.run();}
 this.loading_img=$a(this.toolbar_area,'img','lib/images/ui/button-load.gif',{display:'none',marginLeft:'3px',marginBottom:'-2px'});}
 if(this.opts.new_doctype){this.new_btn=$btn(this.toolbar_area,'New '+get_doctype_label(this.opts.new_doctype),function(){newdoc(me.opts.new_doctype,me.opts.new_doc_onload,me.opts.new_doc_indialog,me.opts.new_doc_onsave);},{marginLeft:'7px'});}}
 this.make_more_button=function(){this.more_btn=$btn(this.more_button_area,'More...',function(){me.more_btn.set_working();me.run(function(){me.more_btn.done_working();},1);},'',0,1);$y(this.more_btn.loading_img,{marginBottom:'0px'});}
 this.clear=function(){this.results_area.innerHTML='';this.table=null;$ds(this.results_area);$dh(this.no_results_area);}
 this.make_results=function(r,rt){if(this.start==0)this.clear();$dh(this.more_button_area);if(this.loading_img)$dh(this.loading_img)
-if(r.values&&r.values.length){this.values=r.values;var m=Math.min(r.values.length,this.page_length);for(var i=0;i<m;i++){var row=this.add_row();this.opts.render_row(row,r.values[i],this,i);}
+if(r.message)r.values=r.message;if(r.values&&r.values.length){this.values=r.values;var m=Math.min(r.values.length,this.page_length);for(var i=0;i<m;i++){var row=this.add_row();this.opts.render_row(row,r.values[i],this,i);}
 this.start+=m;if(r.values.length>this.page_length)$ds(this.more_button_area);}else{if(this.start==0){$dh(this.results_area);$ds(this.no_results_area);}}
 if(this.onrun)this.onrun();if(this.opts.onrun)this.opts.onrun();}
 this.add_row=function(){return $a(this.results_area,'div','',(opts.cell_style?opts.cell_style:{padding:'3px 0px'}));}
 this.run=function(callback,append){if(callback)
 this.onrun=callback;if(!append)
-this.start=0;this.query=this.opts.get_query?this.opts.get_query():this.opts.query;this.add_limits();args={query_max:this.query_max||this.opts.query_max||''}
-args.simple_query=this.query;args.as_dict=1;if(this.loading_img)$di(this.loading_img);wn.call({method:'webnotes.widgets.query_builder.runquery',args:args,callback:function(r,rt){me.make_results(r,rt)},no_spinner:this.opts.no_loading,btn:this.opts.run_btn});}
+this.start=0;if(!this.opts.method){this.query=this.opts.get_query?this.opts.get_query():this.opts.query;this.add_limits();var args={query_max:this.query_max||this.opts.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.opts.args)
+$.extend(args,this.opts.args)
+if(this.loading_img)$di(this.loading_img);wn.call({method:this.opts.method||'webnotes.widgets.query_builder.runquery',args:args,callback:function(r,rt){me.make_results(r,rt)},no_spinner:this.opts.no_loading,btn:this.opts.run_btn});}
 this.refresh=this.run;this.add_limits=function(){this.query+=' LIMIT '+this.start+','+(this.page_length+1);}
 if(opts)this.make();}
 /*
@@ -725,7 +722,7 @@
 var def_ph_style={wrapper:{marginBottom:'16px',backgroundColor:'#EEE'},main_heading:{},sub_heading:{marginBottom:'8px',color:'#555',display:'none'},separator:{borderTop:'3px solid #777'},toolbar_area:{padding:'3px 0px',display:'none',borderBottom:'1px solid #AAA'}}
 function PageHeader(parent,main_text,sub_text){this.wrapper=$a(parent,'div','page_header');this.t1=make_table($a(this.wrapper,'div','',def_ph_style.wrapper.backgroundColor),1,2,'100%',[null,'100px'],{padding:'2px'});$y(this.t1,{borderCollapse:'collapse'})
 this.lhs=$td(this.t1,0,0);this.main_head=$a(this.lhs,'h1','',def_ph_style.main_heading);this.sub_head=$a(this.lhs,'h4','',def_ph_style.sub_heading);this.separator=$a(this.wrapper,'div','',def_ph_style.separator);this.toolbar_area=$a(this.wrapper,'div','',def_ph_style.toolbar_area);this.padding_area=$a(this.wrapper,'div','',{padding:'3px'});$y($td(this.t1,0,1),{textAlign:'right',padding:'3px'});this.close_btn=$a($td(this.t1,0,1),'span','close',{},'&times;');this.close_btn.onclick=function(){nav_obj.show_last_open();};if(main_text)this.main_head.innerHTML=main_text;if(sub_text)this.sub_head.innerHTML=sub_text;this.buttons={};this.buttons2={};}
-PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
+PageHeader.prototype.add_button=function(label,fn,bold,icon,green){var tb=this.toolbar_area;if(this.buttons[label])return;var btn=$btn(tb,label,fn,{marginRight:'4px'},(green?'btn-primary':''));if(bold)$y(btn,{fontWeight:'bold'});this.buttons[label]=btn;$ds(this.toolbar_area);return btn;}
 PageHeader.prototype.clear_toolbar=function(){this.toolbar_area.innerHTML='';this.buttons={};}
 PageHeader.prototype.make_buttonset=function(){$(this.toolbar_area).buttonset();}
 /*
@@ -808,7 +805,8 @@
 /*
  *	lib/js/legacy/webpage/error_console.js
  */
-var err_console;var err_list=[];function errprint(t){err_list[err_list.length]=('<pre style="font-family: Courier, Fixed; font-size: 11px; border-bottom: 1px solid #AAA; overflow: auto; width: 90%;">'+t+'</pre>');}
+var err_console;var err_list=[];function errprint(t){if(!err_list)err_list=[];err_list.push('<pre style="font-family: Courier, Fixed; font-size: 11px; \
+  border-bottom: 1px solid #AAA; overflow: auto; width: 90%;">'+t+'</pre>');}
 function setup_err_console(){err_console=new Dialog(640,480,'Error Console')
 err_console.make_body([['HTML','Error List'],['Button','Clear'],['HTML','Error Report']]);var span=$a(err_console.widgets['Error Report'],'span','link_type');span.innerHTML='Send Error Report';span.onclick=function(){msg=prompt('How / where did you get the error [optional]')
 var call_back=function(r,rt){err_console.hide();msgprint("Error Report Sent")}
@@ -830,7 +828,7 @@
 if(doctype=='DocType'&&frms[name]){msgprint("Cannot open DocType \""+name+"\" when its instance is open.");return;}
 var show_form=function(f){if(!_f.frm_con){_f.frm_con=new _f.FrmContainer();}
 if(!frms[doctype]){_f.add_frm(doctype,show_doc,name,from_archive);}else if(LocalDB.is_doc_loaded(doctype,name)){show_doc();}else{$c('webnotes.widgets.form.load.getdoc',{'name':name,'doctype':doctype,'user':user,'from_archive':(from_archive?1:0)},show_doc,null,null);}}
-var show_doc=function(r,rt){if(locals[doctype]&&locals[doctype][name]){page_body.set_status('Done');var frm=frms[doctype];frm.refresh(name);if(!frm.in_dialog)
+var show_doc=function(r,rt){if(locals[doctype]&&locals[doctype][name]){var frm=frms[doctype];frm.refresh(name);if(!frm.in_dialog)
 nav_obj.open_notify('Form',doctype,name);if(onload)onload();}else{if(r.exc){msgprint('There were errors while loading '+doctype+' '+name);}
 loadpage('_home');}}
 show_form();}
@@ -844,11 +842,11 @@
 show_doc(frms[doctype]);}
 show_form();}
 var newdoc=new_doc;var pscript={};var cur_page;function loadpage(page_name,call_back,no_history){if(!page_name)return;if(page_name=='_home')
-page_name=home_page;var fn=function(r,rt){page_body.set_status('Done');if(page_body.pages[page_name]){var p=page_body.pages[page_name]
+page_name=home_page;var fn=function(r,rt){if(wn.pages[page_name]){var p=wn.pages[page_name]
 page_body.change_to(page_name);}else{var p=render_page(page_name);if(!p)return;}
 cur_page=page_name;if(call_back)call_back();scroll(0,0);pscript.update_page_history(page_name,no_history)
 try{if(pscript['refresh_'+page_name])pscript['refresh_'+page_name]();}catch(e){console.log(e);}}
-if(get_local('Page',page_name)||page_body.pages[page_name])
+if(get_local('Page',page_name)||wn.pages[page_name])
 fn();else{args=get_url_dict();args.name=page_name;$c('webnotes.widgets.page.getpage',args,fn);}}
 pscript.update_page_history=function(page_name,no_history){var arg=null;var t=null;if(window.location.hash){var t=nav_obj.get_page(window.location.hash)}else if(get_url_arg('page')){var t=nav_obj.get_page(get_url_arg('page'))}
 if(t&&t[1]==page_name)arg=t[2];nav_obj.open_notify('Page',page_name,arg,no_history);}
@@ -867,14 +865,13 @@
 /*
  *	lib/js/legacy/webpage/page.js
  */
-var pages=[];var stylesheets=[];function Page(page_name,content){var me=this;this.name=page_name;this.trigger=function(event){try{if(pscript[event+'_'+this.name])
-pscript[event+'_'+this.name](this.wrapper);}catch(e){console.log(e);}}
-this.onshow=function(){set_title(me.doc.title?me.doc.title:me.name);if(!me.onload_complete){me.trigger('onload');me.onload_complete=true;}
+var stylesheets=[];function Page(page_name,content){var me=this;this.name=page_name;this.trigger=function(event){try{if(pscript[event+'_'+this.name])
+pscript[event+'_'+this.name](me.wrapper);if(me.wrapper[event]){me.wrapper[event](me.wrapper);}}catch(e){console.log(e);}}
+this.page_show=function(){set_title(me.doc.title?me.doc.title:me.name);if(!me.onload_complete){me.trigger('onload');me.onload_complete=true;}
 me.trigger('onshow');cur_frm=null;}
-this.wrapper=page_body.add_page(page_name,this.onshow);this.cont=this.wrapper
+this.wrapper=page_body.add_page(page_name,this.page_show);this.cont=this.wrapper
 if(content)
-this.wrapper.innerHTML=content;if(page_name==home_page)
-pages['_home']=this;return this;}
+this.wrapper.innerHTML=content;return this;}
 function render_page(page_name,menuitem){if(!page_name)return;if((!locals['Page'])||(!locals['Page'][page_name])){loadpage('_home');return;}
 var pdoc=locals['Page'][page_name];if(pdoc.style)set_style(pdoc.style)
 if(pdoc.stylesheet){set_style(locals.Stylesheet[pdoc.stylesheet].stylesheet);stylesheets.push(pdoc.stylesheet);}
@@ -886,7 +883,7 @@
  *	lib/js/legacy/wn/page_layout.js
  */
 wn.PageLayout=function(args){$.extend(this,args)
-this.wrapper=$a(this.parent,'div');this.wtab=make_table(this.wrapper,1,2,'100%',[this.main_width,this.sidebar_width]);this.main=$a($td(this.wtab,0,0),'div','layout_wrapper');this.sidebar_area=$a($td(this.wtab,0,1),'div');this.head=$a(this.main,'div');this.toolbar_area=$a(this.main,'div');this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}}
+this.wrapper=$a(this.parent,'div','layout-wrapper layout-wrapper-background');this.main=$a(this.wrapper,'div','layout-main-section');this.sidebar_area=$a(this.wrapper,'div','layout-side-section');$a(this.wrapper,'div','',{clear:'both'});this.head=$a(this.main,'div');this.toolbar_area=$a(this.main,'div');this.body=$a(this.main,'div');this.footer=$a(this.main,'div');if(this.heading){this.page_head=new PageHeader(this.head,this.heading);}}
 /*
  *	lib/js/legacy/wn/widgets/footer.js
  */
@@ -906,8 +903,7 @@
 LocalDB.sync=function(list){if(list._kl)list=expand_doclist(list);for(var i=0;i<list.length;i++){var d=list[i];if(!d.name)
 d.name=LocalDB.get_localname(d.doctype);LocalDB.add(d.doctype,d.name);locals[d.doctype][d.name]=d;if(d.doctype=='DocType'){fields_list[d.name]=[];}else if(d.doctype=='DocField'){if(!d.parent){alert('Error: No parent specified for field "'+d.label+'"');}
 if(!fields_list[d.parent])fields_list[d.parent]=[];fields_list[d.parent][fields_list[d.parent].length]=d;if(!fields[d.parent])
-fields[d.parent]={};if(d.fieldname){fields[d.parent][d.fieldname]=d;}else if(d.label){fields[d.parent][d.label]=d;}}else if(d.doctype=='Event'){if((!d.localname)&&_c.calendar&&(!_c.calendar.has_event[d.name]))
-_c.calendar.set_event(d);}
+fields[d.parent]={};if(d.fieldname){fields[d.parent][d.fieldname]=d;}else if(d.label){fields[d.parent][d.label]=d;}}
 if(d.localname)
 notify_rename_observers(d.doctype,d.localname,d.name);}}
 local_name_idx={};LocalDB.get_localname=function(doctype){if(!local_name_idx[doctype])local_name_idx[doctype]=1;var n='New '+get_doctype_label(doctype)+' '+local_name_idx[doctype];local_name_idx[doctype]++;return n;}
@@ -944,7 +940,7 @@
 return locals[dt][newdoc];}
 function make_doclist(dt,dn,deleted){var dl=[];dl[0]=locals[dt][dn];for(var ndt in locals){if(locals[ndt]){for(var ndn in locals[ndt]){var doc=locals[ndt][ndn];if(doc&&doc.parenttype==dt&&(doc.parent==dn||(deleted&&doc.__oldparent==dn))){dl[dl.length]=doc;}}}}
 return dl;}
-var rename_observers=[];function notify_rename_observers(dt,old_name,new_name){try{var old=locals[dt][old_name];old.parent=null;old.__deleted=1;}catch(e){alert("[rename_from_local] No Document for: "+old_name);}
+var rename_observers=[];function notify_rename_observers(dt,old_name,new_name){try{delete locals[dt][old_name];}catch(e){alert("[rename_from_local] No Document for: "+old_name);}
 for(var i=0;i<rename_observers.length;i++){if(rename_observers[i])
 rename_observers[i].rename_notify(dt,old_name,new_name);}}
 var Meta={};var local_dt={};Meta.make_local_dt=function(dt,dn){var dl=make_doclist('DocType',dt);if(!local_dt[dt])local_dt[dt]={};if(!local_dt[dt][dn])local_dt[dt][dn]={};for(var i=0;i<dl.length;i++){var d=dl[i];if(d.doctype=='DocField'){var key=d.fieldname?d.fieldname:d.label;local_dt[dt][dn][key]=copy_dict(d);}}}
@@ -975,8 +971,7 @@
 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;}}
 var f=frms[dt];if(f&&!all_clear){if(f)f.savingflag=false;return'Error';}
-var _save=function(){page_body.set_status('Saving...')
-$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;}
+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();}}
 function check_required(dt,dn,parent_dt){var doc=locals[dt][dn];if(doc.docstatus>1)return true;var fl=fields_list[dt];if(!fl)return true;var all_clear=true;var errfld=[];for(var i=0;i<fl.length;i++){var key=fl[i].fieldname;var v=doc[key];if(fl[i].reqd&&is_null(v)&&fl[i].fieldname){errfld[errfld.length]=fl[i].label;if(cur_frm){var f=cur_frm.fields_dict[fl[i].fieldname];if(f){if(f.set_as_error)f.set_as_error(1);if(!cur_frm.error_in_section&&f.parent_section){cur_frm.set_section(f.parent_section.sec_id);cur_frm.error_in_section=1;}}}
@@ -986,37 +981,30 @@
 /*
  *	lib/js/legacy/webpage/body.js
  */
-function Body(){this.left_sidebar=null;this.right_sidebar=null;this.status_area=null;var me=this;page_body=this;this.no_of_columns=function(){var n=2;if(cint(me&&me.cp&&me.cp.right_sidebar_width))
-n=n+1;return n;}
-this.ready=function(){$dh('startup_div');$ds('body_div');}
-this.setup_page_areas=function(){var n=this.no_of_columns();this.body_table=make_table(this.body,1,n,'100%');$y(this.body_table,{tableLayout:'fixed'});var c=0;this.left_sidebar=$td(this.body_table,0,c);$y(this.left_sidebar,{width:cint(this.cp.left_sidebar_width)+'px'});c++;this.center=$a($td(this.body_table,0,c),'div');c++;if(cint(this.cp.right_sidebar_width)){this.right_sidebar=$td(this.body_table,0,c);$y(this.right_sidebar,{width:cint(this.cp.right_sidebar_width)+'px'})
-c++;}
-this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');this.center.loading=$a(this.center,'div','',{margin:'200px 0px',fontSize:'14px',color:'#999',textAlign:'center'});this.center.loading.innerHTML='Loading...'}
-this.setup_sidebar_menu=function(){if(this.left_sidebar&&this.cp.show_sidebar_menu){sidebar_menu=new SidebarMenu();sidebar_menu.make_menu('');}}
+wn.provide('wn.pages');function Body(){this.left_sidebar=null;this.right_sidebar=null;this.status_area=null;var me=this;page_body=this;this.ready=function(){$dh('startup_div');$ds('body_div');}
+this.setup_page_areas=function(){this.center=this.body;this.center.header=$a(this.center,'div');this.center.body=$a(this.center,'div');this.center.loading=$a(this.center,'div','',{margin:'200px 0px',fontSize:'14px',color:'#999',textAlign:'center'});this.center.loading.innerHTML='Loading...'}
 this.run_startup_code=function(){$(document).trigger('startup');try{if(this.cp.custom_startup_code)
 eval(this.cp.custom_startup_code);}catch(e){errprint(e);}}
 this.setup=function(){this.cp=wn.control_panel;this.wrapper=$a($i('body_div'),'div');this.body=$a(this.wrapper,'div');this.setup_page_areas();if(user=='Guest')user_defaults.hide_webnotes_toolbar=1;if(!cint(user_defaults.hide_webnotes_toolbar)||user=='Administrator'){this.wntoolbar=new wn.ui.toolbar.Toolbar();}
-if(this.cp.page_width)$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
-this.pages={};this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
-c.onshow=onshow;if(onhide)
-c.onhide=onhide;this.pages[label]=c;$dh(c);return c;}
-this.change_to=function(label){$dh(this.center.loading);if(me.cur_page&&me.pages[label]!=me.cur_page){if(me.cur_page.onhide)
-me.cur_page.onhide();$dh(me.cur_page);}
-me.cur_page=me.pages[label];me.cur_page_label=label;$(me.cur_page).fadeIn();if(me.cur_page.onshow)
-me.cur_page.onshow(me.cur_page);}
-this.set_status=function(txt){if(this.status_area)
-this.status_area.innerHTML=txt;}
+if(this.cp.page_width)
+$y(this.wrapper,{width:cint(this.cp.page_width)+'px'});}
+this.cur_page=null;this.add_page=function(label,onshow,onhide){var c=$a(this.center.body,'div');if(onshow)
+c.page_show=onshow;if(onhide)
+c.page_hide=onhide;wn.pages[label]=c;$dh(c);return c;}
+this.change_to=function(label){$dh(this.center.loading);if(me.cur_page&&wn.pages[label]!=me.cur_page){if(me.cur_page.page_hide)
+me.cur_page.page_hide();$dh(me.cur_page);}
+me.cur_page=wn.pages[label];me.cur_page_label=label;$(me.cur_page).fadeIn();if(me.cur_page.page_show)
+me.cur_page.page_show(me.cur_page);}
 this.set_session_changed=function(){if(this.session_message_set)return;var div=$a($i('body_div').parentNode,'div','',{textAlign:'center',fontSize:'14px',margin:'150px auto'});$dh('body_div');div.innerHTML='This session has been changed. Please <span class="link_type" onclick="window.location.reload()">refresh</span> to continue';this.session_message_set=1;}
 this.setup();}
 /*
  *	lib/js/legacy/app.js
  */
-var popup_cont;var session={};var start_sid=null;if(!wn)var wn={};function startup(){start_sid=get_cookie('sid');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=profile.first_name+(r.profile.last_name?(' '+r.profile.last_name):'');user_defaults=profile.defaults;user_roles=profile.roles;user_email=profile.email;profile.start_items=r.start_items;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={}
+var popup_cont;var session={};var start_sid=null;if(!wn)var wn={};function startup(){start_sid=get_cookie('sid');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.boot.user_fullnames?wn.boot.user_fullnames[user]:'Guest';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_history=function(r){rename_observers.push(nav_obj);}
-var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_history();var a=new Body();page_body.run_startup_code();page_body.setup_sidebar_menu();for(var i=0;i<startup_list.length;i++){startup_list[i]();}
-if(get_url_arg('embed')){newdoc(get_url_arg('embed'));return;}
+var callback=function(r,rt){if(r.exc)console.log(r.exc);setup_globals(r);setup_history();var a=new Body();page_body.run_startup_code();for(var i=0;i<startup_list.length;i++){startup_list[i]();}
 var t=to_open();if(t){historyChange(t);}else if(home_page){loadpage(home_page);}
 page_body.ready();}
 if(wn.boot){LocalDB.sync(wn.boot.docs);callback(wn.boot,'');if(wn.boot.error_messages)
@@ -1039,8 +1027,7 @@
 $(d).printElement();}
 _p.preview=function(html){var w=window.open('');w.document.write(html)
 w.document.close();}
-function setup_calendar(){var p=new Page('_calendar');p.wrapper.style.height='100%';p.wrapper.onshow=function(){wn.require('lib/js/legacy/widgets/calendar.js');if(!_c.calendar){_c.calendar=new Calendar();_c.calendar.init(p.cont);rename_observers.push(_c.calendar);}}}
-startup_list.push(setup_calendar);var resize_observers=[]
+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;}
@@ -1048,71 +1035,15 @@
  *	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');})
-/*
- *	lib/js/bootstrap/bootstrap-dropdown.js
- *//* ============================================================
- * bootstrap-dropdown.js v1.4.0
- * http://twitter.github.com/bootstrap/javascript.html#dropdown
- * ============================================================
- * Copyright 2011 Twitter, Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============================================================ */
-
-!function( $ ){
-
-  "use strict"
-
-  /* DROPDOWN PLUGIN DEFINITION
-   * ========================== */
-
-  $.fn.dropdown = function ( selector ) {
-    return this.each(function () {
-      $(this).delegate(selector || d, 'click', function (e) {
-        var li = $(this).parent('li')
-          , isActive = li.hasClass('open')
-
-        clearMenus()
-        !isActive && li.toggleClass('open')
-        return false
-      })
-    })
-  }
-
-  /* APPLY TO STANDARD DROPDOWN ELEMENTS
-   * =================================== */
-
-  var d = 'a.menu, .dropdown-toggle'
-
-  function clearMenus() {
-    $(d).parent('li').removeClass('open')
-  }
-
-  $(function () {
-    $('html').bind("click", clearMenus)
-    $('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
-  })
-
-}( window.jQuery || window.ender );
-
+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\
+  <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;var module_content_dict={};var user_full_nm={};wn.provide('erpnext.startup');erpnext.startup.set_globals=function(){pscript.is_erpnext_saas=cint(wn.control_panel.sync_with_gateway)
+var current_module;var is_system_manager=0;wn.provide('erpnext.startup');erpnext.startup.set_globals=function(){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(user=='Guest'){$dh(page_body.left_sidebar);if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
-if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{pscript.startup_make_sidebar();erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="erpnext-footer">\
+erpnext.startup.start=function(){$('#startup_div').html('Starting up...').toggle(true);erpnext.startup.set_globals();if(wn.boot.custom_css){set_style(wn.boot.custom_css);}
+if(user=='Guest'){if(wn.boot.website_settings.title_prefix){wn.title_prefix=wn.boot.website_settings.title_prefix;}}else{erpnext.toolbar.setup();erpnext.startup.set_periodic_updates();$('footer').html('<div class="web-footer erpnext-footer">\
    Powered by <a href="https://erpnext.com">ERPNext</a></div>');}
 $('#startup_div').toggle(false);}
 show_chart_browser=function(nm,chart_type){var call_back=function(){if(nm=='Sales Browser'){var sb_obj=new SalesBrowser();sb_obj.set_val(chart_type);}
@@ -1122,29 +1053,30 @@
 ModulePage=function(parent,module_name,module_label,help_page,callback){this.parent=parent;page_body.cur_page.module_page=this;this.wrapper=$a(parent,'div');this.module_name=module_name;this.transactions=[];this.page_head=new PageHeader(this.wrapper,module_label);if(help_page){var btn=this.page_head.add_button('Help',function(){loadpage(this.help_page)},1,'ui-icon-help')
 btn.help_page=help_page;}
 if(callback)this.callback=function(){callback();}}
-var update_messages=function(){if(inList(['Guest','Administrator'],user)){return;}
-$c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);}});}
+var update_messages=function(){if(inList(['Guest'],user)){return;}
+$c_page('home','event_updates','get_unread_messages',null,function(r,rt){if(!r.exc){page_body.wntoolbar.set_new_comments(r.message);var circle=$('#msg_count')
+if(circle){if(r.message.length){circle.find('span:first').text(r.message.length);circle.toggle(true);}else{circle.toggle(false);}}}else{clearInterval(wn.updates.id);}});}
 erpnext.startup.set_periodic_updates=function(){wn.updates={};if(wn.updates.id){clearInterval(wn.updates.id);}
-wn.updates.id=setInterval(update_messages,180000);}
+wn.updates.id=setInterval(update_messages,60000);}
 $(document).bind('startup',function(){erpnext.startup.start();});
 /*
  *	erpnext/website/js/topbar.js
  */
-wn.provide('erpnext.topbar');erpnext.topbar.TopBar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.topbar').dropdown();},make:function(){$('header').append('<div class="topbar">\
-   <div class="topbar-inner">\
+wn.provide('erpnext.navbar');erpnext.navbar.navbar=Class.extend({init:function(){this.make();$('.brand').html(wn.boot.website_settings.brand_html);this.make_items();$('.dropdown-toggle').dropdown();},make:function(){$('header').append('<div class="navbar navbar-fixed-top">\
+   <div class="navbar-inner">\
    <div class="container">\
     <a class="brand">[brand]</a>\
     <ul class="nav">\
     </ul>\
     <img src="lib/images/ui/spinner.gif" id="spinner"/>\
-    <ul class="nav secondary-nav">\
+    <ul class="nav pull-right">\
      <li><a href="#!Login Page">Login</a></li>\
     </ul>\
    </div>\
    </div>\
    </div>');$('.brand').attr('href','#!'+(wn.boot.website_settings.home_page||'Login Page'))},make_items:function(){var items=wn.boot.website_menus;for(var i=0;i<items.length;i++){var item=items[i];if(!item.parent_label&&item.parentfield=='top_bar_items'){item.route=item.url||item.custom_page;$('header .nav:first').append(repl('<li data-label="%(label)s">\
      <a href="#!%(route)s">%(label)s</a></li>',item))}}
-for(var i=0;i<items.length;i++){var item=items[i];if(item.parent_label&&item.parentfield=='top_bar_items'){$parent_li=$(repl('header li[data-label="%(parent_label)s"]',item));if(!$parent_li.hasClass('dropdown')){$parent_li.addClass('dropdown');$parent_li.find('a:first').addClass('dropdown-toggle');$parent_li.append('<ul class="dropdown-menu"></ul>');}
+for(var i=0;i<items.length;i++){var item=items[i];if(item.parent_label&&item.parentfield=='top_bar_items'){$parent_li=$(repl('header li[data-label="%(parent_label)s"]',item));if(!$parent_li.hasClass('dropdown')){$parent_li.addClass('dropdown');$parent_li.find('a:first').addClass('dropdown-toggle').attr('data-toggle','dropdown').attr('href','').append('<b class="caret"></b>').click(function(){return false;});$parent_li.append('<ul class="dropdown-menu"></ul>');}
 item.route=item.url||item.custom_page;$parent_li.find('.dropdown-menu').append(repl('<li data-label="%(label)s">\
      <a href="#!%(route)s">%(label)s</a></li>',item))}}}});erpnext.Footer=Class.extend({init:function(){$('footer').html(repl('<div class="web-footer">\
    <div class="web-footer-menu"><ul></ul></div>\
@@ -1154,4 +1086,4 @@
     <a href="https://erpnext.com">erpnext.com</a></div>\
   </div>',wn.boot.website_settings));this.make_items();},make_items:function(){var items=wn.boot.website_menus
 for(var i=0;i<items.length;i++){var item=items[i];if(!item.parent_label&&item.parentfield=='footer_items'){item.route=item.url||item.custom_page;$('.web-footer-menu ul').append(repl('<li><a href="#!%(route)s" \
-     data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.topbar.topbar=new erpnext.topbar.TopBar();})
\ No newline at end of file
+     data-label="%(label)s">%(label)s</a></li>',item))}}}});$(document).bind('startup',function(){erpnext.footer=new erpnext.Footer();erpnext.navbar.navbar=new erpnext.navbar.navbar();})
diff --git a/js/app.js b/js/app.js
index ec4da9a..f2e24bb 100644
--- a/js/app.js
+++ b/js/app.js
@@ -1,3 +1,19 @@
+// 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',
@@ -15,5 +31,11 @@
 });
 
 $(document).bind('toolbar_setup', function() {
-	$('.brand').html('<b>erp</b>next');	
-})
\ No newline at end of file
+	$('.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');
+	});
+})
diff --git a/rss.xml b/rss.xml
index f69724b..2aa7ead 100755
--- a/rss.xml
+++ b/rss.xml
@@ -1,5 +1,22 @@
 #!/usr/bin/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 cgi, cgitb, os, sys
 cgitb.enable()
 
diff --git a/sitemap.xml b/sitemap.xml
index 04e565b..d3e09fd 100755
--- a/sitemap.xml
+++ b/sitemap.xml
@@ -1,5 +1,21 @@
 #!/usr/bin/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 cgi, cgitb, os, sys
 cgitb.enable()
 
diff --git a/temp.py b/temp.py
new file mode 100644
index 0000000..cdbd4b0
--- /dev/null
+++ b/temp.py
@@ -0,0 +1,55 @@
+license = """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/>."""
+
+license2 = """Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com)
+
+MIT License (MIT)
+
+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:
+
+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.
+"""
+
+
+if __name__=='__main__':
+	import os
+	clicense = '\n'.join([('# ' + l) for l in license2.split('\n')])
+	
+	for wt in os.walk('lib/py/build/'):
+		for fname in wt[2]:
+			if fname.endswith('.py'):
+				path = os.path.join(wt[0], fname)
+				with open(path, 'r') as codefile:
+					codetxt = codefile.read()
+				
+				if codetxt.strip():
+					with open(path, 'w') as codefile:
+						codefile.write(clicense + '\n\n' + codetxt)
+				
+					print 'updated in ' + path				
\ No newline at end of file
diff --git a/version.num b/version.num
index 99fd457..0218075 100644
--- a/version.num
+++ b/version.num
@@ -1 +1 @@
-577
\ No newline at end of file
+747
diff --git a/wnf.py b/wnf.py
index 4f18187..d0a0d56 100755
--- a/wnf.py
+++ b/wnf.py
@@ -1,5 +1,21 @@
 #!/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):
@@ -23,13 +39,18 @@
 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")
-	parser.add_option("--replace", nargs=3, default=False, 
-						metavar = "search replace_by extension",
-						help="file search-replace")
+
+	# git
 	parser.add_option("--status", default=False, action="store_true",
 						help="git status")
 	parser.add_option("--pull", nargs=2, default=False,
@@ -41,22 +62,42 @@
 	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("-d", "--db",
-						dest="db_name",
-						help="Apply the patches on given db")
 	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")
-	parser.add_option('--sync_with_gateway', nargs=1, metavar = "1/0", help="Set or Unset Sync with Gateway")
+	parser.add_option('--sync_with_gateway', nargs=1, metavar = "1/0", \
+						help="Set or Unset Sync with Gateway")
+
+	# 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")
+	
 
 	return parser.parse_args()
 	
@@ -152,6 +193,22 @@
 		else:
 			webnotes.message_log.append("ERROR: sync_with_gateway can be either 0 or 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)
+	
 	# print messages
 	if webnotes.message_log:
 		print '\n'.join(webnotes.message_log)