Index: trunk/CHANGELOG
===================================================================
--- trunk/CHANGELOG	(revision 397)
+++ trunk/CHANGELOG	(revision 398)
@@ -12,6 +12,7 @@
 
 ------------------------------------- 2.6.5 -------------------------------------
 23-Dez-2006 Matthias Gallas
+#	Fixed IE allows to set a page as parent of itself (#320)
 #	Fixed problem with Page Title has to be escaped (#287)
 #	Fixed the possibility to call the index.php of the templates directly in the browser (#291)
 21-Dez-2006 Matthias Gallas
Index: trunk/wb/admin/pages/settings.php
===================================================================
--- trunk/wb/admin/pages/settings.php	(revision 397)
+++ trunk/wb/admin/pages/settings.php	(revision 398)
@@ -1,5 +1,7 @@
 <?php
 
+// $Id$
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -253,10 +255,10 @@
 			if($results_array['parent'] == $page['page_id']) {
 				$template->set_var('SELECTED', ' selected');
 			} elseif($results_array['page_id'] == $page['page_id']) {
-				$template->set_var('SELECTED', ' disabled');
+				$template->set_var('SELECTED', ' disabled="disabled" style="color: #aaa;"');
 				$list_next_level=false;
 			} elseif($can_modify != true) {
-				$template->set_var('SELECTED', ' disabled');
+				$template->set_var('SELECTED', ' disabled="disabled" style="color: #aaa;"');
 			} else {
 				$template->set_var('SELECTED', '');
 			}
Index: trunk/wb/admin/pages/index.php
===================================================================
--- trunk/wb/admin/pages/index.php	(revision 397)
+++ trunk/wb/admin/pages/index.php	(revision 398)
@@ -1,5 +1,7 @@
 <?php
 
+// $Id$
+
 /*
 
  Website Baker Project <http://www.websitebaker.org/>
@@ -466,7 +468,7 @@
 				if($can_modify == true) {
 					$template->set_var('DISABLED', '');
 				} else {
-					$template->set_var('DISABLED', ' disabled');
+					$template->set_var('DISABLED', ' disabled="disabled" style="color: #aaa;"');
 				}
 				$template->parse('page_list2', 'page_list_block2', true);
 		}
Index: trunk/wb/admin/pages/settings.html
===================================================================
--- trunk/wb/admin/pages/settings.html	(revision 397)
+++ trunk/wb/admin/pages/settings.html	(revision 398)
@@ -8,6 +8,29 @@
 		document.getElementById('allowed_viewers').style.display = 'none';
 	}
 }
+var lastselectedindex = new Array();
+
+function disabled_hack_for_ie(sel) { 
+	var sels = document.getElementsByTagName("select");
+
+    var i;
+    var sel_num_in_doc = 0;
+
+    for (i = 0; i <sels.length; i++)
+    {    if (sel == sels[i])
+        {    sel_num_in_doc = i;
+        }
+    }
+
+     // never true for browsers that support option.disabled
+    if (sel.options[sel.selectedIndex].disabled)
+    {    sel.selectedIndex = lastselectedindex[sel_num_in_doc];
+    } else
+    {    lastselectedindex[sel_num_in_doc] = sel.selectedIndex;
+    }
+
+    return true;
+}
 </script>
 
 <table cellpadding="5" cellspacing="0" border="0" align="center" width="100%" height="50" style="margin-bottom: 10px;">
@@ -37,7 +60,7 @@
 <table cellpadding="2" cellspacing="0" border="0" width="100%" align="center">
 <tr>
 	<td width="100" height="20">{TEXT_PAGE_TITLE}:</td>
-	<td with="240" height="20">
+	<td width="240" height="20">
 		<input type="text" name="page_title" value="{PAGE_TITLE}" style="width: 232px;" />
 	</td>
 	<td rowspan="10" valign="top" style="padding-left: 20px; padding-top: 8px;">
@@ -67,14 +90,14 @@
 </tr>
 <tr height="20">
 	<td width="100" height="20">{TEXT_MENU_TITLE}:</td>
-	<td with="240" height="20">
+	<td width="240" height="20">
 		<input type="text" name="menu_title" value="{MENU_TITLE}" style="width: 232px;" />
 	</td>
 </tr>
 <tr height="20">
 	<td width="100">{TEXT_PARENT}:</td>
-	<td with="240">
-		<select name="parent" style="width: 240px;">
+	<td width="240">
+		<select name="parent" style="width: 240px;" onchange="return disabled_hack_for_ie(this);">
 			<!-- BEGIN page_list_block2 -->
 			<option value="{ID}"{SELECTED}>{TITLE}</option>
 			<!-- END page_list_block2 -->
