var c1="※";
var c2="⊙";
var c3="‖";
//---------------------------------------2011-7-12(浮动广告)------------------------------------------
function sMoveClass(){
    this.obj=null;//保存当前移动的对象信息
    this.sArray=new Array();//保存浏览器的信息
    this.roation=145;
    this.moveed=5;            
    this.start=function(obj){
	    this.obj=obj;
        this.returnScreenWh();
        this.sy=Math.abs(Math.sin(this.roation)*this.moveed);
        this.sx=Math.abs(Math.cos(this.roation)*this.moveed);
        this.w=parseInt(this.obj.style.width)+3;
        this.h=parseInt(this.obj.style.height);
		this.obj.onmouseover=function(){
            clearInterval(sMove.stop);
        }
        this.obj.onmouseout=function(){                   
            sMove.stop=setInterval("sMove.removeing()",100);                  
        }
        this.stop=setInterval("sMove.removeing()",100);                
    } 
    this.close=function(obj){
         clearInterval(sMove.stop);
         obj.parentNode.parentNode.removeNode(obj.parentNode);
    }           
    this.removeing=function(){   
	    this.nx=parseInt(this.obj.style.left);//获取当前对象距离左边的相对距离
        this.ny=parseInt(this.obj.style.top);//获取当前对象距离顶部的相对距离
		if(typeof(this.nx)=="NaN"){this.nx=0}
		if(typeof(this.ny)=="NaN"){this.ny=0}
		//判断当前的距离是否大于在(最右边)或者(最左边)或者(隐藏滚动条内部)                
        if(this.nx>=(this.sArray[0]-this.w+this.sArray[2])||this.nx<=0||this.nx<this.sArray[2]){
            this.sx=-this.sx;
            if(this.nx<this.sArray[2])
               this.nx=this.sArray[2];
            else if(this.ny>(this.sArray[2]+this.sArray[0]-this.w))
                this.nx=(this.sArray[2]+this.sArray[0]-this.w)   
        }
        //判断当前的距离是否大于在(最下边)或者(最上边)或者(隐藏滚动条内部)   
        if(this.ny>=(this.sArray[1]+this.sArray[3]-this.h)||this.ny<=0||this.ny<this.sArray[3]){
            this.sy=-this.sy;
            if(this.ny<this.sArray[3])
               this.ny=this.sArray[3];
            else if(this.ny>(this.sArray[3]+this.sArray[1]-this.h))
                this.ny=(this.sArray[3]+this.sArray[1]-this.h)                    
        }
        this.obj.style.left=(this.nx+parseInt(this.sx))+"px";
        this.obj.style.top=(this.ny+parseInt(this.sy))+"px";
    }
    //计算当前的显示区域高度宽度
    this.returnScreenWh=function(){
        this.sArray=new Array();
        if(document.compatMode=="BackCompat"){
            this.sArray.push(document.body.clientWidth);
            this.sArray.push(document.body.clientHeight);
            this.sArray.push(document.body.scrollLeft);
            this.sArray.push(document.body.scrollTop);                    
        }else{
            this.sArray.push(document.documentElement.clientWidth);
            this.sArray.push(document.documentElement.clientHeight);
            this.sArray.push(document.documentElement.scrollLeft);
            this.sArray.push(document.documentElement.scrollTop);                    
        }
    }
} 
//----------------------------------------2011-7-11(显示签收情况信息)----------------------------------
function zydn_Hiweb_SignFor_Open(tabId,tabName,newPage){
    var signForTitltCss="border:solid 1px #E4E4E4;border-left:none;text-align:center;height:25px;font-size:13px;font-weight:bold;";
    var signForBodyCss="border:solid 1px #E4E4E4;border-left:none;border-top:none;text-align:center;height:22px;font-size:12px;";
    var objAjax=new JAjax();            
    var objResponse=new JHttpResponse();
    objResponse.write("tabId",tabId);
    objResponse.write("tabName",tabName);
    var out=objAjax.getText("post","../../system/signFor/execSign.aspx?type=redSignResourt",objResponse,null);
    //toUser,state,toDate,signForDate,fileTitle,leaveWord,IP,menuId
    if(out.indexOf(c1)>-1){
       out=out.split(c2);
       var sOne=out[0].split(c1);
       var bodyBigDiv=document.createElement("div");
       document.body.appendChild(bodyBigDiv);
       var wh=returnWh();
       bodyBigDiv.oncontextmenu=function(){return false}
       bodyBigDiv.style.cssText="width:"+(wh[1])+"px;height:"+(wh[3])+"px;z-index:777;background-color:#E4E4E4;position:absolute;left:0px;top:0px;filter:Alpha(opacity=50);";
       var cDiv=document.createElement("div");
       var left=((parseInt(wh[0])-350)/2)+wh[5];
       var top=((parseInt(wh[2])-380)/2)+wh[4];
       cDiv.style.cssText="width:350px;z-index:888;background-color:#ffffff;position:absolute;border:solid 1px #e4e4e4;left:"+left+"px;top:"+top+"px;"
       document.body.appendChild(cDiv);
       cDiv.oncontextmenu=function(){return false}
       var tab=document.createElement("table");
       tab.setAttribute("border","0");
       tab.setAttribute("cellPadding","0");
       tab.setAttribute("cellSpacing","0");
       tab.style.cssText="border-left:solid 1px #E4E4E4;border-top:solid 1px #E4E4E4;width:338px;margin:5px;";
       cDiv.appendChild(tab);
       var tr=tab.insertRow(tab.rows.length);
       var td=tr.insertCell(-1);
       td.setAttribute("colSpan",4);
       td.style.cssText="text-align:center;height:25px;border-right:solid 1px #e4e4e4;padding-left:2px;"
       td.innerHTML="<a href='./"+newPage+"?menuid="+sOne[7]+"&tab="+tabName+"&tabid="+tabId+"'>"+sOne[4]+"</a>";  
	   
       tr=tab.insertRow(tab.rows.length);
       td=tr.insertCell(-1);
       td.style.cssText=signForTitltCss;
       td.innerHTML="签收用户";
       
       td=tr.insertCell(-1);
       td.style.cssText=signForTitltCss;
       td.innerHTML="签收状态";
       
       td=tr.insertCell(-1);
       td.style.cssText=signForTitltCss;
       td.innerHTML="签收IP";
       
       td=tr.insertCell(-1);
       td.style.cssText=signForTitltCss;
       td.innerHTML="签收时间";
       var idx=0;
       for(var i=0;i<out.length;i++){
            var sp=out[i].split(c1);
            var color="orange";
            if(parseInt(sp[1].toString())==1){
                idx=parseInt(idx)+1;
                color="blue";
            }
            tr=tab.insertRow(tab.rows.length);            
            td=tr.insertCell(-1);
            td.style.cssText=signForBodyCss;
            td.style.color=color;
            td.innerHTML=sp[0];
            
            td=tr.insertCell(-1);
            td.style.cssText=signForBodyCss;
            td.style.color=color;
            td.innerHTML=(parseInt(sp[1].toString())==0?"未签收":"已签收");
            
            td=tr.insertCell(-1);
            td.style.cssText=signForBodyCss;
            td.style.color=color;
            td.innerHTML=(sp[6].toString()==""?"null":sp[6]);
            
            td=tr.insertCell(-1);
            td.style.cssText=signForBodyCss;
            td.style.color=color;
            td.innerHTML=(sp[3].toString()==""?"null":sp[3]);          
       }  
	   
	   tr=tab.insertRow(1);
       td=tr.insertCell(-1);
       td.style.cssText=signForTitltCss+"color:red;border-bottom:none;";
       td.setAttribute("colSpan","4");
       td.innerHTML="共需"+out.length+"用户签收,已签收"+idx+"个用户,未签收"+(out.length-idx)+"个用户";       
       var cColor=document.createElement("div");
       cColor.style.cssText="z-index:999;position:absolute;top:"+(top-12)+"px;left:"+(left+335)+"px;background-image:url(./img/ico/close.gif);height:12px;width:12px;background-repeat:no-repeat;";
       cColor.setAttribute("title","关闭");       
       cColor.setAttribute("id",tabId);
       cColor.onclick=function(){   
           document.body.removeChild(this.parentNode.nextSibling) ;
		   document.body.removeChild(this.parentNode);
       }
	   
	   tr=tab.insertRow(tab.rows.length);
       td=tr.insertCell(-1);
       td.style.cssText=signForTitltCss+"color:red;border-top:none;";
       td.setAttribute("colSpan","4");
       td.innerHTML="<a href='./"+newPage+"?menuid="+sOne[7]+"&tab="+tabName+"&tabid="+tabId+"'>签收</a><span style='width:200px;'>&nbsp;</span><a href='ly_edit.aspx'>反馈</a>";  
       bodyBigDiv.appendChild(cColor);   
   }else{
       alert(out);
   }
}
//获取浏览器的高度
function returnWh(){
    var wh=new Array();
    if(document.compatMode=="BackCompat"){
        wh.push(document.body.clientWidth);
        wh.push(document.body.scrollWidth)
        wh.push(document.body.clientHeight);
        wh.push(document.body.scrollHeight);
        wh.push(document.body.scrollTop);
        wh.push(document.body.scrollLeft);
    }else{
        wh.push(document.documentElement.clientWidth);
        wh.push(document.documentElement.scrollWidth)
        wh.push(document.documentElement.clientHeight);
        wh.push(document.documentElement.scrollHeight); 
        wh.push(document.documentElement.scrollTop);
        wh.push(document.documentElement.scrollLeft);
    }
    return wh;
}//--------------------------------------------------------------------
 var pageWidth=0;
 function sendxml(){   
           var objAjax=new JAjax();            
           var out=objAjax.getText("post","../system/IEintegratedData/Parameters.aspx?type=issendxml&islogin=1",null,null);
           switch(out)
           {
            case "3":{senddvbbs();
                      sendoblog();}break;
            case "2":{sendoblog();}break;
            case "1":{senddvbbs();}break;
           }
   }
function senddvbbs(){
        try
        {
            var objAjax=new JAjax();
            var objResponse=new JHttpResponse();
            objResponse.write("appid","dvbbs");
            var out=objAjax.getText("post","../system/IEintegratedData/Parameters.aspx?type=readUrl",objResponse,null);
            if(out!=null&&out!="")
            {   
                var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0"); 
                xmlDoc.async = false; 
                var date=new Date();
                var str=date.getMilliseconds()+""+date.getMinutes()+""+date.getSeconds();
                xmlDoc.load("../system/IEintegratedData/xml/dvbbs.xml?str="+str);
                
                var xmlhttps = new ActiveXObject("Msxml2.XMLHTTP.3.0");
                xmlhttps.open("POST",out, false);
                xmlhttps.send(xmlDoc);
                var txt=xmlhttps.responseText;
                alert(txt); 
            }
            else
            {
              //弹出提示：你还没有设置同步数据
            }
        }
        catch(err)
        {
          alert("不能够打开"+out+"\n请确保该整合数据是否正确设置")
        }

 }
function sendoblog(){
     try
       {
       var objResponse=new JHttpResponse();
       var objAjax=new JAjax();
        objResponse.write("appid","oblog");
        var out=objAjax.getText("post","../system/IEintegratedData/Parameters.aspx?type=readUrl",objResponse,null);
        if(out!=null&&out!="")
        {
           var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.3.0"); 
            xmlDoc.async = false; 
            var date=new Date();
            var str=date.getMilliseconds()+""+date.getMinutes()+""+date.getSeconds();
            xmlDoc.load("../system/IEintegratedData/xml/oblog.xml?str="+str);
            
            var xmlhttps = new ActiveXObject("Msxml2.XMLHTTP.3.0");
            xmlhttps.open("POST",out, false);
            xmlhttps.send(xmlDoc);
            var txt=xmlhttps.responseText;
            alert(txt); 
        }
        else
        {
           //弹出提示：你还没有设置同步数据
        }        
      }
      catch(err)
      {
         alert("不能够打开"+out+"\n请确保该整合数据是否正确设置")
      }
   }
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";
		
	 }
	

	  
	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 refUrl=document.referrer;
	
	 var isTest= objCookMan.getCookieValue("msgIsTest")
	 if (isTest!="0"){
		isTest="1";
	 }
	 var newUser=objCookMan.getCookieValue("nUserCookies")
	 if (newUser=="1"){
	    refUrl="";
	 }else{
	    if (refUrl==""|refUrl==null){
	        refUrl="直接输入地址"
	    }
 	    var objCookie=new JHttpCookie("nUserCookies","1","","","",false);  //创建一个cookie
	    objCookMan.addCookie(objCookie);  // 添加、更新cookie
	}

	objResponse.write("isTest",isTest);
	objResponse.write("refUrl",refUrl);
	//alert(url)
	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.id="msg_DivMax";
			nObj.style.cssText="width:300px;height:100px;position:absolute;left:expression(document.body.offsetWidth-" + nObj.id + ".offsetWidth-30); position:absolute;top:expression(document.body.clientHeight-this.style.pixelHeight+document.body.scrollTop+95-" + nObj.id + ".offsetHeight);background-color:#ffffff;";
			var html="";
			if (out[0].indexOf("<br>")!=-1){
			    html=objAjax.getText("get",sysPath+"webUser/msgsignFor.htm",null,null);
			}else{
			    html=objAjax.getText("get",sysPath+"webUser/msg.htm",null,null);
			}
			nObj.innerHTML=html;
			
			if (out[0].indexOf("<br>")!=-1){　//如果是签收
				$("msg_Info").innerHTML=out[0];
				$("msgUrl").href=sysPath+"webUser/signForA.aspx?menuindex=3";
				
			
			}else{ //如果是留言

					
					$("msgUrl").href=sysPath+"webUser/showMsg.aspx?menuindex=1&id="+out[4];
					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="";
							
					}
					
					$("msgUrl").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));
		}
	}
}


var errFile="";
var pageImgCount=0;
var pageLoadImg=0;

