var c1="※";
var c2="⊙";
var c3="‖";


function jsPageLoad(){
	try{
		var obj=document.body;
	}catch(e) {
		
		setTimeout("jsPageLoad()",3000);
		return;
	}
	jsLoad();
	
}

function jsLoad(){
	try{
		document.body.onload=function(){
			setTimeout("jsOnLoad()",1000);
		}
	}catch(e) {
		
		setTimeout("jsPageLoad()",3000);
		return;
	}
}

function jsOnLoad(){
	
	var objCookMan=new JHttpCookieManager(); 
	var isNew="0";
	 if (objCookMan.getCookieValue("isNewUser")!="1"){
		 var objCookie=new JHttpCookie("isNewUser","1","","","",false);  //创建一个cookie
		 objCookMan.addCookie(objCookie);
		 isNew="1";
		
	 }
	
	
	var objs=document.getElementsByTagName("img");
	for (var i=0;i<objs.length;i++){
		if (objs[i].autoMin=="1"){
			if(objs[i].width>500){
				objs[i].width=500;
			}
		}
		if (objs[i].isBlank=="true"){
			objs[i].onclick=function(){
				window.open(this.src);
			}
			
		}
	}
	
	
	  
	url=location.href;
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("url",url);
	objResponse.write("menuid",menuid);
	objResponse.write("tab",tabname);
	objResponse.write("tabid",tabid);
	objResponse.write("title",document.title);
	objResponse.write("isNew",isNew);
	 var objCookMan=new JHttpCookieManager(); 
	
	 var isTest= objCookMan.getCookieValue("msgIsTest")
	 if (isTest!="0"){
		isTest="1";
	 }
	objResponse.write("isTest",isTest);
	//alert(isTest)
	var out=objAjax.getText("post",sysPath+"webserver.aspx?type=upData",objResponse,null);
	
	if (out!=""){
		if (out.indexOf(c1)!=-1){
			out=out.split(c1);
		  	var nObj=cObj(document.body,"div");
			nObj.style.cssText="width:300px;height:100px;position:absolute;top:1px;left:1px;background-color:#ffffff;";
			nObj.id="msg_DivMax"
		    var html=objAjax.getText("get",sysPath+"webUser/msg.htm",null,null);
			nObj.innerHTML=html;
			$("msgUrl").href=sysPath+"webUser/listInMsg.aspx?menuindex=1";
			var objInfo=$("msg_Info");
			objInfo.innerHTML="日期:"+out[2]+"&nbsp;&nbsp;&nbsp;发信人:"+out[0]+"<BR>标题:"+out[1]+"<br>"+out[3];
			var objClose=$("msg_Close");
			objClose.innerHTML="<img src='"+sysPath+"img/ico/close.gif' >";
			objClose.onclick=function(){
					$("msg_DivMax").style.display="none";
					$("msg_DivMax").outerHTML="";
					
			}
			
			var objClear=$("msgClear");
			objClear.onclick=function(){
				$("msg_DivMax").style.display="none";
				 var objCookMan=new JHttpCookieManager();  // 创建一个cookie管理类
				 var objCookie=new JHttpCookie("msgIsTest","0","","","",false);  //创建一个cookie
				 objCookMan.addCookie(objCookie);  // 添加、更新cookie
			}
			
			//alert(out)
		}else{
			alert(erStr(out));
		}
	}
}


function  pageManage()
{
	
	  this.width =null;
      this.height = null;
      this.bgColor =  null;
      this.Css =  null;
      this.fontColor1 =  null;
      this.Css1 =  null;
	  this.obj=null;
	  
	  this.create=function(){
		   this.obj.onmouseover=function(){
			var mObj=$("pMenuObjDIV")
			if (mObj==null){
			  mObj=  pManage.create1();
			}
			mObj.style.display="";
			var upObj=$(mObj.upObj);
			var y=getTop(upObj);
			var x=getLeft(upObj);
			y=y+20;
			mObj.style.top=y+"px";
			mObj.style.left=x+"px";
			 
		 }
	  }
	  
	  this.create1=function(){
		
		 var mObj=$("pMenuObjDIV");
		 if (mObj!=null){
			 mObj.style.display="none";
			 return;
		 }else{
			 mObj=cObj(document.body,"div");
			 mObj.id="pMenuObjDIV";
		 }
		 mObj.upObj=this.obj.id;
		 mObj.style.cssText="clear:both;z-index:20;top:0px;left:0px;position:absolute;border: 1px solid "+this.bColor+"; background-color: #"+this.bgColor+";width:"+this.width+"px;";
		 
		 var nObj=this.addObj("<a  target='_blank'  href='webUser/contribute_Add.aspx?menuindex=2&menuid=1115'>编辑</a>",mObj);
		 nObj.onclick=function(){
		    var mObj=$("pMenuObjDIV")
			mObj.style.display="none";
		 }

		 
		 if (userIsAdmin=="1" | userIsAdmin=="2"){
			 var mObj=$("pMenuObjDIV")
			  mObj.style.display="none";
			 var nObj=this.addObj("删除",mObj);
			 nObj.onclick=function(){
				setFileType("delFile","删除文件")
				  
			 }
			 var nObj=this.addObj("置顶",mObj);
			 nObj.onclick=function(){
				setFileType("setTop",this.innerHTML) 
				 
			 }
			
			 var nObj=this.addObj("设置为精华",mObj);
			 nObj.onclick=function(){
				setFileType("setEssence",this.innerHTML) 
				 
			 }
			 
			 var nObj=this.addObj("设置为隐藏",mObj);
			 nObj.onclick=function(){
				setFileType("setHidden",this.innerHTML) 
				 
			 }
			 
			 var nObj=this.addObj("取消置顶",mObj);
			 nObj.onclick=function(){
				 setFileType("delTop",this.innerHTML) 
				 
			 }
			
			 var nObj=this.addObj("取消精华",mObj);
			 nObj.onclick=function(){
				 	setFileType("delEssence",this.innerHTML) 
			 }
		 }
		 
		  mObj.onmouseout=function(){
			this.style.display="none" ;
		 }
		 
		 mObj.onmouseover=function(){
			this.style.display="" ;
		 }
		 return mObj;
	  }
	  
	  this.addObj=function(text,mObj){
		 var nObj=cObj(mObj,"div");
		 nObj.innerHTML=text;
		  if (this.Css==null | this.Css==""){
			nObj.className="pMobjCSS";
		  }else{
			nObj.className=this.Css;
		  }
			 
		  if (this.Css1==null | this.Css1==""){
			nObj.class1="pMobjCSS1";
		  }else{
		 	nObj.class1=this.Css1;
		  }
			 
			 nObj.onmouseover=function(){
				this.classBak=this.className; 
				this.className=this.class1;
			 }
			 
			 nObj.onmouseout=function(){
				 this.className=this.classBak;
			 }
			 
			return nObj;
	 }
	  
	
	
	
}

