diff -NBurp mythweb-old/includes/sorting.php mythweb/includes/sorting.php
--- mythweb-old/includes/sorting.php	2006-02-26 03:20:07.000000000 -0600
+++ mythweb/includes/sorting.php	2006-02-26 04:39:45.000000000 -0600
@@ -70,42 +70,52 @@
         isset($_GET['reverse']) or $_GET['reverse'] = $_POST['reverse'];
         isset($_GET['sortby'])  or $_GET['sortby']  = $_POST['sortby'];
     // Now we build an array the user's sort preferences
-        if (!is_array($_SESSION[$session]) || !count($_SESSION[$session]))
+        if (!is_array($_SESSION[$session]) || !count($_SESSION[$session])) {
             $_SESSION[$session] = array(array('field' => 'airdate',
                                               'reverse' => false),
                                         array('field' => 'title',
                                               'reverse' => false));
+        }
     // If we were given a sort parameter, let's put it into the sort preferences
         if ($_GET['sortby']) {
             $_GET['sortby'] = strtolower($_GET['sortby']);
-            if (!function_exists('by_'.$_GET['sortby']))
+            if (!function_exists('by_'.$_GET['sortby'])) {
                 $_GET['sortby'] = 'title';
+	    }
         // This sortby method is the first element in the sort array, let's reverse it (unless told otherwise)
             if ($_SESSION[$session][0]['field'] == $_GET['sortby']) {
-                if (isset($_GET['reverse']))
+                if (isset($_GET['reverse'])) {
                     $_SESSION[$session][0]['reverse'] = ($_GET['reverse'] > 0 || eregi('^y', $_GET['reverse'])) ? true : false;
-                else
+		}
+                else {
                     $_SESSION[$session][0]['reverse'] = $_SESSION[$session][0]['reverse'] ? false : true;
+		}
             }
         // Otherwise, we need to parse the array, and add the current choice to the top
             else {
             // Scan the sort array for any entries matching the current choice, and remove them
                 foreach ($_SESSION[$session] as $key => $sort) {
                 // Found a match, or an old/accidental sort method - remove the sort entry
-                    if ($sort['field'] == $_GET['sortby'] || !function_exists('by_'.$sort['field']))
+                    if ($sort['field'] == $_GET['sortby'] || !function_exists('by_'.$sort['field'])) {
                         unset($_SESSION[$session][$key]);
+		    }
                 }
             // Add this choice to the top of the list
                 array_unshift($_SESSION[$session], array('field'   => $_GET['sortby'],
-                                                         'reverse' => $_GET['reverse'] ? true : false));
+                                                         'reverse' => $_GET['reverse'] ? false : false));
             }
         }
     // No sortby, but requested a reversal of the main field
-        elseif ($_GET['reverse'])
+        elseif ($_GET['reverse']) {
             $_SESSION[$session][0]['reverse'] = $_SESSION[$session][0]['reverse'] ? false : true;
+	}
+	else {
+	  $_SESSION[$session][0]['reverse'] = false;
+	}
     // Once we've processed the information, we should make sure that we're actually sorting an array
-        if (!count($programs))
+        if (!count($programs)) {
             return;
+	}
     // Now we just need to sort the array
         $GLOBALS['user_sort_choice'] = &$_SESSION[$session];
         usort($programs, 'by_user_choice');