function webImgLoadErr(imgObj){ //不能显示的图片
    if (pageWidth==0){
		pageWidth=Element.getWidth("hiweb_dataBody");
		var obj=$("hiweb_dataBody");
		var imgs=obj.getElementsByTagName("IMG")
		pageImgCount=imgs.length;
	}
	pageLoadImg++
   errFile=errFile+imgObj.src+"|";
   //	alert(pageLoadImg+"|"+pageImgCount)
   if (pageLoadImg==pageImgCount){
        downImgFile();
     }
}

function webImgLoad(imgObj){ //能正确加载的图片
	if (pageWidth==0){
		pageWidth=Element.getWidth("hiweb_dataBody");
		var obj=$("hiweb_dataBody");
		var imgs=obj.getElementsByTagName("IMG")
		pageImgCount=imgs.length;
	}
	pageLoadImg++
   //	alert(pageLoadImg+"|"+pageImgCount)
    imgObj.style.display="";
	imgObj.style.width="auto";
   // imgObj.style.border="1px solid #000000";
    var w=Element.getWidth(imgObj);
  
    if (w>pageWidth){
	    imgObj.title="点击放大";
	    imgObj.style.width=pageWidth-30;
	    imgObj.onclick=function(){
		    window.open(this.src);
	    }
    }
     if (pageLoadImg==pageImgCount){
        downImgFile();
     }
}

function downImgFile(){
    if (errFile==""){
     // alert("没有不显示的文件.");
        return;
    }
    if (sysPath1=="" | sysPath2==""){
        return;
    }
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
    errFile=errFile.split("|"); 
    i=0
    for (i=0;i<errFile.length-1;i++){
    	objResponse.write("file"+i,errFile[i]); 
    }
    if (i>0){
	    objResponse.write("count",i);
	    var out=objAjax.getText("post",sysPath+"webServer.aspx?type=downImgFile",objResponse,null);
	    //alert(out);
	}
}
		

function userModiContent(labelName,thisObj){ //用户纠错
	var obj=cObj(document.body,"div");
	obj.id="userModiContentDiv";
	obj.style.cssText="z-index:20;left:0px;top:0px;position:absolute;width:100%;height:"+document.body.scrollHeight+"px;background-color:#efefef;filter: Alpha(Opacity=70); "
	var obj1=cObj(document.body,"div");
	obj1.id="userModiContentDiv1";
	obj1.style.cssText="text-align:center;z-index:21;left:0px;top:0px;position:absolute;width:100%;height:"+document.body.scrollHeight+"px; "
	
	var obj2=cObj(obj1,"div");
	var y=getTop(thisObj);
	y=y-410;
	if (y<=10){
		y=10;
	}
	obj2.style.cssText="z-index:22;left:0px;top:"+y+"px;position:relative;width:750px;height:400px;background-color:#c0deff; "
	var objAjax=new JAjax();
	var out=objAjax.getText("get",sysPath+"webUser/userModiContent.htm",null,null);
	obj2.innerHTML=out;
	var obj=$("userButton");
	$("userContent").label=labelName;
	obj.onclick=function(){
		var text=$("userContent").value;
		if (text==""|text.length<5){
			alert("请你正确输入内容")
			return;	
		}
		var label=$("userContent").label;
		var objAjax=new JAjax();
		var objResponse=new JHttpResponse();
		objResponse.write("tabid",tabid);
		objResponse.write("table",tabname);
		objResponse.write("menuid",menuid);
		objResponse.write("label",label);
		objResponse.write("text",text);
		var out=objAjax.getText("post",sysPath+"webserver.aspx?type=userModiContent",objResponse,null);
		$("userModiContentDiv").removeNode(true);
		$("userModiContentDiv1").removeNode(true);
		if (out=="-1"){
			alert("匿名用户禁止在此发布内容")
			return;	
		}
		if (out=="-2"){
			alert("错误的文件ID");
			return;		
		}
		if (out=="1"){
			alert("提交成功");
			return;
		}else{
			alert("错误:\n"+erStr(out));
			return;
		}
	}
	
	$("userButtonClose").onclick=function(){
		$("userModiContentDiv").removeNode(true);
		$("userModiContentDiv1").removeNode(true);
	}
	
}



function addFavorite(fType) //内容页用的加入收藏
{
//if (userID=="-1"){
//		alert("匿名用户不能加入收藏");
//		return;
//	}
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("menuid",menuid);
	objResponse.write("tab",tabname);
	objResponse.write("tabid",tabid);
	objResponse.write("fType",fType);
	var out=objAjax.getText("post",sysPath+"webserver.aspx?type=affFavrite",objResponse,null);
	if (out=="1"){
		if (fType==1){
			alert("栏目收藏成功");
		}else{
			alert("收藏成功");
		}
	}else{
		alert(erStr(out));
	}
}



function addFavoriteFile(tab,tid)  //列表页用的加入收藏
{
	//if (userID=="-1"){
//		alert("匿名用户不能加入收藏");
//		return;
//	}
	fType="2"
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("menuid",menuid);
	objResponse.write("tab",tab);
	objResponse.write("tabid",tid);
	objResponse.write("fType",fType);
	var out=objAjax.getText("post",sysPath+"webserver.aspx?type=affFavrite",objResponse,null);
	if (out=="1"){
		if (fType==1){
			alert("栏目收藏成功");
		}else{
			alert("收藏成功");
		}
	}else{
		alert(erStr(out));
	}
}


function gotoMenu()
{
	var obj=$("menu2Select");
	
	for (var i=0;i<obj.options.length;i++){
	      if (obj.options[i].mid==menuid){
		     obj.options[i].selected=true;
			 return true;
			 break;
		  }
	  }
	
}

//跳转到一个指定的页面.
function menu2SelectJS(obj){
	 location.href=obj.value;
}

//扣用户看当前页面所需的积分
function delUserInt(){
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("tab",tabname);
	objResponse.write("menuid",menuid);
	objResponse.write("tabid",tabid);
	//alert(tabname+"|"+tabid)
	//return;
	if (userID=="-1"){
		alert("匿名用户无法扣分,请登录")
		return;	
	}
	var out=objAjax.getText("post",sysPath+"webServer.aspx?type=delReadBodyInt",objResponse,null);
	if (out=="1"){
		location.reload();   // 扣分成功, 刷新当前页.	
	}else if (out=="-1"){
		alert("积分(或虚拟货币)扣除失败\n请检查您是否有足够的可用积分(或虚拟货币)");
		return;
	}else{
		alert(erStr(out));
	}

}




function allMusic(fm)  //全选音乐
{
	//alert(fm)
	var objs=fm.getElementsByTagName("input");
	for (var i=0;i<objs.length;i++){
		if (objs[i].type=="checkbox"){
			objs[i].checked=true;
		}
	}
}

function reverseMusic(fm){
	var objs=fm.getElementsByTagName("input");
	for (var i=0;i<objs.length;i++){
		if (objs[i].type=="checkbox"){
		    if (	objs[i].checked==true)
			{
				objs[i].checked=false;
			}else{
				objs[i].checked=true;
			}
		}
	}
}

function playMusic(table,fm){ //播放音乐
	var objs=fm.getElementsByTagName("input");
	var idList="";
	for (var i=0;i<objs.length;i++){
		if (objs[i].checked==true){
			idList=idList+objs[i].value+","
		}
	}
	if (idList==""){
		alert("请选择要播放的音乐")
		return;
	}
	idList=idList.substr(0,idList.length-1);
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("tab",table);
	objResponse.write("menuid",menuid);
	objResponse.write("idList",idList);
	var out=objAjax.getText("post",sysPath+"webServer.aspx?type=musicAdd",objResponse,null);
	if (out=="-1"){
		alert("选定的内容没有可播放的音乐")
		return;
	}else if (out=="-2"){
		alert("没有找到音乐内容字段")
		return;
	}
	else if (out=="1"){
		var id=fm.id;
		id=id.split("_");
		var obj=$("playUrl_"+id[1])
		//alert(obj.href);
		if (obj.href.indexOf("http://")==-1){
			obj.href=sysPath+obj.href;
		}
		obj.click();
		
	}else{
		alert(erStr(out));
	}
}





function article_playVideo(table,id){
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("tab",table);
	objResponse.write("menuid",menuid);
	objResponse.write("tabid",id);
	var out=objAjax.getText("post",sysPath+"webServer.aspx?type=readOneMusic",objResponse,null);
	if (out=="-1"){
		alert("没有可播放的音乐或视频");
		return;
	}
	//alert(out);
	var w=$("playVideoDiv").style.width;
	var h=$("playVideoDiv").style.height;
	var n=out.split(".");
	var exName=n[n.length-1];
	exName=exName.toLowerCase();
	var html="";
    switch (exName)
	{
		case "avi":
		case "mpg":
		case "mpeg":
		case "mp4":
		case "mp3":
		case "wmv":
		case "wma":
		case "wav":
		
		
		
html=html+"	<EMBED pluginspage=http://www.macromedia.com/go/getflashplayer src=\""+out+"\" width="+w+" height="+h+" type=application/x-shockwave-flash quality=\"high\"></P>";
html=html+"</EMBED>";

		
/* html=html+"	<object classid=\"clsid:05589FA1-C356-11CE-BF01-00AA0055595A\" id=\"ActiveMovie1\" width=\""+w+"\" height=\""+h+"\"   id=\"NSPlay\">";
 html=html+"	<param name=\"Appearance\" value=\"0\">";
 html=html+"	<param name=\"AutoStart\" value=\"-1\">";
 html=html+"	<param name=\"AllowChangeDisplayMode\" value=\"-1\">";
 html=html+"	<param name=\"AllowHideDisplay\" value=\"0\">";
 html=html+"	<param name=\"AllowHideControls\" value=\"-1\">";
 html=html+"	<param name=\"AutoRewind\" value=\"-1\">";
 html=html+"	<param name=\"Balance\" value=\"0\">";
 html=html+"	<param name=\"CurrentPosition\" value=\"0\">";
 html=html+"	<param name=\"DisplayBackColor\" value=\"0\">";
 html=html+"	<param name=\"DisplayForeColor\" value=\"16777215\">";
 html=html+"	<param name=\"DisplayMode\" value=\"0\">";
 html=html+"	<param name=\"Enabled\" value=\"-1\">";
 html=html+"	<param name=\"EnableContextMenu\" value=\"-1\">";
 html=html+"	<param name=\"EnablePositionControls\" value=\"-1\">";
 html=html+"	<param name=\"EnableSelectionControls\" value=\"0\">";
 html=html+"	<param name=\"EnableTracker\" value=\"-1\">";
 html=html+"	<param name=\"Filename\" value=\""+out+"\" valuetype=\"ref\">";
 html=html+"	<param name=\"FullScreenMode\" value=\"0\">";
 html=html+"	<param name=\"MovieWindowSize\" value=\"0\">";
 html=html+"	<param name=\"PlayCount\" value=\"1\">";
 html=html+"	<param name=\"Rate\" value=\"1\">";
 html=html+"	<param name=\"SelectionStart\" value=\"-1\">";
 html=html+"	<param name=\"SelectionEnd\" value=\"-1\">";
 html=html+"	<param name=\"ShowControls\" value=\"-1\">";
 html=html+"	<param name=\"ShowDisplay\" value=\"-1\">";
 html=html+"	<param name=\"ShowPositionControls\" value=\"0\">";
 html=html+"	<param name=\"ShowTracker\" value=\"-1\">";
 html=html+"	<param name=\"Volume\" value=\"-480\">";
 html=html+"	</object>";
*/

/*		
	html=html+"	<object name=\"wmplayer\" classid=\"CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95\" codebase=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715\" type=\"application/x-oleobject\" width="+w+" height="+h+" hspace=\"0\" standby=\"Loading Microsoft Windows Media Player components...\" id=\"NSPlay\">";
    html=html+"	<param name=\"AutoRewind\" value=0>";
    html=html+"	<param name=\"FileName\" value=\""+out+"\">";
    html=html+"	<param name=\"ShowControls\" value=\"1\">";
    html=html+"	<param name=\"ShowPositionControls\" value=\"0\">";
    html=html+"	<param name=\"ShowAudioControls\" value=\"1\">";
    html=html+"	<param name=\"ShowTracker\" value=\"0\">";
    html=html+"	<param name=\"ShowDisplay\" value=\"0\">";
    html=html+"	<param name=\"ShowStatusBar\" value=\"1\">";
    html=html+"	<param name=\"ShowGotoBar\" value=\"0\">";
    html=html+"	<param name=\"ShowCaptioning\" value=\"0\">";
    html=html+"	<param name=\"AutoStart\" value=\"1\">";
    html=html+"	<param name=\"Volume\" value=\"2000\">";
    html=html+"	<param name=\"AnimationAtStart\" value=\"0\">";
    html=html+"	<param name=\"TransparentAtStart\" value=\"0\">";
    html=html+"	<param name=\"AllowChangeDisplaySize\" value=\"1\">";
    html=html+"	<param name=\"AllowScan\" value=\"0\">";
    html=html+"	<param name=\"EnableContextMenu\" value=\"0\">";
    html=html+"	<param name=\"ClickToPlay\" value=\"0\">";
   html=html+"	</object>";*/


				/*html=html+"	<object classid=\"clsid:05589FA1-C356-11CE-BF01-00AA0055595A\" id=\"ActiveMovie1\" width=\""+w+"\" height=\""+h+"\">";
				html=html+"<param name=\"Appearance\" value=\"0\">";
				html=html+"<param name=\"AutoStart\" value=\"-1\">";
				html=html+"<param name=\"AllowChangeDisplayMode\" value=\"-1\">";
				html=html+"<param name=\"AllowHideDisplay\" value=\"0\">";
				html=html+"<param name=\"AllowHideControls\" value=\"-1\">";
				html=html+"<param name=\"AutoRewind\" value=\"-1\">";
				html=html+"<param name=\"Balance\" value=\"0\">";
				html=html+"<param name=\"CurrentPosition\" value=\"0\">";
				html=html+"<param name=\"DisplayBackColor\" value=\"0\">";
				html=html+"<param name=\"DisplayForeColor\" value=\"16777215\">";
				html=html+"<param name=\"DisplayMode\" value=\"0\">";
				html=html+"<param name=\"Enabled\" value=\"-1\">";
				html=html+"<param name=\"EnableContextMenu\" value=\"-1\">";
				html=html+"<param name=\"EnablePositionControls\" value=\"-1\">";
				html=html+"<param name=\"EnableSelectionControls\" value=\"0\">";
				html=html+"<param name=\"EnableTracker\" value=\"-1\">";
				html=html+"<param name=\"Filename\" value=\""+out+"\" valuetype=\"ref\">";
				html=html+"<param name=\"FullScreenMode\" value=\"0\">";
				html=html+"<param name=\"MovieWindowSize\" value=\"0\">";
				html=html+"<param name=\"PlayCount\" value=\"1\">";
				html=html+"<param name=\"Rate\" value=\"1\">";
				html=html+"<param name=\"SelectionStart\" value=\"-1\">";
				html=html+"<param name=\"SelectionEnd\" value=\"-1\">";
				html=html+"<param name=\"ShowControls\" value=\"-1\">";
				html=html+"<param name=\"ShowDisplay\" value=\"-1\">";
				html=html+"<param name=\"ShowPositionControls\" value=\"0\">";
				html=html+"<param name=\"ShowTracker\" value=\"-1\">";
				html=html+"<param name=\"Volume\" value=\"-480\">";
				html=html+"</object>";*/
			break;
		  case "rm":
		  case "ram":
		  case "rmvb":
		  case "ra":
				html=html+"<OBJECT ID=video1 CLASSID=\"clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA\" HEIGHT="+h+" WIDTH="+w+">";
				html=html+"<param name=\"_ExtentX\" value=\"9313\">";
				html=html+"<param name=\"_ExtentY\" value=\"7620\">";
				html=html+"<param name=\"AUTOSTART\" value=\"1\">";
				html=html+"<param name=\"SHUFFLE\" value=\"0\">";
				html=html+"<param name=\"PREFETCH\" value=\"0\">";
				html=html+"<param name=\"NOLABELS\" value=\"0\">";
				html=html+"<param name=\"SRC\" value=\""+out+"\">";
				html=html+"<param name=\"CONTROLS\" value=\"ImageWindow\">";
				html=html+"<param name=\"CONSOLE\" value=\"Clip1\">";
				html=html+"<param name=\"LOOP\" value=\"0\">";
				html=html+"<param name=\"NUMLOOP\" value=\"0\">";
				html=html+"<param name=\"CENTER\" value=\"0\">";
				html=html+"<param name=\"MAINTAINASPECT\" value=\"0\">";
				html=html+"<param name=\"BACKGROUNDCOLOR\" value=\"#000000\"><embed SRC type=\"audio/x-pn-realaudio-plugin\" CONSOLE=\"Clip1\" CONTROLS=\"ImageWindow\" HEIGHT=\""+h+"\" WIDTH=\""+w+"\" AUTOSTART=\"true\">\n";
				html=html+"</OBJECT>";
			  break;
			case "flv":
			
	
				var swf_width=w
				var swf_height=h
				var texts='视频'
				var files=out
				html=html+'<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ swf_width +'" height="'+ swf_height +'">';
				html=html+'<param name="movie" value="img/swf/vcastr22.swf"><param name="quality" value="high">';
				html=html+'<param name="menu" value="false"><param name="allowFullScreen" value="true" />';
				html=html+'<param name="FlashVars" value="vcastr_file='+files+'&vcastr_title='+texts+'">';
				html=html+'<embed src="img/swf/vcastr22.swf" allowFullScreen="true" FlashVars="vcastr_file='+files+'&vcastr_title=’+texts+’" menu="false" quality="high" width="’+ swf_width +’" height="'+ swf_height +'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
				html=html+'</object>';
			break;
		case "swf":
			html=html+"<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+w+"\" height=\""+h+"\" >"
			html=html+"  <param name=\"movie\" value=\""+out+"\" />"
			html=html+"  <param name=\"quality\" value=\"high\" />"
			html=html+"  <embed src=\""+out+"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\""+w+"\" height=\""+h+"\"></embed>"
			html=html+"</object>"
		   break;
	}
	if (html=="" | html==null){
		$("playVideoDiv").style.display="none";
		return;
	}
	//alert(html)
	 $("playVideoDiv").innerHTML=html;
}


