//关闭div
function closediv(SuiJishu) {
	if(document.getElementById("resulttext")!=undefined){ resulttext.innerHTML="";}
}
//关闭div
//清除上传选择
function clearUpload(obj) {  
  var nf = obj.cloneNode(true);  
    nf.value='';     
        obj.parentNode.replaceChild(nf, obj);    
}
function createAjax() {		
	var _xmlhttp;
	try {	
		_xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");	
	}
	catch (e) {
		try {
			_xmlhttp=new XMLHttpRequest();	
		}
		catch (e) {
			_xmlhttp=false;		
		}
	}
	return _xmlhttp;	
}
//弹出div
function dvck(good){
var SysIsIE; 
var ua = navigator.userAgent.toLowerCase(); 
var s;(s = ua.match(/msie ([\d.]+)/)) ? SysIsIE = s[1] : 0; 
var ids;
var date = new Date(); //日期对象
ids=date.getSeconds();
e=document.getElementById('tian'+ids); 
if(e != null  ){ 
e.parentNode.removeChild(e); 
} 
var div=document.createElement("div"); 
div.style.position="absolute"; 
div.style.top='10%'; 
div.style.left='40%'; 
div.style.cssText='filter: alpha(opacity=10);opacity:0.1;align:center;position:fixed;left:'+(window.screen.width/2-100)+'px;top:300px;padding-top:18px;width:250px;height:40px;border:#93B2D0 10px solid;z-index:10000000;background-color:#FFFFCC'; 
div.id='tian'+ids; 
div.innerHTML='<center>'+good+'</center>'; 
document.body.appendChild(div); 
if (SysIsIE) 
dcbIE('+',ids); 
else 
dcboth('+',ids); 
} 
function dcbIE(j,ids){ 
o=document.getElementById('tian'+ids); 
opc=parseInt(o.filters.alpha.opacity); 
if(j=='+'){ 
if(opc<100){ 
o.filters.alpha.opacity=(opc+20)+''; 
setTimeout("dcbIE('"+j+"',"+ids+")",100); 
}
else{
setTimeout("dcbIE('-',"+ids+")",2400); 
} 
}else if(j=='-'){ 
if(opc>0){ 
o.filters.alpha.opacity=(opc-20)+''; 
setTimeout("dcbIE('"+j+"',"+ids+")",100); 
}
else{
	o.style.display="none";
	}
} 
} 
function dcboth(j,ids){ 
o=document.getElementById('tian'+ids); 
opc=parseFloat(o.style.opacity); 
if(j=='+'){ 
if(opc<1){ 
o.style.opacity=(opc+0.09)+''; 
setTimeout("dcboth('"+j+"',"+ids+")",100); 
} 
else{ 
setTimeout("dcboth('-',"+ids+")",2400);  
} 
}else if(j=='-'){ 
if(opc>0){ 
o.style.opacity=(opc-0.09)+''; 
setTimeout("dcboth('"+j+"',"+ids+")",100); 
} 
else{
	o.style.display="none";
	}
}
} 
//弹出div
function switchSysBar(ii){
	 if (document.all("frmTitle"+ii).style.display==""){
	    document.all("frmTitle"+ii).style.display="none";
     }
     else{
	document.all("frmTitle"+ii).style.display="";
     } 
}
var isIe=(document.all)?true:false;
function setSelectState(state)
{
var objl=document.getElementsByTagName('select');
for(var i=0;i<objl.length;i++)
{
objl[i].style.visibility=state;
}
}
function mousePosition(ev)
{
if(ev.pageX || ev.pageY)
{
return {x:ev.pageX, y:ev.pageY};
}
return {
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft,y:ev.clientY + document.body.scrollTop - document.body.clientTop
}
}
function showMessageBox(wTitle,pos,wWidth)
{
closeWindow('');
var bWidth=parseInt(document.documentElement.scrollWidth);
if(document.body.scrollHeight)
var bHeigh= parseInt(document.body.scrollHeight);
else
var bHeigh=0;
if (document.documentElement.scrollHeight)
var sHeigh= parseInt(document.documentElement.scrollHeight);
else
var sHeigh=0;
if (sHeigh<bHeigh)
var bHeight=bHeigh;
else
var bHeight=sHeigh;
if(isIe){
setSelectState('hidden');}
var backs=document.createElement("div");
backs.id="back";
var styleStr="top:0px;left:0px;position:absolute;z-index:10;background:#ffffff;width:"+bWidth+"px;height:"+bHeight+"px;";
styleStr+=(isIe)?"filter: alpha(opacity=35);":"opacity:0.35;";
backs.style.cssText=styleStr;
document.body.appendChild(backs);
showBackground(backs,75);
var mesW=document.createElement("div");
mesW.id="mesWindow";
mesW.className="mesWindow";
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
var mescontent="<div class='mesWindowTop' ><table width='100%' height='100%'><tr><td>"+wTitle+"</td><td style='width:1px;'><image src='images/X.gif' style='cursor:pointer' width=17 height=15 onclick=closeWindow('"+wTitle+"'); title='关闭窗口'></td></tr></table></div><div class='mesWindowContent' id='content'>"
if (wTitle=='发表新帖(社区)')
{
mescontent=mescontent+"<center><iframe src='mail/addtopic.asp'  id='openthis'  hspace='0' vspace='0'   longdesc='0' marginheight='0' marginwidth='0'  width='98%' height='540' scrolling='auto' frameborder='0' style='margin:0px;'><\/iframe></center>"
	}
if (wTitle.substring(0,4)=='修改帖子')
{
	var arrstr = wTitle.split("(");
 var clubid=arrstr[1].replace(")",""); 
mescontent=mescontent+"<center><iframe src='mail/addtopic.asp?clubid="+clubid+"'  id='openthis'  hspace='0' vspace='0'   longdesc='0' marginheight='0' marginwidth='0'  width='98%' height='540' scrolling='auto' frameborder='0' style='margin:0px;'><\/iframe></center>"
	}	
mescontent=mescontent+"</div>";
if(wWidth==null || wWidth=='')
wWidth=1200;
if(wWidth<=1)
wWidth=window.screen.width*wWidth;
styleStr="left:"+(window.screen.width-wWidth-20)/2+"px;top:"+(scrollTop+20)+"px;position:absolute;width:"+wWidth+"px;";
mesW.innerHTML=mescontent
mesW.style.cssText=styleStr;
document.body.appendChild(mesW);
}
window.onresize=findDimensions;
function findDimensions()
{
if (document.getElementById("back")!=undefined)	{
var winWidth = 0;
if (window.innerWidth)
winWidth = window.innerWidth;
else if ((document.body) && (document.body.clientWidth))
winWidth = document.body.clientWidth;

if (document.documentElement  && document.documentElement.clientHeight && document.documentElement.clientWidth)
winWidth = document.documentElement.clientWidth;
if(document.body.scrollHeight)
var bHeigh= parseInt(document.body.scrollHeight);
else
var bHeigh=0;
if (document.documentElement.scrollHeight)
var sHeigh= parseInt(document.documentElement.scrollHeight);
else
var sHeigh=0;
if (sHeigh<bHeigh)
var bHeight=bHeigh;
else
var bHeight=sHeigh;

document.getElementById("back").style.width= winWidth;
document.getElementById("back").style.height=bHeight;
//调用函数，获取数值
}
}
//让背景渐渐变暗
function showBackground(obj,endInt)
{
if(isIe)
{
obj.filters.alpha.opacity+=5;
if(obj.filters.alpha.opacity<endInt)
{
setTimeout(function(){showBackground(obj,endInt)},5);
}
}else{
opc=parseFloat(obj.style.opacity); 
if(opc<(endInt/100))
{
obj.style.opacity=(opc+0.02)+'';	
	setTimeout(function(){showBackground(obj,endInt)},5);}
}
}
//关闭窗口
function closeWindow(wTitle)
{
if (document.getElementById("content")==undefined)
{
return;}
if(document.getElementById('mesWindow')!=null)
{
document.getElementById('mesWindow').parentNode.removeChild(document.getElementById('mesWindow'));
}

if(document.getElementById('content')!=null)
{
document.getElementById('content').parentNode.removeChild(document.getElementById('content'));
}
if(document.getElementById('back')!=null)
{
document.getElementById('back').parentNode.removeChild(document.getElementById('back'));
}

if (wTitle=='批量导入人员')
	{
getcontent('admin/userlist.asp?thiss=2','contents',1);
return;
}
if ( wTitle.indexOf("(") > 0 ) {
var arrstr = wTitle.split("(");
 var newstr=arrstr[1].replace(")",""); 
 var newstr1=arrstr[0]; 
if (newstr1=='汇报设置' || newstr1=='群内成员'  || newstr1=='批量导入新报表' )
	{
getcontent('baobiao/hbdatail.asp?bj_system_ID='+escape(newstr),'contents',1); 
return;
}
if (newstr1=='短信群组' )
	{
getcontent('duanxin/duanxin.asp?types=3&thiss=5&page='+escape(newstr),'indexcontent',1);
return;
}
if (newstr1=='修改帖子' )
	{	
getcontent('club/clubtopic.asp?clubid='+escape(newstr),'contents',1);
return;
}
if (newstr=='社区' )
{
getcontent('club/club.asp?q=q','contents',1);
return;
}
if (newstr=='mytasks' || newstr=='myfollow' || newstr=='myguanzhu' )
{
if (newstr=='mytasks'){
	qiehuan(2);
	}	
if (newstr=='myfollow'){
	qiehuan(3);
	}	
	if (newstr=='myguanzhu'){
	qiehuan(4);
	}	

getweblists('mytask.asp?types=1&yemian='+escape(newstr)+'&isinit=trues');	
	}
else if (newstr1!='汇报设置' && newstr!='社区' )
	{
getcontent('secret/quncontent.asp?page=1&qunzuid='+escape(newstr),'quncontent',1);   
}
}
if(isIe){
setSelectState('');}
}
//测试弹出
function testMessageBox(ev,title,widths)
{
	
var objPos = mousePosition(ev);
if(widths=='')
showMessageBox(title,objPos,1200);
else
showMessageBox(title,objPos,widths);
}
 //统计数量开始
   function tjwangong(yemian,zhi) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((yemian == null) || (yemian == "")) return;
xmlhttp.open('post','wangongshu.asp?yemian='+escape(yemian)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	var arrstr = unescape(xmlhttp.responseText).split(",");
eval("wangongtj8").innerHTML=arrstr[8];
eval("wangongtj1").innerHTML=arrstr[1];
eval("wangongtj2").innerHTML=arrstr[2];
eval("wangongtj3").innerHTML=arrstr[3];
eval("wangongtj4").innerHTML=arrstr[4];
eval("wangongtj5").innerHTML=arrstr[5];
eval("wangongtj6").innerHTML=arrstr[6];
eval("wangongtj7").innerHTML=arrstr[7];
eval("wangongtj0").innerHTML=arrstr[0];
if (zhi==9){
getcontent('secret/mytaskcontent.asp?page=1&types=8&yemian='+escape(yemian)+'&totalput='+arrstr[8],'quncontent',1);
}
}}}
		xmlhttp.send(null);
	}

function getcontent(url,divid,xianshi) {		
	var xmlhttp=createAjax();
	if (xmlhttp) {	
		var thiscontent=document.getElementById(divid);		
		xmlhttp.open('post',url+'&n='+Math.random(),true);	
		xmlhttp.onreadystatechange=function() {	
			if (xmlhttp.readyState<4 && xianshi==1) {	
			  document.all("loading").style.display="";
			}	
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
			
			document.all("loading").style.display="none";
			thiscontent.innerHTML=unescape(xmlhttp.responseText);

if(document.body.scrollHeight)
var bHeigh= parseInt(document.body.scrollHeight);
else
var bHeigh=0;
if (document.documentElement.scrollHeight)
var sHeigh= parseInt(document.documentElement.scrollHeight);
else
var sHeigh=0;
if (sHeigh<bHeigh)
var bHeight=bHeigh;
else
var bHeight=sHeigh;	
if (document.getElementById("notecontents")!=undefined)	{
	document.getElementById("notecontents").style.height=bHeight-60;
}
if (url.indexOf("yindexcontent.as")>0){
 pleasewait.style.display="none";
}
if (url.indexOf("hakan.asp")>0 ){
getcontent('xiajitaskcontent.asp?types=8&id=0','quncontent',1);
}

if (url.indexOf("huibaodefault.asp")>0   ){
bjsort();
$("#"+$("#clickelement").val()).css( "background", "#ffffff" );
getcontent('baobiao/huibao_fenzu_con.asp?bj_system_ID=0','huibao_fenzu',0);
}
if (url.indexOf("ao_fenzu_con.asp")>0   ){
bjsort_con();
}



if (url.indexOf("bdatail.asp")>0   ){
	//hbdatail 下拉菜单

          $('#btnShow').click(function (event) {  
              //取消事件冒泡  
              event.stopPropagation();  
              //设置弹出层的位置  
              var offset = $(event.target).offset();  
              $('#divTop').css({ top: offset.top + $(event.target).height() + "px", left: offset.left });  
              //按钮的toggle,如果div是可见的,点击按钮切换为隐藏的;如果是隐藏的,切换为可见的。  
                $('#divTop').toggle('normal');  
          });  
          //点击空白处或者自身隐藏弹出层，下面分别为滑动和淡出效果。  
          $(document).click(function (event) {						  
if (event.target.id.substring(0,6)!='divTop'){
		   $('#divTop').slideUp('fast');
		   } 
		   });  
	//hbdatail 下拉菜单
		 
}
if (url.indexOf("sethuibao.asp?types=2")>0   ){
baobiaoset();
		getcontent('baobiao/sethuibao_attr.asp?zd_system_ID='+$("#head_div_id").val(),'xianshitext',0);
}

if (url.indexOf("sethuibao_attr.asp")>0   ){
$(function (){
 bianjiqi("kindeditor");
});
bb_attrset();
}



if (url.indexOf("howfile.as")>0 ){
$(".kexiugai,.dizhi,.contextMenu,.kexiugaixia").bind("selectstart",function(){return false;}); 
//所有添加和上传
$(".dizhi").contextMenu('myMenu2', {
        bindings: {
          'upload': function(t) {//上传
 alertbox(t.id,'upfiles',320,150,0);
          },
		    'sort1': function(t) {//上传
             var fileid=document.getElementById("thisfolderid").value;
             var creattype=document.getElementById("creattype").value;
			getcontent('secret/showfile.asp?sortby=filename&creattype='+escape(creattype)+'&folderid='+escape(fileid),'contents',0);
          },
		    'sort2': function(t) {//sort文件大小
				var fileid=document.getElementById("thisfolderid").value;
	    var creattype=document.getElementById("creattype").value;
			getcontent('secret/showfile.asp?sortby=filesize&creattype='+escape(creattype)+'&folderid='+escape(fileid),'contents',0);
          },
		    'sort3': function(t) {//sort文件大小
	    var creattype=document.getElementById("creattype").value;
			getcontent('secret/showfile.asp?sortby=creattime&creattype='+escape(creattype)+'&folderid='+escape(fileid),'contents',0);
          },
		    'sort4': function(t) {//上传
            var fileid=document.getElementById("thisfolderid").value; 
			    var creattype=document.getElementById("creattype").value;
			getcontent('secret/showfile.asp?sortby=filetype&creattype='+escape(creattype)+'&folderid='+escape(fileid),'contents',0);
          },
		
          'create': function(t) {//新建
alertbox(t.id,'creatnewfolder',320,150,0);
          }
        }
      });
//所有div标签
$(".kexiugai,.kexiugaixia").contextMenu('myMenu1', {
onShowMenu: function(e, menu) { 
if ($(e.target).attr('id').substring(0,4)=='fold')   
{
	$('#gongxiang,#download,#zhuanyi', menu).remove();
	var creattype=document.getElementById("creattype").value;
	if(creattype==3)
document.getElementById("allbutton").value=4;
else
document.getElementById("allbutton").value=3;
}
if ($('#shouquan'+$(e.target).attr('id').replace($(e.target).attr('id').substring(0,6),'')).val()==1) {
 $('#quanxian,#move,#delete,#rename', menu).remove();
 document.getElementById("allbutton").value=5;
}
return menu;   
},
        bindings: {
          'rename': function(t) {//重命名
			alertbox(t.id,'rename',320,150,0);
          },
          'delete': function(t) {//删除文件
      	alertbox(t.id,'delete',320,150,0);
          },
          'quanxian': function(t) {//权限设置
			alertbox(t.id,'quanxian',750,430,0);
          },
          'move': function(t) {
			alertbox(t.id,'remove',320,350,0);
          },
		     'gongxiang': function(t) {
			alertbox(t.id,'gongxiang',320,350,0);
          },
		     'download': function(t) {
			 window.location.href='makefile/down_file.asp?fileid='+t.id;
          },
		     'zhuanyi': function(t) {
			alertbox(t.id,'zhuanyi',320,350,0);
          }
        }
      });
//修改结束
}
}}
		xmlhttp.send(null);	
	}}
	function bianjiqi(keid){ 
var keditor =  KindEditor.create(
'textarea[name="con"]', 
{     
width : "99%", //编辑器的宽度为70%
height : "200px", //编辑器的高度为100px 
		afterChange: function () {
					var idvalues=document.getElementById("zd_system_ID_attr").value;
				 if(keditor!=null  &&keditor.isEmpty() ){
                 var c = keditor.html();
                 c = c.replace(/\s+/g, ""); 
                   c = c.replace(/[\r\n]/g, "");
                 if(c=='<p>&nbsp;</p>' ){
                     keditor.text("");
                 }
             }
			  this.sync();
document.getElementById("bb_info"+idvalues).innerHTML=document.getElementById("con").value; },	
	afterBlur: function(){
	var idvalue=document.getElementById("zd_system_ID_attr").value;
	this.sync();
bb_edititem(idvalue,2,document.getElementById("con").value);},
					newlineTag:"br",
					allowPreviewEmoticons : false,
					allowImageUpload : true,
					uploadJson : 'mail/bianjiqi/asp/upload_json.asp',
					items : [
						'source','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '/', 'image', 'table','link', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist']
});
}
	function bjsort(){
	
	$("#"+$("#clickelement").val()).children('.arrowimg').css("opacity",1);
	
	
	$(".portlet-contentli").click(function(){			
	$("#clickelement").val($(this).attr("id"));							   		   
$(".portlet-contentli").css( "background", "#F5F5F5" );
$(this).css( "background", "#ffffff" );
	$(".arrowimg").css("opacity",0.4);	
$(this).children('.arrowimg').css("opacity",1);
$(".portlet-contentli").children('.deletex').css("display","none");
	$(this).children('.deletex').css("display","block");
});
	
	
	$(".portlet-contentli").mouseover(function(){
    $(this).not("#"+$("#clickelement").val()).css( "background", "#EDEDED" );
	$(this).not("#"+$("#clickelement").val()).children('.arrowimg').css("opacity",1);
});
$(".portlet-contentli").mouseout(function(){
  $(this).not("#"+$("#clickelement").val()).css( "background", "#F5F5F5" );
$(this).not("#"+$("#clickelement").val()).children('.arrowimg').css("opacity",0.4);
});
	$(".deletex").mouseover(function(){
	$(this).css("color","#F27466");
});
$(".deletex").mouseout(function(){
		$(this).css("color","#BFBABA");
});
	$(".portlet-content" ).sortable({
	   cursor:"move",
	  opacity:0.8,
	   zIndex:1,
	  revert:true,
distance: 5,
axis: "y",
tolerance: "pointer",
placeholder: "ui-state-highlight",
start:function(event,ui){
$("#"+$(ui.item).attr("id")).css( "background", "#ffffff" );
},

update: function( event, ui ) { 
var idstr = "";
			    $(".portlet-content li").each(function() {
			        // 将选中的字段id拼成字符串
			        idstr += $(this).attr("id") + ",";
			    });
				idstr=idstr.replace(/item_/g, '')
			
				var xmlhttp=createAjax();	
	if (xmlhttp) {

xmlhttp.open('post','baobiao/cuaddhuibao.asp?pass=500&newsort='+escape(idstr)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
			
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {
		if(unescape(xmlhttp.responseText).indexOf("失败：")>0) {
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}	}
        }
		}
		xmlhttp.send(null);
}
});               
		 //$( ".portlet-content" ).disableSelection();
	}	//报表set
	function baobiaoset(){
$(".ui-state-default").click(function(){
	$(".del_item_img").css("display","none");
	$(".add_item_img").css("display","none");

	$(this).children('.add_item_img').css("display","block");
$(this).children('.del_item_img').css("display","block");
		$("#clickshowelement").val($(this).attr("id"));
	 $(".baobiao-header").css({"border":"1px #C2D8EB solid","background":"#CDEEF5"});
    $(".ui-state-default").css({"border":"1px solid #ffffff","background":"#ffffff"});
        $(this).css({"border":"1px #E8DBAD solid","background":"#FFFBEF"});
    });	
    $(".ui-state-default,.baobiao-header").mouseover(function(){
         $(this).not("#"+$("#clickshowelement").val()).css("border","1px #BBBBBB dashed");
    });
$(".ui-state-default,.baobiao-header").mouseleave(function(){
	     $(".ui-state-default").not("#"+$("#clickshowelement").val()).css("border","1px #ffffff dashed");	
 });	  
$(".ziduantd").mouseover(function(){
    $(this).css( "background", "#F5F5F5" );
	
});
	$(".ziduantd").mouseout(function(){
	$(".ziduantd").css( "background", "#ffffff" );										  
});	  
$("#biaodanitem" ).sortable({

axis: "y",
tolerance: "pointer",					
	   cursor:"move",
	  opacity:0.8,

	  revert:true,
      distance: 5,
       placeholder: "ui-state-highlight1",
       update: function( event, ui ) {
			        var idstr = ",";
			    $("#biaodanitem li").each(function() {
			        // 将选中的字段id拼成字符串
			        idstr += $(this).attr("id") + ",";
			    });
				idstr=idstr.replace(/input/g, '');
$("#bb_shunxu").val(idstr);

   save_shunxu($("#bj_system_ID").val(),idstr);
                 },
				 start:function(event,ui){
	if ($(".ui-state-highlight1").height()==0)
{
$(".ui-state-highlight1").height($(ui.item).height());
$(".ui-state-highlight1").width($(ui.item).width());
}
}
			
    });
$(".ui-state-default,#biaodanitem" ).disableSelection();


	}
	function bb_attrset(){	
$("#biaodanitem-attr" ).sortable({
 handle: ".portlet-header-attr",
	  opacity:0.8,
	   zIndex: 1,
	  revert:true,
      distance: 5,
	  placeholder: "ui-state-highlight1",
		 start:function(event,ui){
if ($(".ui-state-highlight1").height()==0)
{
$(".ui-state-highlight1").height($(ui.item).height());
$(".ui-state-highlight1").width($(ui.item).width());
}
},  
	  
       update: function( event, ui ) {
		        var idstr = "";
				var zd_system_ID=$("#zd_system_ID_attr").val();
			    $("#biaodanitem-attr li").each(function() {
			        // 将选中的字段id拼成字符串
			        idstr += $("#val_"+$(this).attr("id")).val() + "$#$";
			    });
		
				bb_edititem(zd_system_ID,14,idstr);
				
				var moveid=ui.item.attr("id");	
				if(moveid.indexOf("ttrs")>0)//checkbox\radio移动
				{var baforeid=$("#"+ui.item.attr("id")).next().attr("id");
				if (baforeid==undefined)
				{
				$("#option_all_"+moveid.split("-")[2]).append($("#"+moveid.replace("attrs-input","input_big_")));	
					}
				else
				{xianshi_move(baforeid,moveid);}
                 }}
    });

	}
		function xianshi_move(baforeid,moveid){	

	$("#"+moveid.replace("attrs-input","input_big_")).insertBefore("#"+baforeid.replace("attrs-input","input_big_"));
	}
