function isrename()
{

   var s1, s2;
   s1 = document.getElementById("TextBox2").value;
   s2 = document.getElementById("TextBox1").value;
   if(s1 == s2)
   {
      alert("对不起，文件名称没有更改，不能相同！");
      return false;
   }
   else
   {
      var re = /^\w{1,16}$/
      var str = document.getElementById("TextBox2").value;
      var b;
      // alert(str);
      b = re.test(str);
      // alert(b);
      if(b)
      {
         return true;
      }
      else
      {
         alert("对不起，您输入文件名称不符合规则，只能是数字，字母和下划线组合！1-16个字符！");
         return false;
      }
   }
}

// #######################################################
function mereload()
{
   // alert("MM")
   // window.location.reload();
   //window.location.href = "DocumentLeft.aspx";
}
// #################################################
function gorefresh()
{
   window.alert("操作信息成功，准备刷新查看！");
   // parent.mereload();
   // document.parentWindow.frames["leftFrame"].mereload();
   parent.document.frames("leftFrame").mereload();
   window.location.href = "DocumentList.aspx?path=";
}

// #################################################
function folderisok()
{

   var re = /^\w{3,16}$/
   var str = document.getElementById("TxtCreate").value;
   var b;
   // alert(str);
   b = re.test(str);
   // alert(b);
   if(b)
   {
      return true;
   }
   else
   {
      alert("对不起，您输入的路径名称不符合规则，只能是数字，字母和下划线组合！3-16个字符！");
      return false;
   }

}
// #################################################
function jsuserd(src)
{
   // alert(src);
   parent.returl(src);
   return false;
}
// #################################################
function returl(Url)
{
   var Str = "确实要使用您选中的内容吗？";
   if(confirm(Str))
   {
      //window.alert(Url);
      returnValue =  Url;
      window.close();
      window.parent.close();
   }
}
// #################################################

var isDispaly = true;
function meoprthis()
{
   // alert("打开关闭");
   // parent.document.getElementById("allFrame").cols = "0,*";
   // isDispaly = false;
   var s;
   s = document.getElementById("mydocumentid")
   if (isDispaly)
   {
      parent.document.getElementById("allFrame").cols = "0,*";
      isDispaly = false;
      s.title = "展开左侧目录菜单！"
      s.innerHTML = " → 我的文档"

   }
   else
   {
      parent.document.getElementById("allFrame").cols = "150,*";
      isDispaly = true;
      s.title = "关闭左侧目录菜单！"
      s.innerHTML = " ← 我的文档"
   }
}
// ####################################################################
var resizemode = 2

// #############################################################
function imgresize(o)
{
   var myimg, oldwidth, oldheight, t;
   var maxwidth = 100;
   var maxheight = 100;
   myimg = o;
   oldwidth = myimg.width;
   oldheight = myimg.height;
   if(oldwidth < maxwidth && oldheight < maxheight)
   {
   }
   else
   {
      if(oldheight < oldwidth)
      {
         // kuan
         myimg.width = maxwidth;
         t = myimg.height * (maxwidth / oldwidth);
         if(t < 40)
         {
            t = 40
         }
         myimg.height = t
      }
      else
      {
         myimg.height = maxheight;
         t = myimg.width * maxheight / oldheight
         if(t < 40)
         {
            t = 40
         }
         myimg.width = t;
      }
   }
}
// ###############################################################
function example()
{
   var s, ad;
   ad = "\n#######################################";
   s = "\n格式1显示方式（按照时间分类）：" + ad + "\n upload\n   201207\n   201208\n   201209\n   201210" + ad;
   s += "\n格式2显示方式（按照类型分类）：" + ad + "\n upload\n   swf\n   jpg\n   gif\n   rar" + ad;
   alert(s);
}
function UpJsOpr(str, isl)
{
}