diff -NBurp mythweb-old/modules/video/edit.php mythweb/modules/video/edit.php
--- mythweb-old/modules/video/edit.php	2006-02-26 03:20:07.000000000 -0600
+++ mythweb/modules/video/edit.php	2006-02-26 04:40:27.000000000 -0600
@@ -44,7 +44,7 @@ if (isset($_POST['submit'])) {
 ?>
 <html>
 <head>
-<script language="JavaScript">
+<script type="text/javascript">
 <!--
     function refreshParent() {
         window.opener.location.href = window.opener.location.href;
@@ -99,13 +99,13 @@ if (isset($_POST['submit'])) {
 <table width="302" border="0" cellspacing="0" cellpadding="3">
 <tr>
     <td width="99">Title:</td>
-    <td width="301"><input name="title" type="text" value="<?php if (isset($title)) print $title ?>"></td>
+    <td width="301"><input name="title" type="text" value="<?php if (isset($title)) echo $title ?>"></td>
 </tr><tr>
     <td>Director:</td>
-    <td><input name="director" type="text" value="<?php if (isset($director)) print $director ?>"></td>
+    <td><input name="director" type="text" value="<?php if (isset($director)) echo $director ?>"></td>
 </tr><tr>
     <td>Plot:</td>
-    <td><textarea name="plot" rows="5" cols="30" wrap="VIRTUAL"><?php if (isset($plot)) print $plot ?></textarea></td>
+    <td><textarea name="plot" rows="5" cols="30" wrap="VIRTUAL"><?php if (isset($plot)) echo $plot ?></textarea></td>
 </tr><tr>
     <td>Category:</td>
     <td><select name="category">
@@ -122,22 +122,22 @@ if (isset($_POST['submit'])) {
         ?></select></td>
 </tr><tr>
     <td>Rating:</td>
-    <td><input name="rating" type="text" value="<?php if (isset($rating)) print $rating ?>"></td>
+    <td><input name="rating" type="text" value="<?php if (isset($rating)) echo $rating ?>"></td>
 </tr><tr>
     <td>IMDB:</td>
-    <td><input name="inetref" type="text" value="<?php if (isset($inetref)) print $inetref ?>"></td>
+    <td><input name="inetref" type="text" value="<?php if (isset($inetref)) echo $inetref ?>"></td>
 </tr><tr>
     <td>Year:</td>
-    <td><input name="year" type="text" size=4 value="<?php if (isset($year)) print $year ?>"></td>
+    <td><input name="year" type="text" size=4 value="<?php if (isset($year)) echo $year ?>"></td>
 </tr><tr>
     <td>Userrating:</td>
-    <td><input name="userrating" type="text" size=3 value="<?php if (isset($userrating)) print $userrating ?>"></td>
+    <td><input name="userrating" type="text" size=3 value="<?php if (isset($userrating)) echo $userrating ?>"></td>
 </tr><tr>
     <td>Length:</td>
-    <td><input name="length" type="text" size=3 value="<?php if (isset($length)) print $length ?>"> in minutes</td>
+    <td><input name="length" type="text" size=3 value="<?php if (isset($length)) echo $length ?>"> in minutes</td>
 </tr><tr>
     <td></td>
-    <td><input type="hidden" name="intid" value="<?php if (isset($_REQUEST['intid'])) print $_REQUEST['intid'] ?>">
+    <td><input type="hidden" name="intid" value="<?php if (isset($_REQUEST['intid'])) echo $_REQUEST['intid'] ?>">
        <input type="submit" name="submit" value="submit"></td>
 </tr>
 </table>
diff -NBurp mythweb-old/themes/default/video/video.php mythweb/themes/default/video/video.php
--- mythweb-old/themes/default/video/video.php	2006-02-26 03:20:07.000000000 -0600
+++ mythweb/themes/default/video/video.php	2006-02-26 04:18:43.000000000 -0600
@@ -20,7 +20,7 @@
     require_once theme_dir.'/header.php';
 ?>
 
-<SCRIPT LANGUAGE=JAVASCRIPT TYPE="TEXT/JAVASCRIPT">
+<script type="text/javascript">
 <!--Hide script from old browsers
 
 function newWindow(newContent)
@@ -29,12 +29,12 @@ function newWindow(newContent)
  }
 
  //Stop hiding script from old browsers -->
- </SCRIPT>
+ </script>
 <table width="100%" border="0" cellpadding="4" cellspacing="2" class="list small">
 <tr class="menu">
 <td>
 <?php
-    echo '<form action="'.root."video\" method=\"GET\">\n";
+    echo '<form action="'.root."video\" method=\"get\">\n";
     echo t('Display') . ": ";
     echo "<select name=\"category\">\n";
     echo '<option value="-1"';
@@ -61,36 +61,36 @@ function newWindow(newContent)
 <?php   if (show_video_covers) { ?>
     <td><?php echo t('cover') ?></td>
 <?php   } ?>
-    <td><a href="<?php echo root ?>video?sortby=title"><?php    echo t('title') ?></a></td>
-    <td><a href="<?php echo root ?>video?sortby=director"><?php echo t('director') ?></a></td>
+    <td><a href="<?php echo root ?>video?sortby=title<?php echo $_GET['category'] ? ('&amp;category=' . $_GET['category']) : ''?>"><?php    echo t('title') ?></a></td>
+    <td><a href="<?php echo root ?>video?sortby=director<?php echo $_GET['category'] ? ('&amp;category=' . $_GET['category']) : ''?>"><?php echo t('director') ?></a></td>
     <td><?php echo t('plot')     ?></td>
-    <td><a href="<?php echo root ?>video?sortby=category"><?php echo t('category') ?></a></td>
-    <td><?php echo t('rating')   ?></a></td>
-    <td><?php echo t('IMDB')     ?></a></td>
-    <td><a href="<?php echo root ?>video?sortby=length"><?php     echo t('length') ?></a></td>
-    <td><a href="<?php echo root ?>video?sortby=userrating"><?php echo t('imdb rating') ?></a></td>
-    <td><a href="<?php echo root ?>video?sortby=year"><?php       echo t('year') ?></a></td>
-    <td><?php echo t('Edit') ?></a></td>
+    <td><a href="<?php echo root ?>video?sortby=category<?php echo $_GET['category'] ? ('&amp;category=' . $_GET['category']) : ''?>"><?php echo t('category') ?></a></td>
+    <td><?php echo t('rating')   ?></td>
+    <td><?php echo t('IMDB')     ?></td>
+    <td><a href="<?php echo root ?>video?sortby=length<?php echo $_GET['category'] ? ('&amp;category=' . $_GET['category']) : ''?>"><?php     echo t('length') ?></a></td>
+    <td><a href="<?php echo root ?>video?sortby=userrating<?php echo $_GET['category'] ? ('&amp;category=' . $_GET['category']) : ''?>"><?php echo t('imdb rating') ?></a></td>
+    <td><a href="<?php echo root ?>video?sortby=year<?php echo $_GET['category'] ? ('&amp;category=' . $_GET['category']) : ''?>"><?php       echo t('year') ?></a></td>
+    <td><?php echo t('Edit') ?></td>
 </tr><?php
     $row = 0;
     foreach ($All_Shows as $show) {
     ?><tr class="recorded">
     <td><?php
         if (show_video_covers && file_exists(video_img_path.'/'.basename($show->coverfile)))
-            echo '<a href="'.$show->url.'"><img id="'.html_entities($show->filename).'" src="'.video_img_path.'/'.basename($show->coverfile).'" width="'.video_img_width.'" height="'.video_img_height.'">';
+            echo '<a href="'.$show->url.'"><img src="'.video_img_path.'/'.basename($show->coverfile).'" width="'.video_img_width.'" height="'.video_img_height.'" alt="' . html_entities($show->title) . '"/></a>';
         else
             echo '&nbsp;';
     ?></td>
     <td><?php echo '<a href="'.$show->url.'">'.html_entities($show->title).'</a>' ?></td>
-    <td><?php echo $show->director                   ?></td>
-    <td><?php echo $show->plot                       ?></td>
-    <td><?php echo $Category_String[$show->category] ?></td>
+    <td><?php echo html_entities($show->director)                   ?></td>
+    <td><?php echo html_entities($show->plot)                       ?></td>
+    <td><?php echo html_entities($Category_String[$show->category]) ?></td>
     <td><?php echo $show->rating                     ?></td>
     <td><a href="http://www.imdb.com/Title?<?php echo $show->inetref ?>"><?php echo $show->inetref ?></a></td>
     <td nowrap><?php echo nice_length($show->length * 60) ?></td>
     <td nowrap><?php echo $show->userrating ?></td>
     <td nowrap><?php echo $show->year ?></td>
-    <td><a href="javascript:newWindow ('<?php echo root ?>video/edit?intid=<?php echo $show->intid ?>')" ><?php echo t('Edit') ?></a>
+    <td><a href="javascript:newWindow('<?php echo root ?>video/edit?intid=<?php echo $show->intid ?>')"><?php echo t('Edit') ?></a>
 <?php
         $row++;
     }