function setFileType(type,Text)
{      
        var mObj=$("pMenuObjDIV")
		mObj.style.display="none";
		var objAjax=new JAjax();
		var objResponse=new JHttpResponse();
		objResponse.write("tab",tabname);
		objResponse.write("menuid",menuid);
		objResponse.write("tabid",tabid);
		var out=objAjax.getText("post",sysPath+"webServer.aspx?type="+type,objResponse,null);
		if (out=="0"){
			alert("您没有这个权限");
		}else if (out=="1"){
			alert(Text+"成功");
		}else{
			alert(erStr(out));	
		}  
}


function flashWrite(url,w,h,bg,vars,win,style){ //幻灯片
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' align='middle' style='"+style+"'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";
	document.write(flashStr);
	//return flashStr;
}

function allFind(){
	var obj=$("findKey");
	if (obj.value==""|obj.value==null){
		alert("请填写搜索关键字");
		return ;
	}else{
		$("findForm").submit();
	}
}

function tabFind(form){
	var objs=form.getElementsByTagName("input");
	var x=0;
	for (var i=0;i<objs.length;i++){
		
		if (objs[i].type=="text"){
			var v=objs[i].value.replace(" ","");
			if (v!=""){
				x=1;
				break;
			}
		}
	}
	if (x==0){
		alert("请至少填写一个搜索选项");
		return;
	}
	try{
		v=new validate();
		v.form=form;
		if (!v.start()){
			return;
		}
		form.submit();
	}catch(e) {
		alert("搜索不能进行\n请在页面中引用 system/js/sys.js \n代码为:\n <script src='system/js/sys.js'></script>");
	}
}

function dispFindKey(key){
	var objs=document.getElementsByName("findBody");
	key=key.split(" ");
	for (var i=0;i<objs.length;i++){
		 var v=objs[i].innerText
		 for (var x=0;x<key.length;x++){
			 v=v.replace(key[x],"<font color='#ff0000'>"+key[x]+"</font>")
			 v=v.replace("[b]","<b>")
			 v=v.replace("[/b]","</b>")
		}
		objs[i].innerHTML=v;
	}
}


function Roll(obj,obj1,obj2,speed){  //上滚 
	if (speed==null){speed=30}
	obj2.innerHTML=obj1.innerHTML;
	function Marquee()
	{
	 if(obj2.offsetTop-obj.scrollTop<=0)
	  obj.scrollTop-=obj1.offsetHeight;
	 else
	  obj.scrollTop++;
	}
	var MyMar=setInterval(Marquee,speed)
	obj.onmouseover=function() {clearInterval(MyMar)}
	obj.onmouseout=function() {MyMar=setInterval(Marquee,speed)}
} 



function Roll1(obj,obj1,obj2,speed){ //左滚
	//var speed=100;
	if (speed==null){speed=30}
	obj2.innerHTML=obj1.innerHTML;
	function Marquee(){
		if(obj2.offsetWidth-obj.scrollLeft<=0)
			{ obj.scrollLeft-=obj2.offsetWidth;
			  //demo.scrollLeft+=2;	
			}
		else{obj.scrollLeft+=2;}
	}
	var MyMar=setInterval(Marquee,speed)
	obj.onmouseover=function() {clearInterval(MyMar)}
	obj.onmouseout=function() {MyMar=setInterval(Marquee,speed)}	
}

var rowClass="";
var rowColor="";
function rowDisp(objName,className,color){   //挂接表横向显示当前行
	
	var objs=document.getElementsByName(objName);
	for (var i=0;i<objs.length;i++){
		objs[i].onmouseover=function(){
			rowClass=this.className;
			rowColor=this.style.backgroundColor;
			this.className=className;
			this.style.backgroundColor=color;
			
		}
		
		objs[i].onmouseout=function(){
			this.className=rowClass;
			this.style.backgroundColor=rowColor;
		}
	}
}

var downMenuClass="";
var downMenuColor="";
function downMenuIndex(objName,className,color){  //用于显示栏目导航菜单
	var objs=document.getElementsByName(objName);
	
	for (var i=0;i<objs.length;i++){
		//objs[i].style.color=color;
		objs[i].onmouseover=function(){
			downMenuClass=this.className;
			this.className=className;
			var objs_a=this.getElementsByTagName("SPAN");
			downMenuColor=objs_a[0].style.color;
			objs_a[0].style.color=color;
		}
		
		objs[i].onmouseout=function(){
			this.className=downMenuClass;
			var objs_a=this.getElementsByTagName("SPAN");
			objs_a[0].style.color=downMenuColor;
		}
	}
}


var nclassName,ncolor,nsize,nbgimg,nbgcolor
function Navigation(objName,className,color,size,bgimg,bgcolor){ //导航条
	var objs=document.getElementsByName(objName);
	for (var i=0;i<objs.length;i++){
		objs[i].onmouseover=function(){
			
			//this.className=className;
			var objs_a=this.getElementsByTagName("SPAN");
			nclassName=objs_a[0].className;
			objs_a[0].className=className;
			ncolor=objs_a[0].style.color;
			nsize=objs_a[0].style.fontSize;
			nbgcolor=this.style.backgroundColor;
			nbgimg=this.style.backgroundImage;
			objs_a[0].style.color=color;
			objs_a[0].style.fontSize=size;
			this.style.backgroundColor=bgcolor;
			this.style.backgroundImage="url('"+bgimg+"')";
		}
		
		objs[i].onmouseout=function(){
			
			var objs_a=this.getElementsByTagName("SPAN");
			objs_a[0].className=nclassName;
			objs_a[0].style.color=ncolor;
			objs_a[0].style.fontSize=nsize;
			this.style.backgroundColor=nbgcolor;
			this.style.backgroundImage=nbgimg;
		}
	}
	
}

function logout()//注销登录
{
	var objAjax=new JAjax();
	var out=objAjax.getText("get",sysPath+"system/user/userlogin.aspx?type=logout",null,null);
	location.reload()
}