//报表控件添加 
function additem(bj_system_ID,widgettype){	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
xmlhttp.open('post','secret/sethuibao_add.asp?pass=101&widgettype='+widgettype+'&bj_system_ID='+bj_system_ID+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
					if (xmlhttp.readyState==4 && xmlhttp.status==200) {
			var response=unescape(xmlhttp.responseText);	
		if(response.indexOf("失败：")>0) {
setTimeout("dvck('"+response+"')",500);
	}	
	else
	{			var response=unescape(xmlhttp.responseText).split("|$|");
	var response1=response[1];
	//$("#elementnum").val(parseInt($("#elementnum").val())+1);
	clickele=$("#clickshowelement").val().replace("input","");
if (clickele=="baobiao-header")
{
$("#biaodanitem").prepend(response[0]);	
var result=","+response1+$("#bb_shunxu").val();
	}
else
{
$("#input"+clickele).after(response[0]);
var result=$("#bb_shunxu").val().replace(","+clickele+",",","+clickele+","+response1+",");
}
$("#bb_shunxu").val(result);
save_shunxu(bj_system_ID,result);
shake("#input"+response1,1);
   
getcontent('baobiao/sethuibao_attr.asp?zd_system_ID='+response1,'xianshitext',0);
baobiaoset();
	$(".del_item_img").css("display","none");
	$(".add_item_img").css("display","none");
	$("#input"+response1).children('.add_item_img').css("display","block");
$("#input"+response1).children('.del_item_img').css("display","block");
	 $(".baobiao-header").css({"border":"1px #C2D8EB solid","background":"#CDEEF5"});
    $(".ui-state-default").css({"border":"1px solid #ffffff","background":"#ffffff"});
        $("#input"+response1).css({"border":"1px #E8DBAD solid","background":"#FFFBEF"});
$("#clickshowelement").val("input"+response1);
		}
	}
        }
		xmlhttp.send(null);
}
}
//报表控件添加
	//报表set结束
	
function bjsort_con(){

  $(".sortable" ).sortable({
	   cursor:"move",
	  opacity:0.8,
	   zIndex:1,
	  revert:true,
distance: 5,
update: function( event, ui ) { 
var idstr = "";
			    $(".sortable li").each(function() {
			        // 将选中的字段id拼成字符串
			        idstr += $(this).attr("id") + ",";
			    });
				idstr=idstr.replace(/data/g, '')
				var xmlhttp=createAjax();	
	if (xmlhttp) {
xmlhttp.open('post','baobiao/cuaddhuibao.asp?pass=500&newsort='+escape(idstr)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
			
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {
		if(unescape(xmlhttp.responseText).indexOf("失败：")>0) {
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}	}
	        }
		}
		xmlhttp.send(null);
}
});
$(".portlet-contentli" ).droppable({	
accept: ".sortable li",
     activeClass: "ui-state-hover",
      hoverClass: "ui-state-active",
      drop: function( event, ui ) {
		   var fromid=$(ui.draggable).attr("id"); 
		  var toid=$(this).attr("id");
				var xmlhttp=createAjax();	
	if (xmlhttp) {
xmlhttp.open('post','baobiao/cuaddhuibao.asp?pass=502&fromid='+escape(fromid)+'&toid='+escape(toid)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {
		if(unescape(xmlhttp.responseText).indexOf("失败：")>0) {
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
return;
	}	
	else
	{shake("#"+toid,1);
	$("#"+fromid).css("display","none");
		}
	}
	
        }
		}
		xmlhttp.send(null);
     }
    });
  }

//闪烁效果
function shake(ele,times){
	var i = 0, t = false, c = "", times = times||2;
	if(t) return;
	t= setInterval(function(){
		i++;
	
		$(ele).fadeOut(500).fadeIn(500);
		if(i==2*times){
			clearInterval(t);
		}
	},200);
}
function getweblists(url) {
			var xmlhttp=createAjax();
	if (xmlhttp) {		
		var contents=document.getElementById('contents');		
		xmlhttp.open('post',url+'&suijishu='+Date(),true);	
		xmlhttp.onreadystatechange=function() {	
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		
				contents.innerHTML=unescape(xmlhttp.responseText);
				
				if (url.indexOf("ndexcontent.asp?types=1")>0 ){
				
			getcontent('news.asp?yemian=passed','indexcontent',0);
	        pleasewait.style.display="none";
getcontent('showtongji.asp?yemian=passed','showtongji',0);
getcontent('showcalender.asp?yemian=passed','calenderid',0);
getcontent('shouye.asp?yemian=passed','notecontentss',0);




}
if (unescape(xmlhttp.responseText).indexOf("将到期/已到期")>-1){
				indexcontent.height=screen.availHeight-285;
				}
if(url.indexOf("mytasks") > 0 ){
					 tjwangong('mytasks',9);
					 }
				 if(url.indexOf("myfollow") > 0 ){
					 tjwangong('myfollow',9);
					 }
				 if(url.indexOf("myguanzhu") > 0 ){
					 tjwangong('myguanzhu',9);
					 }
			}
		}
		xmlhttp.send(null);	
	}
}
  //登录页面
 function tologin(xinxi,allowregister,is_yuezhiuse,companyname,logo) {
	var str='<DIV style="BACKGROUND-COLOR: #2e82a6; HEIGHT: 430px; text-align:center; width:100%;position:absolute;top:50%;margin-top:-210px;"><DIV id=w_login><DIV id=wrappertop></DIV><DIV id=wrapper><DIV id=w_content><DIV id=w_header><H1>'+companyname+is_yuezhiuse+'</H1></DIV><DIV id=darkbanner class=banner320><H2>Login</H2></DIV><DIV id=darkbannerwrap></DIV><DIV id=darkbannerwrap1></DIV><DIV id=imagearea><img src="images/upload/'+logo+'" align="absmiddle" width=200  height=100></DIV><div id="login_login" ><LABEL for=user_name>用户名:</LABEL> <INPUT id="NetsysName" type="text"  value="'+xinxi+'" onKeyPress="if(event.keyCode==13||event.which==13){if(document.getElementById(\'NetsysName\').value==\'\'||document.getElementById(\'NetsysPass\').value==\'\'){document.getElementById(\'NetsysName\').focus();return false;}}" maxLength=100 name=NetsysName  class=inputvalue> <br><LABEL for=user_password>密&nbsp;码:</LABEL> <INPUT  class=inputvalue id=NetsysPass onkeypress="if(event.keyCode==13||event.which==13){if(document.getElementById(\'NetsysName\').value==\'\'||document.getElementById(\'NetsysPass\').value==\'\'){document.getElementById(\'NetsysName\').focus();return false;}login();}" maxLength=100 type=password name=NetsysPass> <br><input type="button" style="margin-left:24px;cursor:pointer;" onclick="if(document.getElementById(\'NetsysName\').value==\'\'||document.getElementById(\'NetsysPass\').value==\'\'){document.getElementById(\'NetsysName\').focus();return false;}login();"   value="立即登录"   onkeypress="if(event.keyCode==13||event.which==13){if(document.getElementById(\'NetsysName\').value==\'\'||document.getElementById(\'NetsysPass\').value==\'\'){document.getElementById(\'NetsysName\').focus();return false;}login();}"   maxlength="100" />&nbsp;<A onclick="javascript:getcontent(\'ip.asp?types=1\',\'contents\',1);" href="javascript:void(0)">还没有账户？</A>  <A href="findpass.asp?types=1">忘记密码？</A></div></DIV></DIV><div id="wrapperbottom_branding"><div id="wrapperbottom_branding_text">&nbsp;&nbsp;Powered By <a href=http://www.workts.com>WTS工作跟进系统</a></div></div></DIV></DIV>'		//定义html字符串
	contents.innerHTML=str;	//将str变量的值写入该对象中。
}
//登录开始
function login() {	
	var NetsysName=document.getElementById('NetsysName').value;
	var NetsysPass=document.getElementById('NetsysPass').value;
	if (NetsysName.value==''|| NetsysPass.value=='') {		
		tologin('');
		return;
	}
	pleasewait.style.display="block";
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var is_Login=document.getElementById('is_Login');
		xmlhttp.open('post','culogin.asp?login=1&suijishu='+Date()+'&NetsysName='+escape(NetsysName)+'&NetsysPass='+escape(NetsysPass),true)		
	
		xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4 && xmlhttp.status==200) {
		if(unescape(xmlhttp.responseText).indexOf("失败：")>0) {	
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	pleasewait.style.display="none";
		return;
	}
else{
	contents.style.background='#ffffff';
thistopnav.style.visibility='visible';
contents.style.top="60px";
contents.style.height="auto";
xh_insert();
inits(0);
qiehuan(1);
getweblists('indexcontent.asp?types=1');
var loginreturn=unescape(xmlhttp.responseText).split("$||$");
is_Login.innerHTML=loginreturn[0];
showstatus(loginreturn[1]);
}
				}
			}
		xmlhttp.send(null);
	}
	}
//登录结束
//开始更新循环任务
var xh_t;
function xh_insert() 
{ 
var xmlhttp=createAjax();	
	if (xmlhttp) {
		xmlhttp.open('post','chuli_xh.asp?suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
	if (xmlhttp.readyState==4 && xmlhttp.status==200) {
		if(unescape(xmlhttp.responseText).indexOf("失败：")>0) {
	clearTimeout(xh_t);	
	}
	else
	{
xh_t=setTimeout("xh_insert()",10000);
	}
        }
		}
		}
		xmlhttp.send(null);
} 
//结束更新循环任务
  //退出登录
 function loginout(loguser,allowregister,is_yuezhiuse,companyname,logo) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var is_Login=document.getElementById('is_Login');
		xmlhttp.open('post','culogin.asp?login=0&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
			 contents.style.background='#F1F7FF';
	document.all.pops.style.display="none";	
	thistopnav.style.visibility='hidden';
	 showstatus('无','');
	 contents.style.top='0px';
	 contents.style.height="100%";
	
	 tologin(loguser,allowregister,is_yuezhiuse,companyname,logo);
        }
		}
		xmlhttp.send(null);
	}
 //退出登录结束 
  //修改密码
 function savemima() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data1=document.getElementById('data1').value;
	var data2=document.getElementById('data2').value;
	var data3=document.getElementById('data3').value;
	xmlhttp.open('post','usereditp.asp?actions=1&data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	getweblists('usereditp.asp?thiss=9');
		setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
}}}
		xmlhttp.send(null);
	}
 //修改密码
 //修改系统
 function savexitong() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data1=document.getElementById('data1').value;
	var data2=document.getElementById('data2').value;
	var data3=document.getElementById('data3').value;
	var data4=document.getElementById('data4').value;
	var data5=document.getElementById('data5').value;
	var data6=document.getElementById('data6').value;
	var data7=document.getElementById('data7').value;
	var data8=document.getElementById('data8').value;
	var data9=document.getElementById('data9').value;
	var data10=document.getElementById('data10').value;
	var data11=document.getElementById('data11').value;
	var data12=document.getElementById('data12').value;
	var data13=document.getElementById('data13').value;
	var data14=document.getElementById('data14').value;
	var data15=document.getElementById('data15').value;
		var data16=document.getElementById('data16').value;
	var data17=document.getElementById('data17').value;
	var data18=document.getElementById('tupian').value;
	var data31=document.getElementById('data31').value;
	var data32=document.getElementById('data32').value;
		var data33=document.getElementById('data33').value;
	xmlhttp.open('post','admin/xitong.asp?actions=yes&data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&data4='+escape(data4)+'&data5='+escape(data5)+'&data6='+escape(data6)+'&data7='+escape(data7)+'&data8='+escape(data8)+'&data9='+escape(data9)+'&data10='+escape(data10)+'&data11='+escape(data11)+'&data12='+escape(data12)+'&data13='+escape(data13)+'&data14='+escape(data14)+'&data15='+escape(data15)+'&data16='+escape(data16)+'&data17='+escape(data17)+'&data18='+escape(data18)+'&data31='+escape(data31)+'&data32='+escape(data32)+'&data33='+escape(data33)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {

		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
			if ( unescape(xmlhttp.responseText).indexOf("失败：") >-1) {		
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);	
	return;
	}	
		var isIe=(document.all)?true:false;
		setTimeout("dvck('"+xmlhttp.responseText+"')",0);
		if (xmlhttp.responseText.indexOf("COOKIE")>0){
        loginout('',data6,data12,data1,data18);
			}
else
{
	getweblists('admin/xitong.asp?thiss=6');
}
}}}
		xmlhttp.send(null);
	}
 //修改系统结束
 //重新注册开始
 function savemailset1(data7,data9) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	xmlhttp.open('post','secret/mailset.asp?actions=5&data7='+escape(data7)+'&data8='+escape(data9)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
			
			if (xmlhttp.readyState<4) {		
		setTimeout("dvck('正在发送中')",0);
			}	
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		
if (unescape(xmlhttp.responseText).indexOf("失败")>0){
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
	return;
	}
	getweblists('secret/mailset.asp?thiss=5&types=3');
		setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
}}}
		xmlhttp.send(null);
	}
 //重新注册结束
 //设置用户发送权限
 function savemailset2(actions,ii,user) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
			var shuliang=document.getElementById(("shuliang" + ii)).value;
		
	xmlhttp.open('post','secret/mailset.asp?actions='+actions+'&data15='+escape(user)+'&data16='+escape(shuliang)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState<4) {		
		setTimeout("dvck('正在发送中')",0);
			}	
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
getcontent('secret/mailset.asp?types=3&thiss=5','contents',1);			
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
		}}}
		xmlhttp.send(null);
	}
 //设置用户发送权限
//修改设置开始
 function savemailset(actions) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
		if(actions==1){
	var data1=document.getElementById('data1').value;
	var data2=document.getElementById('data2').value;
	var data3=document.getElementById('data3').value;
	xmlhttp.open('post','secret/mailset.asp?actions='+escape(actions)+'&data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&suijishu='+Date(),true)		
		}
		if(actions==3){
	var data5=document.getElementById('data5').value;
	xmlhttp.open('post','secret/mailset.asp?actions='+escape(actions)+'&data5='+escape(data5)+'&suijishu='+Date(),true)		
		}
		if(actions==2){
			var data4=document.getElementById('data4').value;
	xmlhttp.open('post','secret/mailset.asp?actions=2&data4='+escape(data4)+'&suijishu='+Date(),true)		
		}
		if(actions==4){
			var data6=document.getElementById('data6').value;
	xmlhttp.open('post','secret/mailset.asp?actions=4&data6='+escape(data6)+'&suijishu='+Date(),true)		
		}
		if(actions==5){
			var data7=document.getElementById('data7').value;
			var data8=document.getElementById('data8').value;		
	xmlhttp.open('post','secret/mailset.asp?actions='+escape(actions)+'&data7='+escape(data7)+'&data8='+escape(data8)+'&suijishu='+Date(),true)		
		}
		if(actions==9){
			var data13=document.getElementById('data13').value;
	xmlhttp.open('post','secret/mailset.asp?actions=9&data13='+escape(data13)+'&suijishu='+Date(),true)		
		}
			if(actions==10){
			var thistextarea=document.getElementById('thistextarea').value;
				var toshouji=document.getElementById('toshouji').value;
			
	xmlhttp.open('post','secret/sendsms.asp?actions=10&sms='+escape(thistextarea)+'&toshouji='+escape(toshouji)+'&suijishu='+Date(),true)		
		}
			if(actions==11){
			var data15=document.getElementById('data15').value;
				var data16=document.getElementById('data16').value;
	xmlhttp.open('post','secret/mailset.asp?actions=11&data15='+escape(data15)+'&data16='+escape(data16)+'&suijishu='+Date(),true)		
		}
			if(actions==6 ){
	xmlhttp.open('post','secret/mailset.asp?actions='+escape(actions)+'&suijishu='+Date(),true)		
		}
	if(actions==12){
	var data1=document.getElementById('data1').value;
	var data2=document.getElementById('data2').value;

	xmlhttp.open('post','secret/gengxin.asp?actions='+escape(actions)+'&data1='+escape(data1)+'&data2='+escape(data2)+'&suijishu='+Date(),true)		
		}		
if(actions==7){
	var data7=document.getElementById('data7').value;
	var data8=document.getElementById('data8').value;
	var data9=document.getElementById('data9').value;
	var data10=document.getElementById('data10').value;
	xmlhttp.open('post','secret/mailset.asp?actions='+escape(actions)+'&data7='+escape(data7)+'&data8='+escape(data8)+'&data9='+escape(data9)+'&data10='+escape(data10)+'&suijishu='+Date(),true)		
		}
		if(actions==14){
	var data20=document.getElementById('data20').value;
	xmlhttp.open('post','secret/mailset.asp?actions='+escape(actions)+'&data20='+escape(data20)+'&suijishu='+Date(),true)		
		}
			if(actions==15){
	var data21=document.getElementById('data21').value;
	xmlhttp.open('post','secret/mailset.asp?actions='+escape(actions)+'&data21='+escape(data21)+'&suijishu='+Date(),true)		
		}
		
		xmlhttp.onreadystatechange=function() {
			
			if (xmlhttp.readyState<4 && actions!=6  && actions!=14) {		
		setTimeout("dvck('正在发送中')",0);
			}	
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	

if (unescape(xmlhttp.responseText).indexOf("失败")>0){
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);

	if (actions==10){
	sendsmsbutton.disabled=false;
		}
	return;
	}
if ( actions==11){
				setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
getcontent('secret/mailset.asp?types=3&thiss=5','contents',1);
	}	
		if ( actions==12){
				setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
getcontent('secret/gengxin.asp?types=3&thiss=17','contents',1);
	}	
		if ( actions==14 || actions==15 ){
				setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
	}	
if (actions==1 || actions==2){
				setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
	getweblists('secret/mailset.asp?thiss=5&types=1');
	}
		if (actions==3 || actions==4){
				setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
	getweblists('secret/mailset.asp?thiss=5&types=2');
	}
			if (actions==5 || actions==9){
	getweblists('secret/mailset.asp?thiss=5&types=3');
		setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
		}
			if (actions==7){
		setTimeout("savemailset1('"+data7+"','"+data9+"')",11000);//11秒
		}
		if (actions==6){
chayue.innerHTML=unescape(xmlhttp.responseText);
		}
			if (actions==10){
				counter.innerHTML=400;
			sendsmsbutton.disabled=false;
			document.getElementById('toshouji').value="";
			document.getElementById('thistextarea').value="";
		setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
}}}}
		xmlhttp.send(null);
	}
 //修改设置结束
   //修改项目
 function xiangmu(types,id) {	

	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data0=document.getElementById('data0').value;
	var datas=document.getElementById(("data" + id)).value;
		
	xmlhttp.open('post','admin/xiangmu.asp?actions='+escape(types)+'&data0='+escape(data0)+'&datas='+escape(datas)+'&id='+escape(id)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	getweblists('admin/xiangmu.asp?thiss=3');
				setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
}}}
		xmlhttp.send(null);
	}
 //修改项目结束
   //修改岗位
 function gangwei(types,id) {	

	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data0=document.getElementById('data0').value;
	var datas=document.getElementById(("data" + id)).value;
		
	xmlhttp.open('post','admin/gangwei.asp?actions='+escape(types)+'&data0='+escape(data0)+'&datas='+escape(datas)+'&id='+escape(id)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	getweblists('admin/gangwei.asp?thiss=15');
				setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
}}}
		xmlhttp.send(null);
	}
 //修改岗位结束
   //测试用户重复
   function callServer() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data1=document.getElementById('data1').value;
	var data900=document.getElementById('data900').value;
	if ((data1 == null) || (data1 == "")  || (data900 ==  null) || (data900 == "") ) return;
	if (data900==1 && data1.length<6)
{
document.getElementById("checkusername").innerHTML="<font color=#ff0000>用户名长度至少6位</font>";
return;
	}

xmlhttp.open('post','cucheckuser.asp?check=1&username='+escape(data1)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		
document.getElementById("checkusername").innerHTML=unescape(xmlhttp.responseText);
		}}}
		xmlhttp.send(null);
	}
//测试邮件是否正确
   function callemail() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data3=document.getElementById('data3').value;
if ((data3 == null) || (data3 == "")) return;
xmlhttp.open('post','cucheckuser.asp?check=5&email='+escape(data3)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	checkemail.innerHTML=unescape(xmlhttp.responseText);
}}}
		xmlhttp.send(null);
	}
	//测试发送找回密码邮件
   function findpass() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data1=document.getElementById('data1').value;
xmlhttp.open('post','mail/sendpassemail.asp?email='+escape(data1)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
if ((data1 == null) || (data1 == "") || (data1.indexOf("@")<=0) )
{  
input.disabled=false;
	fankui.innerHTML='请填写正确的E-mail';
		return;
	}	
			
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if (unescape(xmlhttp.responseText).indexOf("您的邮箱完成余下操作")>0)
		{
	contents.innerHTML=unescape(xmlhttp.responseText);
		}
		else
		{
			input.disabled=false;
			fankui.innerHTML=unescape(xmlhttp.responseText);
		return;
}}}}
		xmlhttp.send(null);
	}
