diff -ruN 0.10/setup.py TracWikiToPdf-2.0/setup.py
--- 0.10/setup.py	2008-06-18 13:30:58.000000000 +0200
+++ TracWikiToPdf-2.0/setup.py	2008-07-04 14:31:28.000000000 +0200
@@ -9,7 +9,7 @@
     name = 'TracWikiToPdf',
     version = '2.0',
     packages = ['wikitopdf'],
-    package_data={ 'wikitopdf' : [ 'templates/*.cs' ] },
+    package_data={ 'wikitopdf' : [ 'templates/*.cs', 'htdocs/js/*.js' ] },
     author = "Diorgenes Felipe Grzesiuk",
     author_email = "diorgenes@prognus.com.br",
     description = "Generating PDF files from Wiki pages",
diff -ruN 0.10/wikitopdf/htdocs/js/admin_wikitopdf.js TracWikiToPdf-2.0/wikitopdf/htdocs/js/admin_wikitopdf.js
--- 0.10/wikitopdf/htdocs/js/admin_wikitopdf.js	1970-01-01 01:00:00.000000000 +0100
+++ TracWikiToPdf-2.0/wikitopdf/htdocs/js/admin_wikitopdf.js	2008-07-04 14:32:34.000000000 +0200
@@ -0,0 +1,27 @@
+function move_item(from, to) {
+    var from_box = document.getElementById(from+'pages_select');
+    var to_box = document.getElementById(to+'pages_select');
+    to_box.options[to_box.length] = from_box.options[from_box.selectedIndex];
+    from_box.options[from_box.selectedIndex] = null;
+}
+
+function reorder_item(from, dir) {
+    var box = document.getElementById(from+'pages_select');
+    var i = box.selectedIndex;
+    var j = i + dir;
+    if(j<0 || j>=box.options.length) { return }
+    var temp = box.options[i];
+    var temp2 = box.options[j];
+    box.options[i] = new Option(temp2.value, temp2.value);
+    box.options[j] = new Option(temp.value, temp.value);
+    box.selectedIndex = j;
+}
+
+function compile_pages(form) {
+    var arr = new Array();
+    for(i=0;i<form.rightpages.options.length;i++) {
+        arr.push(form.rightpages.options[i].value);
+    }
+    form.rightpages_all.value = arr.join(',');
+    return 1;
+}
diff -ruN 0.10/wikitopdf/__init__.py TracWikiToPdf-2.0/wikitopdf/__init__.py
--- 0.10/wikitopdf/__init__.py	1970-01-01 01:00:00.000000000 +0100
+++ TracWikiToPdf-2.0/wikitopdf/__init__.py	2008-07-04 14:41:31.000000000 +0200
@@ -0,0 +1 @@
+# makes it a module
diff -ruN 0.10/wikitopdf/templates/admin_wikitopdf.cs TracWikiToPdf-2.0/wikitopdf/templates/admin_wikitopdf.cs
--- 0.10/wikitopdf/templates/admin_wikitopdf.cs	2008-06-18 13:08:38.000000000 +0200
+++ TracWikiToPdf-2.0/wikitopdf/templates/admin_wikitopdf.cs	2008-07-04 14:32:50.000000000 +0200
@@ -1,35 +1,5 @@
 <h2>Generate Wiki to PDF</h2>
 
-<script class="mod" type="text/javascript">
-    function move_item(from, to) {
-        var from_box = document.getElementById(from+'pages_select');
-        var to_box = document.getElementById(to+'pages_select');
-        to_box.options[to_box.length] = from_box.options[from_box.selectedIndex];
-        from_box.options[from_box.selectedIndex] = null;
-    }
-    
-    function reorder_item(from, dir) {
-        var box = document.getElementById(from+'pages_select');
-        var i = box.selectedIndex;
-        var j = i + dir;
-        if(j<0 || j>=box.options.length) { return }
-        var temp = box.options[i];
-        var temp2 = box.options[j];
-        box.options[i] = new Option(temp2.value, temp2.value);
-        box.options[j] = new Option(temp.value, temp.value);
-        box.selectedIndex = j;
-    }
-    
-    function compile_pages(form) {
-        var arr = new Array();
-        for(i=0;i<form.rightpages.options.length;i++) {
-            arr.push(form.rightpages.options[i].value);
-        }
-        form.rightpages_all.value = arr.join(',');
-        return 1;
-    }
-</script>
-
 <form method="post" onsubmit="compile_pages(this);">
 
 <fieldset>
diff -ruN 0.10/wikitopdf/web_ui.py TracWikiToPdf-2.0/wikitopdf/web_ui.py
--- 0.10/wikitopdf/web_ui.py	2008-06-18 13:30:58.000000000 +0200
+++ TracWikiToPdf-2.0/wikitopdf/web_ui.py	2008-07-04 14:35:52.000000000 +0200
@@ -4,7 +4,7 @@
 """
 
 from trac.core import *
-from trac.web.chrome import ITemplateProvider
+from trac.web.chrome import ITemplateProvider, add_script
 from trac.wiki.api import WikiSystem
 from webadmin.web_ui import IAdminPageProvider
 from api import IWikitoPDFFormat
@@ -25,7 +25,7 @@
         
     def get_htdocs_dirs(self):
         from pkg_resources import resource_filename
-        return []
+        return [('wikitopdf', resource_filename(__name__, 'htdocs'))]
 
     # IAdminPageProvider methods
     def get_admin_pages(self, req):
@@ -70,5 +70,7 @@
         req.hdf['wikitopdf.formats'] = formats
         req.hdf['wikitopdf.default_format'] = formats.iterkeys().next()
 
+        add_script(req, 'wikitopdf/js/admin_wikitopdf.js')
+
         return 'admin_wikitopdf.cs', None
 