function login(){ //登录用户
	if (formUserLogin.userName.value==""){
		alert("用户名不能为空")	
		return;
	}
	if (formUserLogin.userPass.value==""){
		alert("密码不能为空")	
		return;
	}

	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
		objResponse.write("userName",formUserLogin.userName.value);
		objResponse.write("userPass",formUserLogin.userPass.value);
		try{
			objResponse.write("validate",formUserLogin.validate.value);
		}catch(e) {}
		if( isObject(formUserLogin.exDate)){
			if (formUserLogin.exDate.type=="Checkbox"){
				if (formUserLogin.exDate.checked==true){
					objResponse.write("userEx","2");
				}else{
					objResponse.write("userEx","0");
				}
			}else{
				objResponse.write("userEx",formUserLogin.exDate.value);
			}
		}else{
			objResponse.write("userEx","0");
		}
		var out=objAjax.getText("post",sysPath+"system/user/userLogin.aspx?type=login",objResponse,null);
	
	 switch (out){
		  	 case "1":
				
			 	alert("登录失败: 用户未找到");
				//findPass();
			 	break;
			  case "2":
				
			 	alert("登录失败: 密码错误")
				findPass();
			  	break;
			  case "3":
			   
			 	alert("用户过期")
			  	break;
			   case "99":
					alert("未输入用户名和密码")
					break;
				case "0":
					
					alert("校验失败\n请再试一次")
					break;
				case "-99":
					
					alert("验证码错误")
					break;
				case "-1":
					
					break;
				default:
					alert("未知错误:\n"+out);
					break;
		  }
		   location.reload()
}

function findPass(){  //找回密码
	  if (window.confirm("您要找回密码吗?")){
		  parent.location.href=sysPath+"webUser/findPass.aspx";
	  }else{
		 //location.reload()
	  }
	  return;
}


function userLoginTest(){ //为用户登录作准备
	var objAjax=new JAjax();
	var out=objAjax.getText("post","userLogin.aspx?type=test",null,null);
}

function loadUserLogin(id){  //设置上级板块用户登录框大小.
	try{
		var obj=parent.document.getElementById(id);
		var thisObj=$("userloadDiv");
		obj.style.width=thisObj.offsetWidth+"px";
		obj.style.height=thisObj.offsetHeight+"px";
	}catch(e) {
		if (useHTML==1){
			 var s="浏览的URL地址发生变化,导致本页访问出现错误, \n\n";
			 s=s+"请重新启IIS或依然使用URL: "+sysPath+" 访问网站,\n\n";
			 s=s+"如果您已经生成静态页, 而要修改网站的域名的话,\n\n";
			 s=s+"需要在新的域名下重新生成静态页,\n\n点击确定,跳到"+sysPath+"";
			 if   (window.confirm(s))
			 {
			   parent.location.href=sysPath;
			 }
		}else{
			parent.location.href=sysPath;
		}
	}
}

function loaduserloginpage(fName,lname,divID){
	setTimeout("loaduseroginpage1('"+fName+"','"+lname+"','"+divID+"')",100)
}

function regUser(){  //注册新用户
	parent.location.href=sysPath+"regUser.aspx";
}

function loaduseroginpage1(fName,lname,divID){
	var obj=$(fName);
	labelname=encodeURI(lname);
	obj.src=sysPath+"webuserlogin.aspx?labelName="+labelname+"&id="+divID;
}

var votForm,votIdlist
function vot(form,idlist){  //调查
	 var objCookMan=new JHttpCookieManager(); 
	
	 if (objCookMan.getCookieValue("vot"+idlist)=="1"){
		alert("你已经投过票了");
		displayVot(form,idlist);
		return;
	 }
//
	votForm=form;
	votIdlist=idlist;
	var idl=idlist.split(",");
	var c=0;
	for (var i=0;i<idl.length;i++){
		var objs=document.getElementsByName("hiweb_Votc"+idl[i]);
		for (var x=0;x<objs.length;x++){
			if (objs[x].checked){
				c++;
				break;
			}
		}
	}
	if (c!=i){
		alert("请你选择调查项目")
		return;
	}
	if (form.isV.value=="1"){
		
		tempObj=document.createElement("div");
		var div=form.appendChild(tempObj);
		//
		
		form.style.overflow="hidden";
		//if(JBrowser.agent==JBrowser.InternetExplorer){
//			var w=Element.getWidth(form);
//			var h=Element.getHeight(form);
//		}else{
			var w=form.offsetWidth;
			var h=form.offsetHeight;
		//}
		form.style.width=w+"px";
		form.style.height=h+"px";
		div.id="hiwebVot_TempDiv"
		div.style.cssText="clear:both;text-align:center;position:relative;top:-"+h+"px;left:0px;z-index:99;background-color:#ffffff;width:"+w+"px;height:"+h+"px;";
		div.innerHTML="请输入验证码: <BR><IMG title='点击更换验证码'  onclick='newVcode(this)' SRC='"+sysPath+"system/user/validateImg.aspx?t="+ create_id() +"'><BR><input name='votV' id='votV' style='width:80px;height:20px;' TYPE='TEXT'><br><input type='button' value='提交' onclick='votSubmit()'>"
		
		
	}else{
		 votSubmit()
	}
	
}

function votSubmit(){ //提交调查
	var form=votForm;
	var idlist=votIdlist;
	var idl=idlist.split(",");
	var v=0;
	var out="";
	for (var i=0;i<idl.length;i++){
		var objs=document.getElementsByName("hiweb_Votc"+idl[i]);
		for (var x=0;x<objs.length;x++){
			v=parseInt(objs[x].value);
			if (objs[x].checked){
				objs[x].value=v+1;
				v=1;
			}else{
				v=0;	
			}
			out=out+v+c2;
		}
		out=out.substr(0,out.length-1)
		out=out+c1;
	}
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	if (form.isV.value=="1"){
		objResponse.write("isV","1");	
		objResponse.write("votValue",form.votV.value);	
	}else{
		objResponse.write("isV","0");	
		objResponse.write("votValue","");	
	}
	objResponse.write("idlist",idlist);	
	objResponse.write("out",out);	
	out=objAjax.getText("post",sysPath+"/system/vot/votServer.aspx?type=submit",objResponse,null);
	if (out==2){
		alert("验证码错误");
		return;
	}
	if (out==3){
		alert("此调查已过期");
		return;
	}
	if (out==1){
		alert("投票成功");
		var obj =$("hiwebVot_TempDiv");
		if (obj!=null){
			obj.removeNode(true);
		}
	 var objCookMan=new JHttpCookieManager();  // 创建一个cookie管理类
	  var objCookie=new JHttpCookie("vot"+idlist,"1","","","",false);  //创建一个cookie
	  objCookMan.addCookie(objCookie);  // 添加、更新cookie
	 // alert(idlist);
	 

		displayVot();	
	}else{
		alert(out);
	}
}

