diff --git a/web/lib/html_themes.ssjs b/web/lib/html_themes.ssjs
new file mode 100644
index 0000000000000000000000000000000000000000..e7b56be4fb534f55b7d73307420d1c2be88e2f9b
--- /dev/null
+++ b/web/lib/html_themes.ssjs
@@ -0,0 +1,13 @@
+/* List of HTML theme packs installed */
+
+Themes=new Object;
+var CurrTheme="Default";
+
+load(system.text_dir+'html_templates/html_themes.ssjs');
+
+/* Read in current users selected theme if it exists */
+if(file_exists(system.data_dir+'user/'+format("%04d.html_theme",user.number)))
+	load(system.data_dir+'user/'+format("%04d.html_theme",user.number));
+
+if(Themes[CurrTheme] == undefined || Themes[CurrTheme].dir == undefined)
+	CurrTheme="Default";
diff --git a/web/lib/template.ssjs b/web/lib/template.ssjs
index 03806a9c2a75f2c1798b27c4094065cac53b5fb0..3d29dac2e8e1776fabd893909a4d9d0eddd456f7 100644
--- a/web/lib/template.ssjs
+++ b/web/lib/template.ssjs
@@ -23,9 +23,10 @@
 /* $Id$ */
 
 template=new Object;
+load("html_inc/html_themes.ssjs");
 
 function write_template(filename)  {
-	var inc=new File(system.text_dir+"html_templates"+'/'+filename);
+	var inc=new File(system.text_dir+"html_templates"+'/'+Themes[CurrTheme].dir+'/'+filename);
 	if(!inc.open("r",true,1024)) {
 		horrible_error("Cannot open template file "+system.text_dir+"html_templates"+'/'+filename+"!");
 	}
diff --git a/web/templates/error.inc b/web/templates/default/error.inc
similarity index 100%
rename from web/templates/error.inc
rename to web/templates/default/error.inc
diff --git a/web/templates/footer.inc b/web/templates/default/footer.inc
similarity index 100%
rename from web/templates/footer.inc
rename to web/templates/default/footer.inc
diff --git a/web/templates/header.inc b/web/templates/default/header.inc
similarity index 100%
rename from web/templates/header.inc
rename to web/templates/default/header.inc
diff --git a/web/templates/infomenu.inc b/web/templates/default/infomenu.inc
similarity index 100%
rename from web/templates/infomenu.inc
rename to web/templates/default/infomenu.inc
diff --git a/web/templates/mainindex.inc b/web/templates/default/mainindex.inc
similarity index 100%
rename from web/templates/mainindex.inc
rename to web/templates/default/mainindex.inc
diff --git a/web/templates/memberindex.inc b/web/templates/default/memberindex.inc
similarity index 100%
rename from web/templates/memberindex.inc
rename to web/templates/default/memberindex.inc
diff --git a/web/templates/msgs/groups.inc b/web/templates/default/msgs/groups.inc
similarity index 100%
rename from web/templates/msgs/groups.inc
rename to web/templates/default/msgs/groups.inc
diff --git a/web/templates/msgs/management.inc b/web/templates/default/msgs/management.inc
similarity index 100%
rename from web/templates/msgs/management.inc
rename to web/templates/default/msgs/management.inc
diff --git a/web/templates/msgs/msg.inc b/web/templates/default/msgs/msg.inc
similarity index 100%
rename from web/templates/msgs/msg.inc
rename to web/templates/default/msgs/msg.inc
diff --git a/web/templates/msgs/msgs.inc b/web/templates/default/msgs/msgs.inc
similarity index 100%
rename from web/templates/msgs/msgs.inc
rename to web/templates/default/msgs/msgs.inc
diff --git a/web/templates/msgs/post.inc b/web/templates/default/msgs/post.inc
similarity index 100%
rename from web/templates/msgs/post.inc
rename to web/templates/default/msgs/post.inc
diff --git a/web/templates/msgs/posted.inc b/web/templates/default/msgs/posted.inc
similarity index 100%
rename from web/templates/msgs/posted.inc
rename to web/templates/default/msgs/posted.inc
diff --git a/web/templates/msgs/reply.inc b/web/templates/default/msgs/reply.inc
similarity index 100%
rename from web/templates/msgs/reply.inc
rename to web/templates/default/msgs/reply.inc
diff --git a/web/templates/msgs/subinfo.inc b/web/templates/default/msgs/subinfo.inc
similarity index 100%
rename from web/templates/msgs/subinfo.inc
rename to web/templates/default/msgs/subinfo.inc
diff --git a/web/templates/msgs/subs.inc b/web/templates/default/msgs/subs.inc
similarity index 100%
rename from web/templates/msgs/subs.inc
rename to web/templates/default/msgs/subs.inc
diff --git a/web/templates/msgs/textmsg.inc b/web/templates/default/msgs/textmsg.inc
similarity index 100%
rename from web/templates/msgs/textmsg.inc
rename to web/templates/default/msgs/textmsg.inc
diff --git a/web/templates/newuser.inc b/web/templates/default/newuser.inc
similarity index 100%
rename from web/templates/newuser.inc
rename to web/templates/default/newuser.inc
diff --git a/web/templates/newuser_created.inc b/web/templates/default/newuser_created.inc
similarity index 100%
rename from web/templates/newuser_created.inc
rename to web/templates/default/newuser_created.inc
diff --git a/web/templates/sysinfo.inc b/web/templates/default/sysinfo.inc
similarity index 100%
rename from web/templates/sysinfo.inc
rename to web/templates/default/sysinfo.inc
diff --git a/web/templates/userlist.inc b/web/templates/default/userlist.inc
similarity index 100%
rename from web/templates/userlist.inc
rename to web/templates/default/userlist.inc
diff --git a/web/templates/userstats.inc b/web/templates/default/userstats.inc
similarity index 100%
rename from web/templates/userstats.inc
rename to web/templates/default/userstats.inc
diff --git a/web/templates/html_themes.ssjs b/web/templates/html_themes.ssjs
new file mode 100644
index 0000000000000000000000000000000000000000..3ae1da120da8cd1ec83b6b3d147ab79f16a6fd89
--- /dev/null
+++ b/web/templates/html_themes.ssjs
@@ -0,0 +1,4 @@
+/* Edit this bit to add/remove/modify theme descriptions and dirs */
+Themes["Default"]=new Object;
+Themes["Default"].desc="Default Synchronet Theme";
+Themes["Default"].dir="default";