function article_playMusic(table,id){//在内容页播放音乐
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
	objResponse.write("tab",table);
	objResponse.write("tabid",id);
	objResponse.write("menuid",menuid);

	var out=objAjax.getText("post",sysPath+"webServer.aspx?type=readOneMusic",objResponse,null);
	if (out=="-1"){
	//	alert("没有可播放的内容");
		return;
	}
	
	if (out=="-3"){
		alert("没有播放的权限");
		return;
	}
	
	if (out=="-2"){
		alert("播放需要积分");
		return;
	}
		
	if (out=="-4"){
		alert("没有找到用于播放的字段");
		return;
	}
	
	//alert(out);
	//return;
	mPlayer.URL=out;
	
	
	
}


function uInfoClass(){
	this.obj=null;
	this.fontCss=null;
	this.opt=null;
	this.userID=null;
	this.guestText="";
	
	this.create=function(){
		if (this.obj==null){
			return;
		}
		if (userID=="-1" | userID=="" | userID==null){
			this.obj.innerHTML=this.guestText;
			this.userID=userID;
			setTimeout("uInfo.create()",3000)
			return;
		}
		if (this.userID==userID){
			//alert("用户名不变退出:"+userID)
			setTimeout("uInfo.create()",3000)
			return;
		}
		//alert("用户名变化，加载")
		this.userID=userID;
		
		var objAjax=new JAjax();
		var out=objAjax.getText("post",sysPath+"webServer.aspx?type=readMyInfo",null,null);

		out=out.split(c1);
		if (out.length<5){
			alert(erStr(out));
			return;	
		}
		opt=","+this.opt+",";
		html="";
		if (opt.indexOf(",1,")!=-1){
			html=html+"<span class='"+this.fontCss+"'>用户名："+out[0]+"</span>";
		}
		if (opt.indexOf(",2,")!=-1){
			html=html+"<span class='"+this.fontCss+"'>所属组："+out[12]+"</span>";
		}
		if (opt.indexOf(",3,")!=-1){
			switch(out[13]){
				case "-1":
				out[13]="普通用户"
				break;
				case "1":
				out[13]="管理员"
				break;
				case "2":
				out[13]="系统管理员"
				break;
			}
			html=html+"<span class='"+this.fontCss+"'>管理身份："+out[13]+"</span>";
		}
		if (opt.indexOf("4")!=-1){
			html=html+"<span class='"+this.fontCss+"'>注册日期："+out[1]+"</span>";
		}
		if (opt.indexOf("5")!=-1){
			html=html+"<span class='"+this.fontCss+"'>登录次数："+out[14]+"</span>";
		}
		if (opt.indexOf("6")!=-1){
			html=html+"<span class='"+this.fontCss+"'>用户级别："+out[11]+"</span>";
		}
		if (opt.indexOf("7")!=-1){
			html=html+"<span class='"+this.fontCss+"'>基本积分："+out[7]+"</span>";
		}
		if (opt.indexOf("8")!=-1){
			html=html+"<span class='"+this.fontCss+"'>专家积分："+out[8]+"</span>";
		}
		if (opt.indexOf("9")!=-1){
			html=html+"<span class='"+this.fontCss+"'>总积分："+out[9]+"</span>";
		}
		//	
//		UserName, RegDate, Last_IP, Count_Comment, Count_Release, Delete_Release, "
//          0       1         2            3             4              5
//      Delete_Comment, Integral_Base, Integral_Expert, Integral_Total, Money, LevelName, "
//          6              7                  8             9             10      11   
//      GroupName, isAdmin, Count_Login
//          12        13        14
		if (opt.indexOf("10")!=-1){
			html=html+"<span class='"+this.fontCss+"'>虚拟货币："+out[10]+"</span>";
		}
		if (opt.indexOf("11")!=-1){
			html=html+"<span class='"+this.fontCss+"'>发文章数："+out[3]+"</span>";
		}
		if (opt.indexOf("12")!=-1){
			html=html+"<span class='"+this.fontCss+"'>被删文章："+out[6]+"</span>";
		}
		if (opt.indexOf("13")!=-1){
			html=html+"<span class='"+this.fontCss+"'>发回复数："+out[4]+"</span>";
		}
		if (opt.indexOf("14")!=-1){
			html=html+"<span class='"+this.fontCss+"'>被删回复："+out[5]+"</span>";
		}
		this.obj.innerHTML=html;
		setTimeout("uInfo.create()",5000)
	}
	
}


function RollStop(obj,obj1,speed,stopPx){  //滚动停顿代码,几个参数的含义是, 外框的名字, 中间放内容的DIV的名字, 滚动动的速度, 每多少象素停一下 
	if (speed==null){speed=30}
	if (stopPx==null){stopPx=100}
	
	obj=document.getElementById(obj);
	obj1=document.getElementById(obj1);
	obj.style.overflow="hidden";
	
	var tObj=document.createElement("div")
	obj2=obj.appendChild(tObj);
	obj2.style.cssText=obj1.style.cssText;
	obj2.className=obj1.className;
	obj2.innerHTML=obj1.innerHTML;
	var movePx=0;
	var MyMar;
	var stopTime=4000; //改这里可以改停留的时间, 现在设置的是4秒, 
	
	function Marquee()
	{
	 movePx++;
	 if (movePx>stopPx){
	 	movePx=0;
		clearInterval(MyMar);
		rollNext();
	 	return;
	 }
	 if(obj2.offsetTop-obj.scrollTop<=0)
	  obj.scrollTop-=obj1.offsetHeight;
	 else
	  obj.scrollTop++;
	}
		
	function rollNext(){
		setTimeout(start,stopTime);  
	}
	
	function start(){
		MyMar=setInterval(Marquee,speed)
	}
	setTimeout(start,stopTime);
} 


function comValue(){ //计算订单的金额
	
	
}

function orderCreate(bTab,tForm,pField,sType,aID){ //建立一个同时订购多个端口的订单
	if (pField.length<1){
		alert("请在后台为实现本功能的标签设置价格使用哪个字段");
		return;	
	}

	if (sType.length<1){
		alert("请在后台为实现本功能的标签设置订购使用的方式");
		return;	
	}


	var objs=tForm.getElementsByTagName("input");
	var idList="";
	for (var i=0;i<objs.length;i++){
		if (objs[i].checked==true){
			idList=idList+objs[i].value+","
		}
	}

	if (idList==""){
		alert("请选择要订购的商品")
		return;
	}
	idList=idList.substr(0,idList.length-1);
	var objAjax=new JAjax();
	var objResponse=new JHttpResponse();
//	typeID + FIELD + tabName + tabID
	objResponse.write("tab",bTab);
	objResponse.write("tabid",idList);
	objResponse.write("field",pField);
	objResponse.write("sType",sType);
	
	var out=objAjax.getText("post",sysPath+"webServer.aspx?type=readShopMD5",objResponse,null);
	if (out.length!=16){
		return;
	}
	
	var url=sysPath+"webUser/orderCreate.aspx?menuindex=4&menuid="+menuid+"&menuname=&tabid="+idList+"&tab="+bTab+"&field="+pField+"&orderType="+sType+"&md5Str="+out;
	$(aID).href=url;
	$(aID).click();
	
	
	
}



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(){
		// if (userID=="-1"){
//			this.obj.innerHTML="";
//			return;
//		 }
		   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+Element.getHeight(upObj);
			mObj.style.top=y+"px";
			mObj.style.left=(x+1)+"px";
			 
		 }
	  }
	  
	  this.create1=function(){
		
		 var mObj=$("pMenuObjDIV");
		 if (mObj!=null){
			 mObj.style.display="none";
			 return;
		 }else{
			 mObj=cObj(document.body,"div");
			 mObj.id="pMenuObjDIV";
		 }
		// if (userID=="-1"){
//			this.obj.innerHTML="";
//			return;
//		 }
		 
		 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='"+sysPath+"webUser/contribute_Add.aspx?menuindex=2&pType=modi&menuid="+menuid+"&id="+tabid+"&asTab="+tabname+"'>编辑</a>",mObj);
		 nObj.onclick=function(){
		    var mObj=$("pMenuObjDIV")
			mObj.style.display="none";
		 }

		 
		 var nObj=this.addObj("<a title='在本栏目发布信息' target='_blank'  href='"+sysPath+"webUser/contribute_Add.aspx?menuindex=2&pType=add&menuid="+menuid+"'>发布</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='sameDomain' />"+
	"<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='sameDomain' 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{
		obj.value=obj.value.replace(".","．");
		//obj.value=obj.value.replace("'","＇");
		$("findForm").submit();
	}
}

function tabFind(form,rType){
    if (form==null){form=$("findForm")}
	if (rType!=null & rType==2){
		var fField=$("findField").value;
	 	var obj=$("findKey");
		if (obj.value==""){
			alert("请填写搜索关键字");
			return;	
		}
		
		var fKey=obj.value
		fKey=fKey.replace(".","．");
		//fKey=fKey.replace("'","＇");
		
		obj=$("findField");
		for (var i=0;i<obj.options.length;i++){
			if (obj.options[i].value!=fField){
				var newObj =cObj(form,"input");
				newObj.value="";
				newObj.name=obj.options[i].value;
				newObj.id=obj.options[i].value;
				newObj.style.display="none";
			}else{
				var newObj =cObj(form,"input");
				newObj.value=fKey;
				newObj.name=obj.options[i].value;
				newObj.id=obj.options[i].value;
				newObj.style.display="none";
			}
		}
	
		form.submit();
		for (var i=0;i<obj.options.length;i++){
			$(obj.options[i].value).removeNode(true);
		}
		return;	
	}
	
	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(" ","");
			objs[i].value=objs[i].value.replace(".","．");
			//objs[i].value=objs[i].value.replace("'","＇");

			if (v!=""){
				x=1;
				break;
			}else{
			}
		}
	}
	
	var objs=form.getElementsByTagName("select");
	for (var i=0;i<objs.length;i++){
		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)}
} 