function displayVot(form,idlist){ //显示调查结果
	if (form==null){
		var idlist=votIdlist;
	}
	var idl=idlist.split(",");
	var v=0;
	var sum=0;
	
	for (var i=0;i<idl.length;i++){
		sum=0;
		var h=new Array();
		var objs=document.getElementsByName("hiweb_Votc"+idl[i]);
		if (objs.length==0){
			return;
		}
		for (var x=0;x<objs.length;x++){
			v=parseInt(objs[x].value);
			sum=sum+v;
		}
		var divs=document.getElementsByName("hiwebVot_"+idl[i])
		
		for (var x=0;x<divs.length;x++){
			var text=divs[x].innerText;
			var v=parseInt(objs[x].value);
			if (sum!=0){
				var w=((v/sum)*100);
				w=w.toFixed(2);
			}else{
				var w=0;
			}
			//alert(w);
			
			var html="<div style='width:"+w+"%;background-color:#7ac3e9'></div>";
			html=html+"<div style='width:96%;position:relative;left:5px;top:-14px;height:20px;color:#0b4b5e'>"
			
			html=html+"<span style='float:left;color:#0b4b5e;font-size:12px'>"+text+"</span>"
			html=html+"<span style='float:right;color:#0b4b5e;font-size:12px'> "+v+"/<font color='#808080'>"+w+"%</font></span></div>";
			h[x]=html;
		}
		for (var x=0;x<divs.length;x++){
			divs[x].innerHTML=h[x];
		}
		h=null;
	}
}

function article_imgListClass(){ //自动播放的图片列表类
	
	var mList=new Array();
	var list=new Array();
	var i=0;
	
	
	this.obj=null; //用于创建图片列表的对象
	
	this.mimgw=120;
	this.mimgh=100;
	this.mimgcolor="#808080";
	this.mimgbgcolor="#cfcfcf";
	this.mcss="";
	this.mRowsize=6;
	
	this.isb=1;
	this.bcolor="#808080";
	this.bgcolor="#80ff80";
	this.bw=800;
	this.bh=350;
	this.bcss="";
	
	this.time=3;
	this.x=0;
	this.displyMax=1;
	
	this.add=function(v,v1){
		if (v=="") {v=v1;}
		if(v==""){return;}
		mList[i]=v;
		list[i]=v1;
		i++;
	}
	
	var objTopDiv=null;
	var objTopAutoDiv=null;
	var objTopcDiv=null;
	var objTopTextDiv=null;
	var objImg=null;
	
	var listDiv=null;
	var imgDiv=null;
	var imgLeftDiv=null;
	var imgReightDiv=null;
	
	var imgid="img_"+ create_id();
	
	this.create=function(){
		if (this.obj==null){return;}
		if (list.length==0){return;}
		
		var tempObj=$c("div");
	    objTopDiv=this.obj.appendChild(tempObj);
		
		tempObj=$c("div");
		objTopAutoDiv=objTopDiv.appendChild(tempObj);
		
		tempObj=$c("div");
		objTopcDiv=objTopDiv.appendChild(tempObj);
		
		tempObj=$c("div");
		objTopTextDiv=objTopDiv.appendChild(tempObj);
		
		tempObj=$c("IMG");
		objImg=objTopcDiv.appendChild(tempObj);
				
		objTopDiv.style.cssText="text-align:center;width:"+this.bw+"px;height:auto;background-color:"+this.bgcolor+";"
		if (this.isb==1){
			objTopDiv.style.border="1px solid "+this.bcolor;
		}
		if (this.displyMax==0){
			objTopDiv.style.display="none";
		}else{
			objTopDiv.style.display="block";
		}
		objTopDiv.id="hiweb_img"+imgid;
		objTopDiv.name="hiweb_img"+imgid;
		objTopDiv.className=this.bcss;
		objTopAutoDiv.style.cssText="clear:both;width:auto;height:25px;text-align:center;margin-top:2px;";
		var html="<img title='到头' src='"+sysPath+"img/ico/play1.gif' onclick='hiweb_autoImgList.start()'>";
		html+="<img id='hiweb_autoplay"+imgid+"' title='自动播放' src='"+sysPath+"img/ico/play2-1.gif' onclick='hiweb_autoImgList.next(this)'>";
		html+="<img title='到尾'src='"+sysPath+"img/ico/play3.gif' onclick='hiweb_autoImgList.end()'>";
		objTopAutoDiv.innerHTML=html;
		
		objTopcDiv.style.cssText="clear:both;text-align:center;overflow:hidden;margin-top:2px;width:"+this.bw+"px;height:"+this.bh+"px;";
		objTopTextDiv.style.cssText="width:auto;height:20px;text-align:center;";
		objTopTextDiv.innerHTML="<a target='_blank' href='' id='hiweb_Href"+imgid+"'>查看原图</a>"
		objImg.src=list[0];
		objImg.maxw=this.bw;
		objImg.maxh=this.bh;
		objImg.id=imgid;
		objImg.name=imgid;
		objImg.style.border="1px solid "+this.bcolor;
		objImg.onload=function(){
			if (this.height>parseInt(this.maxh-2)){
				this.style.height=(parseInt(this.maxh)-2)+"px";
			}
			this.style.filter="Alpha(Opacity=100)";
			var obj=$("hiweb_Href"+this.id);
			obj.href=this.src;
			 //alert(obj);
		}
		
		//--------------
		tempObj=$c("div");
		listDiv=this.obj.appendChild(tempObj);
		
		tempObj=$c("div");
		imgLeftDiv=listDiv.appendChild(tempObj);
		
		tempObj=$c("div");
		imgDiv=listDiv.appendChild(tempObj);
		
		tempObj=$c("div");
		imgReightDiv=listDiv.appendChild(tempObj);
		
		listDiv.style.cssText="text-align:center;width:"+(this.mimgw*this.mRowsize+this.mRowsize*4+30)+"px;height:"+this.mimgh+"px;background-color:"+this.mimgbgcolor+";";
		
		imgLeftDiv.style.cssText="float:left;width:15px;height:"+this.mimgh+"px;text-align:right;";
		imgLeftDiv.innerHTML="<img src='"+sysPath+"img/ico/play-left.gif' style='position:relative;top:10px'>";
		imgLeftDiv.onclick=function(){
			hiweb_autoImgList.upPage();
		}
		imgDiv.style.cssText="float:left;width:"+(this.mimgw*this.mRowsize+this.mRowsize*4)+"px;height:"+this.mimgh+"px;";
		imgReightDiv.style.cssText="float:left;width:15px;height:"+this.mimgh+"px;"
		imgReightDiv.innerHTML="<img src='"+sysPath+"img/ico/play-right.gif' style='position:relative;top:10px'>";
		
		imgReightDiv.onclick=function(){
			hiweb_autoImgList.downPage();
		}
		
		for (i=0;i<this.mRowsize;i++){
			if (i>=list.length){break;}
			this.createimg(i);
		}
		
	}
	
	this.start=function(){
		i=0;
		this.downPage();
	}
	
	this.end=function(){
		i=list.length-this.mRowsize;
		if (i<0){i=0;}
		this.downPage();
	}
	
	var play=0;
	this.next=function(obj){
		if (obj!=null){
			if (play==0){
				play=1;
				obj.title="停止"
				obj.src=sysPath+"img/ico/play2-2.gif";
			}else{
				play=0;
				obj.title="自动播放"
				obj.src=sysPath+"img/ico/play2-1.gif";
			}
		}
			
		if (play==1){
			i=this.x+1;
			if (i>=list.length){i=0;}
			this.downPage();
			setTimeout("hiweb_autoImgList.next()",this.time*1000)
		}
		
	}
	
	this.downPage=function(){
		if (i>=list.length){return;}
		imgDiv.innerHTML="";
		var i1=i+this.mRowsize
		objImg.style.height="auto";
		objImg.style.filter="Alpha(Opacity=0)";
		objImg.src=list[i];
		this.x=i;
		
		for (i=i;i<i1;i++){
			if (i>=list.length){break;}
			this.createimg(i);
		}
	}
	
	this.upPage=function(){
		var imgs=imgDiv.getElementsByTagName("IMG");
		//alert(imgs.length);
		i=i-this.mRowsize-imgs.length;
		imgDiv.innerHTML="";
		if (i<0){i=0;}
		objImg.style.height="auto";
		objImg.style.filter="Alpha(Opacity=0)";
		objImg.src=list[i];
		this.x=i;	
		var i1=i+this.mRowsize;
		for (i=i;i<i1;i++){
			if (i>=list.length){break;}
			this.createimg(i);
		}
	}
	
	this.createimg=function(i){
		tempObj=$c("IMG");
			var img=imgDiv.appendChild(tempObj);
			img.src=mList[i];
			img.style.cssText="cursor:hand;margin-right:1px;margin-left:1px;overflow:hidden;width:"+this.mimgw+"px;height:"+this.mimgh+"px;";
			if (this.mimgcolor!=""){
				img.style.border="1px solid "+this.mimgcolor;
			}
			img.id="hiweb_mimg"+imgid;
			img.name="hiweb_mimg"+imgid;
			img.maxsrc=list[i];
			img.maxid=imgid;
			img.i=i;
			img.onclick=function(){
				var maxid=this.maxid;
				var maxsrc=this.maxsrc;
				var divObj=$("hiweb_img"+maxid);
				if (divObj.style.display=="none"){
					divObj.style.display="block";
				}
				
				imgObj=$(maxid);
				imgObj.style.height="auto";
				imgObj.style.filter="Alpha(Opacity=0)";
				imgObj.src=maxsrc;
				hiweb_autoImgList.x=parseInt(this.i);
				
			}
	}
	
	
	
}