//结束
 //测试密码是否正确
   function callpassword() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data8=document.getElementById('data8').value;
if ((data8 == null) || (data8 == "")) return;
var reg =/^(?=.*[a-zA-Z]+)(?=.*[0-9]+)[a-zA-Z0-9]+$/ 
if(!reg.test(data8) || data8.length<6){
checkpassword.innerHTML="&nbsp;<font color=#FF0000>提示：密码长度至少六位，且同时包含数字和字母</font>";
 return;
	}
xmlhttp.open('post','cucheckuser.asp?check=2&password='+escape(data8)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	checkpassword.innerHTML=unescape(xmlhttp.responseText);
}}}
		xmlhttp.send(null);
	}
  //测试确认密码是否正确
   function callpassword2() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data8=document.getElementById('data8').value;	
	var data9=document.getElementById('data9').value;
	var reg =/^(?=.*[a-zA-Z]+)(?=.*[0-9]+)[a-zA-Z0-9]+$/ 
if(!reg.test(data8) || data8.length<6 || !reg.test(data9) || data9.length<6){
checkpassword2.innerHTML="&nbsp;<font color=#FF0000>提示：密码长度至少六位，且同时包含数字和字母</font>";
 return;
	}
if ((data8 == null) || (data8 == "")|| (data9 == "")|| (data9 == null)) return;
  if ((data9 == null) || (data9 ==data8)) {
xmlhttp.open('post','cucheckuser.asp?check=3&rightor=1&suijishu='+Date(),true)		
}
if ((data9 !=data8))
   {
xmlhttp.open('post','cucheckuser.asp?check=3&rightor=0&suijishu='+Date(),true)		
}
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	checkpassword2.innerHTML=unescape(xmlhttp.responseText);
}}}
		xmlhttp.send(null);
	}
//添加用户
function adduser(from) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var data1=document.getElementById('data1').value;
	var data2=document.getElementById('data2').value;
	var data3=document.getElementById('data3').value;
	var data4=document.getElementById('data4').value;
	var data5=document.getElementById('pcls0').value;
	var data6=document.getElementById('data6').value;
	var data10=document.getElementById('data10').value;
	var data8=document.getElementById('data8').value;
	var data9=document.getElementById('data9').value;
	var data11=document.getElementById('shengri').value;
	 if(document.getElementById("data7").checked)
 {	var fasong=1;}
else
{var fasong=0;}			
	xmlhttp.open('post','ip.asp?actions=1&from='+escape(from)+'&data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&data6='+escape(data6)+'&data10='+escape(data10)+'&data4='+escape(data4)+'&data5='+escape(data5)+'&data11='+escape(data11)+'&fasong='+escape(fasong)+'&data8='+escape(data8)+'&data9='+escape(data9)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
	if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	 addnewuser.disabled=false;
if( unescape(xmlhttp.responseText).indexOf('员添加成功')>0) {	
if (from==2){

closeWindow('');	
	getweblists('admin/userlist.asp?thiss=2');
			setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
}
else
{
contents.innerHTML='<table width="699" style="margin-top:100px;" border="0" align="center" cellpadding="2" cellspacing="0"   ><tr><td height="40" colspan=2     background="images/bgx.png"><font color="#ffffff" >&nbsp;注册结果</font></TD></TR><tr><td width="120" height="150" bgcolor="#FFFFFF" style="border-left:1px #C7DADA solid;border-bottom:1px #C7DADA solid;"  align="center" valign="middle"><img width=100 height=100 src=images/oklas.jpg></td><td  style="border-right:1px #C7DADA solid;border-bottom:1px #C7DADA solid;" height="150"    bgcolor="#FFFFFF"  align="left"> 帐户注册成功,请立即<a href="index.asp">登录</a></td></tr></table> ';	
}}
	else
	{
		setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
		return;
		}}}}
		xmlhttp.send(null);
	}
//	用户冻结\修改
   function callpass(ii,id,zhi) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((zhi == null) || (zhi == "") || (id== null) || (id == "")) return;
  updatePagee = eval("updatePage" + ii);
  if (zhi==4){
		var data1=document.getElementById('data1'+ii).value;
	var data2=document.getElementById('data2'+ii).value;
	var data3=document.getElementById('data3'+ii).value;
	var data4=document.getElementById('data4'+ii).value;
		var data5=document.getElementById('data5'+ii).value;
	var data6=document.getElementById('data6'+ii).value;
		var data7=document.getElementById('data7'+ii).value;
		var shengri=document.getElementById('shengri'+ii).value;
	var pcls=document.getElementById('pcls'+ii).value;  
  if ((pcls== null) || (pcls == "")) return;	  
xmlhttp.open('post','cucheckuser.asp?check=6&data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&shengri='+escape(shengri)+'&data4='+escape(data4)+'&data5='+escape(data5)+'&data6='+escape(data6)+'&data7='+escape(data7)+'&pcls='+escape(pcls)+'&ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)		
  }else{
xmlhttp.open('post','cucheckuser.asp?check=6&ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)			  
  }
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
			if( unescape(xmlhttp.responseText)=='删除成功！') {		
	getweblists('admin/userlist.asp?thiss=2');
	setTimeout("dvck('<img src=images/okla.gif align=absmiddle> "+unescape(xmlhttp.responseText)+"')",500);
	}else{
	updatePagee.innerHTML=unescape(xmlhttp.responseText);
	}
}}}
		xmlhttp.send(null);
	}
//领导交办开始

   function openjiaojie(ii,yemian,types,page,keyword,totalput) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {

	var data1=document.getElementById('openpeople'+ii).value;
	var data2=document.getElementById('openpeople'+ii+'gh').value;
if(document.getElementById('openghren'+ii).checked){
	var openghren=2;
}else
{
	var openghren=1;	
	}

  if ((data1== null) || (data2 == "")) 
  {setTimeout("dvck('<img src=images/x.gif align=absmiddle> 数据不完整')",500);
	  return;	  }
xmlhttp.open('post','secret/cutask.asp?pass=601&jinji='+escape(openghren)+'&beizhu1='+escape(data1)+'&beizhu2='+escape(data2)+'&id='+escape(ii)+'&suijishu='+Date(),true)		

		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		var response=unescape(xmlhttp.responseText)
			if( response.indexOf('失败')>=0) {		
	setTimeout("dvck('<img src=images/x.gif align=absmiddle> "+response+"')",500);
	return;
	}else{
var arrstrst = response.split("|$|");	
				document.getElementById("updateguanzhu" + ii).innerHTML=arrstrst[0];
				document.getElementById("newguanzhu" + ii).innerHTML=arrstrst[1];
document.getElementById('openzerenren'+ii).innerHTML=data2;
document.getElementById('openthisjiaojie'+ii).innerHTML="<img src=images/okla.gif align='absmiddle' id='openthis'> 交办成功";
 getcontent('taskstatus.asp?yemian='+escape(yemian)+'&types='+escape(types)+'&page='+escape(page)+'&keyword='+escape(keyword)+'&totalput='+escape(totalput)+'&rizhiid='+ii,'caozuo'+ii,0);

	}
}}}
		xmlhttp.send(null);
	}

//领导交办结束
//	用户资料修改
   function calluser(types,id) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
		var data1=document.getElementById('data1').value;
	var data2=document.getElementById('data2').value;
		var data3=document.getElementById('data3').value;
			var data4=document.getElementById('data4').value.replace(/\r/g,"<br>");
			var data5=document.getElementById('shengri').value;	
xmlhttp.open('post','cucheckuser.asp?check=10&data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&data4='+escape(data4)+'&data5='+escape(data5)+'&id=' + escape(id)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	getweblists('useredit.asp?2342FF=34');
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
}}}
		xmlhttp.send(null);
	}
 //资料修改结束
 //	用户提醒信息修改
   function callxinxi(user) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
 if(document.getElementById("tixing1").checked)
 {	var tixing1=1;}
else
{var tixing1=0;}		
 if(document.getElementById("tixing2").checked)
 {	var tixing2=1;}
else
{var tixing2=0;}			
	 if(document.getElementById("tixing3").checked)
 {	var tixing3=1;}
else
{var tixing3=0;}
 if(document.getElementById("tixing4").checked)
 {	var tixing4=1;}
else
{var tixing4=0;}
 if(document.getElementById("tixing5").checked)
 {	var tixing5=1;}
else
{var tixing5=0;}
xmlhttp.open('post','cucheckuser.asp?check=7&tixing1='+escape(tixing1)+'&tixing2='+escape(tixing2)+'&tixing3='+escape(tixing3)+'&tixing4='+escape(tixing4)+'&tixing5='+escape(tixing5)+'&user=' + escape(user)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
		}}}
		xmlhttp.send(null);
	}
 //用户提醒信息修改
function searchqun1() {	
	var data11=document.getElementById('data11').value;
	if ((data11== null) || (data11== "") ) return;
	getcontent("qunzu/searchqun.asp?page=1&keyword="+escape(data11),"content",1);
		 }
  //创建群
  function creatqun(types) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
		 //创建群分组
		 if (types==1) {
	var data1=document.getElementById('data1').value;
	  if ((data1== null) || (data1 == "")) return;	  
		xmlhttp.open('post','qunzu/qunedit.asp?check=1&data1='+escape(data1)+'&suijishu='+Date(),true)		
			 }
		 	 //修改群分组
	 if (types==2) {
	var data2=document.getElementById('data2').value;
		var data3=document.getElementById('data3').value;
		  if ((data2== null) || (data2 == "") || (data3 == "") || (data3 == null)) return;
		
		xmlhttp.open('post','qunzu/qunedit.asp?check=2&data2='+escape(data2)+'&data3='+escape(data3)+'&suijishu='+Date(),true)		
		 }
		 //删除群分组
	 if (types==3) {
	var data4=document.getElementById('data4').value;
			  if ((data4== null) || (data4 == "") ) return;
				xmlhttp.open('post','qunzu/qunedit.asp?check=3&data4='+escape(data4)+'&suijishu='+Date(),true)		
			 }
//创建新群
		 if (types==4) {
	var data5=document.getElementById('data5').value;
		var data6=document.getElementById('data6').value;
		  if ((data6== null) || (data6== "") || (data5 == "") || (data5 == null)) return;
				xmlhttp.open('post','qunzu/qunedit.asp?check=4&data6='+escape(data6)+'&data5='+escape(data5)+'&suijishu='+Date(),true)		
		 }	 
	//修改新群
		 if (types==5) {
	var data7=document.getElementById('data7').value;
		var data8=document.getElementById('data8').value;
		  if ((data8== null) || (data8== "") || (data7 == "") || (data7 == null)) return;
				xmlhttp.open('post','qunzu/qunedit.asp?check=5&data7='+escape(data7)+'&data8='+escape(data8)+'&suijishu='+Date(),true)		
		 }	 	 
		 		 if (types==6) {
	var data9=document.getElementById('data9').value;
		  if ((data9== null) || (data9== "") ) return;
			xmlhttp.open('post','qunzu/qunedit.asp?check=6&data9='+escape(data9)+'&suijishu='+Date(),true)		
		 }	 	 
			xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	getweblists('qunzu/qunzu.asp?fanFGH2=FGH');
			setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
}}}
	xmlhttp.send(null);
	}
  //创建群结束
  //部门
   function callbumen(ii,id,zhi) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((zhi == null) || (zhi == "") || (id== null) || (id == "")) return;
  updatePagee = eval("updatePage" + ii);
  if (zhi==4){
		var data1=document.getElementById('data1'+ii).value;
	var data2=document.getElementById('data2'+ii).value;
	var data3=document.getElementById('data3'+ii).value;
	var pcls=document.getElementById('pcls'+ii).value;  
  if ((pcls== null) || (pcls == "")) return;	  
xmlhttp.open('post','cucheckuser.asp?check=6&data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&pcls='+escape(pcls)+'&ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)		
  }else{
xmlhttp.open('post','cucheckuser.asp?check=6&ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)			  
  }
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
			if( unescape(xmlhttp.responseText)=='删除成功！') {		
	getweblists('admin/userlist.asp?thiss=2');
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}else{
	updatePagee.innerHTML=unescape(xmlhttp.responseText);
	}
}}}
		xmlhttp.send(null);
	}
//部门结束
//群用户添加、删除
   function callqunuser(ii,user,zhi,qunzuid) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((user== null) || (user == "") || (ii== null) || (ii == "")|| (qunzuid== null) || (qunzuid == "")|| (zhi == "")|| (zhi ==null)) return;
 //删除用户
  if (zhi==1000){
 xmlhttp.open('post','qunzu/qunpeopleedit.asp?zhi=' + escape(zhi)+'&ii=' + escape(ii)+'&user=' + escape(user)+'&qunzuid=' + escape(qunzuid)+'&suijishu='+Date(),true)		
  }
    if (zhi==2 ){
  updatePagee = eval("updatePage" + ii);	  
xmlhttp.open('post','qunzu/qunpeopleedit.asp?zhi=' + escape(zhi)+'&ii=' + escape(ii)+'&user=' + escape(user)+'&qunzuid=' + escape(qunzuid)+'&suijishu='+Date(),true)		
  }
  //添加用户
    if (zhi==1){
		 updatePagee = eval("alluser");
		var users=document.getElementById('qunusers').value;
		var usersgh=document.getElementById('qunusersgh').value;
  if ((users== null) || (users == "") ) return;
	xmlhttp.open('post','qunzu/qunpeopleedit.asp?zhi=1&ii=' + escape(ii)+'&user=' + escape(users)+'&usergh=' + escape(usersgh)+'&qunzuid=' + escape(qunzuid)+'&suijishu='+Date(),true)		
  }
      //用户加群
    if (zhi==300){
xmlhttp.open('post','qunzu/qunpeopleedit.asp?zhi=300&qunzuid=' + escape(qunzuid)+'&suijishu='+Date(),true)		
  }
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		 if (zhi==1000){
  	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
   getweblists('qunzu/qunzu.asp?types=1');
  }
  	  if (zhi==300){
  updatePagee = eval("haveadd" + ii);
updatePagee.innerHTML='您已经加入该群';
   getweblists('qunzu/qunzu.asp?types=1'); 
  }
  	if (zhi!=1000 && zhi!=300)	{
	updatePagee.innerHTML=unescape(xmlhttp.responseText);
	}
}}}
		xmlhttp.send(null);
	}
//群用户添加、删除
//群日志操作
function callyue(id,pass,types,beiyong,page,keyword,yemian) {
	var xmlhttp=createAjax();	
	if (xmlhttp) {	
	  if ((id== null) || (id == "") || (pass== null) || (pass == "")|| (types== null) || (types == "")) return;	
    if( (pass == 1 || pass ==11  || pass == 10  || pass == 20 || pass == 31 || pass == 41)  ) {
var neirong=document.getElementById("neirong").value; 
var miaoshu=document.getElementById("miaoshu").value; 
var leibie=document.getElementById("leibie").value;
var zhibiao=document.getElementById("zhibiao").value;
var jiaofu=document.getElementById("jiaofu").value;
var beizhu1=document.getElementById("beizhu1").value;
var beizhu2=document.getElementById("beizhu2").value;
var beizhu3=document.getElementById("beizhu3").value;
var beizhu4=document.getElementById("beizhu4").value;
var beizhu5=document.getElementById("beizhu5").value;
 if(document.getElementById("emailsend").checked)
 {	var emailsend=1;}
else
{var emailsend=0;}			
 if(document.getElementById("duanxinsend").checked)
 {	var duanxinsend=1;}
else
{var duanxinsend=0;}
var wenjian=document.getElementById("wenjians").value;
var jinji=document.getElementById("jinji").value; 
var totime=document.getElementById("totime").value;
var zerenren=document.getElementById("zerenren").value;
var genzongren=document.getElementById("genzongren").value; 
var gzhuren=document.getElementById("gzhuren").value;
var zerenrengh=document.getElementById("zerenrengh").value;
var genzongrengh=document.getElementById("genzongrengh").value; 
var gzhurengh=document.getElementById("gzhurengh").value;
var xunhuan=document.getElementById("xunhuan").value;
var zhoucontent=document.getElementById("zhoucontent").value;
var yuecontent=document.getElementById("yuecontent").value;
var jiducontent=document.getElementById("jiducontent").value;
var niancontent=document.getElementById("niancontent").value;
var nianyuecontent=document.getElementById("nianyuecontent").value;
var xh_zhouqi=document.getElementById("xh_zhouqi").value;
var stopcycle=document.getElementById("stopcycle").value;

if (types!=100 && types!=400){
  var url = "secret/cutask.asp?types="+types+"&id="+id+"&beiyong="+beiyong+"&duanxinsend="+duanxinsend+"&emailsend="+emailsend+"&pass="+pass+"&neirong=" + escape(neirong)+"&miaoshu=" + escape(miaoshu)+"&leibie=" + escape(leibie)+"&zhibiao=" + escape(zhibiao)+"&jiaofu=" + escape(jiaofu)+"&wenjian=" + escape(wenjian)+"&jinji=" + escape(jinji)+"&beizhu1=" + escape(beizhu1)+"&beizhu2=" + escape(beizhu2)+"&beizhu3=" + escape(beizhu3)+"&beizhu4=" + escape(beizhu4)+"&beizhu5=" + escape(beizhu5)+"&genzongren=" + escape(genzongren)+"&zerenren=" + escape(zerenren)+"&gzhuren=" + escape(gzhuren)+"&genzongrengh=" + escape(genzongrengh)+"&zerenrengh=" + escape(zerenrengh)+"&gzhurengh=" + escape(gzhurengh)+"&xunhuan=" + escape(xunhuan)+"&zhoucon=" + escape(zhoucontent)+"&yuecon=" + escape(yuecontent)+"&jiducon=" + escape(jiducontent)+"&stopcycle=" + escape(stopcycle)+"&xh_zhouqi=" + escape(xh_zhouqi)+"&niancon=" + escape(niancontent)+"&nianyuecon=" + escape(nianyuecontent)+"&totime=" + escape(totime)+"&suijishu="+Date();
}
  else
  {
  var url = "secret/cutask.asp?types="+types+"&id="+id+"&beiyong="+beiyong+"&pass="+pass+"&neirong=" + escape(neirong)+"&miaoshu=" + escape(miaoshu)+"&xunhuan=" + escape(xunhuan)+"&zhoucon=" + escape(zhoucontent)+"&yuecon=" + escape(yuecontent)+"&jiducon=" + escape(jiducontent)+"&niancon=" + escape(niancontent)+"&nianyuecon=" + escape(nianyuecontent)+"&leibie=" + escape(leibie)+"&zhibiao=" + escape(zhibiao)+"&jiaofu=" + escape(jiaofu)+"&wenjian=" + escape(wenjian)+"&jinji=" + escape(jinji)+"&beizhu1=" + escape(beizhu1)+"&beizhu2=" + escape(beizhu2)+"&beizhu3=" + escape(beizhu3)+"&beizhu4=" + escape(beizhu4)+"&beizhu5=" + escape(beizhu5)+"&genzongren=" + escape(genzongren)+"&zerenren=" + escape(zerenren)+"&gzhuren=" + escape(gzhuren)+"&genzongrengh=" + escape(genzongrengh)+"&zerenrengh=" + escape(zerenrengh)+"&stopcycle=" + escape(stopcycle)+"&xh_zhouqi=" + escape(xh_zhouqi)+"&gzhurengh=" + escape(gzhurengh)+"&totime=" + escape(totime)+"&suijishu="+Date();
}
  
  }
   if (pass == 2 || pass == 6 || pass == 5 || pass == 91 || pass == 92 || pass == 81 || pass == 82 || pass == 83 || pass == 84 || pass == 85 || pass == 86) {
	 var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass="+pass+"&suijishu="+Date();
  }
     if (pass == 3) {
	       var jjyuanyin=document.getElementById("jjyuanyin" + id).value;
if ((jjyuanyin== null) || (jjyuanyin== "") || (jjyuanyin == "请输入拒绝原因") ) return;
  var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass=3&jjyuanyin=" + escape(jjyuanyin)+"&suijishu="+Date();
  } 
     if (pass == 4) {
	       var yqyuanyin=document.getElementById("yqyuanyin" + id).value;
		 var yqdate=document.getElementById("yqdate" + id).value;
 if ((yqyuanyin== null) || (yqyuanyin== "") || (yqdate== null) || (yqdate == "") || (yqyuanyin == "请输入延期原因") ) return;		 
  var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass=4&yqyuanyin=" + escape(yqyuanyin)+"&yqdate=" + escape(yqdate)+"&suijishu="+Date();
  } 
//批准延期
     if (pass == 15 || pass == 16 ) {
var yqdates=document.getElementById("yqdates" + id).value;
if ((yqdates == null) || (yqdates == '') ) return;	
var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass="+pass+"&yqdate=" + escape(yqdates)+"&suijishu="+Date();
  } 
if (pass == 7 || pass == 8) {
var scyuanyin=document.getElementById("scyuanyin" + id).value;
var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass="+pass+"&scyuanyin=" + escape(scyuanyin)+"&suijishu="+Date();
  }

  xmlhttp.open("post", url, true);
 if (pass == 91 || pass ==92 ){//关注。
  updatePageb = eval("updateguanzhu" + id);
    updatePageg = eval("newguanzhu" + id);
  }
if (pass >80 && pass <90 )//紧急。
  {
updatePageb= eval("isjinji" + id);
 } 
  	xmlhttp.onreadystatechange=function() {
		if(document.getElementById("fankui")!=undefined) {document.getElementById('fankui').innerHTML='';}
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
			if ( unescape(xmlhttp.responseText).indexOf("失败：") >= 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	return;
	}	
		
//审核成功
	if (pass == 2 && unescape(xmlhttp.responseText)==2 )
	{	
xh_insert();

	eval("caozuo" + id).innerHTML="&nbsp;<input type='button'   onclick=callyue("+id+",8,6,"+beiyong+","+page+",'"+keyword+"'); value='删除'><input type='hidden' id='scyuanyin"+id+"'  value='删除'>";
	eval("wangong" + id).innerHTML="<img src=images/tongguo.gif> 审核通过";
		setTimeout("dvck('<img src=images/okla.gif> 审核通过！')",500);
		}
//审核拒绝		
	if (pass == 3 && unescape(xmlhttp.responseText)==3 )
	{
	eval("caozuo" + id).innerHTML="&nbsp;<input type='button'   onclick=callyue("+id+",2,6,"+beiyong+","+page+",'"+keyword+"'); value='审核通过'>&nbsp;<input type='button'   onclick=callyue("+id+",8,6,"+beiyong+","+page+",'"+keyword+"'); value='删除'><input type='hidden' id='scyuanyin"+id+"'  value='删除'>";
	eval("wangong" + id).innerHTML="<img src=images/refuse.gif> 审核未过";
		setTimeout("dvck('<img src=images/okla.gif> 审核已拒绝！')",500);
		}
	//同意延期
	if (pass == 16 && unescape(xmlhttp.responseText)==2 )
	{
	eval("totime" + id).innerHTML=escape(yqdates);
		eval("caozuo" + id).innerHTML="&nbsp;<input type='button'   onclick=callyue("+id+",8,6,"+beiyong+","+page+",'"+keyword+"'); value='删除'><input type='hidden' id='scyuanyin"+id+"'  value='删除'>";
	eval("wangong" + id).innerHTML="<img src=images/tongguo.gif> 审核通过";
	setTimeout("dvck('<img src=images/okla.gif> 已批准延期！')",500);
		}	
	//拒绝延期
	if (pass == 15 && unescape(xmlhttp.responseText)==2 )
	{
	eval("caozuo" + id).innerHTML="&nbsp;<input type='button'   onclick=callyue("+id+",8,6,"+beiyong+","+page+",'"+keyword+"'); value='删除'><input type='hidden' id='scyuanyin"+id+"'  value='删除'>";
	eval("wangong" + id).innerHTML="<img src=images/tongguo.gif> 审核通过";
	setTimeout("dvck('<img src=images/okla.gif> 已拒绝延期！')",500);
		}	
//关闭任务		
	if (pass == 6 && unescape(xmlhttp.responseText)==6 )
	{
	eval("caozuo" + id).innerHTML="&nbsp;<input type='button'   onclick=callyue("+id+",8,6,"+beiyong+","+page+",'"+keyword+"'); value='删除'><input type='hidden' id='scyuanyin"+id+"'  value='删除'>";
	eval("wangong" + id).innerHTML="<img src=images/okla.gif> 任务完成";
		setTimeout("dvck('<img src=images/okla.gif> 任务已关闭！')",500);
		}	
	//申请关闭任务		
	if (pass == 5 && unescape(xmlhttp.responseText)==5 )
	{
	eval("caozuo" + id).innerHTML="&nbsp;<input id='scyuanyin"+id+"'  type='text'   name='scyuanyin"+id+"' value='请输入删除理由' size='13'   onMouseOver='this.focus()'  onFocus='this.select()' onClick=\"if(this.value!='')this.value=''\">&nbsp;<input type='button'   onclick=callyue("+id+",7,6,"+beiyong+","+page+",'"+keyword+"'); value='申请删除'>";
	eval("wangong" + id).innerHTML="<img src=images/REPAIR.GIF> 等待关闭";
		setTimeout("dvck('<img src=images/okla.gif> 申请关闭成功！')",500);
		}	
	//申请延期		
	if (pass == 4 && unescape(xmlhttp.responseText)==4 )
	{
	eval("caozuo" + id).innerHTML="&nbsp;";
	eval("wangong" + id).innerHTML="<img src=images/ico.png> <span title=延期原因："+yqyuanyin+">申请延期</span>";
		setTimeout("dvck('<img src=images/okla.gif> 延期申请成功！')",500);
		}			
//申请删除任务		
	if (pass == 7  )
	{
	eval("caozuo" + id).innerHTML="&nbsp;<input type=hidden value=yes>/";
	eval("wangong" + id).innerHTML="<img src=images/nomoney.GIF> <span title=删除原因："+scyuanyin+">等待删除</span>";
		setTimeout("dvck('<img src=images/okla.gif> 已经申请删除！')",500);
		}		
	//申请延期		
	if (pass == 8 && unescape(xmlhttp.responseText)==8 )
	{
	getcontent('secret/quncontent.asp?qunzuid='+escape(beiyong)+'&keyword='+escape(keyword),'quncontent',0);

		setTimeout("dvck('<img src=images/okla.gif> 删除成功！')",500);
		}		
	 if (pass == 1 || pass ==11  || pass == 10  || pass == 20 || pass == 31 || pass == 41 )
  {  
  if(pass==41){
	  xh_insert();}
  	  if(pass==20 || pass==31 || pass==41   ){
		  if (keyword=='KPI指标专用通道')
getcontent('addtask.asp?jixiaoid='+escape(beiyong)+'&yemian=kpi','content',0);
		 else 
getcontent('addtask.asp?qunzuid='+escape(beiyong)+'&page='+escape(page)+'&keyword='+escape(keyword),'content',0);

}

		if (pass==10) {
	document.all("back").style.display="none";	
	document.all("mesWindow").style.display="none";
	}
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);

 if (types==100 || types==400){
	getcontent('secret/showjixiao.asp?id='+escape(beiyong)+'&thiss=14&types=100&suijishu='+Date(),'contents',0);
	}
	else
	{
		if(yemian=="myfabu"){
		
			getcontent('myfabu.asp?page='+escape(page)+'&yemian=myfabu&thiss=19&xunhuan='+escape(beiyong)+'&keyword='+escape(keyword)+'&suijishu='+Date(),'contents',0);	

		
		}else{
	getcontent('secret/quncontent.asp?qunzuid='+escape(beiyong)+'&types='+escape(types)+'&page='+escape(page)+'&keyword='+escape(keyword)+'&suijishu='+Date(),'quncontent',0);	
		}
	}
	 }
if (pass == 91|| pass ==92  || pass == 81  || pass == 82 || pass == 83  || pass == 84 || pass == 85 || pass == 86)
 {

				if(pass==91){
			var arrstrst = unescape(xmlhttp.responseText).split("|$|");	
				updatePageb.innerHTML=arrstrst[0];
				updatePageg.innerHTML=arrstrst[1];
			
				setTimeout("dvck('<img src=images/okla.gif> 取消关注成功')",500);	
				}
				else if(pass==92){
				var arrstrst = unescape(xmlhttp.responseText).split("|$|");	
				updatePageb.innerHTML=arrstrst[0];
				updatePageg.innerHTML=arrstrst[1];
				setTimeout("dvck('<img src=images/okla.gif> 关注成功')",500);	
				}
				else
				{
updatePageb.innerHTML=unescape(xmlhttp.responseText);	
					}
				
				
				}}}}
		xmlhttp.send(null);
	}