var saveRool=new Array();
function Roll1(obj,obj1,obj2,speed){ //左滚	
	if (speed==null){speed=30}
	obj2.innerHTML=obj1.innerHTML;
	var index=new Array();
	index.push(obj);
	index.push("0");
	var isBool=false;
	for(var i=0;i<saveRool.length;i++){
	    if(saveRool[i][0]==obj){
	        isBool=true;
	        break;
	    }
	}
	if(isBool==false){
	    saveRool.push(index);
	}
	function Marquee(){
		if(obj2.offsetWidth-obj.scrollLeft<=0){ 
		        obj.scrollLeft-=obj2.offsetWidth;
			}else{
			
		    var nowIndex=new Array();
		    for(var j=0;j<saveRool.length;j++){
		        if(saveRool[j][0]==obj){
		            nowIndex=saveRool[j];
		            break;
		        }
		    }
		    nowIndex[1]=obj.scrollLeft;
	        obj.scrollLeft+=2;
	        if(obj.scrollLeft==nowIndex[1]){
	             obj.scrollLeft=0;
	        }
		}
	}
	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,exMenuClassName,exMenu){  //用于显示栏目导航菜单
	var objs=document.getElementsByName(objName);
	//alert(className);
	for (var i=0;i<objs.length;i++){
		//alert(className+"|"+objs[i].id+objs[i].outerHTML);
		
		//objs[i].style.color=color;
		objs[i].mouseClassName=className;
		objs[i].mouseexMenuClassName=exMenuClassName;
		if (objs[i].mid==menuid){ //处理当前栏目
			//alert(objs[i].layer);
			if (objs[i].layer=="0"){
				objs[i].className=className;
			}else{
					objs[i].className=exMenuClassName;
			}
			var objs_c=objs[i].getElementsByTagName("SPAN");
			objs_c[1].style.color=color;
		}
		
		objs[i].onmouseover=function(){
			downMenuClass=this.className;
			var layer=this.layer;
			//alert(this.className+"|"+layer+"|"+this.mouseClassName);
			if (layer=="0"){
				
				this.className=this.mouseClassName;
			}else{
				this.className=this.mouseexMenuClassName; //子栏目
			}
			//	alert(this.className+"|"+layer+"|"+className);
			var objs_a=this.getElementsByTagName("SPAN");
			downMenuColor=objs_a[1].style.color;
			objs_a[1].style.color=color;
		}
		
		objs[i].onmouseout=function(){
			this.className=downMenuClass;
			var objs_a=this.getElementsByTagName("SPAN");
			objs_a[1].style.color=downMenuColor;
		}
		
	}
	//alert(exMenu)
	//exMenu=1;
	if (exMenu=="0"){
		var isDisplay="0";
		var mid="";
		var myUpListID=","+UpListID+",";
		for (var i=0;i<objs.length;i++)
		{
			var layer=objs[i].layer;
			//alert(layer);
			if (layer=="0"){
				mid=objs[i].mid;
				//alert(myUpListID+"|"+","+mid+",");
				if (myUpListID.indexOf(","+mid+",")==-1){
					isDisplay="0";
				}else{
					isDisplay="1";
				}
			}else{
				if (isDisplay=="1")	{
					objs[i].style.display="";
				}else{
					objs[i].style.display="none";
				}
			}
			
		}
	}
	
}



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].tclassName=className;
		objs[i].tcolor=color;
		objs[i].tsize=size;
		objs[i].tbgcolor=bgcolor;
		objs[i].tbgimg=bgimg
		objs_a=objs[i].getElementsByTagName("LI");
		objs_a[0].style.width=objs[i].style.width;
	    objs_a[0].style.textAlign="center";
		
		objs[i].onmouseover=function(){
			//this.className=className;
			var objs_a=this.getElementsByTagName("SPAN");
			if (objs_a.length==0){
				 objs_a=this.getElementsByTagName("LI");
			}
			this.nclassName=objs_a[0].className;
			objs_a[0].className=this.tclassName;
			
			this.ncolor=objs_a[0].style.color;
			this.nsize=objs_a[0].style.fontSize;
			this.nbgcolor=this.style.backgroundColor;
			this.nbgimg=this.style.backgroundImage;
			
			objs_a[0].style.color=this.tcolor;
			objs_a[0].style.fontSize=this.tsize;
			
			this.style.backgroundColor=this.tbgcolor;
			this.style.backgroundImage="url('"+this.tbgimg+"')";
		}
		
		objs[i].onmouseout=function(){
			
			var objs_a=this.getElementsByTagName("SPAN");
			if (objs_a.length==0){
				 objs_a=this.getElementsByTagName("LI");
			}
			objs_a[0].className=this.nclassName;
			objs_a[0].style.color=this.ncolor;
			objs_a[0].style.fontSize=this.nsize;
			
			this.style.backgroundColor=this.nbgcolor;
			this.style.backgroundImage=this.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.userEx)){
			if (formUserLogin.userEx.type.toLowerCase()=="checkbox"){
				if (formUserLogin.userEx.checked==true){
					objResponse.write("userEx","2");
				}else{
					objResponse.write("userEx","0");
				}
			}else{
				objResponse.write("userEx",formUserLogin.userEx.value);
			}
		}else{
			objResponse.write("userEx","0");
		}
		var out=objAjax.getText("post",sysPath+"system/user/userLogin.aspx?type=login",objResponse,null);
	//alert(out);
	 switch (out){
			 case "-1":
				 location.reload(); //登录成功，刷新
				 break;
		 
		  	 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":
					sendxml();
					break;
				default:
					alert("未知错误:\n"+out);
					break;
		  }
		  $("formUserLogin").onsubmit=function(){
			return  false;
		  }
		  
		  $("userName").value="";
		  $("userPass").value="";
		// event.preventDefault();
		 // return false;
		  // 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",sysPath+"system/user/userLogin.aspx?type=test",null,null);
	//alert(out);
}


function loaduserloginpage(fName,lname,divID,childWebID){
	if (childWebID==null){childWebID="";}
	setTimeout("loaduseroginpage1('"+fName+"','"+lname+"','"+divID+"','"+childWebID+"')",100)
}

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 (isWWW(sysPath)){
			return;	
		}
		
		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 isWWW(url){
	url=url.toLowerCase();
	var l=url.split(".");
	if (l.length==2 & l.indexOf("www")==-1)
	{
		return true;
	}
	return false;
}

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

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

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 EXIF=new Array();
	var imgTitle=new Array();
	var imgInfo=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.imgTitleObj=null;
	this.imgInfoObj=null;
	this.autoPlay="0";
	
	
	this.exifCss="";
	
	this.add=function(v,v1,eData,title,info){
		if (v=="") {v=v1;}
		if(v==""){return;}
		mList[i]=v;
		list[i]=v1;
		EXIF[i]=eData;
		imgTitle[i]=title;
		imgInfo[i]=info;
		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;
		
		if (this.autoPlay=="1"){
			setTimeout("hiweb_autoImgList.next($('hiweb_autoplay"+imgid+"'))",3000);
		}
		
		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><div id='titleDiv_"+imgid+"'></div><div id='bodydiv_"+imgid+"'></div><div id='EXIFdiv"+imgid+"' style='text-align:left;padding:1px 2px 1px 4px;'></div>"
		objImg.src=list[0];
		objImg.maxw=this.bw;
		objImg.maxh=this.bh;
		objImg.style.cursor="hand";
		objImg.id=imgid;
		objImg.name=imgid;
		objImg.exif=EXIF[0];
		objImg.title=imgTitle[0];
		objImg.info=imgInfo[0];
		
		objImg.style.border="1px solid "+this.bcolor;
		objImg.onload=function(){
		   // alert("开始")
			
			this.style.filter="Alpha(Opacity=100)";
			
			var obj=$("hiweb_Href"+this.id); //显示大图
			obj.href=this.src;
			this.onclick=function(){
				var obj=$("hiweb_Href"+this.id);
				obj.click();
			}
			
			obj=$("EXIFdiv"+this.id); //显示EXIF
			if (this.exif!=null & this.exif!=""){
				var exif=this.exif;
				exif=exif.split(c1);
				var html="";
				for (var i=0;i<exif.length-1;i++){
					html=html+"<span class='"+hiweb_autoImgList.exifCss+"'>"+exif[i]+"</span>"	;
				}
				obj.innerHTML=html;
			}else{
				obj.innerHTML="";
			}
			//alert(this.title);
			
			var titleDivObj=$("titleDiv_"+this.id);  //显示标题
			if (hiweb_autoImgList.isImgTitle=="1" & hiweb_autoImgList.imgTitleObj!=null){
				hiweb_autoImgList.imgTitleObj.innerHTML=this.title;
			}
			else if(hiweb_autoImgList.isImgTitle=="1" & this.title!="" )
			{
				titleDivObj.innerText=this.title;
				titleDivObj.style.cssText="text-align:center;display:block;";
				 obj=$("hiweb_Href"+this.id)
				obj.style.display="none";
			}else{
				titleDivObj.style.cssText="display:none;";
			}
			
			var bodyDivObj=$("bodyDiv_"+this.id); //显示图片说明 
			if (hiweb_autoImgList.isImgInfo=="1" & hiweb_autoImgList.imgInfoObj!=null){
				hiweb_autoImgList.imgInfoObj.innerHTML=this.info;
			}else if (hiweb_autoImgList.isImgInfo=="1"& this.info!=""){
				bodyDivObj.innerText=this.info;
				bodyDivObj.style.cssText="text-align:center;display:block;width:100%;text-align:left;";
			}else{
				bodyDivObj.style.cssText="text-align:center;display:none;";
			}
			
			setTimeout("setImgWH($('"+this.id+"'))",100);
			//alert(obj.exif);
		}
		
		//--------------
		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+40)+"px;height:"+this.mimgh+"px;background-color:"+this.mimgbgcolor+";";
		
		imgLeftDiv.style.cssText="vertical-align:middle;float:left;width:20px;height:"+this.mimgh+"px;text-align:right;overflow:hidden;";
		imgLeftDiv.innerHTML="<table border='0' height='100%' cellspacing='0' cellpadding='0'><tr><td><img   src='"+sysPath+"img/ico/play-left.gif' ></td></tr></table>";
		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="vertical-align:middle;overflow:hidden;float:left;width:20px;height:"+this.mimgh+"px;"
		imgReightDiv.innerHTML="<table border='0' height='100%' cellspacing='0' cellpadding='0'><tr><td><img src='"+sysPath+"img/ico/play-right.gif'></td></tr></table>";
		
		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.exif=EXIF[i];
		objImg.title=imgTitle[i];
		objImg.info=imgInfo[i];
		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.title=imgTitle[i];
		objImg.info=imgInfo[i];
		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.exif=EXIF[i];
			img.title=imgTitle[i];
			img.info=imgInfo[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.exif=this.exif;
				imgObj.title=this.title;
				imgObj.info=this.info;
				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="您没有阅读权限";
	}
	
	if (out.indexOf("noInt|")!=-1){
		out=out.split("|");
		out=out[1];	
	}
	//alert(out);
	
	
	$(objid).innerHTML=out;
}

var ReviewComment="";
var Reviewtime=0;
var Reviewform=null;
function saveReview(form,isVcode,mid,tab,tabid,reid,isL){
	//alert(mid);
	
	
	var Comment=form.rText.value;
	if (Comment==""){
		alert("内容不能为空");
		return;
	}
	if (Comment==ReviewComment)
	{
		alert("内容不能重复");
		return;
	}
	var objCookMan=new JHttpCookieManager();
	if (isL==null){
			alert(isL);
		if (objCookMan.getCookieValue("Reviewtime")=="1"){
			alert("不能连续发布,请稍后再试");
			return;
		}
	}
	ReviewComment=Comment;	
	Reviewform=form;
	try{
		if (form.isGuest.checked){
			isGuest=1;
		}else{
			isGuest=0;
		}
	}catch(e) {
		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.bodyRowHeight="40";
	this.bodyCss="";
	
	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.language="c";
	
	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}
		var language=this.language;
		
		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);
		objResponse.write("language",language);
		
		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.language=this.language;
			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);
				if (this.addOns.search(",6,")!=-1){
				    switch (language){
					    case "e":
						    levelDiv.innerText=" Level "+out[i][10]+"";
						    break;
					    default:
						    levelDiv.innerText=" 第"+out[i][10]+"楼";
						    break;
				    }
				}
				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= "height:"+this.bodyRowHeight+"px;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;";
				css += "px;text-align:left;padding:4px;border-top: 1px solid "+this.bodyBcolor+"; border-bottom: 1px solid "+this.bodyBcolor+";"
				
				bDiv.style.cssText=css;
				bDiv.className=this.bodyCss;
				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);
		//alert(out)
		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[1]=="" & out[0]=="-100"){
			this.obj.style.display="none";
			return;
		}
		if (out[0]=="0"){
			var divObj=createObj(this.obj,"div");
			divObj.id="hiwebsingDiv"
			divObj.style.cssText="width:100%;text-align:center;"
			if (this.sType==1){
				this.textObj=createObj(divObj,"textarea");
				this.textObj.id="signText";
				this.textObj.style.cssText="width:90%;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="您已签收";
		}
		else if (out[1]=="" & out[0]=="-100"){
			return;
		}else 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 titlediv=createObj(this.obj,"div");
			titlediv.className="titleRow";
	        var t=new outTitle();
	        t.add("用户名","","100");
	        t.add("状态","","60");
	        t.add("日期","","150");
	        t.add("留言","","200");
	        t.add("IP","","100");
	        t.obj=titlediv;
	        t.create();	
	
	
			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 ,ip
			//0    1       2        3           4       5  6         7
			wData.add(raadArray(out,1),"listBodyOption","100");    //添加一列数据  用户名
			wData.add(raadArray(out,5),"listBodyOption","60");         //添加一列数据  状态
			wData.add(raadArray(out,3),"listBodyOption","150");     //添加一列数据  签收日期
			wData.add(raadArray(out,6),"listBodyOption","200");         //添加一列数据 留言
			wData.add(raadArray(out,7),"listBodyOption","100");         //添加一列数据 留言
			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="";
    this.isClick=0;
    
    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;
                
                if ( this.isClick==0){
                    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;
                             }
                        }
                        
                    }
                }else{
                     optObjs[i].onclick=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;
                }
           }
		   
		   for (var i=0;i<bodyObjs.length;i++){
			   if (i==0){
				  bodyObjs[i].style.display="";
			   }else{
				  bodyObjs[i].style.display="none";
			   }
			    bodyObjs[i].style.visibility="inherit";
		   }
           
    }
    

}