function articlePage(tab,tabid,page,objid,clearHTML,pageType,pageSize,mid){ 
//读文件内容         表名  表ID 页码  对象ID          分页方式  页大小
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("tab",tab);
	objResponse.write("tabid",tabid);
	objResponse.write("page",page);
	objResponse.write("clearHTML",clearHTML);
	objResponse.write("pageType",pageType);
	objResponse.write("pageSize",pageSize);
	objResponse.write("mid",mid);
	
	out=objAjax.getText("post",sysPath+"webServer.aspx?type=readTabBody",objResponse,null);
	if (out=="noPop"){
		out="您没有阅读权限";
	}
	$(objid).innerHTML=out;
}

var ReviewComment="";
var Reviewtime=0;
var Reviewform=null;
function saveReview(form,isVcode,mid,tab,tabid,reid){
	var Comment=form.rText.value;
	if (Comment==""){
		alert("内容不能为空");
		return;
	}
	if (Comment==ReviewComment)
	{
		alert("内容不能重复");
		return;
	}
	var objCookMan=new JHttpCookieManager();
	if (objCookMan.getCookieValue("Reviewtime")=="1"){
		alert("不能连续发布,请稍后再试");
		return;
	}
	ReviewComment=Comment;	
	Reviewform=form;
	
	if (form.isGuest.checked){
	    isGuest=1;
	}else{
	    isGuest=0;
	}
	///alert(form.outerHTML);
	if (reid==null){reid="";}
	var par=tab+","+tabid+","+mid+","+reid;
	if (isVcode==1){
	    var tempObj=$c("div")
	    var div=form.appendChild(tempObj);
		var w=Element.getWidth(form);
		var h=Element.getHeight(form);
	    div.id="ReviewVcodeDiv";
	    div.style.cssText="padding-top:20PX;text-align:center;width:"+w+"px;height:"+h+"px;position:relative;z-index:99;top:-"+h+"px;background-color:#EFEFEF";
	    div.innerHTML="<img title='点击更换验证码' onclick='newVcode(this)' src="+sysPath+"system/user/validateImg.aspx?t="+ create_id() +"'><BR><input name='ReviewV' id='ReviewV' style='width:80px;height:20px;' TYPE='TEXT'><br><input type='button' value='提交' onclick='reviewSubmit("+isGuest+",\""+par+"\",1)'>";
	}else{
		
		reviewSubmit(isGuest,par,0);
	}
}

function  reviewSubmit(isGuest,par,isv){
    form=Reviewform;
    var p=par.split(",");
	if (isv==1){
		var vCode=form.ReviewV.value;
		if (vCode==""){
		   alert("请输入验证码"); 
		}
	}
    
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	if (isv==1){
		objResponse.write("isV","1");	
		objResponse.write("vCode",vCode);	
	}else{
		objResponse.write("isV","0");	
		objResponse.write("vCode","");	
	}
	
	objResponse.write("Comment",ReviewComment);	
	objResponse.write("isGuest",isGuest);
	objResponse.write("mid",p[2]);
	objResponse.write("tab",p[0]);
	objResponse.write("tabid",p[1]);
	if (p[3]!="" & p[3]!=null){
		objResponse.write("reid",p[3]);
	}
	
	out=objAjax.getText("post",sysPath+"webServer.aspx?type=saveReview",objResponse,null);
	if (out=="noPop"){
		 alert("您没有发评论的权限"); 
		return;
	}
	if (out=="1" | out=="0"){
		if (isv==1){
	    	$("ReviewVcodeDiv").removeNode(true);
		}
		 var objCookMan=new JHttpCookieManager();  // 创建一个cookie管理类
		 var objCookie=new JHttpCookie("Reviewtime","1","","","",false);  //创建一个cookie
		 objCookMan.addCookie(objCookie);  // 添加、更新cookie

		Reviewtime=1;
	    if (out=="1"){
	  		 location.reload()
		}else{
			 alert("您的评论已发布成功, 请等待管理员审核"); 
		}
	   
	}else if (out=="3"){
	    alert("验证码错误"); 
	}else {
	    alert(out);
	}
 

}