//群日志操作结束
//非群日志操作

function callnoqun(id,pass,types,yemian,page,keyword,totalput) {
	var xmlhttp=createAjax();	
	if (xmlhttp) {	
	  if ((id== null) || (id == "") || (pass== null) || (pass == "")) return;	
    if( (pass == 1 || pass ==11  || pass == 10  || pass == 20 || pass == 31 || pass == 41)  ) {
var neirong=document.getElementById("neirong").value; 
var miaoshu=document.getElementById("miaoshu").value; 
var leibie=document.getElementById("leibie").value;
var zhibiao=document.getElementById("zhibiao").value;
var jiaofu=document.getElementById("jiaofu").value;
var beizhu1=document.getElementById("beizhu1").value;
var beizhu2=document.getElementById("beizhu2").value;
var beizhu3=document.getElementById("beizhu3").value;
var beizhu4=document.getElementById("beizhu4").value;
var beizhu5=document.getElementById("beizhu5").value;
var wenjian=document.getElementById("wenjians").value;
var jinji=document.getElementById("jinji").value;
 if(document.getElementById("emailsend").checked)
 {	var emailsend=1;}
else
{var emailsend=0;}			
 if(document.getElementById("duanxinsend").checked)
 {	var duanxinsend=1;}
else
{var duanxinsend=0;}
var totime=document.getElementById("totime").value;
var zerenren=document.getElementById("zerenren").value;
var genzongren=document.getElementById("genzongren").value; 
var gzhuren=document.getElementById("gzhuren").value;
var zerenrengh=document.getElementById("zerenrengh").value;
var genzongrengh=document.getElementById("genzongrengh").value; 
var gzhurengh=document.getElementById("gzhurengh").value;
var xunhuan=document.getElementById("xunhuan").value;
var xh_zhouqi=document.getElementById("xh_zhouqi").value;
var stopcycle=document.getElementById("stopcycle").value;
var zhoucontent=document.getElementById("zhoucontent").value;
var yuecontent=document.getElementById("yuecontent").value;
var jiducontent=document.getElementById("jiducontent").value;
var niancontent=document.getElementById("niancontent").value;
var nianyuecontent=document.getElementById("nianyuecontent").value;
  var url = "secret/cutask.asp?types="+types+"&id="+id+"&beiyong=0&pass="+pass+"&neirong=" + escape(neirong)+"&xunhuan=" + escape(xunhuan)+"&zhoucon=" + escape(zhoucontent)+"&yuecon=" + escape(yuecontent)+"&jiducon=" + escape(jiducontent)+"&niancon=" + escape(niancontent)+"&nianyuecon=" + escape(nianyuecontent)+"&duanxinsend="+duanxinsend+"&emailsend="+emailsend+"&miaoshu=" + escape(miaoshu)+"&leibie=" + escape(leibie)+"&zhibiao=" + escape(zhibiao)+"&jiaofu=" + escape(jiaofu)+"&wenjian=" + escape(wenjian)+"&jinji=" + escape(jinji)+"&beizhu1=" + escape(beizhu1)+"&beizhu2=" + escape(beizhu2)+"&beizhu3=" + escape(beizhu3)+"&beizhu4=" + escape(beizhu4)+"&beizhu5=" + escape(beizhu5)+"&genzongren=" + escape(genzongren)+"&zerenren=" + escape(zerenren)+"&gzhuren=" + escape(gzhuren)+"&genzongrengh=" + escape(genzongrengh)+"&zerenrengh=" + escape(zerenrengh)+"&stopcycle=" + escape(stopcycle)+"&xh_zhouqi=" + escape(xh_zhouqi)+"&gzhurengh=" + escape(gzhurengh)+"&totime=" + escape(totime)+"&suijishu="+Date();
  }
   if (pass == 2 || pass == 6 || pass == 5 || pass == 91 || pass == 92 || pass == 81 || pass == 82 || pass == 83 || pass == 84 || pass == 85 || pass == 86) {
  var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass="+pass+"&suijishu="+Date();
  }
     if (pass == 3) {
	       var jjyuanyin=document.getElementById("jjyuanyin" + id).value;
if ((jjyuanyin== null) || (jjyuanyin== "") || (jjyuanyin == "请输入拒绝原因") ) return;
  var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass=3&jjyuanyin=" + escape(jjyuanyin)+"&suijishu="+Date();
  } 
     if (pass == 4) {
	       var yqyuanyin=document.getElementById("yqyuanyin" + id).value;
		 var yqdate=document.getElementById("yqdate" + id).value;
 if ((yqyuanyin== null) || (yqyuanyin== "") || (yqdate== null) || (yqdate == "") || (yqyuanyin == "请输入延期原因") ) return;		 
		  var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass=4&yqyuanyin=" + escape(yqyuanyin)+"&yqdate=" + escape(yqdate)+"&suijishu="+Date();
  } 
//批准延期
     if (pass == 15 || pass == 16 ) {
var yqdates=document.getElementById("yqdates" + id).value;
if ((yqdates == null) || (yqdates == '') ) return;	
var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass="+pass+"&yqdate=" + escape(yqdates)+"&suijishu="+Date();
  } 
if (pass == 7 || pass == 8) {

var scyuanyin=document.getElementById("scyuanyin" + id).value;

if ((scyuanyin== null) || (scyuanyin== "") || (scyuanyin == "请输入删除理由") ) return;

var url = "secret/cutask.asp?types="+types+"&id="+id+"&pass="+pass+"&scyuanyin=" + escape(scyuanyin)+"&suijishu="+Date();
  }
  xmlhttp.open("post", url, true);
 if (pass == 91 || pass ==92 ){//关注。
  updatePageb = eval("updateguanzhu" + id);
  }
if (pass >80 && pass <90 )//紧急。
  {
updatePageb= eval("isjinji" + id);
 } 
  	xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if(document.getElementById("fankui")!=undefined) {document.getElementById('fankui').innerHTML='';}
		if ( unescape(xmlhttp.responseText).indexOf("失败：") >= 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	return;
	}	
	if (page==0 && yemian!='newmessage'){
	
	getcontent('showtongji.asp?yemian=passed','showtongji',0);	
	}
//审核成功
	if (pass == 2 && unescape(xmlhttp.responseText)==2 )
	{

xh_insert();

	
		
		if (yemian=='needshenpi'){
		getcontent('indexaddtask.asp?yemian=needshenpi','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 审核通过！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian=needshenpi','indexcontent',0);
		}
		else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 审核通过！')",500);
	
		}
		else if (yemian=='passed' || yemian=='notfinish'){
		getcontent('indexaddtask.asp?rizhiid='+id+'&yemian='+yemian+'','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 审核通过！')",500);
		getcontent('myindexcontent.asp?yemian='+yemian,'indexcontent',0);
		}
		else if (yemian=='rizhouyue'){
			var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 审核通过！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}		
		
		else
		{
		getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);	
	setTimeout("dvck('<img src=images/okla.gif> 审核通过！')",500);
			}
		}
//审核拒绝		
	if (pass == 3 && unescape(xmlhttp.responseText)==3 )
	{
	if (yemian=='needshenpi'){
		getcontent('indexaddtask.asp?yemian=needshenpi','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 审核已拒绝！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian=needshenpi','indexcontent',0);
		}
		else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 审核已拒绝！')",500);
		}
		else if (yemian=='passed' || yemian=='notfinish'){
		getcontent('indexaddtask.asp?rizhiid='+id+'&yemian='+yemian+'','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 审核已拒绝！')",500);
		getcontent('myindexcontent.asp?yemian='+yemian,'indexcontent',0);
		}
				else if (yemian=='rizhouyue'){
			var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 审核已拒绝！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 审核已拒绝！')",500);
			}
			}
	//同意延期
	if (pass == 16 && unescape(xmlhttp.responseText)==2 )
	{
	if (yemian=='needshenpi'){
		getcontent('indexaddtask.asp?yemian=needshenpi','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已批准延期！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian=needshenpi','indexcontent',0);
		}
			else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 已批准延期！')",500);
		}
		else if (yemian=='passed' || yemian=='notfinish'){
		getcontent('indexaddtask.asp?rizhiid='+id+'&yemian='+yemian+'','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已批准延期！')",500);
		getcontent('myindexcontent.asp?yemian='+yemian,'indexcontent',0);
		}
				else if (yemian=='rizhouyue'){
			var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已批准延期！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
	setTimeout("dvck('<img src=images/okla.gif> 已批准延期！')",500);
			}		
			}	
	//拒绝延期
	if (pass == 15 && unescape(xmlhttp.responseText)==2 )
	{
		if (yemian=='needshenpi'){
		getcontent('indexaddtask.asp?yemian=needshenpi','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已拒绝延期！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian=needshenpi','indexcontent',0);
		}
		else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 已拒绝延期！')",500);
		}
			else if (yemian=='passed' || yemian=='notfinish'){
		getcontent('indexaddtask.asp?rizhiid='+id+'&yemian='+yemian+'','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已拒绝延期！')",500);
		getcontent('myindexcontent.asp?yemian='+yemian,'indexcontent',0);
		}
				else if (yemian=='rizhouyue'){
			var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已拒绝延期！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
	setTimeout("dvck('<img src=images/okla.gif> 已拒绝延期！')",500);
			}		
			}	
//关闭任务		
	if (pass == 6 && unescape(xmlhttp.responseText)==6 )
	{
		if (yemian=='needshenpi'){
		getcontent('indexaddtask.asp?yemian=needshenpi','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 任务已关闭！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian=needshenpi','indexcontent',0);
		}
		else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 任务已关闭！')",500);
		}
				else if (yemian=='passed' || yemian=='notfinish'){
		getcontent('indexaddtask.asp?rizhiid='+id+'&yemian='+yemian+'','open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 任务已关闭！')",500);
		getcontent('myindexcontent.asp?yemian='+yemian,'indexcontent',0);
		}
				else if (yemian=='rizhouyue'){
			var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 任务已关闭！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 任务已关闭！')",500);
			}		
			}	
	//申请关闭任务		
	if (pass == 5 && unescape(xmlhttp.responseText)==5 )
	{
	if (yemian=='passed' || yemian=='notfinish' ){
		getcontent('indexaddtask.asp?yemian='+escape(yemian),'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 申请关闭成功！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian='+escape(yemian),'indexcontent',0);
		}
		else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 申请关闭成功！')",500);
		}
else if (yemian=='rizhouyue'){
			var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 申请关闭成功！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 申请关闭成功！')",500);
			}		
			}	
	//申请延期		
	if (pass == 4 && unescape(xmlhttp.responseText)==4 )
	{
		if (yemian=='passed' || yemian=='notfinish' ){
		getcontent('indexaddtask.asp?yemian='+escape(yemian),'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 延期申请成功！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian='+escape(yemian),'indexcontent',0);
		}
		else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 延期申请成功！')",500);
		}
		else if (yemian=='rizhouyue'){
		var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 延期申请成功！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 延期申请成功！')",500);
			}
			}
//申请删除任务		
	if (pass == 7  )
	{
		if (yemian=='passed' || yemian=='notfinish' ){
		getcontent('indexaddtask.asp?yemian='+escape(yemian),'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已经申请删除！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian='+escape(yemian),'indexcontent',0);
		}
		else if (yemian=='newmessage'){
         getcontent('taskstatus.asp?yemian='+escape(yemian)+'&rizhiid='+escape(id),'caozuo',1);
		setTimeout("dvck('<img src=images/okla.gif> 已经申请删除！')",500);
		}
else if (yemian=='rizhouyue'){
		var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 已经申请删除！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 已经申请删除！')",500);
		}
		}
		//申请删除	
	if (pass == 8  )
	{
	
			if (yemian=='needshenpi' || yemian=='passed' || yemian=='notfinish'){
		getcontent('indexaddtask.asp?yemian='+escape(yemian),'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 删除成功！正在自动为您加载下一条记录')",500);
		getcontent('myindexcontent.asp?yemian='+escape(yemian),'indexcontent',0);
		}
		else if (yemian=='newmessage'){
      document.getElementById("newcontentid").innerHTML="";
		setTimeout("dvck('<img src=images/okla.gif> 删除成功！')",500);
		}
				else if (yemian=='rizhouyue'){
		var arrstrst = keyword.split("㊣");
		getcontent('indexaddtask.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'open0',1); 
		setTimeout("dvck('<img src=images/okla.gif> 删除成功！正在自动为您加载下一条记录')",500);
		getcontent('rizhouyue.asp?yemian=rizhouyue&types='+arrstrst[0]+'&nian='+arrstrst[1]+'&yue='+arrstrst[2]+'&ri='+arrstrst[3]+'&page='+arrstrst[4],'indexcontent',0);
		getcontent('showcalender.asp','calenderid',0);
		}	
		else
		{
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+(totalput-1),'quncontent',0);
	tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 删除成功！')",500);
			}	
			}		
			 if (pass == 1 || pass ==11  || pass == 10  || pass == 20 || pass == 31  || pass == 41 )
  {
	  
	    if(pass==41){
	  xh_insert();}
	  
	  if(pass==20 || pass==31  || pass == 41){
	
getcontent('addtask.asp?types='+escape(types)+'&page='+escape(page)+'&yemian='+escape(yemian)+'&totalput='+escape((totalput+1)),'content');
getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian),'quncontent',0);
}
if (types==8 &&pass==11){
		getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+escape(totalput),'quncontent',0);
}
if (types==8 &&pass==10){
	document.all("back").style.display="none";	
	document.all("mesWindow").style.display="none";
	getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+escape((totalput-1)),'quncontent',0);
}
if (pass==1){
	getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+escape(totalput),'quncontent',0);
}
	tjwangong(yemian,types);
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
 } 
if ( pass ==92  )
{

	if (yemian=='myguanzhu'){
	getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+escape((totalput+1)),'quncontent',0);
		tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 关注成功')",500);
		}
	else if (yemian!='passed' && yemian!='notfinish' && yemian!='needshenpi' && yemian!='rizhouyue'&& yemian!='myguanzhu' && yemian!='newmessage'){
	getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+escape(totalput),'quncontent',0);
		tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 关注成功')",500);
		}
		else
		{
	updatePageb.innerHTML=unescape(xmlhttp.responseText);
		setTimeout("dvck('<img src=images/okla.gif> 关注成功')",500);
			}	
		}
  if ( pass ==91 )
{
	
		if (yemian=='myguanzhu'){
	getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+escape((totalput-1)),'quncontent',0);
		tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 取消关注成功')",500);
		}	
		
	else if (yemian!='passed' && yemian!='notfinish' && yemian!='needshenpi' && yemian!='rizhouyue'&& yemian!='myguanzhu' && yemian!='newmessage'){
	getcontent('secret/mytaskcontent.asp?page='+escape(page)+'&types='+escape(types)+'&yemian='+escape(yemian)+'&totalput='+escape(totalput),'quncontent',0);
		tjwangong(yemian,types);
		setTimeout("dvck('<img src=images/okla.gif> 取消关注成功')",500);
		}
		else
		{
	updatePageb.innerHTML=unescape(xmlhttp.responseText);
		setTimeout("dvck('<img src=images/okla.gif> 取消关注成功')",500);
			}	
		}
 if (  pass == 81  || pass == 82 || pass == 83  || pass == 84 || pass == 85 || pass == 86)
 {
			updatePageb.innerHTML=unescape(xmlhttp.responseText); 
}}}}
		xmlhttp.send(null);
	}
//非群日志操作结束