//浏览网站上的目录和文件
function ioFileClass(){
	
	this.titleBGcolor =null;
	this.titleBGIMG = null;
	this.titleFontColor = null;
	this.titleFontSize = null;
	this.titleFontCss = null;
	this.titleRowCss =null;
	this.width=null;
	this.height=null;
	
	this.rowBGcolor = null;
	this.row1BGcolor = null;
	this.rowFontColor = null;
	this.row1FontColor =null;
	this.thisRowBGcolor = null;
	this.thisRowFontColor =null;
	this.rowCss =null;
	this.fontCss=null;
	
	this.labelName=null;
	
	var obj=null;
	var titleObj=null;
	var bodyObj=null;
	var path="";
	
	this.create=function(objName){
		obj=$(objName);
		titleObj=cObj(obj,"div");
		titleObj.className=this.titleRowCss;
		titleObj.style.cssText="background-image:url('" + this.titleBGIMG + "');background-color:"+this.titleBGcolor+";width:" + this.width + "px";
		bodyObj=cObj(obj,"div");
		bodyObj.style.cssText="overflow:scroll;width:"+this.width+"px;height:"+this.height+"px;"
		this.createTitle();
		this.readFile();
		
	}
	
	this.createTitle=function(){
		var tObj=cObj(titleObj,"div");
		tObj.innerHTML="返回";
		tObj.style.cssText="cursor:hand;width:50px;float:left;font-size:"+this.titleFontSize+"px;text-align:center;padding-top:3px;color:"+this.titleFontColor+";background-image:url('"+this.titleBGIMG +"');background-color:"+this.titleBGcolor+";";
		tObj.className=this.titleFontCss;
		tObj.onclick=function(){
			ioFile.upPath();
		}

        tObj=cObj(titleObj,"div");
		tObj.innerHTML="文件名";
		tObj.style.cssText="width:250px;float:left;font-size:"+this.titleFontSize+"px;text-align:center;padding-top:3px;color:"+this.titleFontColor+";background-image:url('"+this.titleBGIMG +"');background-color:"+this.titleBGcolor+";";
		tObj.className=this.titleFontCss;
		
		
		tObj=cObj(titleObj,"div");
		tObj.innerHTML="文件大小 (KB)";
		tObj.style.cssText="width:100px;float:left;font-size:"+this.titleFontSize+"px;text-align:center;padding-top:3px;color:"+this.titleFontColor+";background-image:url('"+this.titleBGIMG +"');background-color:"+this.titleBGcolor+";";
		tObj.className=this.titleFontCss;
		
		
		tObj=cObj(titleObj,"div");
		tObj.innerHTML="创建日期";
		tObj.style.cssText="width:100px;float:left;font-size:"+this.titleFontSize+"px;text-align:center;padding-top:3px;color:"+this.titleFontColor+";background-image:url('"+this.titleBGIMG +"');background-color:"+this.titleBGcolor +";";
		tObj.className=this.titleFontCss;
	}
	
	this.readFile=function(){
		var objAjax=new JAjax();
		var objResponse=new JHttpResponse();
		objResponse.write("path",path);
		
		objResponse.write("menuid",menuid);
		objResponse.write("labelName",this.labelName);
		//alert(isTest)
		var out=objAjax.getText("post",sysPath+"webserver.aspx?type=ioReadFile",objResponse,null);
		if (out.indexOf(c1)==-1){
			if (out==""){
				bodyObj.innerHTML="空目录";
				//alert("没有权限获取数据, 或没有数据")
			}else{
				alert(erStr(out));
			}
			return;	
		}
		bodyObj.innerHTML="";
		out=comminute(out,c1,c2);
		for (var i=0;i<out.length-1;i++){
			var rowObj=cObj(bodyObj,"div");
			
			rowObj.className=this.rowCss;
			var rowData=out[i];
			this.createRow(rowObj,out[i]);
		}
		
		 objs=document.getElementsByName("fileICO");
		 for (var i=0;i<objs.length;i++){
			 if (objs[i].fileSize==-1) {
					//alert(objs[i].fileSize);
					objs[i].src=sysPath+"img/fileIco/file.gif";
			 }
		 }
		 
		 objs=document.getElementsByName("fileListRowDiv");
		 var x=0;
		 for (var i=0;i<objs.length;i++){
			 objs[i].className=this.rowCss ;
			 objs[i].thisBGcolor=this.thisRowBGcolor;
			 objs[i].thisRowFontColor=this.thisRowFontColor;
			 objs[i].RowFontColor=this.rowFontColor;
			 
			 if (x==0){
				x=1;
				objs[i].style.backgroundColor=this.rowBGcolor;
				objs[i].bgColorBak=this.rowBGcolor;
			 }else{
				x=0; 
				objs[i].style.backgroundColor=this.row1BGcolor;
				objs[i].bgColorBak=this.row1BGcolor;
			 }
			 objs[i].onmouseover=function(){
				 this.style.backgroundColor=this.thisBGcolor;
			 }
			 
			 objs[i].onmouseout=function(){
				 this.style.backgroundColor=this.bgColorBak;
			 }
			 if (objs[i].fileType==".dir"){
				  objs[i].onclick=function(){
					  ioFile.addPath(this.fileName);
					  ioFile.readFile();
				  }
			 }
		 }
		//alert(out);
	}
	
	this.addPath=function(fileName){
		path=path+"\\"+fileName;
	}
	
	this.upPath=function(){
		if (path=="" | path =="\\")	{
			alert("现在已经是最上层目录");
			return;	
		}
		//alert(path);
		var p=path.split("\\");
		path="";
		for (var i=0;i<p.length-1;i++){
			if (p[i]!=""){
				path=path+"\\"+p[i]+"";
			}
		}
		ioFile.readFile();
	}
	
	this.createRow=function(obj,data)
	{
		//0  文件名   1 文件大小   2  文件日期   3 文件扩展名
		
		//alert(data);
		var w=parseInt(this.width);
		w=w-20;
		obj.style.cssText="width:"+w+"px;background-color:"+this.rowBGcolor+";";
		obj.id="fileListRowDiv";
		obj.name="fileListRowDiv";
		obj.fileType=data[3];
		obj.fileName=data[0];
		
		var css="text-align:left;height:20px;float:left;font-size:"+this.titleFontSize+"px;padding-top:3px;color:"+this.rowFontColor+";";
		var icoDiv=cObj(obj,"div");
		icoDiv.style.cssText="width:29px;"+css;
		var ico=data[3].replace(".","");
		ico="<img src='"+sysPath+"img/fileIco/"+ico+".gif' id='fileICO' id='fileICO' type='"+data[4]+"'>";
		icoDiv.innerHTML=ico;
		icoDiv=this.fontCss;

		//icoDiv.innerHTML=data[];
		
		var fileNameDiv=cObj(obj,"div");
		fileNameDiv.style.cssText="cursor:hand;width:270px;"+css;
		if (data[3]!=".dir"){
			var p=path;
			if (path!=""){
				p=p.replace("\\","/")+"/";
			}
			var fileUrl="<a target='_blank'  href='"+this.webPath.replace("[http:path]",sysPath)+p+data[0]+"'><span style='color:"+this.rowFontColor+"'>";
			fileNameDiv.innerHTML=fileUrl+data[0]+"</span></a>";
		}else{
			fileNameDiv.innerHTML=data[0]
		}
		fileNameDiv=this.fontCss;
		
		var fileSizeDiv=cObj(obj,"div");
		fileSizeDiv.style.cssText="width:100px;"+css;
		fileSizeDiv.innerHTML=data[1];
		fileSizeDiv=this.fontCss;
		
		var fileDateDiv=cObj(obj,"div");
		fileDateDiv.style.cssText="width:100px;"+css;
		fileDateDiv.innerHTML=data[2];
		fileDateDiv=this.fontCss;
	}
	
	
	
}








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;

findKey=function(url){ //从一个URL中找到搜索关键字
		//alert(url.search(/\?/i));
	    if (url.search(/\?/i)==-1 || url.search(/&/i)==-1 || url==""){
			 return "";
		}
		var key="";
		url=url.toLowerCase();
		var url1=url.split("?");
		var url2=url1[1].split("&");
		var kname="";
		var urltype="gb2312";
		
		if (url1[0].search(".google.")!=-1){
			kname="q";	
			if (url1[1].search(/ie=gb2312/i)==-1){
				urltype="utf-8";
			}
		}else if(url1[0].search("nmsearch.3721.")!=-1){
			kname="p";
		}else if(url1[0].search("seek.3721.")!=-1){
			if (url1[1].search(/name/i)==-1){
				kname="p"
			}else{
				kname="name";
			}
		}else if(url1[0].search(".3721")!=-1){
			kname="name";
		}else if(url1[0].search(".sohu.")!=-1){
			kname="word";
		}else if(url1[0].search("www.baidu.")!=-1){
			if (url1[1].search(/wd/i)==-1){
				kname="word"
			}else{
				kname="wd";
			}
			if (url1[1].search(/ie=utf-8/i)!=-1){
				urltype="utf-8";
			}
			
		}else if(url1[0].search(".sina.")!=-1){
			kname="_searchkey";
		}else if(url1[0].search("post.baidu.")!=-1){
			kname="kw";
		}else if(url1[0].search(".baidu.com")!=-1){
			kname="word";
		}else if(url1[0].search(".163.")!=-1){
			kname="q";
		}else if(url1[0].search(".yahoo.com")!=-1){
			kname="p";
			if (url1[1].search(/3721/i)!=-1){
				urltype="gb2312";
			}else{
				urltype="utf-8";
			}
		}else if(url1[0].search(".yahoo.cn")!=-1){
			kname="p";
			urltype="utf-8";
		}else if(url1[0].search(".soso.")!=-1){
			kname="w";
		}else if(url1[0].search(".yisou.com")!=-1){
			kname="p";
		}else if(url1[0].search(".sogou.com")!=-1){
			kname="query";
		}
		if (kname!=""){
			for (var i=0;i<url2.length;i++){
				 var url3=url2[i].split("=");
				 //alert(url3[0]+"|\n"+kname);
				 url3[0]=url3[0].replace(/amp;/,"")
				 if (url3[0]==kname){
					 
					if (urltype=="gb2312"){
					    VBScode();
							key=URLDecode(url3[1]);
					}else{
						try{
							key=decodeURIComponent(url3[1]);
						}catch(e){
						    VBScode();
							key=URLDecode(url3[1]);
						}
					}
					break; 
				 }
			}
		}
		return  key;
	}
	
	
	
	
