Index: themes/default_ajax/inc/afunc.js
===================================================================
--- themes/default_ajax/inc/afunc.js	(revision e11e175ffbdaac2b7504bf5dd83aee7e579eaea0)
+++ themes/default_ajax/inc/afunc.js	(revision a7a1edb651c11ad353d1b55d5bc20b8dc8f70284)
@@ -49,4 +49,54 @@
 }
 
+function loadcontent_dirpriority( iurl, hash, dir, dirpriority ) {
+ var xmlHttp;
+ try {
+  xmlHttp = new XMLHttpRequest();
+ }
+ catch ( e ) {
+  try {
+   xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP" );
+  }
+  catch ( e ) {
+   try {
+    xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" );
+   } catch ( e ) {
+    alert( "Your browser does not support AJAX!" );
+    return false;
+   }
+  }
+ }
+ xmlHttp.onreadystatechange = function() {
+  switch ( xmlHttp.readyState ) {
+   case 0 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 0;
+    break;
+   }
+   case 1 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Requesting...';
+    break;
+   }
+   case 2 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 2;
+    break;
+   }
+   case 3 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = 'Processing...';
+    break;
+   }
+   case 4 : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = xmlHttp.responseText;
+    break;
+   }
+   default : {
+    document.getElementById( 'torrent_' + hash + '_content' ).innerHTML = '.';
+    break;
+   }
+  }
+ }
+ xmlHttp.open( 'GET', iurl + '?mod=changedirpriority&hash=' + hash + '&dir=' + dir + '&dirpriority=' + dirpriority + '&ajax=true', true );
+ xmlHttp.send( null );
+}
+
 function loadcontent_filepriority( iurl, hash, id, filepriority ) {
  var xmlHttp;