//添加进度开始
function calljindu(id,zhi) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {	
  var tupian=document.getElementById("tupian" + id).value;
  var jindu=document.getElementById("jindu" + id).value;

 if(document.getElementById("ansong" + id).checked)
 {	var ansong=1;	 }
	 else
  {var ansong=0;	 }
   if(document.getElementById("duanxin" + id).checked)
 {	var duanxin=1;	 }
	 else
  {var duanxin=0;	 }
   updatePagel = eval("updatePager" + id);
   jinzhanfk=eval("jinzhanfk" + id);
    tuijianid=eval("tuijianid" + id);
xmlhttp.open('post','secret/cutask.asp?pass=100&zhi='+escape(zhi)+'&id='+escape(id)+'&types=6&jindu=' + escape(jindu)+'&duanxin=' + escape(duanxin)+'&tupian=' + escape(tupian)+'&ansong=' + escape(ansong)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
 if(jindu.length<1){
jinzhanfk.innerHTML="<img align=absmiddle src=images/x.gif> 进展不能为空！";
tuijianid.disabled=false;
return true;
		}
 if(jindu.length>200){
	 jinzhanfk.innerHTML="<img align=absmiddle src=images/x.gif> 留言内容不能超过200个字符！";
tuijianid.disabled=false;
			return true;
		}			
if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
jinzhanfk.innerHTML="";
tuijianid.disabled=false;	
		setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 提交进展成功！')",500);	
	eval("jindu" + id).value="";
	eval("tupian" + id).value="";
	eval("ansong" + id).checked=false;
		eval("filexianshi" + id).innerHTML="";
	updatePagel.innerHTML=unescape(xmlhttp.responseText);
	
		}}}
		xmlhttp.send(null);
	}
//添加进度结束
//添加便签开始
function savetixing(pass,id) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {	
	if (pass==300)	{
var notecontent=document.getElementById("notecontent").value.replace(/\r/ig, "").replace(/\n/ig, ""); 
var touser=document.getElementById("touser").value;
var leibie=document.getElementById("leibie").value;
		if (leibie==1){
var note=document.getElementById("note").value;
xmlhttp.open('post','secret/cutask.asp?pass='+escape(pass)+'&types=6&id=0&leibie=1&note='+escape(note)+'&touser=' + escape(touser)+'&notecontent=' + escape(notecontent)+'&suijishu='+Date(),true)		
		}
	if (leibie==2){
var zhou=document.getElementById("zhoucontent").value;
xmlhttp.open('post','secret/cutask.asp?pass='+escape(pass)+'&types=6&id=0&leibie=2&zhou='+escape(zhou)+'&touser=' + escape(touser)+'&notecontent=' + escape(notecontent)+'&suijishu='+Date(),true)		
		}
			if (leibie==3){
var yue=document.getElementById("yuecontent").value;
xmlhttp.open('post','secret/cutask.asp?pass='+escape(pass)+'&types=6&id=0&leibie=3&yue='+escape(yue)+'&touser=' + escape(touser)+'&notecontent=' + escape(notecontent)+'&suijishu='+Date(),true)		
		}
}
else
{
	xmlhttp.open('post','secret/cutask.asp?pass='+escape(pass)+'&types=6&id='+escape( id )+'&suijishu='+Date(),true)			
		}
 updatePagel = eval("notecontentss");
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		
		if (pass==300)	{	
		 if(notecontent.length<1){
			 bianqianbu.disabled=false;
setTimeout("dvck('便签内容不能为空！')",500);	
			return true;
		}
 if(notecontent.length>200){
	 bianqianbu.disabled=false;
	 setTimeout("dvck('便签内容不能超过200个字符！')",500);		
			return true;
		}
  if(touser.length<1){
	  bianqianbu.disabled=false;
setTimeout("dvck('接收人不能为空！')",500);		
			return true;
}
}
updatePagel.innerHTML=unescape(xmlhttp.responseText);
addimg.src='images/Add.png';
bianqianbu.disabled=false;
if (pass==300)	{
setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 添加成功！')",0);

$("#notecontent").val(''); 
$("#touser").val('');
$("#tousergh").val('');
$("#tousergh").val('');
}
if (pass==400)	
setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 确认成功！')",0);
if (pass==500)	
setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 关闭成功！')",0);
if (pass==600 || pass==700)	
setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 调整成功！')",0);
setTimeout("bottomNav.style.display='none'",700);
}}}
		xmlhttp.send(null);
	}

//添加便签结束
//添加措施开始
function callcuoshi(id) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {	
  var reasons=document.getElementById("reasons" + id).value;
  var lscuoshi=document.getElementById("lscuoshi" + id).value;
  var yjcuoshi=document.getElementById("yjcuoshi" + id).value;
xmlhttp.open('post','secret/cutask.asp?pass=200&id='+escape(id)+'&types=6&yjcuoshi=' + escape(yjcuoshi)+'&reasons=' + escape(reasons)+'&lscuoshi=' + escape(lscuoshi)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	if (unescape(xmlhttp.responseText)=="成功"){
		setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 修改成功！')",500);	
		}
	else
	{
setTimeout("dvck('<img src=images/x.gif align=absmiddle> 添加失败！')",500);		
		}}}}
		xmlhttp.send(null);
	}
//添加措施结束
//群组设置/页面设置开始
function setqunpage(qunzuid,text,zhi) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {
		if ((qunzuid== null) || (qunzuid== "")|| (text== null) || (text== "")|| (zhi== null) || (zhi== "") ) return;
		if( zhi==100 || zhi==200 ){
updatePageq = eval("quncontent");
		}
		else
		{
updatePageq = eval("needtext");
}
		if( zhi==200 ){
  var allowadd=document.getElementById("allowadd").value;
    var beizhu1=document.getElementById("beizhu1").value;
  var beizhu2=document.getElementById("beizhu2").value;
  var beizhu3=document.getElementById("beizhu3").value;
    var beizhu4=document.getElementById("beizhu4").value;
  var beizhu5=document.getElementById("beizhu5").value;
    var iscuoshi=document.getElementById("iscuoshi").value;
	  var keyword=document.getElementById("keywords").value;
    var issearch=document.getElementById("issearch").value;	  
xmlhttp.open('post','qunzu/qunpeopleedit.asp?qunzuid='+escape(qunzuid)+'&zhi=' + escape(zhi)+'&text=' + escape(text)+'&allowadd=' + escape(allowadd)+'&issearch=' + escape(issearch)+'&keyword=' + escape(keyword)+'&beizhu1=' + escape(beizhu1)+'&beizhu2=' + escape(beizhu2)+'&iscuoshi=' + escape(iscuoshi)+'&beizhu3=' + escape(beizhu3)+'&beizhu4=' + escape(beizhu4)+'&beizhu5=' + escape(beizhu5)+'&suijishu='+Date(),true)		
		}
		else
		{
xmlhttp.open('post','qunzu/qunpeopleedit.asp?qunzuid='+escape(qunzuid)+'&zhi=' + escape(zhi)+'&text=' + escape(text)+'&suijishu='+Date(),true)		
}
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
					if( zhi==200 ){
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	getcontent('secret/quncontent.asp?page=1&qunzuid='+escape(qunzuid),'quncontent',0)	
					}
			if( zhi==100 ){
				setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 调整成功！')",500);	
	getcontent('secret/quncontent.asp?page=1&qunzuid='+escape(qunzuid),'quncontent',0)			
			}
 updatePageq.innerHTML=unescape(xmlhttp.responseText);
}}}
		xmlhttp.send(null);
	}
//群组设置/页面设置结束
//搜索开始
function searchcontent(types,data1,data2) {
var keyword=document.getElementById("keyword").value;
if ((keyword == null) || (keyword == '') ) return;	
if (types=='qun'){

getcontent('secret/quncontent.asp?page=1&qunzuid='+escape(data1)+'&keyword='+escape(keyword),'quncontent',1);
	}
if (types=='noqun'){

getcontent('secret/mytaskcontent.asp?types=8&yemian='+escape(data2)+'&keyword='+escape(keyword),'quncontent',1);
	}	
if (types=='xiaji'){

getcontent('xiajitaskcontent.asp?types=8&yemian="jiaoban"&id='+escape(data1)+'&keyword='+escape(keyword),'quncontent',1);
	}
}	
//搜索结束
//修改备注4、备注5开始
function EditElement(element,content,zhi,id)
{
var oldhtml = content;
var newobj = document.createElement('input');//创建新的input元素
newobj.value = content;
newobj.id ='opencontentid'+zhi;
newobj.size =8;
newobj.onblur   = function(){
thevalue=document.getElementById('opencontentid'+zhi).value.replace(/\r/ig, "").replace(/\n/ig, ""); 

if ( thevalue==content && thevalue!='' ){
	element.innerHTML =content;

	}
if ( thevalue==content && thevalue=='' ){
	
	 eval("bianqian"+zhi+id).innerHTML="<span id=\"openthis\" ondblclick=\"EditElement(this,'',"+zhi+","+id+")\" >/</span>";
	}	
if ( thevalue!=content ){
			var xmlhttp=createAjax();	
	if (xmlhttp) {	
xmlhttp.open('post','secret/cutask.asp?pass=900&types='+escape(zhi)+'&id='+escape(id)+'&notecontent='+escape( thevalue)+'&suijishu='+Date(),false)			
		}
		xmlhttp.send(null);
	setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 修改成功！')",500);
	if(thevalue=='')
	{
	 eval("bianqian"+zhi+id).innerHTML="<span id=\"openthis\" ondblclick=\"EditElement(this,'',"+zhi+","+id+")\" >/</span>";
	}
	 else
	 {
	 eval("bianqian"+zhi+id).innerHTML="<span id=\"openthis\" ondblclick=\"EditElement(this,'"+thevalue+"',"+zhi+","+id+")\" >" + thevalue+"</span>";
}}}
element.innerHTML = '';
element.appendChild(newobj);
newobj.focus();
}
//修改备注4、备注5结束



//修改便签
function ShowElement(element,content,zhi,isqueren)
{
var oldhtml = content;
var newobj = document.createElement('textarea');//创建新的input元素
newobj.value = content;
newobj.style.resize = 'none';
newobj.id ='content'+zhi;
newobj.rows =2;
newobj.wrap='soft';
newobj.cols =32;
newobj.onblur   = function(){
thevalue=document.getElementById('content'+zhi).value.replace(/\r/ig, "").replace(/\n/ig, ""); 
if ( thevalue=='' ){
	element.innerHTML ="<font color=#333333>" + oldhtml +"</font>"+ isqueren;
	}
	else{
if ( thevalue==content ){
	element.innerHTML ="<font color=#333333>" + content+"</font>"+ isqueren;
	}	
if ( thevalue!=content ){
			var xmlhttp=createAjax();	
	if (xmlhttp) {	
xmlhttp.open('post','secret/cutask.asp?pass=800&types=6&id='+escape(zhi)+'&notecontent='+escape( thevalue)+'&suijishu='+Date(),false)			
		}
		xmlhttp.send(null);
	setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 修改成功！')",500);	
	 eval("bianqian"+zhi).innerHTML="<span ondblclick=\"ShowElement(this,'"+thevalue+"',"+zhi+",'"+isqueren+"')\" ><font color=#333333>" + thevalue+"</font>" + isqueren+"</span>";
}}}
element.innerHTML = '';
element.appendChild(newobj);
newobj.focus();
}
//修改便签
//弹出临时消息开始
function inits(id){
var xmlhttp=createAjax();
	if (xmlhttp) {		
		xmlhttp.open('post','neirong.asp?id='+escape(id),true);	
		xmlhttp.onreadystatechange=function() {	
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
			 var response =unescape(xmlhttp.responseText);
	if (response != "" && response.indexOf("出错，")<0 ) {
	if (id==0){
var pop=new Pop("","",response);
	}
	else
	{
	popsIntro.innerHTML=response;
	}
	}
	else
	{
	if (id!=0){
	 document.all.pops.style.display="none";
	 }
	window.setTimeout('inits(0)',600000);
}}}
xmlhttp.send(null);	
	}
}
//弹出临时消息结束
//批量导入新任务开始
function daorutask(url){
var xmlhttp=createAjax();
	if (xmlhttp) {		
		xmlhttp.open('post',url,true);
		xmlhttp.onreadystatechange=function() {
			if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	piliangtask.innerHTML=unescape(xmlhttp.responseText);
		}
}
xmlhttp.send(null);	
	}
}
//批量导入新任务结束






//indexcontent切换
 function indexcqie(num){
  for(var ids = 1;ids<=4;ids++)
  {
   if(ids==num)
   {
	 document.getElementById("indexb"+ids).className="sty1";
   }
   else
   {
	 document.getElementById("indexb"+ids).className="sty2";
   }
  }
 }
function secBoard(n)
{
var strs = "current_qieid=" + escape(n);
var date = new Date();
var ms = 24*3600*1000;
date.setTime(date.getTime() + ms);
strs += "; expires=" + date.toGMTString();
document.cookie = strs;
for(i=0;i<3;i++)
  document.getElementById("sec"+i).className="sec1";
  document.getElementById("sec"+n).className="sec2";
for(i=0;i<3;i++)
mainTable.tBodies[i].style.display="none";
mainTable.tBodies[n].style.display="block";
}

//顶栏切换
 function qiehuan(num){
  for(var id = 1;id<=9;id++)
  {
   if(id==num)
   {
	 document.getElementById("banner"+id).style.color='#00FF00';
   }
   else
   {
	 document.getElementById("banner"+id).style.color='#B4D1E4';
   }
  }
 }
  function qiehuanerji(num){
  for(var id = 0;id<=8;id++)
  {
   if(id==num)
   {
	 document.getElementById("bannererji"+id).style.color='#FF0000';
   }
   else
   {
	 document.getElementById("bannererji"+id).style.color='#0000FF';
   }
  }
 }
 
 
function switchMenu(curr_id, total_num,heights)
{
function getcookie(objname){//获取指定名称的cookie的值
var arrstr = document.cookie.split("; ");
for(var i = 0;i < arrstr.length;i ++){
var temp = arrstr[i].split("=");
if(temp[0] == objname) return unescape(temp[1]);
}
}//获取指定名称的cookie的值结束
 if (getcookie('current_id')==null ){//如果cookie为空
	var ell = document.getElementById('menu_sub_0');
		ell.style.display = "none";
}
else
{
var ell = document.getElementById('menu_sub_'+getcookie('current_id'));
		ell.style.display = "none";
}
var str = "current_id=" + escape(curr_id);
var date = new Date();
var ms = 24*3600*1000;
date.setTime(date.getTime() + ms);
str += "; expires=" + date.toGMTString();
document.cookie = str;
			//二级菜单
		var el = document.getElementById('menu_sub_'+curr_id);
       el.style.display="block";
       el.style.height="1px";  
       var changeW=function(){ 	 		
              var obj_h=parseInt(el.style.height);
              if(obj_h<=heights){ 
                     el.style.height=(obj_h+Math.ceil((heights-obj_h)/10))+"px";
              }
              else{ 
              clearInterval(bw1);
              }
                     }
     var  bw1= setInterval(changeW,1);
	}
	
//发送每日邮件开始
function daymail(){
var xmlhttp=createAjax();
	if (xmlhttp) {		
		xmlhttp.open('post','secret/senddayemail.asp?suijishu='+Date(),true);

xmlhttp.send(null);	
	}
}	
//发送每日邮件结束
//下级任务开始
	  function say(leibie,id,types) {
	getcontent('xiajitaskcontent.asp?leibie='+escape(leibie)+'&id='+escape(id)+'&types='+escape(types),'quncontent',1);
   } 
 //下级任务结束
 
//添加评论开始
function callpinglun(id,zhi) {

		var xmlhttp=createAjax();	
	if (xmlhttp) {	
  var pinglun=document.getElementById("pinglun").value;
 if(pinglun.length<1){
setTimeout("dvck('<img src=images/x.gif> 评论内容不能为空！')",500);	
			return true;
		}
xmlhttp.open('post','cupinglun.asp?pass=100&zhi='+escape(zhi)+'&id='+escape(id)+'&pinglun=' + escape(pinglun)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		
		if ( unescape(xmlhttp.responseText).indexOf("失败") > 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	return;
	}		
	updatePinglun.innerHTML=unescape(xmlhttp.responseText);
	document.getElementById("pinglun").value='';
setTimeout("dvck('<img src=images/okla.gif> 评论成功！')",500);	
	huifushu.innerHTML=parseInt(zhi)+1;
		}}}
		xmlhttp.send(null);
	}
//添加进度结束 
 //	授权开始
   function callshouquan(ii,id,zhi) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((zhi == null) || (zhi == "") || (id== null) || (id == "")){
	  
	  	setTimeout("dvck('<img src=images/x.gif align=absmiddle>失败,请将数据补充完整!')",500);
  return;	
		}

  updatePagee = eval("updatePage" + ii);
  if (zhi==99 || zhi==100){
		var data1=document.getElementById('data1'+ii).value;
	var data2=document.getElementById('data2'+ii).value;
	var data3=document.getElementById('data3'+ii).value; 
	var data4=document.getElementById('data4'+ii).value;
var data4gh=document.getElementById('data4'+ii+'gh').value;
  if ( (data1== null) || (data1 == "")  ||  (data2== null) || (data2 == "")  ||  (data3== null) || (data3 == "")  ||  (data4== null) || (data4 == "")){  
	  	setTimeout("dvck('<img src=images/x.gif align=absmiddle>失败,请将数据补充完整!')",500);
  return;		
		}  
xmlhttp.open('post','cushouquan.asp?data1='+escape(data1)+'&data2='+escape(data2)+'&data3='+escape(data3)+'&data4='+escape(data4)+'&data4gh='+escape(data4gh)+'&ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)		
  }else{
xmlhttp.open('post','cushouquan.asp?ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)			  
  }
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("授权添加成功") > 0 ||  unescape(xmlhttp.responseText).indexOf("授权删除成功") > 0 ) {
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	getweblists('shouquan.asp?thiss=13');

	}
	else if(   unescape(xmlhttp.responseText).indexOf("经接收授权") > 0 ){

	updatePagee.innerHTML="<input type='button' value=' 查看详细操作记录 '  onclick=\"getcontent('sqdatail.asp?thiss=13&shouquanid="+id+"','contents',1);\" />";
	}
	else if(   unescape(xmlhttp.responseText).indexOf("经拒绝授权") > 0 ){

	updatePagee.innerHTML=unescape(xmlhttp.responseText);
	}
	else
	{
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
}}}
		xmlhttp.send(null);
	}
//	授权结束
//	添加删除绩效开始
   function calljixiao(ii,id,zhi) {	
 
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((zhi == null) || (zhi == "") || (id== null) || (id == "")){
	  
	  	setTimeout("dvck('<img src=images/x.gif align=absmiddle>失败,请将数据补充完整!')",500);  
  return;		
		}
  if ( zhi==100){
		var data1=document.getElementById('data1'+ii).value;
	var data2=document.getElementById('data2'+ii).value;
  if ( (data1== null) || (data1 == "")  ||  (data2== null) || (data2 == "")){  
	  	setTimeout("dvck('<img src=images/x.gif align=absmiddle>失败,请将数据补充完整!')",500);
  return;		
		}  
xmlhttp.open('post','jixiao/cujixiao.asp?data1='+escape(data1)+'&data2='+escape(data2)+'&ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)		
  }else{
xmlhttp.open('post','jixiao/cujixiao.asp?ii=' + escape(ii)+'&id=' + escape(id)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)			  
  }
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("绩效添加成功") > 0 ||  unescape(xmlhttp.responseText).indexOf("绩效删除成功") > 0 ) {
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	getweblists('jixiao/myjixiao.asp?thiss=14');
	}
	else
	{
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
}}}
		xmlhttp.send(null);
	}

//	添加删除绩效结束


//	拉取绩效开始
   function calllaqu(jixiaoid,id,nianyue,zhi,from) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) { 
  if ((zhi == null) || (zhi == "") || (id== null) || (id == "") || (nianyue== null) || (nianyue == "")) return;

 if(from=='renwu' || from=='qunzu' ){
  laqujieguo=eval("laqurenwu" + id);
  }
  else
  {
  laqujieguo=eval("laqu" + id);	  
	  }
xmlhttp.open('post','jixiao/cujixiao.asp?nianyue=' + escape(nianyue)+'&id=' + escape(id)+'&jixiaoid=' + escape(jixiaoid)+'&zhi=' + escape(zhi)+'&from=' + escape(from)+'&suijishu='+Date(),true)			  
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	
			
				if (from=='renwu' || from=='qunzu') {
laqujieguo.innerHTML=unescape(xmlhttp.responseText);
				}
				if (from=='qunzu')
			getcontent('secret/quncontent.asp?page=1&qunzuid='+escape(jixiaoid),'quncontent',1);		
			else	
	getcontent('secret/showjixiao.asp?thiss=14&id='+escape(jixiaoid),'contents',1);	
	
	
		}}}
		xmlhttp.send(null);
	}
//	拉取绩效结束
//	绩效评分开始
   function pingfen(jixiaoid,types,zhi) {	

	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((types == null) || (types == "") || (jixiaoid== null) || (jixiaoid == "") ) return;

if (types=="qzqueren") {

var data6=document.getElementById('data6').value.replace(/(\r)*\n/g,"<br />").replace(/\s/g," "); 
if(document.getElementById("data1").checked)
 {	var leixing=1;}
else
{var leixing=2;}

if(document.getElementById("data4").checked)
 {	var isqueren=4;}
else
{var isqueren=3;}

xmlhttp.open('post','jixiao/jixiaopingfen.asp?types=' + escape(types)+'&jixiaoid=' + escape(jixiaoid)+'&zhi=' + escape(zhi)+'&leixing=' + escape(leixing)+'&isqueren=' + escape(isqueren)+'&data6=' + escape(data6)+'&suijishu='+Date(),true)			
}


else if (types=="ldqueren") {

var data14=document.getElementById('data14').value.replace(/(\r)*\n/g,"<br />").replace(/\s/g," "); 
if(document.getElementById("data10").checked)
 {	var isqueren=5;}
else
{var isqueren=6;}

xmlhttp.open('post','jixiao/jixiaopingfen.asp?types=' + escape(types)+'&jixiaoid=' + escape(jixiaoid)+'&zhi=' + escape(zhi)+'&isqueren=' + escape(isqueren)+'&data14=' + escape(data14)+'&suijishu='+Date(),true)			
}
else if (types=="zongzi") {
		var data7=document.getElementById('data7').value.replace(/(\r)*\n/g,"<br />").replace(/\s/g," "); 
 if ((zhi== null) || (zhi == "")) return;
xmlhttp.open('post','jixiao/jixiaopingfen.asp?types=' + escape(types)+'&jixiaoid=' + escape(jixiaoid)+'&zhi=' + escape(zhi)+'&data7=' + escape(data7)+'&suijishu='+Date(),true)			
	
	}
	else if (types=="dacheng"){
	var data2=document.getElementById('dacheng'+jixiaoid).value;
	  if ((data2== null) || (data2 == "")) return;
xmlhttp.open('post','jixiao/jixiaopingfen.asp?types=' + escape(types)+'&jixiaoid=' + escape(jixiaoid)+'&zhi=' + escape(data2)+'&suijishu='+Date(),true)		
}	
	else
{
	  if ((zhi== null) || (zhi == "")) return;
xmlhttp.open('post','jixiao/jixiaopingfen.asp?types=' + escape(types)+'&jixiaoid=' + escape(jixiaoid)+'&zhi=' + escape(zhi)+'&suijishu='+Date(),true)		
}
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		var jieguo=unescape(xmlhttp.responseText);
		
			if( jieguo.indexOf("成功") > 0 && ( types=="quanzi" || types=="quanque" || types=="pingzi" || types=="pingping"  )) {	
			var arrstr = jieguo.split("$$$");
  updatePagee = eval(types +'zong');
	updatePagee.innerHTML=arrstr[1];
setTimeout("dvck('"+arrstr[0]+"')",500);
	
	}
	
else if( jieguo.indexOf("成功") > 0 && ( types=="zipingshenpi" || types=="qzqueren" || types=="ldqueren" || types=="zongzi" )) {

 if (types=="qzqueren" || types=="ldqueren"){
getcontent('secret/showjixiao.asp?thiss=14&types=shenpi','contents',1);
setTimeout("dvck('"+jieguo+"已自动为您加载下一个需要审批的绩效!')",500);
 }
 else{
getcontent('secret/showjixiao.asp?thiss=14&id='+escape(jixiaoid),'contents',1);
setTimeout("dvck('"+jieguo+"')",500);
 }
}
else if(jieguo.indexOf("有改变值") > 0)
	{
	}
		else 
	{
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}}}}
		xmlhttp.send(null);
	}