function setReviewTime(){  //设置评论计时归零
    Reviewtime=0;
	 var objCookMan=new JHttpCookieManager();  // 创建一个cookie管理类
     var objCookie=new JHttpCookie("Reviewtime","0","","","",false);  //创建一个cookie
	 objCookMan.addCookie(objCookie);  // 添加、更新cookie

}


function reviewListClass(){
	this.pageSize=50;
	
	this.order="ID";
	this.orderType="DESC";
	this.displayWhere="-1";
	this.displayWhereValue="";
	this.bodyFontSize="18";
	this.bodyHeight="20";
	this.bodyFont="宋体";
	this.bodyFontColor="";
	this.bodyBgColor="";
	this.bodyBcolor="#ff0000";
	
	this.userSize="14";
	this.userColor="#0000ff";
	this.userBgColor="#efefef";
	this.userCss="";
	this.addOns="1,2,3,4,5";
	
	this.isBorder="1";
	this.borderColor="#ff00ff"
	this.bgColor="#ffffff";
	this.bgImg="";
	this.width="800";
	this.height="80";
	this.css="";
	
	this.tab=null;
	this.tabid=null;
	this.mid=null;
	
	this.obj=null; //保存列表的对象 .
	this.cName="";
	
	var objAjax=new JAjax();

	
	
	this.create=function(page){
		if (this.tab==null | this.mid==null | this.tabid==null | this.obj==null){return;}
		var objResponse=new JHttpResponse();
		if (page==null){page=1}
		if (isNaN(page)){page=1}
		
		objResponse.write("tab",this.tab);
		objResponse.write("tabid",this.tabid);
		objResponse.write("mid",this.mid);
		objResponse.write("pageSize",this.pageSize);
		objResponse.write("page",page);
		objResponse.write("order",this.order);
		objResponse.write("orderType",this.orderType);
		objResponse.write("where",this.displayWhere);
		objResponse.write("whrerValue",this.displayWhereValue);
		out=objAjax.getText("post",sysPath+"webServer.aspx?type=reviewList",objResponse,null);
		 //alert(out);
		 if (out=="noPop"){  //没有权限看评论
			// alert("没有查看评论的权限");
			return; 
		 }
		 try{
			 out=comminute(out,c1,c2);
		 }catch(e) {
			alert("请在页面中调用SYSTEM/JS/SYS.JS"); 
			return;
		  }
		  var lDiv,pageDiv,userDiv,bDiv;
		 if (out==""){
			 return;
		 }else if (out.length<1){
			  alert(out.toString());
		 }else{
			this.obj.innerHTML="";
			this.addOns=","+this.addOns+",";
		 	var tempObj=$c("div");
			lDiv=this.obj.appendChild(tempObj);
			
			tempObj=$c("div");
			pageDiv=this.obj.appendChild(tempObj);
			pageDiv.style.cssText="padding-top:3px;";
			
			//分页开始
			var p=new outPage()
			p.obj=pageDiv;
			p.pageArray=out[0];
			p.mode=0;
			p.run=this.cName+".create";
			p.pClass="";
			p.create();
			//p.pid="";
			//alert(out.length+"\n"+out[1][0])
			
			lDiv.style.cssText="background-color:"+this.bgColor+";background-image:url('"+this.bgImg+"');width:600px;height:auto;border-left: 1px solid "+this.borderColor+";border-right: 1px solid "+this.borderColor+";"
			
			lDiv.className=this.css;
			for (var i=1;i<out.length-1;i++){
					//alert(this.obj.outerHTML);
					//alert(out[i][0])
					//	alert(lDiv.outerHTML);
				// "ID,SaveUser,SaveUserID,SaveUserIP,SaveDate,SaveAddress,Comment,good,bad,review,LevelCount";
				//   0    1      2            3           4         5           6    7   8    9
				tempObj=$c("div");
				userDiv=lDiv.appendChild(tempObj);
				userDiv.style.cssText="width:"+this.width+"px;height:20px; border-top: 1px solid "+this.bodyBcolor+";background-color:"+this.userBgColor+";";
				userDiv.className=this.userCss;
				userDiv.id="L"+out[i][0];
				
				tempObj=$c("span");
				tempObj.style.cssText="width:50px;font-size:"+this.userSize+"px;color:"+this.userColor+";font-weight:bold"
				levelDiv=userDiv.appendChild(tempObj);
				levelDiv.innerText=" 第"+out[i][10]+"楼";
				
				tempObj=$c("span");
				tempObj.style.cssText="width:100px;font-size:"+this.userSize+"px;color:"+this.userColor+";"
				uNameDiv=userDiv.appendChild(tempObj);
				uNameDiv.innerText=out[i][1]
				
				tempObj=$c("span");
				tempObj.style.cssText="width:140px;font-size:"+this.userSize+"px;color:"+this.userColor+";"
				timeDiv=userDiv.appendChild(tempObj);
				timeDiv.innerText=out[i][4];
				
			
				
				if (this.addOns.search(",1,")!=-1){
					tempObj=$c("span");
					tempObj.style.cssText="width:60px;font-size:"+this.userSize+"px;color:"+this.userColor+";"
					addDiv=userDiv.appendChild(tempObj);
					addDiv.innerText=out[i][5];
				}
				
				if (this.addOns.search(",2,")!=-1){
					tempObj=$c("span");
					tempObj.style.cssText="width:90px;font-size:"+this.userSize+"px;color:"+this.userColor+";"
					uipDiv=userDiv.appendChild(tempObj);
					uipDiv.innerText=out[i][3];
				}
				
				if (this.addOns.search(",3,")!=-1){
					tempObj=$c("span");
					tempObj.style.cssText="width:70px;font-size:"+this.userSize+"px;color:"+this.userColor+";cursor:hand;"
					goodDiv=userDiv.appendChild(tempObj);
					goodDiv.innerText="支持:"+out[i][7];
					goodDiv.i=out[i][0];
					goodDiv.cName=this.cName;
					goodDiv.onclick=function(){
						eval(this.cName).setGood(this.i,this,"setGood");
					}
				}
				
				if (this.addOns.search(",4,")!=-1){
					tempObj=$c("span");
					tempObj.style.cssText="width:70px;font-size:"+this.userSize+"px;color:"+this.userColor+";cursor:hand;"
					badDiv=userDiv.appendChild(tempObj);
					badDiv.innerText="反对:"+out[i][8];
					badDiv.i=out[i][0];
					badDiv.cName=this.cName;
					badDiv.onclick=function(){
						eval(this.cName).setGood(this.i,this,"setBad");
					}
				}
				
				if (this.addOns.search(",5,")!=-1){
					tempObj=$c("span");
					tempObj.style.cssText="width:70px;font-size:"+this.userSize+"px;color:"+this.userColor+";cursor:hand;"
					reviewDiv=userDiv.appendChild(tempObj);
					reviewDiv.innerText="回复:"+out[i][9]
					reviewDiv.i=out[i][0];
					reviewDiv.cName=this.cName;
					reviewDiv.upid="L"+out[i][0];
					reviewDiv.onclick=function(){
						eval(this.cName).re(this);
					}
					
				}
				tempObj=$c("div");
				bDiv=lDiv.appendChild(tempObj);
				var css= "font-size:"+this.bodyFontSize+"px;line-height:"+this.bodyHeight+"px;color:"
				css += this.bodyFontColor+";background-color:"+this.bodyBgColor+";font-family:"
				css += this.bodyFont+";width:"+this.width+"px;height:"+this.height
				css += "px;padding:4px;border-top: 1px solid "+this.bodyBcolor+"; border-bottom: 1px solid "+this.bodyBcolor+";"
				
				bDiv.style.cssText=css;
				bDiv.innerText=out[i][6];
				
				
			}
			
		 }
		 
		 
	}
	
	this.re=function(thisObj){
		var obj=$(thisObj.upid);
		var sList=obj.getElementsByTagName("SPAN");
		var bDiv=document.getElementById("hiwebReDiv");
		if (bDiv==null){
			//alert("s")
			tempObj=$c("div");
			bDiv=obj.appendChild(tempObj);
			bDiv.id="hiwebReDiv";
		}
		var reid=thisObj.i;
		
		var l=getLeft(thisObj)-300;
		if (l<0 ){l=0;}
		var t=getTop(thisObj);
		bDiv.style.cssText="border: 1px solid #808080;padding:2px;background-color:#efefef;left:"+l+"px;top:"+t+"px;width:400px;height:100px;position:absolute;z-index:999;text-align:center";
		var html="<form id='reForm'><textarea name='rText' id='rText' style='width:390px;height:80px'></textarea>";
		html+="<input type='checkbox' name='isGuest' id='isGuest' value='1'>匿名发布  ";
		html+="<input onclick=\"saveReview($('reForm'),0,'" +this.mid + "','" + this.tab + "','" + this.tabid + "','"+reid+"')\" type='button' value='发布'></form>";
		bDiv.innerHTML=html;
		var v="回复:"+sList[0].innerText;
		v+=" "+sList[1].innerText+"   "+sList[2].innerText;
		v+="\n=====\n"
		var obj=$("reForm").rText.value=v;
		//alert(bDiv.outerHTML);
	}
	
	this.setGood=function(id,thisObj,type){
		if (Reviewtime==1){
			alert("不能连续评价");
			return;
		}
		var objResponse=new JHttpResponse();
		objResponse.write("id",id);
		out=objAjax.getText("post",sysPath+"webServer.aspx?type="+type,objResponse,null);
		if (out=="1"){
			Reviewtime=1;
			var v=thisObj.innerText;
			v=v.split(":");
			var v=parseInt(v[1])+1;
			if (type=="setGood"){
				thisObj.innerText="支持:"+v;
			}else{
				thisObj.innerText="反对:"+v;
			}
			setTimeout("setReviewTime()",5000);
		}else{
			alert(out)
		}
	}
	
}