VBScode=function(){
		var strScript="";
		strScript+=" "+
   
        "Function URLDecode(Str)\n"+
			"Dim Result,IsChar,LastChar,i,TempChar,NextChar,NextNumber\n"+
			"Result=\"\" \n"+
			"IsChar=False \n"+
			"LastChar=\"\" \n"+
			"For i=1 To Len(Str) \n"+
			"	TempChar=Mid(Str,i,1) \n"+
			"	If TempChar=\"+\" Then \n"+
			"		Result=Result&\" \" \n"+
			"	ElseIf TempChar=\"%\" Then \n"+
			"		NextChar=Mid(Str,i+1,2) \n"+
			"		NextNumber=Cint(\"&H\" &NextChar) \n"+
			"		If IsChar Then \n"+
			"			IsChar=False \n"+
			"			Result=Result&Chr(Cint(\"&H\"&LastChar&NextChar)) \n"+
			"		Else \n"+
			"			If Abs(NextNumber)<=127 Then \n"+
			"				Result=Result&Chr(NextNumber) \n"+
			"			Else \n"+
			"				IsChar=True \n"+
			"				LastChar=NextChar \n"+
			"			End If \n"+
			"		End If \n"+
			"		i=i+2 \n"+
			"	Else \n"+
			"		Result=Result&TempChar \n"+
			"	End If \n"+
		    "	Next \n"+
		    "	URLDecode=Result\n"+
            "  End Function\n"+
		System.execScript(strScript,"VBSUrlDecode","VBScript");
	}
	
	function tender()
{
    this.isTender = null;
    this.tInt = null;
    this.tMoney=null;
    this.uID=null;
    this.planID=null;//urlPar("planID");
    this.rowNum=null;//
    this.rowHeight=null;//
    this.titleWidth=null;//
    this.titleFontSize=null;//
    this.titleFontColor=null;//
    this.titleBgColor=null;//
    this.titleLabBgColor=null;//
    this.titleClass=null
    this.spanBgColor=null;//
    this.spanColor=null;//
    this.spanFontSize=null;//
    this.spanLeftWidth=null;//
    this.contentBgColor=null;//
    this.contentBtnBgColor=null;//
    this.contentBtnWidth=null;//
    this.contentBtnHeight=null;//
    this.contentBtnOverColor=null;//
    this.contentBtnfSize =null;//
    this.contentBtnColor=null;//
    this.contentClass=null;
    this.obj=null;
    this.divID=null;
    var flag = 0;
    
    var objAjax=new JAjax();
    this.create = function(){
        
        var planID = this.planID;
        var isTender = this.isTender;
        var objResponse=new JHttpResponse();
        if (planID==null||this.obj==null){return;}
		var objResponse=new JHttpResponse();
        objResponse.write("planID",planID);
		out=objAjax.getText("post",sysPath+"webServer.aspx?type=TenderData",objResponse,null);
        var uidResponse=new JHttpResponse();
        uidResponse.write("planID",planID);
        uidResponse.write("uid",this.uID);
        var outUid=objAjax.getText("post",sysPath+"webServer.aspx?type=TenderUid",uidResponse,null);
        flag = outUid;
        
		var lDiv,pageDiv,ulDiv,liDiv,labDiv;
		var btnWidth = this.contentBtnWidth;
	    var btnHeight = this.contentBtnHeight;
	    var btnMouseOverColor = this.contentBtnOverColor;
	    var btnMouseOutColor = this.contentBtnBgColor;
	    var contentBtnfSize = this.contentBtnfSize;
	    var contentBtnColor = this.contentBtnColor;
	    var tint = this.tInt;
		var tmoney = this.tMoney;  
		var uid = this.uID
        var divID = this.divID;
		    if(out==1)
		    {
		            this.obj.innerHTML="";
		 	        var tempObj=$c("div");
			        lDiv=this.obj.appendChild(tempObj);
			        lDiv.id = "myTender";
			        lDiv.name = "myTender";
			    
			        tempObj=$c("ul");
			        ulDiv=lDiv.appendChild(tempObj);
			        ulDiv.style.cssText="list-style:none;margin:0;";
        			
			        tempObj=$c("li");
			        liDiv=ulDiv.appendChild(tempObj);
			        liDiv.style.cssText="text-align:center;line-height:" + this.rowHeight + "px;background-color:" + this.titleBgColor + ";width:"+this.titleWidth+"px;";
    			    liDiv.className=this.titleClass;
			        tempObj=$c("span");
			        labDiv=liDiv.appendChild(tempObj);
			        labDiv.style.cssText="margin:1px;background-color:"+this.titleLabBgColor;
			        
			        if(flag=="1")
		        {
		            var objResponse=new JHttpResponse();
                    objResponse.write("planID",planID);
		            var outobj=objAjax.getText("post",sysPath+"webServer.aspx?type=TenderOK",objResponse,null);
		            outobj=comminute(outobj,c1,c2);
		            labDiv.innerHTML = "中标者："+outobj[0][2];
			        labDiv.id = outobj[0][0];
			        labDiv.name=outobj[0][1];
		            labDiv.onclick = function()
			                        {
		                                if ( sysPath!=null &  sysPath!="")
		                                {
		                                    tenderModiContent2("",labDiv,this.id,tint,tmoney,this.name,planID); 
		                                }
		                                else
		                                {
    		                                tenderModiContent2("",labDiv,this.id,tint,tmoney,this.name,planID);
		                                }
	                                }
	              labDiv.onmouseover = function()
	                                {
    	                                this.style.cssText = "cursor:hand;";
	                                }
	              labDiv.onmouseout = function()
	                                {
	                                    this.style.cssText = "cursor:none;"; 
	                                }   
	                                
	               var objResponse=new JHttpResponse();
                   objResponse.write("planID",planID);
	               out=objAjax.getText("post",sysPath+"webServer.aspx?type=IsTender",objResponse,null);
	               if(out==0)
	               {
	                        tempObj=$c("span");
			                labDiv=liDiv.appendChild(tempObj);
			                labDiv.style.cssText="margin:3px 0 3px "+this.spanLeftWidth+"px;font-size:"+this.spanFontSize+"px;color:blue; background-color:"+this.spanBgColor;
			                labDiv.innerText = "撤销竞标";
			                labDiv.onclick = function()
			                {
			                    if(confirm("确认撤销？"))
			                    {
			                        var objResponse=new JHttpResponse();
                                    objResponse.write("planID",planID);
                                    objResponse.write("userID",userID);
                                    objResponse.write("isTender",isTender);
                                    objResponse.write("tInt",tint);
                                    objResponse.write("tMoney",tmoney);
		                            out=objAjax.getText("post",sysPath+"webServer.aspx?type=DelTender",objResponse,null);
		                            if(out==0)
		                                        {
		                                            alert("撤销成功！");
		                                            $(divID).style.display = "none";
		                                        }
		                                        else
		                                        {
		                                            alert("您无权此操作");
		                                            return;
		                                        }
		                        }
			                }  
			         
			                var spanLeftWidth = this.spanLeftWidth;
			                var spanFontSize = this.spanFontSize;
			                var spanColor = this.spanColor;
			                var spanBgColor = this.spanBgColor;
			                labDiv.onmouseover = function()
	                                {
    	                                this.style.cssText = "cursor:hand;margin:3px 0 3px "+spanLeftWidth+"px;font-size:"+spanFontSize+"px;color:blue; background-color:"+spanBgColor;
	                                }
	                        labDiv.onmouseout = function()
	                                {
	                                    this.style.cssText = "cursor:none;margin:3px 0 3px "+spanLeftWidth+"px;font-size:"+spanFontSize+"px;color:blue; background-color:"+spanBgColor;
	                                } 
	                 }               
		        }
		        else
		        {
		            labDiv.innerHTML = "该标已结束！";
			    }
		    }
		    else
		    {
		        out=comminute(out,c1,c2);
		        var count=out.length-1;
		         this.obj.innerHTML="";
		 	    var tempObj=$c("div");
			    lDiv=this.obj.appendChild(tempObj);
			    
			        tempObj=$c("ul");
			        ulDiv=lDiv.appendChild(tempObj);
			        ulDiv.style.cssText="list-style:none;margin:0;";
        			
			        tempObj=$c("li");
			        liDiv=ulDiv.appendChild(tempObj);
			        liDiv.style.cssText="line-height:" + this.rowHeight + "px;background-color:" + this.titleBgColor + ";width:"+this.titleWidth+"px;";
    			    liDiv.className=this.titleClass;
			            tempObj=$c("span");
			            labDiv=liDiv.appendChild(tempObj);
			            labDiv.style.cssText="text-align:left;margin:3px 0 3px 5px;color:"+this.titleFontColor+";font-size:"+this.titleFontSize+"px;background-color:"+this.titleLabBgColor;
			            if(count==0)
			            {
			                labDiv.innerHTML = "暂无竞标者"; 
			            }
			            else
			            {
			                labDiv.innerHTML = "竞标者共"+count+"人";   
			            }
        			    
        			    tempObj=$c("span");
			            labDiv=liDiv.appendChild(tempObj);
			            labDiv.style.cssText="text-align:left;margin:3px 0 3px 50px;color:"+this.titleFontColor+";font-size:"+this.titleFontSize+"px;background-color:"+this.titleLabBgColor;
    			        labDiv.innerHTML = "悬赏积分："+this.tInt+"&nbsp 货币："+this.tMoney;
    			        
			            
			            if(flag=="1")
			            {
			                var objResponse=new JHttpResponse();
                               objResponse.write("planID",planID);
	                           outs=objAjax.getText("post",sysPath+"webServer.aspx?type=IsTender",objResponse,null);
	                           if(outs==0)
	                           {
			                            tempObj=$c("span");
			                            labDiv=liDiv.appendChild(tempObj);
			                            labDiv.style.cssText="text-align:left;margin:3px 0 3px 5px;color:blue;font-size:"+this.titleFontSize+"px;background-color:"+this.titleLabBgColor;
			                            labDiv.innerText = "撤销竞标";
			                            labDiv.onclick = function()
			                            {
			                                if(confirm("确认撤销？"))
			                                {
			                                    var objResponse=new JHttpResponse();
                                                objResponse.write("planID",planID);
                                                objResponse.write("userID",userID);
                                                objResponse.write("isTender",isTender);
                                                objResponse.write("tInt",tint);
                                                objResponse.write("tMoney",tmoney);
		                                        out=objAjax.getText("post",sysPath+"webServer.aspx?type=DelTender",objResponse,null);
		                                        if(out==0)
		                                        {
		                                            alert("撤销成功！");
		                                            $(divID).style.display = "none";
		                                        }
		                                        else
		                                        {
		                                            alert("您无权此操作");
		                                            return;
		                                        }
		                                    }
			                            }
			                     
			                var titleFontColor = this.titleFontColor;
			                var titleFontSize = this.titleFontSize;
			                var titleLabBgColor = this.titleLabBgColor;
			                labDiv.onmouseover = function()
	                                {
    	                                this.style.cssText = "cursor:hand;text-align:left;margin:3px 0 3px 5px;color:blue;font-size:"+titleFontSize+"px;background-color:"+titleLabBgColor;
	                                }
	                        labDiv.onmouseout = function()
	                                {
	                                    this.style.cssText = "cursor:none;text-align:left;margin:3px 0 3px 5px;color:blue;font-size:"+titleFontSize+"px;background-color:"+titleLabBgColor;
	                                }   
	                            }  
			            }
			            else
			            {
			            tempObj=$c("span");
			            labDiv=liDiv.appendChild(tempObj);
			            labDiv.style.cssText="margin:3px 0 3px "+this.spanLeftWidth+"px;font-size:"+this.spanFontSize+"px;color:"+this.spanColor+"; background-color:"+this.spanBgColor;
			            labDiv.innerText = "我要竞标";
			            labDiv.onclick = function()
			            {
			                if(userID==-1)
			                {
			                    alert("匿名用户不能竞标！");
			                    return;
			                }
			                
			                var objResponse=new JHttpResponse();
                            objResponse.write("planID",planID);
	                        outdel=objAjax.getText("post",sysPath+"webServer.aspx?type=CheckIsDel",objResponse,null);
			                if(outdel>0)
			                {
			                    alert("该标已撤销！");
			                    $(divID).style.display = "none";
			                    return;
			                }
			                
			                var objResponse=new JHttpResponse();
                            objResponse.write("planID",planID);
	                        outs=objAjax.getText("post",sysPath+"webServer.aspx?type=CheckUser",objResponse,null);
			                if(outs==0)
			                {
			                    alert("您不能做此操作！");
			                    return;
			                }
			                var isExistResponse=new JHttpResponse();
			                isExistResponse.write("planID",planID);
			                isExistResponse.write("uid",userID);
			                var isExist=objAjax.getText("post",sysPath+"webServer.aspx?type=TenderIstender",isExistResponse,null);
			                if(isExist<1)
                            {
		                        tenderModiContent("",labDiv,planID,tint,tmoney);        
                            }
                            else
                            {
                                alert("你已经投过该标了！");
                                return;
                            }
	                    }
	                    var spanColor = this.spanColor;
	                    var spanBgColor = this.spanBgColor;
	                    var spanFontSize = this.spanFontSize;
	                    var spanLeftWidth = this.spanLeftWidth;
                        labDiv.onmouseover = function()
	                                {
    	                                this.style.cssText = "cursor:hand; margin:3px 0 3px "+spanLeftWidth+"px;font-size:"+spanFontSize+"px;color:"+spanColor+"; background-color:"+spanBgColor;
	                                }
	                    labDiv.onmouseout = function()
	                                {
	                                    this.style.cssText = "cursor:none; margin:3px 0 3px  "+spanLeftWidth+"px;font-size:"+spanFontSize+"px;color:"+spanColor+"; background-color:"+spanBgColor;
	                                }		  
			            }
			        var v = count;
                    var rNum = this.rowNum;
                    if(rNum<1)
                    rNum = 1;
			        for(i=0;i<count/rNum;i++)
			        {
			            tempObj=$c("li");
			            liDiv=ulDiv.appendChild(tempObj);
			            liDiv.style.cssText="text-align:left;line-height:" + this.rowHeight + "px;background-color:" + this.contentBgColor + ";width:"+this.titleWidth+"px;";
			            liDiv.className=this.contentClass;
			            
			            for(j=0;j<rNum;j++)
			            {
			                
			                if(v>0)
			                {
			                    v--;
			                    tempObj=$c("span");
			                    labDiv=liDiv.appendChild(tempObj);
			                    labDiv.style.cssText="text-align:center;font-size:"+this.contentBtnfSize+"px; color:"+this.contentBtnColor+"; width:"+this.contentBtnWidth+"px; height:"+this.contentBtnHeight+"px; margin:3px 3px 3px 3px;background-color:"+this.contentBtnBgColor;
			                    labDiv.innerHTML = out[v][2];
			                    labDiv.id = out[v][0];
			                    labDiv.name=out[v][1];
			                    if(flag=="1")
			                    {
                                    labDiv.onclick = function()
			                        {
			                        var objResponse=new JHttpResponse();
                                    objResponse.write("planID",planID);
	                                outs=objAjax.getText("post",sysPath+"webServer.aspx?type=CheckUser",objResponse,null);
		                                if (outs==0)
		                                {
		                                    tenderModiContent2("",labDiv,this.id,tint,tmoney,this.name,planID); 
		                                }
		                                else
		                                {
		                                    alert("您无权此操作！");
		                                    return;
		                                }
	                                }
	                               
	                                labDiv.onmouseover = function()
	                                {
    	                                this.style.cssText = "cursor:hand; text-align:center;font-size:"+contentBtnfSize+"px; color:"+contentBtnColor+"; width:"+btnWidth+"px;height:"+btnHeight+"px; margin:3px 3px 3px 3px;text-align:center;background-color:"+btnMouseOverColor;
	                                }
	                                labDiv.onmouseout = function()
	                                {
	                                    this.style.cssText = "cursor:none; text-align:center;font-size:"+contentBtnfSize+"px; color:"+contentBtnColor+"; width:"+btnWidth+"px;height:"+btnHeight+"px; margin:3px 3px 3px 3px;text-align:center;background-color:"+btnMouseOutColor;
	                                }
	                            }
			                }
			            }
			        }
		    }
		}
}	
function tenderModiContent(labelName,thisObj,planID,tint,tmoney){ 
	var obj=cObj(document.body,"div");
	obj.id="userModiContentDiv";
	obj.style.cssText="z-index:20;left:0px;top:0px;position:absolute;width:100%;height:"+document.body.scrollHeight+"px;background-color:#efefef;filter: Alpha(Opacity=70); "
	var obj1=cObj(document.body,"div");
	obj1.id="userModiContentDiv1";
	obj1.style.cssText="text-align:center;z-index:21;left:0px;top:0px;position:absolute;width:100%;height:"+document.body.scrollHeight+"px; "
	
	var obj2=cObj(obj1,"div");
	var y=getTop(thisObj);
	y=y-410;
	if (y<=10){
		y=10;
	}
	
	
	obj2.style.cssText="z-index:22;left:0px;top:"+y+"px;position:relative;width:750px;height:400px;background-color:#c0deff; "
	var objAjax=new JAjax();
	var out=objAjax.getText("get",sysPath+"system/sysSetup/tenderModiContent.aspx?planID="+planID,null,null);
	obj2.innerHTML=out;
	
	$("userButtonClose").onclick=function(){
		$("userModiContentDiv").removeNode(true);
		$("userModiContentDiv1").removeNode(true);
	}
	
	$("tenderOk").onclick = function()
	{
	    var mark = $("tenderMark").value;
            if(mark==null||mark=="")
            {
                alert("总得说点啥吧！");
                return;
            }
            
            var objAjax = new JAjax();
            var objResponse=new JHttpResponse();
            var tenderMark = $("tenderMark").value;
            var filePath = $("filePath").value;
            objResponse.write("tenderMark",tenderMark);
            objResponse.write("filePath",filePath);
            objResponse.write("planID",planID);
            objResponse.write("tInt",tint);
            objResponse.write("tMoney",tmoney);
            out = objAjax.getText("post",sysPath+"system/sysSetup/tenderModiContent.aspx?type=save",objResponse,null);
            
            if(parseInt(out)>0)
            {
                alert("投标完成")
                $("userButtonClose").click();
                tObj.create();
            }
            else
            {
                alert("您已经投过该标了！");
            }
	}
	
	$("upFile").onclick=function()
	{
	    var out = openUpfile(3,sysPath+"system/");//注意要修改
            if(out!=null)
            $("filePath").value = out.split("※")[0];
	}
	
	
}