//	绩效评分结束
//	交接开始
   function calljiaojie(rizhiid,peoplefrom,peopleto,peoplefromgh,peopletogh,types) {	

	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((rizhiid == null) || (peoplefrom == "") || (peopleto == "") || (types== null) || (peoplefrom == null) || ( rizhiid== "") || ( types== "") || (peopleto== null)  ) return;
xmlhttp.open('post','jiaojie/jiaojieact.asp?types=' + escape(types)+'&rizhiid=' + escape(rizhiid)+'&peoplefrom=' + escape(peoplefrom)+'&peopleto=' + escape(peopleto)+'&peoplefromgh=' + escape(peoplefromgh)+'&peopletogh=' + escape(peopletogh)+'&suijishu='+Date(),true)			
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		var jieguo=unescape(xmlhttp.responseText);
		
			if( jieguo.indexOf("失败：") > 0) {	
setTimeout("dvck('"+jieguo+"')",500);
	}
		else 
	{
	if (types==1){
 updatePagee = eval("zerenren" +rizhiid);
	updatePagee.innerHTML=peopletogh;
		  updatePagers = eval("jiaojie" +rizhiid);
	updatePagers.innerHTML=jieguo;
	setTimeout("dvck('责任人交接成功')",500);
		}	
		
		if (types==2){
		
	  updatePagee = eval("genzongren" +rizhiid);
	updatePagee.innerHTML=peopletogh;
		  updatePagers = eval("jiaojie" +rizhiid);
	updatePagers.innerHTML=jieguo;
	setTimeout("dvck('跟踪人交接成功')",500);
		}		
	if (types==3){
		
		  updatePagers = eval("jiaojie" +rizhiid);
	updatePagers.innerHTML=jieguo;
	setTimeout("dvck('关注人交接成功')",500);
		}
	}
		}}}
		xmlhttp.send(null);
	}
//	绩效评分结束
//添加汇报开始

function addnewhb(id,pass) {
var xmlhttp=createAjax();	
	if (xmlhttp) {	
if(pass==500){
  var hbcontent=document.getElementById("hbcontent").value;}
  else
{ var hbcontent=document.getElementById("newmingcheng").value;} 
 if(hbcontent.length<1){
setTimeout("dvck('<img src=images/x.gif> 失败！名称不能为空！')",500);	
			return;
		}
		
xmlhttp.open('post','baobiao/cuhbcontent.asp?id='+escape(id)+'&pass='+escape(pass)+'&hbcontent='+escape(hbcontent)+'&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
else{
	if(pass==500){//添加分组

var response=unescape(xmlhttp.responseText).split("$#$");
   $("#sortable1").prepend(response[0]);
   shake("#item_"+response[1],2);
   	$("#clickelement").val("item_"+response[1]);						   		   
$(".portlet-contentli").css( "background", "#F5F5F5" );
	$(".arrowimg").css("opacity",0.4);	
$(".portlet-contentli").children('.deletex').css("display","none");
	$("#item_"+response[1]).css( "background", "#ffffff" );
$("#item_"+response[1]).children('.arrowimg').css("opacity",1);
getcontent('baobiao/huibao_fenzu_con.asp?bj_system_ID='+response[1],'huibao_fenzu',0);
document.getElementById("hbcontent").value='';
document.getElementById("bottomNav").style.display='none';
document.getElementById('addimg').src='images/Add.png';
bjsort();
	}
		if(pass==501){//添加报表
var response=unescape(xmlhttp.responseText).split("$#$");
   $("#sortable").prepend(response[0]);
   shake("#data"+response[1],1);
document.getElementById("newmingcheng").value='';
document.getElementById("hide_input").style.display='none';
document.getElementById("xianshi_input").style.display='';
bjsort_con();
	}
}}}}
		xmlhttp.send(null);
	}
//添加汇报结束

//修改汇报分组
function edithbfenzu(element,content,zhi)
{
var oldhtml = content;
var newobj = document.createElement('input');//创建新的input元素
newobj.value = content;
newobj.id ='content'+zhi;
newobj.maxLength =17;
newobj.onblur   = function(){
thevalue=document.getElementById('content'+zhi).value; 
if ( thevalue=='' ){
	element.innerHTML =oldhtml;
	}
	else{
if ( thevalue==content ){
	element.innerHTML =content;
	}	
if ( thevalue!=content ){
			var xmlhttp=createAjax();	
	if (xmlhttp) {	
xmlhttp.open('post','baobiao/cuaddhuibao.asp?id='+escape(zhi)+'&pass=501&notecontent='+escape( thevalue)+'&suijishu='+Date(),false)			
		}
	
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {	
	element.innerHTML =oldhtml;
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
		else
		{
			setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 修改成功！')",500);	
	 eval("bianqian"+zhi).innerHTML="<span ondblclick=\"edithbfenzu(this,'"+thevalue+"',"+zhi+")\" >" + thevalue+"</span>";
			}
		}
		}
		xmlhttp.send(null);	
	
}}}
element.innerHTML = '';
element.appendChild(newobj);
newobj.focus();
}
//修改汇报分组

//添加属性选项开始
function add_attr_item(pass,id,i,oldvalue,types){
	var ii;	 
	var is_select;
if(pass==15){
              ii=parseInt(document.getElementById("bb_attr_maxnum_"+id).value)+1;}
else
{
	
        if(document.getElementById("bb_attr_num_"+id).value==1)
         {alert("至少要保留一个选项！");return false;}
	
		 if(types=='sele'){
				if(document.getElementById('sele_radio_'+i+'-'+id).checked){
				is_select="yes";
				}}
		 
ii=parseInt(document.getElementById("bb_attr_num_"+id).value)-1;
}
var thisvalue="选项"+(ii+1);
	var xmlhttp=createAjax();	
	if (xmlhttp) {	

xmlhttp.open('post','secret/sethuibao_add.asp?id='+escape(id)+'&pass='+escape(pass)+'&itemvalue='+escape(thisvalue)+'&oldvalue='+escape(oldvalue)+'&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
			
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		var response=unescape(xmlhttp.responseText);
		if ( response.indexOf("失败：") > 0 ) {	

	setTimeout("dvck('"+response+"')",500);
	}
	else
	{
if(pass==15){
if(types=='sele')
{
$("#attrs-input"+i+"-"+id).after("<li class='ui-state-default-attr' id='attrs-input"+ii+"-"+id+"'><input  type='radio' id='sele_radio_"+ii+"-"+id+"'  name='optionvalue-attr'   onclick=\"bb_edititem("+id+",4,this.value);document.getElementById('input_"+id+"_option_00').innerHTML=this.value;\"  title='点击选择此项为默认值'     value='"+response+"'> <input  id='val_attrs-input"+ii+"-"+id+"'  type='text' size='15' value='"+response+"' onblur=\"if(this.value==''){alert('选项不能为空');this.value=document.getElementById('val_attr-input_old"+ii+"-"+id+"').value;this.focus();}else if(this.value==document.getElementById('val_attr-input_old"+ii+"-"+id+"').value){return false;}else{bb_edititem("+id+",13,this.value,"+ii+",document.getElementById('val_attr-input_old"+ii+"-"+id+"').value,'seleedit');}\"  >   <input  id='val_attrs-input_old"+ii+"-"+id+"'  type='hidden' size='15' value='"+response+"'  ><IMG  height='14' width='14' style=' cursor:pointer' onclick=\"add_attr_item(15,"+id+","+ii+",document.getElementById('val_attr-input_old"+ii+"-"+id+"').value,'sele');\" src='images/add_item.gif'> <IMG  height='14' onclick=\"{if(confirm('确定要删除吗？删除后系统将删除所有该字段及已提交选值，且不可恢复，确定吗？')){add_attr_item(16,"+id+","+ii+",document.getElementById('val_attr-input_old"+ii+"-"+id+"').value,'sele');}return false;}\"  width='14' style='cursor:pointer;' src='images/dele_item.gif'><IMG class='portlet-header-attr' height='18' width='18' style='float:right;cursor:move; margin-top:4px;vertical-align:middle' src='images/move.gif'> </li>"); 
	}
else
	{
$("#attrs-input"+i+"-"+id).after("<li class='ui-state-default-attr' id='attrs-input"+ii+"-"+id+"'><input  type='"+types+"'  name='optionvalue-attr'  onclick=\"if(this.checked){bb_edititem("+id+",4,this.value);document.getElementById('input_"+id+"_option_"+ii+"').checked=true;}else{bb_edititem("+id+",18,this.value);document.getElementById('input_"+id+"_option_"+ii+"').checked=false;}\"  title='点击选择此项为默认值'     value='"+response+"'> <input  id='val_attrs-input"+ii+"-"+id+"'  type='text' size='15' value='"+response+"' onblur=\"if(this.value==''){alert('选项不能为空');this.value=document.getElementById('val_attr-input_old"+ii+"-"+id+"').value;this.focus();}else if(this.value==document.getElementById('val_attr-input_old"+ii+"-"+id+"').value){return false;}else{bb_edititem("+id+",13,this.value,"+ii+",document.getElementById('val_attr-input_old"+ii+"-"+id+"').value);}\"  onkeyup=\"document.getElementById('input_"+id+"_option_00').innerHTML=this.value;\"  >   <input  id='val_attr-input_old"+ii+"-"+id+"'  type='hidden' size='15' value='"+response+"'  ><IMG  height='14' width='14' style=' cursor:pointer' onclick=\"add_attr_item(15,"+id+","+ii+",document.getElementById('val_attr-input_old"+ii+"-"+id+"').value,'"+types+"');\" src='images/add_item.gif'> <IMG  height='14' onclick=\"{if(confirm('确定要删除吗？删除后系统将删除所有该字段及已提交选值，且不可恢复，确定吗？')){add_attr_item(16,"+id+","+ii+",document.getElementById('val_attr-input_old"+ii+"-"+id+"').value,'"+types+"');}return false;}\"  width='14' style='cursor:pointer' src='images/dele_item.gif'><IMG class='portlet-header-attr' height='18' width='18' style='float:right;cursor:move; margin-top:4px;vertical-align:middle' src='images/move.gif'> </li>"); 

	}

if(types=='radio' || types=='checkbox' ){
$("#input_big_"+i+"-"+id).after("<span  id='input_big_"+ii+"-"+id+"' ><input   id='input_"+id+"_option_"+ii+"'   disabled='disabled' type='"+types+"'    name='input_"+id+"'><span id='input_"+id+"_xianshi_"+ii+"' >"+response+"</span></span>");


	}
document.getElementById("bb_attr_num_"+id).value=parseInt(document.getElementById("bb_attr_num_"+id).value)+1;
document.getElementById("bb_attr_maxnum_"+id).value=ii;

}
		else
		{
		$("#attrs-input"+i+"-"+id).remove();
	
		if(types=='radio' || types=='checkbox'  ){
$("#input_big_"+i+"-"+id).remove();
	}
			if(types=='sele' &&  	is_select=="yes"  ){
		document.getElementById('input_'+id+'_option_00').innerHTML="请选择";
			}
		
		document.getElementById("bb_attr_num_"+id).value=ii;
	if(i==document.getElementById("bb_attr_maxnum_"+id).value){
document.getElementById("bb_attr_maxnum_"+id).value=parseInt(document.getElementById("bb_attr_maxnum_"+id).value)-1;
		}
		
			}
		
}}}
		xmlhttp.send(null);




bb_attrset();

	}
	}
	//添加属性选项结束


//复制报表项目开始
function add_item(pass,bj_system_ID,id,widgettype){
	event.cancelBubble=true;
	var xmlhttp=createAjax();	
	if (xmlhttp) {	
	xmlhttp.open('post','secret/sethuibao_add.asp?pass='+pass+'&widgettype='+widgettype+'&bj_system_ID='+bj_system_ID+'&zd_system_ID='+id+'&suijishu='+Date(),true)	
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("失败：") > 0 ) {	
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
	else
	{

if(pass==101){
	var response=unescape(xmlhttp.responseText).split("|$|");
	var response1=response[1];
$("#input"+id).after(response[0]);
shake("#input"+response1,1);
baobiaoset();
getcontent('baobiao/sethuibao_attr.asp?zd_system_ID='+response1,'xianshitext',0);
var result=$("#bb_shunxu").val().replace(","+id+",",","+id+","+response1+",");
save_shunxu(bj_system_ID,result);
$("#bb_shunxu").val(result);
	$(".del_item_img").css("display","none");
	$(".add_item_img").css("display","none");
	$("#input"+response1).children('.add_item_img').css("display","block");
$("#input"+response1).children('.del_item_img').css("display","block");
	 $(".baobiao-header").css({"border":"1px #C2D8EB solid","background":"#CDEEF5"});
    $(".ui-state-default").css({"border":"1px solid #ffffff","background":"#ffffff"});
        $("#input"+response1).css({"border":"1px #E8DBAD solid","background":"#FFFBEF"});
$("#clickshowelement").val("input"+response1);
}
		else
		{
			var result=$("#bb_shunxu").val().replace(","+id+",",",")
        save_shunxu(bj_system_ID,result);
		$("#input"+id).remove();
		$("#bb_shunxu").val(result);
		baobiaoset();
		getcontent('baobiao/sethuibao_attr.asp?zd_system_ID='+$("#head_div_id").val(),'xianshitext',0);
		$("#clickshowelement").val("baobiao-header");
		 $(".baobiao-header").css({"border":"1px #BBBBBB dashed","background":"#FFFBEF"});
		$('.ui-state-default').css({'border':'1px solid #ffffff','background':'#ffffff'});	

}
		
}}}
		xmlhttp.send(null);


	}
	}
	//复制报表项目结束

//删除汇报分组
function delefenzu(bj_system_ID){

	var xmlhttp=createAjax();	
	if (xmlhttp) {	
	xmlhttp.open('post','baobiao/cuaddhuibao.asp?pass=503&id='+bj_system_ID+'&suijishu='+Date(),true)	
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("失败：") > 0 ) {	
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
	else
	{
		bjsort();



	$("#item_"+bj_system_ID).remove();	
$("#item_0").children('.arrowimg').css("opacity",1);
			$("#item_0").css( "background", "#ffffff" );
getcontent('baobiao/huibao_fenzu_con.asp?bj_system_ID=0','huibao_fenzu',0);
		
	
		
}}}
		xmlhttp.send(null);


	}
	}
	//删除汇报分组



//保存更新后的数据字段开始
function save_shunxu(id,result) {

		var xmlhttp=createAjax();	
	if (xmlhttp) {	

xmlhttp.open('post','secret/sethuibao_add.asp?id='+escape(id)+'&pass=100&result='+escape(result)+'&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
}}}
		xmlhttp.send(null);
	}
//保存更新后的数据字段开始

//修改报表字段开始
function bb_edititem(id,pass,itemvalue,optionorder,oldvalue,ii) {

		var xmlhttp=createAjax();	
	if (xmlhttp) {	

xmlhttp.open('post','secret/sethuibao_add.asp?id='+escape(id)+'&pass='+escape(pass)+'&itemvalue='+escape(itemvalue)+'&oldvalue='+escape(oldvalue)+'&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("失败：") > 0 ) {	
		if(pass==13){
			if(ii=='seleedit'){
				if(document.getElementById('sele_radio_'+optionorder+'-'+id).checked){
				document.getElementById('input_'+id+'_option_00').innerHTML=oldvalue;
				}
				}
			   else{
			document.getElementById("input_"+id+"_xianshi_"+ii).innerHTML=oldvalue;
			} 
			document.getElementById("val_attrs-input"+optionorder+"-"+id).value=oldvalue;
		} 
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
	else
	{
		
		if(pass==13){
			if(ii=='seleedit'){
				if(document.getElementById('sele_radio_'+optionorder+'-'+id).checked){
				document.getElementById('input_'+id+'_option_00').innerHTML=itemvalue;
				}}
document.getElementById("val_attr-input_old"+optionorder+"-"+id).value=itemvalue;
			}
		}
}}}
		xmlhttp.send(null);
	}
	
	//修改报表字段结束






//修改汇报开始
function EditHuibao(element,content,zhi,id)
{
var oldhtml = content;
var newobj = document.createElement('input');//创建新的input元素
newobj.value = content;
newobj.id ='contentid'+zhi;
newobj.setAttribute("type","text");
newobj.setAttribute("maxlength","17");
newobj.setAttribute("size","18");
newobj.onblur   = function(){
thevalue=document.getElementById('contentid'+zhi).value.replace(/\r/ig, "").replace(/\n/ig, ""); 
if ( thevalue=='' ){
	element.innerHTML =oldhtml;
	}
	else{
if ( thevalue==content ){
	element.innerHTML =content;
	}	
if ( thevalue!=content ){
			var xmlhttp=createAjax();	
	if (xmlhttp) {	
xmlhttp.open('post','baobiao/cuhbcontent.asp?pass=200&id='+escape(id)+'&hbcontent='+escape( thevalue)+'&suijishu='+Date(),false)			

		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	element.innerHTML =content;
	}
	else
	{
		setTimeout("dvck('<img src=images/okla.gif align=absmiddle> 修改成功！')",500);	
	 eval("huibao"+id).innerHTML="<span ondblclick=\"EditHuibao(this,'"+thevalue+"',"+zhi+","+id+")\" >" + thevalue+"</span>";
}}}}
xmlhttp.send(null);
}}}
element.innerHTML = '';
element.appendChild(newobj);
newobj.focus();
}
//修改备注4、备注5结束
//删除汇报开始
function delehb(id,pass) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {	
xmlhttp.open('post','baobiao/cuhbcontent.asp?id='+escape(id)+'&pass='+escape(pass)+'&hbcontent=notkong&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
else{
	if(pass==301){

getcontent('baobiao/huibaodefault.asp?types=1','contents',1); 
	
		
	}
	else
	{
document.getElementById("data"+id).style.display="none";
setTimeout("dvck('<img src=images/okla.gif> 汇报删除成功！')",500);
	}
}}}}
		xmlhttp.send(null);
	}
//删除汇报结束


//修改字段名称开始
function changeziduan(ii,id,pass) {
	if (pass==900){
	   var newsziduan=document.getElementById("xuanxiang" + ii).value; 
	}
	else
{
  var newsziduan=document.getElementById("ziduan" + ii).value;	
}
 if(newsziduan.length<1 || newsziduan=='请重新输入' ){
resulttext.innerHTML="<div  style='background-color:#F58C81;margin-left:10px;padding:4px;margin-top:-10px;height:15px;width:250px;color:#ffffff' >失败！名称不能为空！</div>"; 
setTimeout("closediv()",5000);
eval("ziduan"+ii).value="请重新输入";
			return;
		}

		var xmlhttp=createAjax();	
	if (xmlhttp) {	
xmlhttp.open('post','baobiao/cuhbcontent.asp?id='+escape(id)+'&ii='+escape(ii)+'&pass='+escape(pass)+'&hbcontent='+escape(newsziduan)+'&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
			if ( unescape(xmlhttp.responseText).indexOf("请先在操作栏中启用该字") > 0 ) {
				resulttext.innerHTML="<div  style='background-color:#F58C81;margin-left:10px;padding:4px;margin-top:-10px;height:15px;width:250px;color:#ffffff' >失败,请先在操作栏中启用该字段！</div>"; 
setTimeout("closediv()",3000);

eval("ziduan"+ii).value=unescape(xmlhttp.responseText).split("||")[1];
			}
		else if ( unescape(xmlhttp.responseText).indexOf("您没有修改！") > 0 ) {	
		}
		else if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {	
		resulttext.innerHTML="<div  style='background-color:#F58C81;margin-left:10px;padding:4px;margin-top:-10px;height:15px;width:250px;color:#ffffff' >"+unescape(xmlhttp.responseText)+"</div>"; 
setTimeout("closediv()",3000);
	
	}
else{
	if (pass==900){
eval("selectdata"+ii).innerHTML=unescape(xmlhttp.responseText);		
		}
		else
{
eval("newdata"+ii).innerHTML=newsziduan;

}
	resulttext.innerHTML="<div  style='background-color:#68AF02;margin-left:10px;padding:4px;margin-top:-10px;height:15px;width:250px;color:#ffffff' >修改成功！</div>"; 
setTimeout("closediv()",3000);

}}}}
		xmlhttp.send(null);
	}