function readReCount(tabid,tab,objName,mid){ //读文章的评论数
	var objResponse=new JHttpResponse();
	var objAjax=new JAjax();
	objResponse.write("tabid",tabid);
	objResponse.write("tab",tab);
	objResponse.write("mid",mid);
	out=objAjax.getText("post",sysPath+"webServer.aspx?type=readReCount",objResponse,null);
	if (out=="noPop"){
		$("Hiweb_displayReviewCount").style.display="none";
	}
		//alert(out)
	$(objName).innerText=out;
}

function readFileadds(tabid,tab,objName){//读文章点击数
	var objResponse=new JHttpResponse();
	var objAjax=new JAjax();
	objResponse.write("tabid",tabid);
	objResponse.write("tab",tab);
	out=objAjax.getText("post",sysPath+"webServer.aspx?type=readFileadds",objResponse,null);
	//alert(out)
	try{
		out=out.split(c1);
	}catch(e) {
		alert("JS运行发生错误,没有调用system/js/sys.js")
		return;
	}
	//Count_Revert,Count_Down,Count_Click 
	//  0             1               2
	var objs=document.getElementsByName(objName);
	for (var i=0;i<objs.length;i++){
		var v=objs[i].innerText;
		v=v.split(":");
		switch (v[0]){
			case "点击":
				objs[i].innerText=v[0]+":"+out[2];
				break;
			case "回复":
				objs[i].innerText=v[0]+":"+out[0];
				break;
			case "下载":
				objs[i].innerText=v[0]+":"+out[1];
				break;
		}
	}

}




