        function AdminReplyModSave(obid,ob_group,cmtsreid,cmtid,uid){
                var ModAdminReContent = jQuery("textarea#modify_masterComment_"+cmtid).val();
                var ModifyAdminCmts_url   = "rd/ajax_file/ModifyAdminCmts.php";
                jQuery.post(ModifyAdminCmts_url, { ModifyContent:ModAdminReContent, cmtsreid:cmtsreid }, function(data){
                  //alert(data);
		  switch (ob_group){
		    case "com_poi":
			var Itemid = "&Itemid=3" ; 
			var id = "&id="+obid;
                        var au= "";
		    break;
                    case "com_jb2":
			var Itemid = "&Itemid=26" ;
			var id = "&postid="+obid;
                        var au= "&au="+uid;
                    break;
		  }
                  var return_url = "index.php?option="+ob_group+"&view=detail"+id+au+Itemid+"&remsgsave=1";
                  location.href=return_url;
                });
        }
        function AdminReplyModCancel(cmtsreid,cmtid){
                jQuery("div#modify_recom_"+cmtid).hide("hide");
		jQuery("div#AdminRe_"+cmtsreid).show("show");
		jQuery("div#toolAdmin1_"+cmtid).show("show");
        }

        function AdminReplyNewSave(obid,ob_group,cmtid,ownerid,uid){
		var NewAdminReContent = jQuery("textarea#new_masterComment_"+cmtid).val();
	        var SaveAdminCmts_url   = "rd/ajax_file/SaveAdminCmts.php";
        	jQuery.post(SaveAdminCmts_url, { NewContent:NewAdminReContent, cmtid:cmtid, ownerid:ownerid, obid:obid , ob_group:ob_group }, function(data){
                  switch (ob_group){
                    case "com_poi":
                        var Itemid = "&Itemid=3" ;
                        var id = "&id="+obid;
			var au= "";
                    break;
                    case "com_jb2":
                        var Itemid = "&Itemid=26" ;
                        var id = "&postid="+obid;
			var au= "&au="+uid;
                    break;
                  }
                  var return_url = "index.php?option="+ob_group+"&view=detail"+id+au+Itemid+"&remsgsave=1";
		  location.href=return_url;
	        });
		
        }

        function AdminReplyNewCancel(cmtid){
		jQuery("div#new_recom_"+cmtid).hide("hide");
                jQuery("div#toolAdmin1_"+cmtid).show("show");
        }

        function AdminNew(cmtid){
		jQuery("div#toolAdmin1_"+cmtid).hide("hide");
		jQuery("textarea#new_masterComment_"+cmtid).val("");
		jQuery("div#new_recom_"+cmtid).show("show");
        }

        function AdminModify(cmtsreid,cmtid){
                //alert('aaa'+cmtid);
		var AdminReContent = jQuery("div#AdminRe_"+cmtsreid).html();
		AdminReContent = AdminReContent.replace(/\<br>/g, "\n");
		jQuery("textarea#modify_masterComment_"+cmtid).val(AdminReContent);
		jQuery("div#toolAdmin1_"+cmtid).hide("hide");
		jQuery("div#AdminRe_"+cmtsreid).hide("hide");
		jQuery("div#modify_recom_"+cmtid).show("show");
        }

        function AdminDel(obid,ob_group,cmtid){
                //alert('aaa'+cmtid);
                var DelAdminCmts_url   = "rd/ajax_file/DelAdminCmts.php";
                jQuery.post(DelAdminCmts_url, { cmtid:cmtid }, function(data){
                  switch (ob_group){
                    case "com_poi":
                        var Itemid = "&Itemid=3" ;
                        var id = "&id="+obid;
                    break;
                    case "com_jb2":
                        var Itemid = "&Itemid=26" ;
                        var id = "&postid="+obid;
                    break;
                  }
                  var return_url = "index.php?option="+ob_group+"&view=detail"+id+Itemid+"&remsgdel=1";

                  location.href=return_url;
                });

        }
