function insert_version_links() {
    var labels = ['dev', '0.4', '0.3'];

    document.write('<ul class="versions">\n');

    for (i = 0; i < labels.length; i++){
        document.write('<li> <a href="URL">skimage VERSION</a> </li>\n'
                        .replace('VERSION', labels[i])
                        .replace('URL', 'http://scikits-image.org/docs/' + labels[i]));
    }
    document.write('</ul>\n');
}


function insert_version_links() {
    var labels = ['0.5dev', '0.4', '0.3'];
    var links = ['http://scikits-image.org/docs/dev/index.html',
                 'http://scikits-image.org/docs/0.4/index.html',
                 'http://scikits-image.org/docs/0.3/index.html'];

    document.write('<ul class="versions">\n');

    for (i = 0; i < labels.length; i++){
        document.write('<li> <a href="URL">skimage VERSION</a> </li>\n'
                        .replace('VERSION', labels[i])
                        .replace('URL', links[i]));
    }
    document.write('</ul>\n');
}


--- 
+++ 
@@ -1,17 +1,12 @@
-
 function insert_version_links() {
-    var labels = ['0.5dev', '0.4', '0.3'];
-    var links = ['http://scikits-image.org/docs/dev/index.html',
-                 'http://scikits-image.org/docs/0.4/index.html',
-                 'http://scikits-image.org/docs/0.3/index.html'];
+    var labels = ['dev', '0.4', '0.3'];
 
     document.write('<ul class="versions">\n');
 
     for (i = 0; i < labels.length; i++){
         document.write('<li> <a href="URL">skimage VERSION</a> </li>\n'
                         .replace('VERSION', labels[i])
-                        .replace('URL', links[i]));
+                        .replace('URL', 'http://scikits-image.org/docs/' + labels[i]));
     }
     document.write('</ul>\n');
 }
-
DOC: Refactor Javascript for listing doc versions to only have the version in one place.