function tenderModiContent2(labelName,thisObj,tid,tint,tmoney,uid,planID){ 

	var obj=cObj(document.body,"div");
	obj.id="userModiContentDiv";
	obj.style.cssText="z-index:20;left:0px;top:0px;position:absolute;width:100%;height:"+document.body.scrollHeight+"px;background-color:#efefef;filter: Alpha(Opacity=70); "
	var obj1=cObj(document.body,"div");
	obj1.id="userModiContentDiv1";
	obj1.style.cssText="text-align:center;z-index:21;left:0px;top:0px;position:absolute;width:100%;height:"+document.body.scrollHeight+"px; "
	
	var obj2=cObj(obj1,"div");
	var y=getTop(thisObj);
	y=y-410;
	if (y<=10){
		y=10;
	}
	

	obj2.style.cssText="z-index:22;left:0px;top:"+y+"px;position:relative;width:750px;height:400px;background-color:#c0deff; "
	var objAjax=new JAjax();
	var out=objAjax.getText("get",sysPath+"system/sysSetup/tenderModiContent2.aspx?tid="+tid,null,null);
	obj2.innerHTML=out;

    var objResponse=new JHttpResponse();
    objResponse.write("planID",planID);
    out=objAjax.getText("post",sysPath+"webServer.aspx?type=TenderData",objResponse,null);
    
    if(out==1)
    {
        $("payMoneyBtn").style.display = "inline-block";
        $("tenderOver").style.display = "none";
    }
    
    var objResponse=new JHttpResponse();
    objResponse.write("tid",tid);
    out=objAjax.getText("post",sysPath+"webServer.aspx?type=TenderIsPay",objResponse,null);
    if(out==1)
    {
        $("payMoneyBtn").style.display = "none";
        $("tenderOver").style.display = "none";
    }
	
	$("userButtonClose").onclick=function(){
		$("userModiContentDiv").removeNode(true);
		$("userModiContentDiv1").removeNode(true);
	}
	
	$("showUserInfo").onclick=function()
	{
	    $("userInfo").href="../../webUser/userInfo.aspx?menuindex=0&userID="+uid;
	    $("userInfo").click();
	}
	
	$("tenderOver").onclick = function()
	{
            var objResponse=new JHttpResponse();
            objResponse.write("tid",tid);
            objResponse.write("tInt",tint);
            objResponse.write("tMoney",tmoney);
            var out = objAjax.getText("post",sysPath+"system/sysSetup/tenderModiContent2.aspx?type=tenderOk",objResponse,null);
            if(parseInt(out)>0)
            {
                alert("该竞标已结束！")
                $("userButtonClose").click();
            }
            else
            {
                alert("恭喜您找到合适的人员");
                $("userButtonClose").click();
                tObj.create();
            }
	}
	
	$("payMoneyBtn").onclick=function()
	{
	    if(confirm("确认支付？"))
	    {
	    var objResponse=new JHttpResponse();
            objResponse.write("tid",tid);
            objResponse.write("tInt",tint);
            objResponse.write("tMoney",tmoney);
            var out = objAjax.getText("post",sysPath+"system/sysSetup/tenderModiContent2.aspx?type=tenderPay",objResponse,null);
                alert("支付完成");
                $("userButtonClose").click();
                tObj.create();
        }
	}
}




function msgClass(){ //在页面中显示一个提示对话框

    this.text="";
    this.title="提示";
	this.titleClass="";
	this.fClass="";
	this.width="400px";
	
	
    this.create=function(){
       
       	var objAjax=new JAjax();
        var out=objAjax.getText("get",sysPath+"webUser/pageMsg.htm",null,null);
        var newObj=cObj(document.body,"div");
        newObj.innerHTML=out;
        var textObj=$("hiweb_MsgDivText");
        textObj.innerHTML=this.text;
		var titleObj=$("hiwebMsgDivTitle")
		titleObj.innerHTML=this.title;
		titleObj.className=this.titleClass;
		$("hiweb_MsgDiv").className=this.fClass;
		$("hiweb_MsgDiv").style.width=this.width;
		return $("hiweb_MsgDivText");
                
    }
}

function pointpolicy(){ //用于显示积分规则在论坛中
	
	var msg=new msgClass();
	msg.text="";
	msg.title="积分规则";
	msg.titleClass="msgTitleCss";
	msg.width="500px";
    msg.fClass="msgBodyDivCss";
	
	var obj=msg.create();
	obj.style.height="250px";
	obj.className="intCss";
	
	var objResponse=new JHttpResponse();
	objResponse.write("menuid",menuid);
	var objAjax=new JAjax();
	var out = objAjax.getText("post",sysPath+"webServer.aspx?type=readPointPolicy",objResponse,null);	
	//alert(out)
    //发贴加积分,发贴加金钱,看贴扣积分,看贴金钱,精华加分,置顶加分,删除扣分,屏蔽扣分,删除回复扣分,发回得得分,发回复得钱.
	//   0        1          2           3        4       5         6       7   8             9         10
	var html="";
	if (out.indexOf(c1)!=-1){
		out=out.split(c1);
		html=html+"<span >";
		html=html+"发贴加积分:"+out[0];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"回贴加积分:"+out[9];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"发贴加金钱:"+out[1];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"回贴加金钱:"+out[10];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"精华贴加积分:"+out[4];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"置顶加积分:"+out[5];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"看贴需积分:"+out[2];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"看贴扣金钱:"+out[3];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"删贴扣积分:"+out[6];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"屏蔽扣积分:"+out[7];
		html=html+"</span>";
		
		html=html+"<span >";
		html=html+"删除回复扣积分:"+out[8];
		html=html+"</span>";
		obj.innerHTML=html;
		
		
		
	}else{
		alert(erStr(out));
	}

	
}

function loadTabField(x){ //用于自定义挂接表编辑页, 显示扩展字段.
	
	if (x==null){x=0}
	x++;
	
	if (x>10){
		alert("无法加载扩展字段\n\n请在后台标签管理功能中,用\"挂接表编辑页设置栏目\"标签模板制作一个标签\n\n放在本页面中,指明本页需要编辑的数据来自哪个栏目")
		return;
	}
	
	if (asTab==""|asTab==null){
		setTimeout("loadTabField("+x+")",1000)
		return;
	}
	
	d.serverPath=sysPath+"system/";
	d.menuPar=d.loadPar(menuid);
	
	if (d.menuPar=="noPop"){
	    alert("您在本栏目没有发布信息的权限");
		document.body.innerHTML="";
		return;
	}

	var fObj=$(exFieldObj);
	d.tabPar=d.loadExDataPar(asTab);
	d.displayExData(fObj,fCss);
	
	d.modiType="user";
			
	if (pType=="modi"){
		d.readFileData();  //填充原始数据
		fData=d.fData;
		field=d.field;
	}
	
	
}

function loadTabFieldContent(x,language){
	if (x==null){x=0}
	x++;
	
	if (x>10){
		alert("无法加载文章内容，请确认你是把设置编辑数据栏目的标签放在编辑器之后");
		return;
	}
	if (EditContent=="" | EditContent==null){
		setTimeout("loadTabFieldContent("+x+",'"+language+"')",1000)
		return;
	}
	
	switch (language){
		case "e":
			$("editTxt").src=sysPath + "system/editor/Editor-E.htm";
			break;
		default:
			$("editTxt").src=sysPath + "system/editor/Editor.htm";
			break;
	}
}


function comparisonClass(){
	
	var data=new Array();
	var tab="";
	this.file="";
	this.max=5;
	this.moveImg="";
	this.comClickCss="";
	this.outImg="";
	
	this.onMoveup=function(obj){
		this.outImg=obj.src;
		obj.src=this.moveImg;
	}
	
	this.onMouseout=function(obj){
		obj.src=this.outImg;
	}
	
	
	this.clickObj=function(tabid,table,tabAsName,obj){
		if (obj.checked==true){
			this.add(tabid,table,tabAsName,obj)	;
		}else{
			this.del(tabid);
		}
	}
	
	
	this.add=function(tabid,table,tabAsName,obj){
		if (tab==""){
			tab=tabAsName;	
		}else{
			if (tab!=tabAsName)	{
				obj.checked=false;
				alert("“"+tab+"”和“"+tabAsName+"”之间的数据无法比较")
				return;	
			}
		}
		var i=data.length;
		if (i>=this.max){
			obj.checked=false;
			alert("最多只能比较"+this.max+"条产品信息");
			return;	
		}
		
	    var fObj= $("dataDiv_"+tabid);
		fObj.oldClass=fObj.className;
		fObj.className=this.comClickCss;
		
		data[i]=new Array();
		data[i][0]=tabid;
		data[i][1]=table;
		data[i][2]=tabAsName;
	}
	
	this.del=function(tabid){
		var id="";
		
		for (var i=0;i<data.length;i++){
			id=data[i][0];
			if (id==tabid){
				var fObj= $("dataDiv_"+tabid);
				//fObj.oldClass=fObj.className;
				fObj.className=fObj.oldClass;
				//alert(fObj.outerHTML);
				data.removeAt(i);
				break;
			}
		}
	}
	
	this.start=function(){
		if (data.length<2){
			alert("至少要选择两个项目才可以比较");
			return;	
		}
		
		if (this.file==""){
		   this.file="compare.aspx";
		}
		
		var uPar="tid=";
		for (var i=0;i<data.length;i++){
			uPar=uPar+data[i][0]+",";
		}
		uPar=uPar+"&tab="+data[0][1]+"&menuid="+menuid;
		$("comNewPage").href=sysPath+this.file+"?"+uPar;
		$("comNewPage").click();
	}
	
	this.xt=function(){ //显示比较中的相同点,隐藏不同点
		var objs=document.getElementsByName("hiweb_CompTr");
		for (var i=0;i<objs.length;i++){
			var tds=objs[i].getElementsByTagName("td");
			var dataStr=tds[1].innerHTML;
			var isDisplay=1;
			for (var x=2;x<tds.length;x++){
				if (dataStr!=tds[x].innerHTML){
					isDisplay=0;
					//objs[i].style.display="none";
					break;	
				}
			}
			if (isDisplay==0){
					objs[i].style.display="none";
			}else{
					objs[i].style.display="";
			}
		}
	}
	
	this.bt=function(){
		var objs=document.getElementsByName("hiweb_CompTr");
		for (var i=0;i<objs.length;i++){
			var tds=objs[i].getElementsByTagName("td");
			var dataStr=tds[1].innerHTML;
			var isDisplay=0;
			for (var x=2;x<tds.length;x++){
				if (dataStr!=tds[x].innerHTML){
					isDisplay=1;
					break;	
				}
			}
			if (isDisplay==0){
					objs[i].style.display="none";
			}else{
					objs[i].style.display="";
			}
		}
	}
	
	this.all=function(){
		var objs=document.getElementsByName("hiweb_CompTr");
		for (var i=0;i<objs.length;i++){
			objs[i].style.display="";
		}
	}
	
	this.move = function(id){
		//alert(id);
		if (this.max<=2){
			alert("最少要两项比较数据");
			return;	
		}
		var tid=readPar(null,"tid");
		var idList=tid.split(",");
		tid="";
		for (var i=0;i<idList.length-1;i++){
			if (idList[i]!=id){
				tid+=idList[i]+",";
			}
		}
		var menuid=readPar(null,"menuid");
		var tab=readPar(null,"tab")
		var url=sysPath+pageUrlFile+"?tid="+tid+"&menuid="+menuid+"&tab="+tab
		location.href=url;
	
	}
	
}
function ArticleGoodBadUpdate(typeid){
   
     if(tabid=="null"||tabname=="null"){
      alert("参数错误");
     return; 
    }
     if(typeid=="1"||typeid=="0"){
     var objAjax=new JAjax();
     var objResponse=new JHttpResponse();
     objResponse.write("tabid",tabid);
     objResponse.write("tabname",tabname);
     objResponse.write("typeid",typeid);
     var out=objAjax.getText("post","webServer.aspx?type=GoodBadUpdate",objResponse,null);
     switch(out){
     case "ok":alert("操作成功");window.location.href=window.location.href;break;
     default:alert(out);break;
     } 
      } 
      else 
      { 
      alert("参数错误"); 
     } 
 }
 
 
 
 	
