Index: tags/Ver2.2.4/xpressme_integration_kit/blocks/block_common.php
===================================================================
--- trunk/xpressme_integration_kit/blocks/block_common.php	(revision 495)
+++ tags/Ver2.2.4/xpressme_integration_kit/blocks/block_common.php	(revision 515)
@@ -72,18 +72,18 @@
     }
     $output = _MB_XP2_CATS_SELECT ."<br />\n";
-    $output .= 	"<input type='hidden' name='$option_name' value='$value' />\n";
-    $output .= '&nbsp;&nbsp;<select name="categorie" '.$size.' multiple="multiple" onclick="CatSelect()">' ."\n";
+    $output .= '&nbsp;&nbsp;<select name="categorie" id="cat_sel" '.$size.' multiple="multiple" onclick="CatSelect()">' ."\n";
     $output .= $option;
-    $output .= '</select><br />';
+    $output .= '</select>';
+    $output .= 	'&emsp;' .  _MB_XP2_CATS_DIRECT_SELECT . " <input type='text' name='$option_name' id='cat_csv' value='$value' /><br />\n";
     $output .= '
 <script type="text/javascript">
     function CatSelect(){
         var idx=new Array();
-        var sel=document.forms["blockform"].elements["categorie"].options;
+        var sel = document.getElementById("cat_sel").options;
         for(var i=0, n=0; i<sel.length; i++){
             if(sel[i].selected){ idx[n++]=sel[i].value; }
         }
         if(idx.length>0){
-        	document.forms["blockform"].elements["' .$option_name . '"].value = idx;
+        	document.getElementById("cat_csv").value = idx;
 		}
     }
@@ -122,6 +122,6 @@
 
     $output = _MB_XP2_COM_TYPE . "<br />\n";
-    $output .= 	"<input type='hidden' name='$option_name' value='$value' />\n";
-    $output .= '&nbsp;&nbsp;<select name="com_type" multiple="multiple" onclick="ComTypeSelect()">' ."\n";
+    $output .= 	"<input type='hidden' name='$option_name' id='com_hidden' value='$value' />\n";
+    $output .= '&nbsp;&nbsp;<select name="com_type" id="com_type" multiple="multiple" onclick="ComTypeSelect()">' ."\n";
     $output .= $option;
     $output .= '</select><br />';
@@ -130,10 +130,10 @@
     function ComTypeSelect(){
         var idx=new Array();
-        var sel=document.forms["blockform"].elements["com_type"].options;
+        var sel=document.getElementById("com_type").options;
         for(var i=0, n=0; i<sel.length; i++){
             if(sel[i].selected){ idx[n++]=sel[i].value; }
         }
         if(idx.length>0){
-        	document.forms["blockform"].elements["' .$option_name . '"].value = idx;
+	       	document.getElementById("com_hidden").value = idx;
 		}
     }
@@ -165,6 +165,6 @@
 	
 	$output = _MB_XP2_THISTEMPLATE . "\n";
-	$output .= 	'<input type="hidden" size="50" name="' . $option_name . '" value="' . $value .'"/>' . "\n";
-    $output .= '&nbsp;<select name="template_type" onclick="Template_Make()">' ."\n";
+	$output .= 	'<input type="hidden" size="50" name="' . $option_name . '" id="template_hide" value="' . $value .'"/>' . "\n";
+    $output .= '&nbsp;<select name="template_type" id="template_type" onclick="Template_Make()">' ."\n";
 	switch ($temp_type){
 		case 'db':
@@ -179,11 +179,11 @@
 	$output .= '</select>';
 	$output .= '<b>:'.$mydirname . '_</b>';
-	$output .= '<input type="text" size="30" name="none_prefix_file" value="'. $none_prefix_filename. '"  onChange="Template_Make()"/><b>.html</b><br />';
+	$output .= '<input type="text" size="30" name="none_prefix_file" id="none_prefix_file" value="'. $none_prefix_filename. '"  onChange="Template_Make()"/><b>.html</b><br />';
     $output .= '
 <script type="text/javascript">
 	function Template_Make(){
-		var type_element = document.getElementsByName("template_type").item(0);
-		var name_element = document.getElementsByName("none_prefix_file").item(0);
-		var real_element = document.getElementsByName("' .$option_name . '").item(0);
+		var type_element = document.getElementById("template_type");
+		var name_element = document.getElementById("none_prefix_file");
+		var real_element = document.getElementById("template_hide");
 
 		var file_name = "' . $mydirname . '_" + name_element.value + ".html";
