tinymce fixes
diff --git a/website/doctype/web_page/web_page.js b/website/doctype/web_page/web_page.js
index 17e7f15..274fcab 100644
--- a/website/doctype/web_page/web_page.js
+++ b/website/doctype/web_page/web_page.js
@@ -1,24 +1,17 @@
 $.extend(cur_frm.cscript, {
 	layout: function(doc) {
-		if(!doc.layout) doc.layout = 'Two column with header'
-		hide_field(['head_section', 'side_section', 'javascript', 'css']);
-		if(doc.layout=='Two column with header') {
-			unhide_field(['head_section', 'side_section']);
-		}
-		if(doc.layout=='Two column') {
-			unhide_field('side_section');
-		}
-		if(doc.insert_code) {
-			if(!doc.javascript) {
-				doc.javascript = 'wn.pages["'+doc.name+'"].onload = function(wrapper) { }';				
+		if(!doc.__islocal) {
+			if(doc.insert_code) {
+				if(!doc.javascript) {
+					cur_frm.set_value("javascript", 
+						'wn.pages["'+doc.name+'"].onload = function(wrapper) { }');
+				}
 			}
-			unhide_field('javascript');
-		}
-		if(doc.insert_style) {
-			if(!doc.css) {
-				doc.css = '#page-'+doc.name+' { }';	
+			if(doc.insert_style) {
+				if(!doc.css) {
+					cur_frm.set_value("css", '#page-'+doc.name+' { }');	
+				}
 			}
-			unhide_field('css');
 		}
 	},
 	refresh: function(doc) {