//修改字段名称结束
//汇报字段是否启用开始
function ishbqiyong(ii,id,pass) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {	
xmlhttp.open('post','baobiao/cuhbcontent.asp?id='+escape(id)+'&ii='+escape(ii)+'&pass='+escape(pass)+'&hbcontent=yes&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {	
	resulttext.innerHTML="<div  style='background-color:#F58C81;margin-left:10px;padding:4px;margin-top:-10px;height:15px;width:250px;color:#ffffff' >"+unescape(xmlhttp.responseText)+"</div>"; 
	setTimeout("closediv()",3000);
	}
else{
	if (pass==500){
		if (ii==11 || ii==12  ){
	eval("xuanxiang"+ii).disabled=false;
	}
	eval("ziduan"+ii).disabled=false;
		eval("tiaozhengdown"+ii).disabled=false;
			eval("tiaozhengup"+ii).disabled=false;
eval("isqiyong"+ii).innerHTML='<INPUT type="button" style="background-color:#99FF99"  value="已启用" name="neirong" onclick="ishbqiyong('+escape(ii)+','+escape(id)+',600)" >';	
		}
else if (pass==600)
{	

if (ii==11 || ii==12  ){
	eval("xuanxiang"+ii).disabled=true;
	}

eval("tiaozhengdown"+ii).disabled=true;
		eval("tiaozhengup"+ii).disabled=true;
		eval("ziduan"+ii).disabled=true;
		eval("isqiyong"+ii).innerHTML='<INPUT type="button" style="background-color:#FFCCCC"  value="未启用" name="neirong" onclick="ishbqiyong('+escape(ii)+','+escape(id)+',500)" >';	
	}
xianshitext.innerHTML=unescape(xmlhttp.responseText);
	resulttext.innerHTML="<div  style='background-color:#68AF02;margin-left:10px;padding:4px;margin-top:-10px;height:15px;width:250px;color:#ffffff' >调整成功！</div>"; 
setTimeout("closediv()",3000);

}}}}
		xmlhttp.send(null);
	}
//汇报字段是否启用结束
//汇报用户添加、删除
   function callhuibaouser(ii,users,zhi,huibaoid) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((users== null) || (users == "") || (ii== null) || (ii == "")|| (huibaoid== null) || (huibaoid == "")|| (zhi == "")|| (zhi ==null)) return;
//删除用户

    if (zhi==2 ){	
                  updatePagee = eval("updatePageb" + ii);	  
                 }
//设置是否需要汇报
    if (zhi>=3 ){
                  updatePagee = eval("updatePagerb" + ii);	  
                 }
  //添加用户
    if (zhi==1){
	            updatePagee = eval("alluser");
                var users=document.getElementById('qunusers').value;
				var usersgh=document.getElementById('qunusersgh').value;
                if ((users== null) || (users == "") ) return;
                 }
			
xmlhttp.open('post','baobiao/huibaopeopleedit.asp?zhi=' + escape(zhi)+'&ii=' + escape(ii)+'&user=' + escape(users)+'&usergh=' + escape(usersgh)+'&huibaoid=' + escape(huibaoid)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
	updatePagee.innerHTML=unescape(xmlhttp.responseText);
    if (zhi==1){
$("#addusers").css("display","none");
$("#adduserbutton").val('添加新用户');
$("#qunusersgh").val('');
	}
    if (zhi==2 ){
eval("updatePagerb" + ii).innerHTML="/";  
                 }
	   }}}
		xmlhttp.send(null);
	}
//汇报用户添加、删除
//添加上传的文件
function backfn(fname,inputs,xianshi){
	if (fname.length>10){
var newsfname=document.getElementById(inputs).value+"|{|"+fname;
	document.getElementById(inputs).value=newsfname;
	var arrstrs = newsfname.split("|{|");
	var xianshivalue="";
 for (var i=1;i<arrstrs.length;i++)
{
	
xianshivalue=xianshivalue+"<br>&nbsp;&nbsp;文件"+i+"："+arrstrs[i].substr(18)+"&nbsp;&nbsp;<a href='javascript:void(0)' id='openthis' onclick=deletefujian('"+arrstrs[i]+"','"+inputs+"','"+xianshi+"');>删除</a>";
}
document.getElementById(xianshi).innerHTML=xianshivalue;

	document.getElementById("fileToUpload").value="";
}
}







//系统图片上传
function backfxitong(fname,inputs,xianshi){
	if (fname.length>10){
	document.getElementById(inputs).value=fname;
	document.getElementById("imgs").src="images/upload/"+fname;
	document.getElementById("fileToUpload").value="";
	}
}
//删除上传的文件
function deletefujian(fname,inputs,xianshi){
	var newsfname=document.getElementById(inputs).value.replace("|{|"+fname,"")
	document.getElementById(inputs).value=newsfname;
var arrstrs = newsfname.split("|{|");
	var xianshivalue="";
 for (var i=1;i<arrstrs.length;i++)
{
xianshivalue=xianshivalue+"<br>&nbsp;文件"+i+"："+arrstrs[i].substr(18)+"&nbsp;&nbsp;<a href='javascript:void(0)'  id='openthis'  onclick=deletefujian('"+arrstrs[i]+"','"+inputs+"','"+xianshi+"');>删除</a>";
}
document.getElementById(xianshi).innerHTML=xianshivalue;	
}
//删除上传的文件结束

//添加汇报内容开始
function addnewhuibao(id,pass,xianshi,needshenpi,contentid) {

		var xmlhttp=createAjax();	
	if (xmlhttp) {	
var allshuju="";

var arrstrs = xianshi.split("||");
 for (var i=1;i<arrstrs.length-1;i++)
{
allshuju=allshuju+"&"+arrstrs[i]+"="+escape(document.getElementById("input"+arrstrs[i]).value).replace(/(\r)*\n/g,"<br />");
}
if (needshenpi==1){
var shenpiren=document.getElementById("shenpiren").value;
var shenpirengh=document.getElementById("shenpirengh").value;
xmlhttp.open('post','baobiao/cuaddhuibao.asp?id='+escape(id)+'&contentid='+escape(contentid)+'&shenpiren='+escape(shenpiren)+'&shenpirengh='+escape(shenpirengh),true)
}
else
xmlhttp.open('post','baobiao/cuaddhuibao.asp?id='+escape(id)+'&contentid='+escape(contentid),true)

		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	}
else{
	
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"系统正在返回中...')",500);
getcontent('baobiao/hbdatail.asp?huibaoid='+escape(id),'contents',0); 
setTimeout("closeWindow('')",3000);
}}}}
xmlhttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");
		xmlhttp.send('pass='+escape(pass)+allshuju);
	}
//添加汇报内容结束

//添加留言开始
function callliuyan(id,bj_system_ID) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {
	  var liuyan=document.getElementById("liuyan" + id).value;	
xmlhttp.open('post','baobiao/culiuyan.asp?id='+escape(id)+'&bj_system_ID='+escape(bj_system_ID)+'&liuyan='+escape(liuyan)+'&suijishu='+Date(),true)
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		if ( unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败") > 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	eval("addliuyanbutton"+id).disabled=false;
	}
else{
	eval("updatePager"+id).innerHTML=unescape(xmlhttp.responseText);
document.getElementById("liuyan"+id).value="";
setTimeout("dvck('<img src=images/okla.gif> 留言添加成功！')",500);
eval("addliuyanbutton"+id).disabled=false;
}}}}
		xmlhttp.send(null);
	}
//添加留言结束

//	汇报审批开始
   function huibaosp(hbcontentid,bj_system_ID,zhi) {	

	var xmlhttp=createAjax();	
	if (xmlhttp) {
var data6=document.getElementById('data6').value.replace(/(\r)*\n/g,"<br />").replace(/\s/g," "); 
if(document.getElementById("data1").checked)
 {	var leixing=1;}
else
{var leixing=2;}

if(document.getElementById("data4").checked)
 {	var isqueren=4;}
else
{var isqueren=3;}

xmlhttp.open('post','baobiao/huibaoshenpi.asp?hbcontentid=' + escape(hbcontentid)+'&bj_system_ID='+escape(bj_system_ID)+'&zhi=' + escape(zhi)+'&leixing=' + escape(leixing)+'&isqueren=' + escape(isqueren)+'&data6=' + escape(data6)+'&suijishu='+Date(),true)			
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		var jieguo=unescape(xmlhttp.responseText);
if( jieguo.indexOf("成功") > 0 ) {
setTimeout("getcontent('baobiao/hbshenpi.asp?thiss=14','contents',1);",2500);
setTimeout("dvck('"+jieguo+"正在自动为您加载下一个需要审批的信息!')",100);
	}
else{
	shenpibutton.disabled=false;
setTimeout("dvck('"+jieguo+"')",500);
}}}}
		xmlhttp.send(null);
	}
//	汇报审批结束
//汇报设置开始
function sethuibao(qunzuid,pass) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {
  var isshenpi=document.getElementById("isshenpi").value;
    var ismeiren=document.getElementById("ismeiren").value;
  var gonggao=document.getElementById("gonggao").value;
  var maxshuliang=document.getElementById("maxshuliang").value;
    var isyici=document.getElementById("isyici").value;
	    var isniming=document.getElementById("isniming").value;
		    var iscode=document.getElementById("iscode").value;
		  var istijiao=document.getElementById("istijiao").value;	
xmlhttp.open('post','baobiao/cuhbcontent.asp?id='+escape(qunzuid)+'&ii=1&hbcontent=hbcontent&pass=' + escape(pass)+'&isshenpi=' + escape(isshenpi)+'&istijiao=' + escape(istijiao)+'&iscode=' + escape(iscode)+'&gonggao=' + escape(gonggao)+'&maxshuliang=' + escape(maxshuliang)+'&ismeiren=' + escape(ismeiren)+'&isniming=' + escape(isniming)+'&isyici=' + escape(isyici)+'&suijishu='+Date(),true)		

	
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
				
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	sethuibaobutton.disabled=false;
	jinzhanfk.innerHTML="";

}}}
		xmlhttp.send(null);
	}
//汇报设置结束

//帖子操作开始
function editclub(leixing,clubid) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {
   if ((leixing== null) || (leixing == "") || (clubid== null) || (clubid == "")) return;
xmlhttp.open('post','club/clubtopic.asp?clubid='+escape(clubid)+'&leixing=' + escape(leixing)+'&suijishu='+Date(),true)		
xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	

	if ( unescape(xmlhttp.responseText).indexOf("失败") > 0 ) {		
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);	
	return;
	}
	if(leixing==3){
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);	
getcontent('club/club.asp?q=3','contents',1);
	}
	if(leixing==1 || leixing==2){
zhiding.innerHTML=unescape(xmlhttp.responseText);
	}
}}}
		xmlhttp.send(null);
	}
//帖子操作结束
//短信用户添加、删除
   function calldxuser(ii,users,zhi,dxqunid) {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
  if ((users== null) || (users == "") || (ii== null) || (ii == "")|| (dxqunid== null) || (dxqunid == "")|| (zhi == "")|| (zhi ==null)) return;
//删除用户
    if (zhi==2 ){
            updatePagee=eval("updatePage" + ii)    
xmlhttp.open('post','duanxin/duanxinpeopleedit.asp?zhi=' + escape(zhi)+'&ii=' + escape(ii)+'&user=' + escape(users)+'&dxqunid=' + escape(dxqunid)+'&suijishu='+Date(),true)					  
                 }
				 //删除用短信群
    if (zhi==4 ){
            updatePagee=eval("updatePagers" + ii)    
xmlhttp.open('post','duanxin/duanxinpeopleedit.asp?zhi=' + escape(zhi)+'&ii=' + escape(ii)+'&user=' + escape(users)+'&dxqunid=' + escape(dxqunid)+'&suijishu='+Date(),true)					  
                 }
  //添加用户
    if (zhi==1 || zhi==5){

	          if (zhi==1){
                var users=document.getElementById('qunusers').value;

				}
				    if (zhi==5)//添加新群
					{
                var users=document.getElementById('newqun').value;
				
					}
                if ((users== null) || (users == "") ) return;
xmlhttp.open('post','duanxin/duanxinpeopleedit.asp?zhi=' + escape(zhi)+'&ii=' + escape(ii)+'&user=' + escape(users)+'&dxqunid=' + escape(dxqunid)+'&suijishu='+Date(),true)					
                 }
  //添加用户
    if (zhi==3){
	            updatePagee = eval("alluser");
                var users=document.getElementById('names').value;	
				   var shoujihao=document.getElementById('shoujihao').value;

                if ((users== null) || (users== "") || (shoujihao == "") || (shoujihao == "") ) return;
xmlhttp.open('post','duanxin/duanxinpeopleedit.asp?zhi=' + escape(zhi)+'&ii=' + escape(ii)+'&user=' + escape(users)+'&shoujihao=' + escape(shoujihao)+'&dxqunid=' + escape(dxqunid)+'&suijishu='+Date(),true)					
                 } 
	
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {
			if ( unescape(xmlhttp.responseText).indexOf("失败") > 0 ) {		
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);
	return;
	}	
	
	 if (zhi==5 ){
	setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);	 
getcontent('duanxin/duanxin.asp?types=3','indexcontent',1);
return;
                 }
	  if (zhi==1 ){
		      updatePagee = eval("alluser");
document.getElementById('qunusers').value="";  
                 }
	
	updatePagee.innerHTML=unescape(xmlhttp.responseText);
	    if ( zhi==3 ){
document.getElementById('names').value="";
document.getElementById('shoujihao').value="";
                 }
	    if (zhi==6 ){
ishuibao.style.display="none";
                 }			 
	    if (zhi==5 ){
ishuibao.style.display="";
                 }}}}
		xmlhttp.send(null);
	}
//短信用户添加、删除

function countChar(textareaName,spanName) 
{ 
document.getElementById(spanName).innerHTML = 400 - document.getElementById(textareaName).value.length; 
if (400 - document.getElementById(textareaName).value.length<0)
{
document.getElementById(textareaName).value=document.getElementById(textareaName).value.substring(0, 400);
document.getElementById(spanName).innerHTML=0;
}
}
//手工升级系统开始
 function updatexitong() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	xmlhttp.open('post','admin/updateinstall/sggengxin.asp?suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
				
			if (xmlhttp.readyState<4) {	
		setTimeout("dvck('正在发送中')",0);
			}	
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		
if (unescape(xmlhttp.responseText).indexOf("失败")>0){
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
	return;
	}
	
getcontent('secret/gengxin.asp?thiss=17','contents',1);
		setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",0);
}}}
		xmlhttp.send(null);
	}
 //手工升级系统结束
 
 

 function getdatas() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	xmlhttp.open('post','secret/gengxin.asp?actions=18&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
}}
		xmlhttp.send(null);
	}

 
 
 
 function mouseCoords(ev) 
{ 
if(ev.pageX || ev.pageY){ 
return {x:ev.pageX, y:ev.pageY}; 
} 
return { 
x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, 
y:ev.clientY + document.body.scrollTop - document.body.clientTop 
}; 
} 
 //显示备注栏开始
function showData(frompage,id,bj_system_ID,ev)
{
var showdata = document.getElementById("box");
showdata.style.display="block";
ev= ev || window.event; 
var mousePos = mouseCoords(ev); 
      var x =mousePos.x; 
      var y = mousePos.y; 
if(window.screen.width-x<400){
showdata.style.left=x-405+"px";
}
else
showdata.style.left=x+"px";

showdata.style.top=document.documentElement.scrollTop+y-60+"px";
showdata.style.position="absolute";
var xmlhttp=createAjax();	
	if (xmlhttp) {
	xmlhttp.open('post','baobiao/huibaojindu.asp?id=' + escape(id)+'&bj_system_ID=' + escape(bj_system_ID)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
	if (xmlhttp.readyState==4 && xmlhttp.status==200) {				
showdata.innerHTML=unescape(xmlhttp.responseText);	
}
}
xmlhttp.send(null);
}
}
function closeData()
{
var showdata = document.getElementById("box");
showdata.style.display="none";
} //显示备注栏结束