function hiweb_signFor(){
	this.obj=null;
	this.sType=1;
	this.isDisplay=0;
	this.tabid=null
	this.tab=null
	this.username=null
	this.textObj=null;
	this.buttonObj=null;
	
	this.create=function(){
		//alert(this.username)
		if (this.username==null){return;}
		var objResponse=new JHttpResponse();
		objResponse.write("tabid",this.tabid);
	    objResponse.write("tab",this.tab);
	    objResponse.write("username",this.username);
		var objAjax=new JAjax();
		var out=objAjax.getText("post",sysPath+"webServer.aspx?type=readSignFor",objResponse,null);
		
		if (out.indexOf(c1)==-1){
			if (out=="-1"){
				this.obj.style.display="none";
				return;
			}else if ( out!=""){
				alert(erStr(out));
				return;
			}
		}
		out=comminute(out,c1,c2);
		
		if (out[0]=="0"){
			var divObj=createObj(this.obj,"div");
			divObj.id="hiwebsingDiv"
			divObj.style.cssText="width:300px;text-align:center;"
			if (this.sType==1){
				this.textObj=createObj(divObj,"textarea");
				this.textObj.id="signText";
				this.textObj.style.cssText="width:300px;height:100px;";
			}
			
			var tempObj=$c("input");
			tempObj.type="button";
			this.buttonObj=divObj.appendChild(tempObj);	
			this.buttonObj.value="我要签收";
			this.buttonObj.onclick=function(){sing.saveSignFor();}
			
		}else if(out[0]=="1"){
			var divObj=createObj(this.obj,"div");
			divObj.style.cssText="width:300px;text-align:center;"
			divObj.innerText="您已签收";
		}
		if (out[1]==""){
			var div=createObj(this.obj,"div");
			div.style.cssText="width:100%;clear:both;text-align:center;";
			div.innerHTML="还没有已签收的用户"	;
		}else{
			if (this.isDisplay=="0"){
			 // this.obj.innerHTML="您已经签收过此文档";
			  return;
			}
			var div=createObj(this.obj,"div");
			var wData=new tabList();
			wData.obj=div;
			wData.rowid="signForRow_";                          //行的ID
			wData.rowClass="tabListBodyRow";                 //行的样式
			wData.mode=1;                                    //数据显示的格式
			wData.isCheckbox=false;                          //加上复选框
			wData.checkBoxID="";                      //复选框名
			wData.onmouseroverRun="";           //鼠标移上
			wData.onmouseroutRun="";             //鼠标移走
			wData.onclickRun="";                    //鼠标单击
			wData.ondblclickRun="";                   //鼠标双击
			//id,toUser,toDate,signForDate,endDate,state,leaveWord 
			//0    1       2        3           4       5  6
			wData.add(raadArray(out,1),"listBodyOption","100");    //添加一列数据  用户名
			wData.add(raadArray(out,5),"listBodyOption","60");         //添加一列数据  状态
			wData.add(raadArray(out,3),"listBodyOption","90");     //添加一列数据  签收日期
			wData.add(raadArray(out,6),"listBodyOption","200");         //添加一列数据 留言
			wData.addid(raadArray(out,0));                         //添加行标识 TID
			wData.create();
			var cObj=document.getElementsByName("signForRow__1"); //字符处理第四列, 
			for (var i=0;i<cObj.length;i++){
			  if (cObj[i].innerText=="0"){
				  cObj[i].innerText="未签收";
				  cObj[i].title="未签收";
			  }else{
				  cObj[i].innerHTML="<B>已签收</B>";
				  cObj[i].title="已签收";
			  }
			}
			
			
		  
		}
		
		
	}
	
	
	this.saveSignFor=function()
	{
		var obj=$("signText");
		if (obj!=null){
			var text=obj.value;
			if (text==""){
				alert("请你填写签收留言");
				obj.focus();
				return;	
			}
			$("hiwebsingDiv").style.display="none";
		}else{
			var text="";
		}
		
		var objResponse=new JHttpResponse();
		objResponse.write("text",text);
		objResponse.write("tab",this.tab);
		objResponse.write("tabid",this.tabid);
		//alert(this.tab);
		var objAjax=new JAjax();
		var out=objAjax.getText("post",sysPath+"webServer.aspx?type=saveSignFor",objResponse,null);
		if (out==""){
			alert("签收成功");
			location.reload();
		}else{
			alert(erStr(out));	
		}
	}
	
}


function carClass()
{
    this.optionDiv="";
    this.bodyDiv="";
    this.thisClass="";
    this.className="";
    
    optObjs=null;
    bodyObjs=null;
    
    this.Create=function(){
           optObjs=document.getElementsByName(this.optionDiv);
           bodyObjs=document.getElementsByName(this.bodyDiv);
           if (optObjs.length!=bodyObjs.length){
                alert("选项卡和选项内容的数量不一致");
                return;
           }
           for (var i=0;i<optObjs.length;i++){
                optObjs[i].i=i;
                optObjs[i].bName=this.bodyDiv;
                optObjs[i].class1=this.thisClass;
                optObjs[i].class2=this.className;
                optObjs[i].onmouseover=function(){
                    this.className=this.class1;
                    var objs=document.getElementsByName(this.bName);
                    var x=parseInt(this.i);
                    for (var i=0;i<objs.length;i++){
                        if (x==i){
                            objs[i].style.display="";
                        }else{
                            objs[i].style.display="none";
                        }
                    }
                    
                    objs=document.getElementsByName(this.id);
                    for (var i=0;i<objs.length;i++){
                         if (x!=i) {
                            objs[i].className=this.class2;
                         }
                    }
                    
                }
                optObjs[i].onmouseout=function(){
                    //this.className=this.class2;
                }
           }
           
    }
    

}






function upfileClick(tab,tabid,mid){ //发送用户在线状态
	var objResponse=new JHttpResponse();
	var objAjax=new JAjax();
	objResponse.write("tabid",tabid);
	objResponse.write("tab",tab);
	objResponse.write("mid",mid);
	out=objAjax.getText("post",sysPath+"webServer.aspx?type=upUserData",objResponse,null);
}



function newVcode(thisObj){ //更换新的验证码
	thisObj.src=sysPath+"system/user/validateImg.aspx?t="+ create_id() ;
}


function getTop(e){
//获得对象的Y坐标（相对于页面）
	var t=e.offsetTop;
	while(e=e.offsetParent){
		t+=e.offsetTop;
		}
	return t;
}
 
function getLeft(e){
//获得对象的X坐标（相对于页面）
	var l=e.offsetLeft;
	while(e=e.offsetParent){
		l+=e.offsetLeft;
		}
	return l;
}

function getmouseX(){
   var x=window.event.clientX;
   return x;
}

function getmouseY(){
   var y=window.event.clientY;
   return y;
}


function create_id(){  //生成对象的ID
   var objdate=new Date()
   var o_datetime
   o_datetime=""
   o_datetime=o_datetime+objdate.getHours()
   o_datetime=o_datetime+objdate.getMinutes()
   o_datetime=o_datetime+objdate.getSeconds()
   var o_r=Math.random()
   o_r=o_datetime+parseInt(o_r*1000)
   return o_r
}

function createObj(inObj,newObjtype){ //在对象对创建一个新对象
	var tempObj=$c(newObjtype);
	newObj=inObj.appendChild(tempObj);	
	return newObj;
}

function findSelectDate(obj){
	arr=openSelectDate(sysPath);
	if (arr!=null){
		obj.value=arr;
	}else{
		obj.value="";
	}
}
//var w=form.offsetWidth;
//var h=form.offsetHeght;