function divZoomClass(){  //制作缩放动作的动画相片列表
	this.maxWidth=0;  // 放大的最大宽度
	this.maxHeight=0; //放大的最大高度
	this.StepCount=15; //完成动画总帧数
	this.time=10;      //一帧动画的时间
	var exList=new Array(); //对对象作缩放的坐标体系
	
	this.maxPhotoW=0;
	this.maxPhotoH=0;
	this.photoW=0;
	this.photoH=0;
	this.minPhotoW=0;
	this.minPhotoH=0;
	
	this.fObj=null;
	
	var xyList=null;
	var tempObj=null;
	var addi=0;
	
	this.isNa=1;
	
	this.imgIsB="1";  //是不是显示边框
	this.imgBcolor="";  //边线色
	this.imgFcolor="";  //外框底色
	this.imgBGcolor="";  //内部底色
	this.imgBGurl="";  //内部底图
	
	xyList=new Array();
		for (var i=0;i<5;i++){
			xyList[i]=new Array();
	}
	this.imgClass="";
	
	
	this.autoSetWh=function(){
		var obj=this.fObj;
		var w=Element.getWidth(obj);
		var h=Element.getHeight(obj);
	
		this.maxPhotoW=w*0.380;
		this.maxPhotoH=h*0.98;
	
		
		this.photoW=this.maxPhotoW*0.7;
		this.photoH=this.maxPhotoH*0.65;
		this.minPhotoW=this.maxPhotoW*0.55;
		this.minPhotoH=this.maxPhotoH*0.5;
		
		if (this.maxWidth==0){
			this.maxWidth=this.maxPhotoW*0.9
			this.maxHeight=this.maxPhotoH*0.9
		}
	}
	
	
	
		
	
	
	
	this.createXY=function(){
		var obj=this.fObj;
		var w=Element.getWidth(obj);
		var h=Element.getHeight(obj);
		var y0=h*0.503;   //中心高度
		var x0=w*0.502;
		
		var x1=x0-this.maxPhotoW*0.47;
		var x2=x0+this.maxPhotoW*0.47;
		
		var x3=x1-this.photoW*0.55;
		var x4=x2+this.photoW*0.55;
		
		//alert(x0+"|"+x1+"|"+x2+"|"+x3+"|"+x4+"|")
	
		
		
		
		xyList[0][0]=x0-this.maxPhotoW/2;
		xyList[0][1]=y0-this.maxPhotoH/2;
		xyList[0][2]=this.maxPhotoW;
		xyList[0][3]=this.maxPhotoH;
		
		
		xyList[1][0]=x1-this.photoW/2;
		xyList[1][1]=y0-this.photoH/2;
		xyList[1][2]=this.photoW;
		xyList[1][3]=this.photoH;
		
		xyList[2][0]=x2-this.photoW/2;
		xyList[2][1]=y0-this.photoH/2;
		xyList[2][2]=this.photoW;
		xyList[2][3]=this.photoH;
		//alert(xyList[2][1]);
		
		xyList[3][0]=x3-this.minPhotoW/2;
		xyList[3][1]=y0-this.minPhotoH/2;
		xyList[3][2]=this.minPhotoW;
		xyList[3][3]=this.minPhotoH;
		
		xyList[4][0]=x4-this.minPhotoW/2;
		xyList[4][1]=y0-this.minPhotoH/2;
		xyList[4][2]=this.minPhotoW;
		xyList[4][3]=this.minPhotoH;
		
		var l=getLeft(this.fObj);
		var t=getTop(this.fObj);
		for (var i=0;i<5;i++){
			xyList[i][0]=xyList[i][0]+l;
			xyList[i][1]=xyList[i][1]+t;
			xyList[i][6]="";
		}
	}
	
	
	this.setObj=function(obj){
		this.fObj=obj;
		this.autoSetWh();
		this.createXY();
	}
	
	this.add=function(img,title,url){
		if (title==null){title="";}
		if (url==null){url="";}
		xyList[addi][6]=img;
		xyList[addi][7]=title;
		xyList[addi][8]=url;
		addi++;
		if (addi>=5){
			addi=0;
		}
	}
	
	
	this.createDiv=function(){
		var html="";
		var divID="";
		for (var i=0;i<5;i++){
			if (xyList[i][6]==""){
				break;
			}
			divID="hiwebZoomID"+i;
			html+="<div  i="+i+" zindex='"+(100-i)+"' id='"+divID+"' ";
			if (i!=0){
				html+="  onMouseOver='zoomDiv.Strat(this.id,0,"+xyList[i][2]+","+xyList[i][3]+")'  "
				html+="  onMouseOut='zoomDiv.na1(this.id,0,"+xyList[i][2]+","+xyList[i][3]+")'  "
			}
			html+=" class='"+this.imgClass+"' style=' ";
			if (this.imgIsB=="1"){
				html+="  border: 1px solid "+this.imgBcolor+";";
			}
			html+="z-index:"+(100-i)+";background-color:"+this.imgFcolor+";";
			html+="width:"+xyList[i][2]+"px;height:"+xyList[i][3]+"px;";
			html+="position:absolute;left:"+xyList[i][0]+"px;top:"+xyList[i][1]+"px;'>";
			
			html+="<div id='"+divID+"_2'  i='"+i+"'  ";
			html+=" style='z-index:10;background-color:"+this.imgBGcolor+";background-image:url(\""+this.imgBGurl+"\");";
			html+="width:"+(xyList[i][2]-12)+"px;height:"+(xyList[i][3]-12)+"px;position:absolute;left:5px;top:5px;overflow:hidden;'>";
			html+="<img src='"+xyList[i][6]+"' onload=setImgWH(this)  id='"+divID+"_3' >"
			html+="</div>"


			html+="<div id='"+divID+"_1'  i='"+i+"'  ";
			if ( xyList[i][7]!=""){
				html+="title='"+xyList[i][7]+"' "
			}
			if (i!=0){
				html+="  onMouseOver='zoomDiv.setIsNa(this,0,1)'  onMouseOut='zoomDiv.setIsNa(this,1,0)' ";
			}
			if (xyList[i][8]!=""){
				html+=" onclick='window.open(\""+xyList[i][8]+"\")' "
			}
			html+=" style='z-index:11;background-color:#000000;;width:"+(xyList[i][2]-10)+"px;height:"+(xyList[i][3]-10)+"px;position:absolute;left:4px;top:4px;filter:Alpha(Opacity=0);'>";
			html+="</div>"
			
			
			html+="</div>\n\n";
		}
		this.fObj.innerHTML=html;
	}
	
	this.setIsNa=function(obj,x1,x2){
		var i=obj.i;
		//alert(tempObj);
		if (x2==1){
			if (tempObj==null){
				x2=1;
			}
			else if (tempObj.tagName!="IMG"){
				x2=1;
			}else{
				x2=0;
			}
		}
		tempObj=obj;
		xyList[i][4]=x1;
		xyList[i][5]=x2;
	}
	
	this.Strat=function(objid,x,w,h){
		
		$(objid).style.zIndex=111;
		//	this.ex(objid,x,w,h);
			setTimeout("zoomDiv.ex('"+objid+"',"+x+","+w+","+h+")",50);
	}
	
	this.End=function(obj){
		obj.style.zIndex=obj.zindex;
	}
	
	
	this.findSizeName=function(objid){
		var f="0";
		for (var i=0;i<exList.length;i++){
			var sl=exList[i];
			if (sl.length>1){
				if (sl[0][0]==objid){
					f=sl;
				}
			}
		}
		return f;
	}
	
	this.createEx=function(obj,w,h){
		//var obj=$(objid)
		var maxW=this.maxWidth;
		var maxH=this.maxHeight;
		var w1=(maxW-w)/this.StepCount;
		var h1=(maxH-h)/this.StepCount;
		var objid=obj.id;
	//alert(w+"\n"+h+"\n"+Element.getWidth(obj)+"\n"+Element.getHeight(obj))
		
		var l=delpx(obj.style.left);
		var t=delpx(obj.style.top);
		var l1=w1/2;
		var t1=h1/2;
		var list=new Array();
		for (var i=0;i<this.StepCount+1;i++){
			list[i]=new Array();
			list[i][0]=objid;
			list[i][1]=w+(w1*i); //应该达到的宽度;
			
			list[i][2]=h+(h1*i); //应该达到的高度;
			list[i][3]=l-(l1*i); //应该达到的LEFT；
			list[i][4]=t-(t1*i); //应该达到的TOP
		}
		exList[exList.length]=list;
		return list;
	}
	
	
	
	
	this.ex=function(objid,x,w,h){
		
		var maxW=this.maxWidth;
		var maxH=this.maxHeight;
		if (maxW==0){
			alert("请设置MAX");
			return;
		}
		//alert(x);
		if (x>this.StepCount){
			return;
		}
		
		var obj=$(objid);
		
		if (xyList[obj.i][5]==0){
			return;
		}
		
		var list=this.findSizeName(objid);
		if (list=="0"){
			list=this.createEx(obj,w,h)
		}
	//	return;
		 var obj1=$(obj.id+"_1");
		 var obj2=$(obj.id+"_2");
		 var obj3=$(obj.id+"_3");
		 
		 obj.style.width=list[x][1];
		 obj.style.height=list[x][2];
		 
 		obj1.style.width=list[x][1]-10;
		obj1.style.height=list[x][2]-10;

 		obj2.style.width=list[x][1]-12;
		obj2.style.height=list[x][2]-12;

		 obj.style.left=list[x][3];
		 obj.style.top=list[x][4];
		 
		 setImgWH(obj3);
		x++;
		setTimeout("zoomDiv.ex('"+objid+"',"+x+")",this.time);
	}
	
	this.na1=function(objid,x,w,h){
		
		setTimeout("zoomDiv.na('"+objid+"',"+x+","+w+","+h+")",50);
	}
	
	this.na=function(objid,x,w,h){
		
		var maxW=this.maxWidth;
		var maxH=this.maxHeight;
		if (maxW==0){
			alert("请设置MAX");
			return;
		}
		var obj=$(objid);
		if (xyList[obj.i][4]==0){
			return;
		}
		tempObj=null;
		
		if (x>this.StepCount){
			this.End(obj);
			return;
		}
		
		var list=this.findSizeName(objid);
		if (list=="0"){
			list=this.createEx(obj,w,h)
		}
		var i=this.StepCount-x;
		var obj1=$(obj.id+"_1");
		var obj2=$(obj.id+"_2");
		var obj3=$(obj.id+"_3");
		
		obj.style.width=list[i][1];
		obj.style.height=list[i][2];
		
		obj1.style.width=list[i][1]-10;
		obj1.style.height=list[i][2]-10;
		
		obj2.style.width=list[i][1]-12;
		obj2.style.height=list[i][2]-12;
		
		
		obj.style.left=list[i][3];
		obj.style.top=list[i][4];
	    setImgWH(obj3);

		
		x++;
		setTimeout("zoomDiv.na('"+objid+"',"+x+")",this.time);
	}
	

	
}




function  wqImgListClass(){
	var  imgList=new Array();
	var  urlList=new Array();
	var titleList=new Array();
	var objString="";
	
	var leftObj=null;
	var rObj=null;
	
	this.maxImgCss="";
	this.minImgcss="";
	
	this.objName="";
	this.imgName="";
	this.mImgName="";
	this.aWZ="3";
	
	
	this.addImg=function(img,title,url){
		imgList[imgList.length]=img;
		urlList[urlList.length]=url;
		titleList[titleList.length]=title;
	}
	
	
	this.create=function(objStr){
		
		//alert("开始")
		if (imgList.length==0){
			 alert("请设置要显示哪些图片"); 
			return;
		}
		objString=objStr;
		 var obj=$(objStr);
		 var lObj=cObj(obj,"div");
		 lObj.className=this.maxImgCss;
		 switch (this.aWZ){
		    case "3":
		        lObj.style.styleFloat="left";
		        break;
		     case "1" :
		         lObj.style.styleFloat="none";
		        break;
		     case "4":
     	        lObj.style.styleFloat="right";
		        break;
		      
		 }
		 
		 lObj.style.overflow="hidden";
		 lObj.innerHTML="<img  onclick='"+this.objName+".open(this)' url='"+urlList[0]+"' src='"+imgList[0]+"' onload=setImgWH(this)>"
		 lObj.id=this.imgName;
		 lObj.name=this.imgName;
		 leftObj=lObj;
		 
		 rObj=cObj(obj,"div");
		 rObj.style.styleFloat="left";
		 rObj.style.width="auto";
		 rObj.style.height="auto";
	
		 for (var i=0;i<imgList.length;i++){
			var nObj=cObj(rObj,"div");
			nObj.style.overflow="hidden";
			nObj.style.styleFloat="left";
			nObj.className=this.minImgCss;
			nObj.id=this.mImgName;
			nObj.name=this.mImgName;
			nObj.innerHTML="<img  title='"+titleList[i]+"' onclick='"+this.objName+".addLeft(this)' url='"+urlList[i]+"' src='"+imgList[i]+"' onload=setImgWH(this)>"
		 }
		 
		
	}
	
	this.setImg=function(){
	   var objs=rObj.getElementsByTagName("img");
	   for (var i=0;i<objs.length;i++){
		   	objs[i].onclick=function(){
				wqimg.addLeft(this)
			}
	   }
	}
	
	this.addLeft=function(rimg){
		leftObj.innerHTML="<img id='"+this.mImgName+"'  onclick='"+this.objName+".open(this)' url='"+rimg.url+"' src='"+rimg.src+"' onload=setImgWH(this)>";
	}
	
	
	this.open=function(limg){
		if (limg.url=="" || limg.url==null){
			return;
		}
		window.open(limg.url);
	}
	
}



function softdownPass(tabid,table){
          var objAjax=new JAjax();
          var objResponse=new JHttpResponse();
          objResponse.write("tabid",tabid);
          objResponse.write("table",table);
          objResponse.write("pass",usersoftdownpass.value);
          
          var out=objAjax.getText("post","webServer.aspx?type=readSoftdownPass",objResponse,null);
          //alert(out);
          if (out=="2"){
            alert("密码错误");
            return;
          }
         //return;
          location.href=out;
        
}