function SelectPeople(checkbox,id,yixuan,forms) {
	var strolltop=document.documentElement.scrollTop+290;
	var strolltop2=strolltop+40
	var bWidth=parseInt(document.documentElement.scrollWidth);
if(document.body.scrollHeight)
var bHeigh= parseInt(document.body.scrollHeight);
else
var bHeigh=0;
if (document.documentElement.scrollHeight)
var sHeigh= parseInt(document.documentElement.scrollHeight);
else
var sHeigh=0;
if (sHeigh<bHeigh)
var bHeight=bHeigh;
else
var bHeight=sHeigh;
if(document.getElementById("thatdiv")!=undefined){ document.getElementById('thatdiv').parentNode.removeChild(document.getElementById('thatdiv'));}
var messW=document.createElement("div");
messW.id='thatdiv';
messW.innerHTML='<div  id="openthis" style="POSITION: absolute; WIDTH:'+bWidth+'px;height:'+bHeight+'px; text-align:center;BOTTOM: 0px; BACKGROUND: #fff; OVERFLOW: auto; TOP: 0px; LEFT: 0px;filter: alpha(opacity=60);opacity:0.6;z-index:1102;"><\/div><div id="openthis" style="position:absolute;left:50%;top:'+strolltop+'px;margin-top:-190px;margin-left:-130px;z-index:9999;background:#C3D8EB;border:1px solid #93B2D0;width:300px;height:30px;line-height:30px;text-align:right"><image src="images/X.gif" id="openthis" style="cursor:pointer" width=17 height=15 onclick="thatdiv.style.display=\'none\';" title="关闭窗口"></div><div  id="openthis" style="position:absolute;left:50%;top:'+strolltop2+'px;margin-top:-200px;margin-left:-130px;z-index:9999;background-color:#FFFFFF;border:1px solid #93B2D0;width:300px;height:400px;text-align:center"><iframe src="selectpeople.asp?box='+checkbox+'&forms='+forms+'&types='+id+'&yixuan='+escape(yixuan)+'"  id="openthis"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="300" height="400" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe><\/div>';
messW.style.cssText="Z-INDEX:1101;";
document.body.appendChild(messW);
}
function checkAll(){ 
var che = $("#allBox").attr("checked");
$("div#one [name='student']:checkbox").attr("checked",che);
}
function getdata(page,keyword,xunhuan){ 
var xmlhttp=createAjax();	
	if (xmlhttp) {
var student = $("input[name='student']:checked").serialize().replace(/&student=/g,',').replace(/student=/g,'');
xmlhttp.open('post','myfabu.asp?actions=dels&student='+escape(student)+'&suijishu='+Date(),true)		
xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	

	if ( unescape(xmlhttp.responseText).indexOf("失败") > 0 ) {		
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);	
	return;
	}
setTimeout("dvck('"+unescape(xmlhttp.responseText)+"')",500);	
getcontent('myfabu.asp?thiss=19&page='+escape(page)+'&xunhuan='+escape(xunhuan)+'&keyword='+escape(keyword),'contents',1);
}}}
		xmlhttp.send(null);
}
function alertbox(id,types,width,height,y) {
var bWidth=parseInt(document.documentElement.scrollWidth);
if(document.body.scrollHeight)
var bHeigh= parseInt(document.body.scrollHeight);
else
var bHeigh=0;
if (document.documentElement.scrollHeight)
var sHeigh= parseInt(document.documentElement.scrollHeight);
else
var sHeigh=0;
if (sHeigh<bHeigh)
var bHeight=bHeigh;
else
var bHeight=sHeigh;
if(document.getElementById("thatdiv")!=undefined){ document.getElementById('thatdiv').parentNode.removeChild(document.getElementById('thatdiv'));}
var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
var messW=document.createElement("div");
messW.id='thatdiv';
var contents;
var headcontent;
if(types=='creatnewfolder')
headcontent="创建文件夹";
else if (types=='rename')
headcontent="重命名";
else if (types=='delete')
headcontent="删除文件/文件夹";
else if (types=='remove')
headcontent="移动文件/文件夹";
else if (types=='upfiles')
headcontent="上传文件";
else if (types=='quanxian')
headcontent="设定权限";
else if (types=='gongxiang')
headcontent="分享文件";
else if (types=='zhuanyi')
headcontent="拷贝文件到我的文件夹";
contents='<div  id="openthis" style="POSITION: absolute; WIDTH:100%;height:'+bHeight+'px; text-align:center;BOTTOM: 0px; BACKGROUND: #fff; OVERFLOW: auto; TOP: 0px; LEFT: 0px;filter: alpha(opacity=40);opacity:0.4;z-index:1102;"><\/div><div  style="position:absolute;left:50%;top:'+(scrollTop+100)+'px;margin-left:-'+width/2+'px;z-index:9999;"><div id="openthis" style="background:#C3D8EB;border:1px solid #93B2D0;width:'+width+'px;height:30px;line-height:15px;font-weight:bolder"><table width="100%" height="100%"><tr><td>'+headcontent+'</td><td style="width:1px;"><image src="images/X.gif" style="cursor:pointer" width=17 height=15  onclick="thatdiv.style.display=\'none\';" title="关闭窗口"></td></tr></table></div><div   style="background-color:#FFFFFF;border:1px solid #93B2D0;width:'+width+'px;height:'+height+'px;margin-top:-1px;text-align:center">';
if(types=='creatnewfolder')
contents=contents+'<br><br><input id="newfoldername" size="20" >&nbsp;<input type="button" onclick="creatfolder();" value="创建文件夹">';
else if (types=='rename'){
headcontent.innerHTML="修改";
 if(id.substring(0,4)=="fold")
 {
	 id=id.replace("foldna","folder");
	  var yuanmingzi=document.getElementById(id).title;
var filename =yuanmingzi;
contents=contents+'<br><br><input id="newfilename"  value="'+filename+'" >&nbsp;';
var filetype ="^wenjianjia^";
	 }
	 else
	 {	 id=id.replace("filena","filety");
	     id=id.replace("fileti","filety");
		  var yuanmingzi=document.getElementById(id).title;
 var ldot = yuanmingzi.lastIndexOf(".");
var filetype = yuanmingzi.substring(ldot + 1);
var filename = yuanmingzi.substring(0,ldot);
contents=contents+'<br><br><input id="newfilename"  value="'+filename+'" >&nbsp;';
contents=contents+'<font style="background-color:#cccccc;font-size:14px;">.'+filetype+'</font>';
	 }
contents=contents+'&nbsp;&nbsp;<input type=button  onclick="rename();"  value=修改名称><input  id="fileid" value="'+id+'"  type="hidden" ><input  id="filetype" value="'+filetype+'"  type="hidden" ><input id="oldfilename"   type="hidden" value="'+filename+'" >';
}
else if (types=='delete'){
var uptype=id.substring(0,4);
if(uptype=="fold")
contents=contents+'<br><br> <input type=button  onclick="deletefolder();"   value=删除文件夹及下面所有的文件>&nbsp;<input type=button  onclick=document.getElementById("thatdiv").style.display="none";  value=不删除,返回><input  id="fileid" value="'+id+'"  type="hidden" >';
else
contents=contents+'<br><br><input type=button  onclick="deletefolder();"   value=立即删除>&nbsp;<input type=button  onclick=document.getElementById("thatdiv").style.display="none";  value=我点错了,返回><input  id="fileid" value="'+id+'"  type="hidden" >';
}
else if (types=='quanxian'){
var uptype=id.substring(0,4);
fileid=id.substring(6,id.length);
contents=contents+'<div  id="bannerqun"  style="cursor:pointer;background-color:#C7DADA;height:30px;width:160px;float:left;line-height:30px;"    onclick=document.getElementById("liulanqun").style.display="";document.getElementById("liulanren").style.display="none";document.getElementById("liulanquncreat").style.display="none";document.getElementById("liulanrencreat").style.display="none";document.getElementById("bannerqun").style.background="#C7DADA";document.getElementById("bannerren").style.background="#E8E9F7";document.getElementById("bannerquncreat").style.background="#E8E9F7";document.getElementById("bannerrencreat").style.background="#E8E9F7";>部门浏览权限</div><div id="bannerren"  style="cursor:pointer;height:30px;width:160px;background-color:#E8E9F7;float:left;line-height:30px;"   onclick=document.getElementById("liulanqun").style.display="none";document.getElementById("liulanren").style.display="";document.getElementById("liulanquncreat").style.display="none";document.getElementById("liulanrencreat").style.display="none";document.getElementById("bannerren").style.background="#C7DADA";document.getElementById("bannerqun").style.background="#E8E9F7";document.getElementById("bannerquncreat").style.background="#E8E9F7";document.getElementById("bannerrencreat").style.background="#E8E9F7";>个人浏览权限</div>'
contents=contents+'<div  id="bannerquncreat"  style="cursor:pointer;background-color:#E8E9F7;'
if(uptype=="file"){
contents=contents+'display:none;';
var wenjianjia='文件';
}
else
var wenjianjia='文件夹';
contents=contents+'height:30px;width:160px;float:left;line-height:30px;"    onclick=document.getElementById("liulanqun").style.display="none";document.getElementById("liulanren").style.display="none";document.getElementById("liulanquncreat").style.display="";document.getElementById("liulanrencreat").style.display="none";document.getElementById("bannerren").style.background="#E8E9F7";document.getElementById("bannerqun").style.background="#E8E9F7";document.getElementById("bannerquncreat").style.background="#C7DADA";document.getElementById("bannerrencreat").style.background="#E8E9F7";>部门新建上传权限</div><div id="bannerrencreat"  style="cursor:pointer;height:30px;width:160px;'
if(uptype=="file")
contents=contents+'display:none;';
contents=contents+'background-color:#E8E9F7;float:left;line-height:30px;"   onclick=document.getElementById("liulanqun").style.display="none";document.getElementById("liulanren").style.display="none";document.getElementById("liulanquncreat").style.display="none";document.getElementById("liulanrencreat").style.display="";document.getElementById("bannerren").style.background="#E8E9F7";document.getElementById("bannerqun").style.background="#E8E9F7";document.getElementById("bannerquncreat").style.background="#E8E9F7";document.getElementById("bannerrencreat").style.background="#C7DADA";>个人新建上传权限</div>'
if(uptype=="file")
contents=contents+'<div  style="height:30px;width:430px;background-color:#EFEFEF;float:left;line-height:30px;margin-bottom:10px" ></div>';
else
contents=contents+'<div  style="height:30px;width:110px;background-color:#EFEFEF;float:left;line-height:30px;margin-bottom:10px" ></div>';
contents=contents+'<div id="liulanqun" style="text-align:center;padding:7px;"><table width="700"  border=0   cellpadding="0" cellspacing="0" algin=center ><tr><td  height=30  align="center"  bgcolor="#C2D8EB" >选择部门<\/td><td  width=15>&nbsp;<\/td><td  bgcolor="#C2D8EB" >已选部门</td><\/tr><tr><td ><iframe src="selectfile.asp?box=checkbox&types='+fileid+'&forms=frombumen"    hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0" id="renselect"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe></td><td width=15>&nbsp;<\/td><td ><iframe src="haveselect.asp?types=bumen&fileid='+fileid+'"  id="bumenhaveselect"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe><\/td><\/tr><tr><td colspan=3 height=5 align=left> <\/td><\/tr><tr><td colspan=3  bgcolor="#EAF1F6" height=26 align=left>备注:1、部门和个人浏览权限都不设置，则默认该'+wenjianjia+'为公共'+wenjianjia+'，所有人员都可以访问该'+wenjianjia+'；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、同时设置部门和人员浏览权限，则符合条件的人员都可以访问该'+wenjianjia+'；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3、设置部门权限后，则该部门及下级部门的人员均可以访问。<\/td><\/tr><\/table></div>'
contents=contents+'<div id="liulanren" style="text-align:center;display:none;padding:7px;"><table width="700"  border=0   cellpadding="0" cellspacing="0" algin=center ><tr><td  height=30  align="center"  bgcolor="#C2D8EB" >选择人员<\/td><td  width=15>&nbsp;<\/td><td  bgcolor="#C2D8EB" >已选人员</td><\/tr><tr><td ><iframe src="selectpeople.asp?box=checkbox&types='+fileid+'&forms=fromwenjian"    hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0" id="renselect"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe></td><td width=15>&nbsp;<\/td><td ><iframe src="haveselect.asp?types=renyuan&fileid='+fileid+'"  id="renhaveselect"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe><\/td><\/tr><tr><td colspan=3 height=5 align=left bgcolor="#EAF1F6"> <\/td><\/tr><tr><td  bgcolor="#EAF1F6"	 colspan=3 height=26 align=left>备注:1、部门和个人浏览权限都不设置，则默认该'+wenjianjia+'为公共'+wenjianjia+'，所有人员都可以访问该'+wenjianjia+'；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、同时设置部门和人员浏览权限，则符合条件的人员都可以访问该'+wenjianjia+'；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3、设置人员浏览权限后，则只有被选择人员可以访问该'+wenjianjia+'。<\/td><\/tr><\/table></div>';
contents=contents+'<div id="liulanquncreat" style="text-align:center;display:none;padding:7px;"><table width="700"  border=0   cellpadding="0" cellspacing="0" algin=center ><tr><td  height=30  align="center"  bgcolor="#C2D8EB" >选择部门<\/td><td  width=15>&nbsp;<\/td><td  bgcolor="#C2D8EB" >已选部门</td><\/tr><tr><td ><iframe src="selectfile.asp?box=checkbox&types='+fileid+'&forms=frombumencreat"    hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0" id="renselect"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe></td><td width=15>&nbsp;<\/td><td ><iframe src="haveselect.asp?types=bumencreat&fileid='+fileid+'"  id="bumencreathaveselect"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe><\/td><\/tr><tr><td colspan=3 height=5 align=left> <\/td><\/tr><tr><td colspan=3  bgcolor="#EAF1F6" height=26 align=left>备注:1、部门和个人新建上传权限都不设置，则默认该文件夹为公共文件夹，所有人员都可以上传文件和新建文件夹；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、同时设置部门和人员新建上传权限，则符合条件的人员都可以上传文件和新件文件夹；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3、设置部门新建上传权限后，则该部门及其下级部门的人员可以上传文件和新建文件夹。<\/td><\/tr><\/table></div>'
contents=contents+'<div id="liulanrencreat" style="text-align:center;display:none;padding:7px;"><table width="700"  border=0   cellpadding="0" cellspacing="0" algin=center ><tr><td  height=30  align="center"  bgcolor="#C2D8EB" >选择人员<\/td><td  width=15>&nbsp;<\/td><td  bgcolor="#C2D8EB" >已选人员</td><\/tr><tr><td ><iframe src="selectpeople.asp?box=checkbox&types='+fileid+'&forms=fromwenjiancreat"    hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0" id="renselect"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe></td><td width=15>&nbsp;<\/td><td ><iframe src="haveselect.asp?types=renyuancreat&fileid='+fileid+'"  id="rencreathaveselect"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="365" height="300" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe><\/td><\/tr><tr><td colspan=3 height=5 align=left bgcolor="#EAF1F6"> <\/td><\/tr><tr><td  bgcolor="#EAF1F6"	 colspan=3 height=26 align=left>备注:1、部门和个人新建上传权限都不设置，则默认该文件夹为公共文件夹，所有人员都可以上传文件和新建文件夹；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2、同时设置部门和人员新建上传权限，则符合条件的人员都可以上传文件和新建文件夹；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3、设置人员新建上传权限后，则只有被选择人员可以上传文件和新建文件夹。<\/td><\/tr><\/table></div>';
}

else if (types=='remove'){
		var creattype=document.getElementById("creattype").value;
contents=contents+'<iframe src="selectfile.asp?box=radio&fromid='+id+'&creattype='+creattype+'"  id="openthis"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="320" height="350" scrolling="auto" frameborder="0" ><\/iframe>';
}
else if (types=='gongxiang'){
	fileid=id.substring(6,id.length);
		var creattype=document.getElementById("creattype").value;
contents=contents+'<iframe src="selectpeople.asp?box=checkbox&types='+fileid+'&forms=fenxiangwenjian"  id="openthis"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="320" height="350" scrolling="auto" frameborder="0" ><\/iframe>';
}
else if (types=='zhuanyi'){
	fileid=id.substring(6,id.length);
contents=contents+'<iframe src="selectfile.asp?box=radio&fromid='+id+'&forms=zhuanyi&creattype=1"  id="openthis"  hspace="0" vspace="0"    longdesc="0" marginheight="0" marginwidth="0"  width="320" height="350" scrolling="auto" frameborder="0" ><\/iframe>'; 
}
else if (types=='upfiles'){
	var folderid=document.getElementById("thisfolderid").value;
	var creattype=document.getElementById("creattype").value;
contents=contents+'<br><br><form action="upload/upload.asp?inputs=wenjian&creattype='+creattype+'&xianshi=filexianshi&types=fromwenjian&qunzuid='+folderid+'" method="post" id="thisidss" name="thisidss"  target="upload" enctype="multipart/form-data"> <div style="background-image: url(images/upload.gif);vertical-align:middle;text-align:center;background-position:2px;background-repeat:no-repeat;height:28px;margin-left:120px;" ><input type="file"  name="file1" id="fileToUpload" onchange="document.thisidss.submit();jieguo.innerHTML=\'<img src=images/onload.gif>上传中，请稍后\';" style="width:74px;height:28px;margin-left:-122px;filter:alpha(opacity:0);opacity: 0;"/><iframe name="upload"   style="display:none;"   id="upload"  frameborder="0" align="middle" scrolling="no"></iframe></div></form>';
}
else
contents=contents+'<iframe  id="openthis"  src="../selectpeople.asp"  width="100%" height="100%" scrolling="auto" frameborder="0" style="margin:0px;"><\/iframe>';
contents=contents+'<BR><BR><span id=jieguo style="color:red;border:1px"></span><\/div><\/div>';
messW.className="newtarget";
messW.innerHTML=contents;
messW.style.cssText="Z-INDEX:1101;";
document.body.appendChild(messW);
}
function creatfolder() {	
	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var newfoldername=document.getElementById("newfoldername").value; 
var folderid=document.getElementById("thisfolderid").value; 
var creattype=document.getElementById("creattype").value; 
if ((newfoldername== null) || (newfoldername == "") || (folderid== null) || (folderid == "")) return;	
	xmlhttp.open('get','wenjian/cuwenjian.asp?actions=addnewwenjian&newfoldername='+escape(newfoldername)+'&creattype='+escape(creattype)+'&folderid=' + escape(folderid)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
		
if (unescape(xmlhttp.responseText).indexOf("失败：")>=0){
document.getElementById("jieguo").innerHTML=unescape(xmlhttp.responseText);
	return;
	}
$('#addmore').html($("#addmore").html()+unescape(xmlhttp.responseText));
document.getElementById("thatdiv").style.display="none";
if(document.body.scrollHeight)
var bHeigh= parseInt(document.body.scrollHeight);
else
var bHeigh=0;
if (document.documentElement.scrollHeight)
var sHeigh= parseInt(document.documentElement.scrollHeight);
else
var sHeigh=0;
if (sHeigh<bHeigh)
var bHeight=bHeigh;
else
var bHeight=sHeigh;	
	document.getElementById("notecontents").style.height=bHeight-60;
//所有div标签
$(".kexiugai,.kexiugaixia").contextMenu('myMenu1', {
									onShowMenu: function(e, menu) { 
if ($(e.target).attr('id').substring(0,4)=='fold')   
{
	$('#gongxiang,#download,#zhuanyi', menu).remove();
	var creattype=document.getElementById("creattype").value;
	if(creattype==3)
document.getElementById("allbutton").value=4;
else
document.getElementById("allbutton").value=3;

}
if ($('#shouquan'+$(e.target).attr('id').replace($(e.target).attr('id').substring(0,6),'')).val()==1) {
 $('#quanxian,#move,#delete,#rename', menu).remove();
 document.getElementById("allbutton").value=5;
}
return menu;   
},
        bindings: {
          'rename': function(t) {//重命名
			alertbox(t.id,'rename',320,150,0);
          },
          'delete': function(t) {//删除文件
		     
      	alertbox(t.id,'delete',320,150,0);
          },
          'quanxian': function(t) {//权限设置
		     
           	alertbox(t.id,'quanxian',750,430,0);
          },
          'move': function(t) {
             
			alertbox(t.id,'remove',320,350,0);
          },
		     'gongxiang': function(t) {
			alertbox(t.id,'gongxiang',320,350,0);
          },
		     'download': function(t) {
 window.location.href='makefile/down_file.asp?fileid='+t.id;
          },
		     'zhuanyi': function(t) {
			alertbox(t.id,'zhuanyi',320,350,0);
          }
        }
      });
//修改结束
	return;
}}}
		xmlhttp.send(null);
	}
function rename() {	

	var xmlhttp=createAjax();	
	if (xmlhttp) {
	var newfoldername=document.getElementById("newfilename").value; 
var folderid=document.getElementById("thisfolderid").value; 
var fileid=document.getElementById("fileid").value; 
var filetype=document.getElementById("filetype").value; 
var oldfilename=document.getElementById("oldfilename").value; 
if ((newfoldername== null) || (newfoldername == "") || (folderid== null) || (folderid == "")) return;	
	xmlhttp.open('get','wenjian/cuwenjian.asp?actions=rename&newfoldername='+escape(newfoldername)+'&folderid=' + escape(folderid)+'&fileid=' + escape(fileid)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
if (newfoldername==oldfilename){
document.getElementById("jieguo").innerHTML="您没有修改！";
	return false;
	}
	var jieguo=unescape(xmlhttp.responseText);
if (jieguo.indexOf("align=absmiddle> 失败")>=0){
document.getElementById("jieguo").innerHTML=jieguo;
return false;
	}
if(filetype!='^wenjianjia^'){
document.getElementById(fileid).title=newfoldername+'.'+filetype;
if(newfoldername.length>11)
document.getElementById(fileid.replace("filety","filena")).innerHTML=newfoldername.substring(0,11)+'.'+filetype;
else
document.getElementById(fileid.replace("filety","filena")).innerHTML=newfoldername+'.'+filetype;
}
else
{
document.getElementById(fileid).title=newfoldername;
if(newfoldername.length>11)
document.getElementById(fileid.replace("folder","foldna")).innerHTML=newfoldername.substring(0,11);
else
document.getElementById(fileid.replace("folder","foldna")).innerHTML=newfoldername;
}
document.getElementById("thatdiv").style.display="none";
}}}
		xmlhttp.send(null);
	}
function deletefolder() {	

	var xmlhttp=createAjax();	
	if (xmlhttp) {
var fileid=document.getElementById("fileid").value; 
if ((fileid== null) || (fileid == "")) return;	
	xmlhttp.open('get','wenjian/cuwenjian.asp?actions=delfolder&fileid='+escape(fileid)+'&suijishu='+Date(),true)		
		xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
if (unescape(xmlhttp.responseText).indexOf("align=absmiddle> 失败")>=0){
document.getElementById("jieguo").innerHTML=unescape(xmlhttp.responseText);
return false;
	}
document.getElementById(fileid.replace(fileid.substring(0,6),"thisfi")).style.display="none";
document.getElementById("thatdiv").style.display="none";
}}}
		xmlhttp.send(null);
	}
//保存
function backuploads(filenames,id,fname,filetype,filename,positionx,positiony){
	if (fname.length>1){
$('#addmore').html($("#addmore").html()+'<div   id="thisfi'+id+'"  class="kexiugai"><div id="filety'+id+'" title="'+filename+'.'+filetype+'"  onMouseover="this.style.border=\'1px #BED4EE solid\'" onMouseout="this.style.border=\'1px #ECE9D8 solid\';filena'+id+'.style.backgroundColor=\'#ffffff\';filena'+id+'.style.color=\'#000000\';"   onMouseDown="this.style.border=\'1px #7DA2CE solid\';filena'+id+'.style.backgroundColor=\'#316AC5\';filena'+id+'.style.color=\'#ffffff\';" style="width:130px;height:130px;margin:10px 10px 2px 10px;border:1px #ECE9D8 solid;text-align:center"  class="kexiugaixia" ><div style="background:url(images/filebg.png) no-repeat -'+positionx+'px -'+positiony+'px;;width:32px;height:32px;margin:49px 49px 49px 49px;" class="kexiugaixia"  id="fileti'+id+'"  ></div><img style="position:relative;left:55px;top:-128px;filter:alpha(opacity=20); -moz-opacity:0.2; -khtml-opacity: 0.2;opacity: 0.2;" src="images/set.gif"></div><div id="filena'+id+'" class="kexiugaixia" style="margin-left:10px;width:125px;padding:3px;cursor:pointer;font-size:12px;color:#000000"  onMouseover="filety'+id+'.style.border=\'1px #BED4EE solid\'" onMouseout="filety'+id+'.style.border=\'1px #ECE9D8 solid\';this.style.backgroundColor=\'#ffffff\';this.style.color=\'#000000\';"   onMouseDown="filety'+id+'.style.border=\'1px #7DA2CE solid\';this.style.backgroundColor=\'#316AC5\';this.style.color=\'#ffffff\';">'+filenames+'.'+filetype+'</div></div>');
//所有div标签
$(".kexiugai,.kexiugaixia").contextMenu('myMenu1', {
onShowMenu: function(e, menu) { 
if ($(e.target).attr('id').substring(0,4)=='fold')   
{
	$('#gongxiang,#download,#zhuanyi', menu).remove();
	var creattype=document.getElementById("creattype").value;
	if(creattype==3)
document.getElementById("allbutton").value=4;
else
document.getElementById("allbutton").value=3;
}
if ($('#shouquan'+$(e.target).attr('id').replace($(e.target).attr('id').substring(0,6),'')).val()==1) {
 $('#quanxian,#move,#delete,#rename', menu).remove();
 document.getElementById("allbutton").value=5;
}
return menu;   
},
        bindings: {
          'rename': function(t) {//重命名
		     
			alertbox(t.id,'rename',320,150,0);
          },
          'delete': function(t) {//删除文件
		     
      	alertbox(t.id,'delete',320,150,0);
          },
          'quanxian': function(t) {//权限设置
       	alertbox(t.id,'quanxian',750,430,0);
          },
          'move': function(t) {
			alertbox(t.id,'remove',320,350,0);
          },
		     'gongxiang': function(t) {
			alertbox(t.id,'gongxiang',320,350,0);
          },
		     'download': function(t) {
 window.location.href='makefile/down_file.asp?fileid='+t.id;
          },
		     'zhuanyi': function(t) {
			alertbox(t.id,'zhuanyi',320,350,0);
          }
        }
      });
//修改结束
	return;
}
}	
 function searchfile() {
		var dates1=document.getElementById('dates1').value;
	var dates2=document.getElementById('dates2').value;
		var dates3=document.getElementById('dates3').value;
		var dates4=document.getElementById('dates4').value;	
			var dates5=document.getElementById('dates5').value;
			var dates6=document.getElementById('dates6').value;
	if (((dates5== null) || (dates5== "")) && ((dates1== null) || (dates1== "")) && ((dates2== null) || (dates2== "")) && ((dates3== null) || (dates3== "")) && ((dates4== null) || (dates4== "")) && ((dates6== null) || (dates6== ""))  ) return;
	getcontent("secret/showfile.asp?creattype=5&dates1="+escape(dates1)+"&dates2="+escape(dates2)+"&dates3="+escape(dates3)+"&dates4="+escape(dates4)+"&dates5="+escape(dates5)+"&dates6="+escape(dates6),"contents",1);
		 }
	//插入内容到textarea，在mailset页面	 
function insert_to_textarea(id,str){

    var tc = document.getElementById(id);
    var tclen = tc.value.length;
    tc.focus();
    if(typeof document.selection != "undefined")
    {
        document.selection.createRange().text = str;  
    }
    else
    {
        tc.value = tc.value.substr(0,tc.selectionStart)+str+tc.value.substring(tc.selectionStart,tclen);
    }
}
	//插入内容到textarea，在mailset页面结束	 

	//选择hbdatail选项

function checkhbli(bjid,zdid) {
		var xmlhttp=createAjax();	
	if (xmlhttp) {
   if ( (bjid== null) || (bjid == "") || (zdid== null) || (zdid == "")) return;
xmlhttp.open('post','baobiao/cuaddhuibao.asp?pass=504&id=' + escape(bjid)+'&contentid=' + escape(zdid)+'&suijishu='+Date(),true);
xmlhttp.onreadystatechange=function() {
		if (xmlhttp.readyState==4 && xmlhttp.status==200) {	
var response=unescape(xmlhttp.responseText);	
if ( response.indexOf("失败") > 0 ) {		
setTimeout("dvck('"+response+"')",500);
	return;
}
else
{
	if (response=="xianshi" ) {
$("#divTopimgli_"+zdid).attr("src","images/checked.gif");
$(".xianshi_"+zdid).css("display","table-row");
}
	else
	{$("#divTopimgli_"+zdid).attr("src","images/notchecked.gif");
		$(".xianshi_"+zdid).css("display","none");
		}
}
}
}
		xmlhttp.send(null);
	}
	}
	
		//选择hbdatail选项