使用dwr进行数据检索的javascript

var loadingDiv="loading";   //数据加载动画层
var menuDiv="menu";      //数据上层显示数据
var searchResult="searchResult";  //查询结果显示层
var pagingDiv="paging";           //翻页的位置显示层
var m_title="qymc";               //查询的关键词语
var p1="hydm";
var p2="xzqh";
var pagesDiv="pages";
var conditon="";
var pageIndex=1;
var g_keyword="";
var startSearch;  //开始搜索时间
var endSearch;
var totalcount=1;
var pagecount=10;
var maxpage=1;
var keywordlist="";
var keylist_key="";
//用于显示企业窗里面的数据:
var w_dz,w_dh,w_cz,w_email,w_www,w_uuid,w_data;
//控制关键词的显示
function redColor(_source,keywords){
   var arr=keywords.split("/,");
   for(var i = 0;i < arr.length;i++)
   {
     if(_source.indexOf(arr[i]) != -1){
      _source = _source.substring(0,_source.indexOf(arr[i]))+"<font color=red>"+arr[i]+"</font>"+_source.substring((_source.indexOf(arr[i])+ arr[i].length), _source.length);

      }
   }
   return _source;
}
function search_Xiangguan(keywords){
  conditon="";
  var str=keywords;
         var extra=" ";
      
  if(str.indexOf(" ") != -1){
         //2、如果查询条件中有多个关键词
   
   var list = str.split(" "); 
   for(var k = 0;k<list.length;k++){
   var temp = list[k];
   if(temp != ""){
     g_keyword += temp+",";
     extra += " (dwmc like /'%"+temp+"%/' or  jyfw like /'%"+temp+"%/'  or qyjj like /'%"+temp+"%/') and";
   }
        }
   
 extra=extra.substring(0,extra.lastIndexOf("and"));
 //extra+=")";
 
 }else{
        //3、如果查询只有一个关键词
 g_keyword+=str+",";
   extra=" (dwmc like /'%"+str+"%/' or jyfw like /'%"+str+"%/'  or qyjj like /'%"+str+"%/')";
  }

 JPageUtil.getCorreS(g_keyword,cal_xiangguan);
  //相关搜索部分jieshu
 document.getElementById(loadingDiv).style.display="block";
 conditon+=extra;

 startSearch=new Date();
 JPageUtil.getMaxCountOfMain(conditon,cal_maxcount);
 JPageUtil.getCompanys(conditon,pageIndex,cal_search);  //调用有参数的方法,最后一个参数为回调函数名称

}
var cal_xiangguan=function(data){
  var curdiv = document.getElementById("xiangguan");
  document.getElementById("xiangguan").style.display = "block";
  var result="相关搜索:<table width=/"75%/" border=/"0/"><tr>";
   for(i = 0;i<data.length;i++){  //根据反馈回的信息,显示数据
           var keywords=data[i].keywords;
           while(keywords.indexOf(",")!=-1){
           keywords=keywords.replace(","," ");
           }
    result=result+"<td><a href=# οnclick=/"search_Xiangguan(/'"+keywords+"/')/">"+keywords+"</a></td>";
    if(i==3) result+="</tr>";
 }
 result+="</tr></table>";
 curdiv.innerHTML=result;

}
var cal_xiangguan1=function(data){
  var curdiv = document.getElementById("xiangguan");
  document.getElementById("xiangguan").style.display = "block";
  var result="相关搜索:&nbsp;&nbsp;&nbsp;";
   for(i = 0;i<data.length;i++){  //根据反馈回的信息,显示数据
           var keywords=data[i].keywords;
    result=result+"<span><a href=#>"+keywords+"</a></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
    if(i==3) result+="<br>";
 }
 curdiv.innerHTML=result;
 alert(result);
 
}
var cal_maxcount = function(data){ 
 totalcount=data;
 maxpage=Math.round(totalcount / pagecount);
 if(totalcount % pagecount!=0)
 maxpage++;
}
//实际运行搜索后的显示控制

var cal_keylist = function(data){ 

       if (data == null || typeof data != 'object'){      
        document.getElementById(loadingDiv).style.display = "none";
        showPaging(1);   

        return false;
       }

        for(i = 0;i<data.length;i++){  //根据反馈回的信息,显示数据
           var dwmc = data[i].cname;
           if(g_keyword!="") dwmc = redColor(dwmc,g_keyword);
           var dz = "";
           if(g_keyword!="") dz = redColor(dz,g_keyword);
      
           var jyfw = data[i].cdesc;
           if(g_keyword!="") jyfw = redColor(jyfw,g_keyword);
           var www = data[i].curl;
           var statecode = data[i].statecode;
           var a=Math.random(10)*10;
    var b=Math.round(i % 3)+1;
         //  keywordlist+="<table border=0><tr><td rowspan=4><img src=VideoWindow/Videos/zoomIn/"+(Math.round(a))+".GIF alt='图片暂无'><br>&nbsp;&nbsp;&nbsp;点击查看视频</td>";
          // keywordlist+="<table border=0><tr><td rowspan=4><img src=VideoWindow/Videos/zoomIn/"+(Math.round(a))+".GIF alt='图片暂无'></td>";
            keywordlist+="<table border=0><tr><td rowspan=4><img src=VideoWindow/Videos/zoomIn/"+(Math.round(a))+".GIF  alt='图片暂无'></td>";
            keywordlist+="<td><table border=0><tr><td><font size=3>名称</font>:&nbsp;&nbsp;<a href='javascript:;' οnclick='showschjj(/""+statecode+"/",/""+dz+"/",/""+dh+"/",/""+fax+"/",/""+email+"/",/""+www+"/");'><font color=blue style='font-size:14px'>"+dwmc+"</font></a></td></tr>";
       
          // keywordlist+="<td><table border=0><tr><td><font size=3>名称</font>:&nbsp;&nbsp;<a href='qiyechuang/qysch"+(Math.round(b))+".html' target=_blank><font color=blue style='font-size:14px'>"+dwmc+"</font></a></td></tr>";
           keywordlist+="<tr><td>"+jyfw+"</td></tr>";
           keywordlist+="<tr><td>"+dz+"</td></tr>";
          // keywordlist+="<tr><td>网址:&nbsp;<font color=green ><a href='http://"+www+"'  target=_blank>"+www+"</a>&nbsp;&nbsp;&nbsp;&nbsp;电话:"+fax+"</font></td></tr></table></td>";
           keywordlist+="<tr><td>网址:&nbsp;<font color=green ><a href='http://"+www+"'  target=_blank>"+www+"</a></font></td></tr></table></td>";
           keywordlist+="</tr></table>";
           keywordlist+="<br><table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td height='1' background='Images/line.gif'></td></tr></table><br>";
        
         //  result += "<ul><li><a href='http://"+www+"'><font color=blue size=3>"+dwmc+"</font></a></li><li>"+dz+"</li><li>"+jyfw+"</li><li>网址:&nbsp;<font color=green >"+www+"&nbsp;&nbsp;&nbsp;&nbsp;"+fax+"</font></li></ul>" ;       
     }
 
}
var cal_search = function(data){ 

      var grandfather = document.getElementById(searchResult);
       if(data==""){
       
        document.getElementById(loadingDiv).style.display = "none";
        document.getElementById(pagingDiv).style.display = "none";
         grandfather.innerHTML ="<center><font color=red>没有此企业信息!</font></center>";
        return false;
}


      endSearch = new Date();
      var timetitle = "<table class=bi width=100%>";
      timetitle += "<tr><td background='image/leftBG.jpg' style='color:#073FBA;'>您当前的位置是:>>"+document.getElementById("sub_indus").value+">>"+document.getElementById("city").value+"</td><td height='24' align='right' background='image/leftBG.jpg' style='color:#073FBA;'>找到相关信息"+totalcount+"条,用时"+(endSearch-startSearch)/1000+" 秒,当前是第"+pageIndex+"页&nbsp;</td></tr>";
       //  result += "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;网中网视讯,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;用时"+(endSearch-startSearch)/5000+"秒&nbsp;&nbsp;&nbsp;&nbsp; </td></tr></table><br>";
       timetitle += "</table>";
       var result = "";
       for(i = 0;i<data.length;i++){  //根据反馈回的信息,显示数据
           var uuid = data[i].uuid;
           var dwmc = data[i].dwmc;
           if(g_keyword!="") dwmc = redColor(dwmc,g_keyword);
           var dz = data[i].dz;
           if(g_keyword!="") dz = redColor(dz,g_keyword);
           var fax = data[i].fax;
           var jyfw = data[i].jyfw;
           if(g_keyword!="") jyfw = redColor(jyfw,g_keyword);
           var www = data[i].www;
            var dh = data[i].tel;
            var email = data[i].email;
           var qh = data[i].qh;
           var a=Math.random(10)*10;
    var b=Math.round(i % 3)+1;
   
          // result+="<table border=0><tr><td rowspan=4><img src=VideoWindow/Videos/zoomIn/"+(Math.round(a))+".GIF  alt='图片暂无'><br>&nbsp;&nbsp;&nbsp;点击查看视频</td>";
           result+="<table border=0><tr><td rowspan=4><img src=VideoWindow/Videos/zoomIn/"+(Math.round(a))+".GIF  alt='图片暂无'></td>";
           result+="<td><table border=0><tr><td><font size=3>名称</font>:&nbsp;&nbsp;<a href='javascript:;' οnclick='showsch(/""+uuid+"/",/""+dz+"/",/""+dh+"/",/""+fax+"/",/""+email+"/",/""+www+"/");'><font color=blue style='font-size:14px'>"+dwmc+"</font></a></td></tr>";
           result+="<tr><td>"+jyfw+"</td></tr>";
           result+="<tr><td>"+dz+"</td></tr>";
           result+="<tr><td>网址:&nbsp;<font color=green ><a href='http://"+www+"'  target=_blank>"+www+"</a>&nbsp;&nbsp;&nbsp;&nbsp;区号:"+qh+"---电话:"+fax+"</font></td></tr></table></td>";
           result+="</tr></table>";
           result+="<br><table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'><tr><td height='1' background='Images/line.gif'></td></tr></table><br>";
         //  result += "<ul><li><a href='http://"+www+"'><font color=blue size=3>"+dwmc+"</font></a></li><li>"+dz+"</li><li>"+jyfw+"</li><li>网址:&nbsp;<font color=green >"+www+"&nbsp;&nbsp;&nbsp;&nbsp;"+fax+"</font></li></ul>" ;       
     }

     grandfather.innerHTML = timetitle+keywordlist+result;
     document.getElementById(pagingDiv).style.display = "block";
     document.getElementById(loadingDiv).style.display = "none";
}

//搜索功能
function mysearch(){
    //0、初始化查询操作.
 
    g_keyword="";
    pageIndex=1;
    conditon="validate=/'1/' and ";
    var extra=" ";
    var str=document.getElementById(m_title).value;
    //1、如果没有输入查询条件
    if(str==""){
      alert("请输入查询条件!");    
      return false;
    }

    if(document.getElementById(p1).value!=""){
     conditon+=" hydm like '%"+document.getElementById(p1).value+"%' and";
    }

    if(document.getElementById(p2).value!=""){
     conditon+=" xzqh like '%"+document.getElementById(p2).value+"%' and ";
    }

    if(str.indexOf(" ") != -1){
    //2、如果查询条件中有多个关键词
   
   var list = str.split(" ");
   for(var k = 0;k<list.length;k++){
   var temp = list[k];
   if(temp != ""){
   g_keyword += temp+",";
   extra += " (dwmc like /'%"+temp+"%/' or  jyfw like /'%"+temp+"%/'  or qyjj like /'%"+temp+"%/') and";  
 }
    }
   
 extra=extra.substring(0,extra.lastIndexOf("and"));
 //extra+=")";
 
 }else{
   //3、如果查询只有一个关键词
 g_keyword+=str+",";
 DWREngine.setAsync(false);
 var  key_state="";
 var  str_keycondition="";
 if(document.getElementById("state")!=null)
        {
         key_state=document.getElementById("state").value;
         if(key_state==""){
          str_keycondition="leftCounts>0 and isconfirm=1 order by fmoney desc";
                 
         }else{
            str_keycondition="leftCounts>0 and isconfirm=1 and statecode like '"+key_state+"%'  order by fmoney desc";
                }
          
        }
      //  var str_keycondition="leftCounts>0 and isconfirm=1 order by fmoney desc";
 jingjiaManager.findKeyWords(str,str_keycondition,cal_keylist);
 DWREngine.setAsync(true);
   extra=" (dwmc like /'%"+str+"%/' or jyfw like /'%"+str+"%/' or qyjj like /'%"+str+"%/' )";
     }
       //相关搜索部分kaishi 
      //JPageUtil.insertCorre(g_keyword,"unkown");
      JPageUtil.getCorreS(g_keyword.substring(0,g_keyword.length-1),cal_xiangguan);
       //相关搜索部分jieshu
      document.getElementById(loadingDiv).style.display="block";
      conditon+=extra;
    //  conditon+=" order by zczj desc ";
   
      startSearch=new Date();
     // DWREngine.setAsync(false);
      JPageUtil.getMaxCountOfMain(conditon,cal_maxcount);
     // DWREngine.setAsync(true);
      JPageUtil.getCompanys(conditon,pageIndex,cal_search);  //调用有参数的方法,最后一个参数为回调函数名称
     
 }
 

 
 //翻转到特定页面
function currentPage(currentPageIndex){
    DWRUtil.useLoadingMessage();
   document.getElementById(loadingDiv).style.display="block";   
   startSearch=new Date();
   var pageing=document.getElementById(pagingDiv);
   // paging.innerHTML+="<a href=# "
   //alert(conditon);
   JPageUtil.getCompanys(conditon,currentPageIndex,cal_search);  //调用有参数的方法,最后一个参数为回调函数名称
 }
 

 
//向下翻一页
function nextPage(){
 var nocurr=pageIndex;
 if(nocurr++>maxpage)
 {
  alert("没有下一页;");
  return false;
 }
    DWRUtil.useLoadingMessage();
  //  document.getElementById(loadingDiv).style.display="block";
    pageIndex++;
    showPaging(pageIndex);
    startSearch=new Date();
   // var pageing=document.getElementById(pagingDiv);
   // paging.innerHTML+="<a href=# "
    //alert(conditon);
    JPageUtil.getCompanys(conditon,pageIndex,cal_search);  //调用有参数的方法,最后一个参数为回调函数名称
 }
 //向上翻一页
function prePage(){
       DWRUtil.useLoadingMessage();
    //   document.getElementById(loadingDiv).style.display="block";
       if((pageIndex--)<2){
        alert("没有上一页");
        pageIndex++;
        return false;
      }
      showPaging(pageIndex);
       startSearch=new Date();
       JPageUtil.getCompanys(conditon,pageIndex,cal_search);  //调用有参数的方法,最后一个参数为回调函数名称
 }
 
//显示页码
function showPaging(currentPageIndex){
     document.getElementById(loadingDiv).style.display="block";
   var pageing=document.getElementById(pagesDiv);
   pageing.innerHTML="";
    for(var i=currentPageIndex-3;i<(currentPageIndex);i++){
     if(i<=0)
     {
       i=1;
      }
     pageing.innerHTML+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=# οnclick='doCurrent("+i+");'>"+i+"</a>";
   }
   if(currentPageIndex!=1)
    pageing.innerHTML+="&nbsp;&nbsp;&nbsp;&nbsp;<font color=red>"+currentPageIndex+"</font>";
  
   for(var i=currentPageIndex+1;i<(currentPageIndex+4);i++){
    if(i>maxpage)return;
   pageing.innerHTML+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=# οnclick='doCurrent("+i+");'>"+i+"</a>";
   }
  
   pageIndex=currentPageIndex;
 
}
//跳转到当前选择的页码
function doCurrent(mpageIndex){
   if(mpageIndex<=0){
    alert("页码超出范围");
    return false;
   }
   showPaging(mpageIndex);
   startSearch=new Date();
   JPageUtil.getCompanys(conditon,pageIndex,cal_search);  //调用有参数的方法,最后一个参数为回调函数名称
 
}

function showsch(uuid,dz,dh,cz,email,www){
 
 w_dz=dz;
 w_dh=dh;
 w_cz=cz;
 w_email=email;
 w_www=www;
 w_uuid=uuid;
 
        var d="qych";
        var mydiv=document.getElementById(d);
        if(mydiv==null){
          return;
        }
     
        mydiv.style.left=window.event.x-100;
        mydiv.style.top=document.body.scrollTop+window.event.y-100;

        mydiv.style.display="block";
        mydiv.innerHTML=qychTable();
       JPageUtil.getCompanyType(uuid,cal_Companytype);
}
//竞价的显示
function showschjj(uuid,dz,dh,cz,email,www){
 
 w_dz=dz;
 w_dh=dh;
 w_cz=cz;
 w_email=email;
 w_www=www;
 w_uuid=uuid;
 keylist_key=g_keyword;
        var d="qych";
        var mydiv=document.getElementById(d);
        if(mydiv==null){
          return;
        }
     
        mydiv.style.left=window.event.x-100;
        mydiv.style.top=document.body.scrollTop+window.event.y-100;

        mydiv.style.display="block";
        mydiv.innerHTML=qychTable();
       JPageUtil.getCompanyType(uuid,cal_Companytypejj);
}

var cal_Companytypejj=function(data){
   var companytype="-1";
   var companyid="0";
   var userid="";
   var username="";
       if (data == null){      
        document.getElementById(loadingDiv).style.display = "none";
       }else
        {
          companytype=data.associatorType;
          companyid=data.id;
          userid=data.mainId;
          username=data.username;
        }
   var d="qych";
   var mydiv=document.getElementById(d);
   if(mydiv==null){
   return;
   }

  // mydiv.style.left=window.event.x-15;
  // mydiv.style.top=document.body.scrollTop+window.event.y-30;
  // mydiv.style.display="block";
var FO;
var divstr="<table width=/"520/" height=/"240/" border=/"0/" align=/"center/" cellpadding=/"0/" cellspacing=/"0/">";
  divstr+="<tr>";
    divstr+="<td width=/"404/"><table width=/"398/" height=/"240/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
      divstr+="<tr>";
        divstr+="<td height=/"221/" valign=/"top/" bgcolor=/"#FFFFFF/"><table width=/"398/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
          divstr+="<tr>";
            divstr+="<td height=/"25/" valign=/"middle/" background=/"Images/mbg.gif/" bgcolor=/"#FFFFFF/"><table width=/"98%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/">";
              divstr+="<tr>";
                divstr+="<td width=/"96/" align=/"center/" class=/"dao/">企业名片</td>";
                divstr+="<td width=/"2/"><img src=/"Images/mline.gif/" width=/"2/" height=/"19/" /></td>";
                divstr+="<td  align=/"right/" class=/"dao/"><img src=/"Images/closew.gif/" style=/"cursor:hand/" width=/"16/" height=/"16/" οnclick=/"divclose();/"></td>";
              //  divstr+="<td width=/"94/" align=/"center/" class=/"dao/">自我介绍</td>";
              divstr+="</tr>";
            divstr+="</table></td>";
          divstr+="</tr>";
        divstr+="</table>";
              divstr+="<table width=/"398/" height=/"209/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/">";
                divstr+="<tr>";
                  divstr+="<td width=/"136/" height=/"185/" align=/"center/" valign=/"middle/"><table width=/"140/" height=/"140/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
                      divstr+="<tr>";
                        divstr+="<td align=/"center/" valign=/"middle/" bgcolor=/"#FFFFFF/"><span id=player1></span></td>";

                      divstr+="</tr>";
                    divstr+="</table>";
                    divstr+="</td>";
                  divstr+="<td width=/"1/" valign=/"middle/"><img src=/"Images/mlline.gif/" width=/"1/" height=/"140/" /></td>";
                  divstr+="<td width=/"259/" align=/"center/" valign=/"middle/"><table width=/"80%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/">";
                      divstr+="<tr><td height=/"34/"  align=/"left/">地址:"+w_dz+"</td></tr>";
                      divstr+="<tr><td height=/"24/"  align=/"left/">电话:"+w_dh+"</td></tr>";
                      divstr+="<tr><td height=/"24/"  align=/"left/">传真:"+w_cz+"</td></tr>";                  
                      divstr+="<tr><td height=/"24/"  align=/"left/">网站:"+w_www+"</td></tr>";              
                      divstr+="<tr><td height=/"24/"  align=/"left/">邮箱:"+w_email+"</td></tr>";
                  divstr+="</table></td>";
                divstr+="</tr>";
                divstr+="<tr>";
                if(companytype=="-1"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/">><span class=/"dao1/">企业未注册></span> </td>";
                }
           
                if(companytype=="1"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/"><span class=/"dao1/"><a href=VideoWindow/free.jsp?id="+companyid+" οnclick='clickcompany(/""+userid+"/",/""+keylist_key+"/");' target=_blank>查看企业视窗</a></span> </td>";
               
                }
                if(companytype=="2"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/"><span class=/"dao1/"><a href=VideoWindow/commerce.jsp?id="+companyid+" οnclick='clickcompany(/""+userid+"/",/""+keylist_key+"/");' target=_blank>查看企业视窗</a></span> </td>";
                 }
                if(companytype=="3"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/"><span class=/"dao1/"><a href=VideoWindow/vip.jsp?id="+companyid+" οnclick='clickcompany(/""+userid+"/",/""+keylist_key+"/");' target=_blank>查看企业视窗</a></span> </td>";
                  }
                divstr+="</tr>";
            divstr+="</table></td>";
      divstr+="</tr>";
    divstr+="</table></td>";
    divstr+="<td width=/"116/" align=/"center/"><table width=/"100%/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
      divstr+="<tr>";

      if(companytype=="-1"){     

        divstr+="<td valign=/"middle/" bgcolor=/"#FFFFFF/"><img src=/"guanggao_img/free.jpg/" width=/"117/" height=/"239/" /></td>";
      }else{

          divstr+="<td valign=/"middle/" bgcolor=/"#FFFFFF/"><img src=/"guanggao_img/vip.jpg/" width=/"117/" height=/"239/" /></td>";
      }
      divstr+="</tr>";
    divstr+="</table></td>";
  divstr+="</tr>";
divstr+="</table>";

   mydiv.innerHTML=divstr;
if(companytype!="-1"){
FO = {movie:"flvplayer.swf",width:"150",height:"140",majorversion:"7",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",flashvars:"file=VideoWindow/Videos/"+w_uuid+".flv&image=preview.jpg" };
}else
{
FO = {movie:"flvplayer.swf",width:"150",height:"140",majorversion:"7",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",flashvars:"file=VideoWindow/Videos/public.flv&image=preview.jpg" };

}
UFO.create(FO, "player1");
   return;
}

var cal_Companytype=function(data){
   var companytype="-1";
   var companyid="0";
   var userid="";
   var username="";
       if (data == null){      
        document.getElementById(loadingDiv).style.display = "none";
       }else
        {
          companytype=data.associatorType;
          companyid=data.id;
          userid=data.mainId;
          username=data.username;
        }
   var d="qych";
   var mydiv=document.getElementById(d);
   if(mydiv==null){
   return;
   }

  // mydiv.style.left=window.event.x-15;
  // mydiv.style.top=document.body.scrollTop+window.event.y-30;
  // mydiv.style.display="block";
var FO;
var divstr="<table width=/"520/" height=/"240/" border=/"0/" align=/"center/" cellpadding=/"0/" cellspacing=/"0/">";
  divstr+="<tr>";
    divstr+="<td width=/"404/"><table width=/"398/" height=/"240/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
      divstr+="<tr>";
        divstr+="<td height=/"221/" valign=/"top/" bgcolor=/"#FFFFFF/"><table width=/"398/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
          divstr+="<tr>";
            divstr+="<td height=/"25/" valign=/"middle/" background=/"Images/mbg.gif/" bgcolor=/"#FFFFFF/"><table width=/"98%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/">";
              divstr+="<tr>";
                divstr+="<td width=/"96/" align=/"center/" class=/"dao/">企业名片</td>";
                divstr+="<td width=/"2/"><img src=/"Images/mline.gif/" width=/"2/" height=/"19/" /></td>";
                divstr+="<td  align=/"right/" class=/"dao/"><img src=/"Images/closew.gif/" style=/"cursor:hand/" width=/"16/" height=/"16/" οnclick=/"divclose();/"></td>";
              //  divstr+="<td width=/"94/" align=/"center/" class=/"dao/">自我介绍</td>";
              divstr+="</tr>";
            divstr+="</table></td>";
          divstr+="</tr>";
        divstr+="</table>";
              divstr+="<table width=/"398/" height=/"209/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/">";
                divstr+="<tr>";
                  divstr+="<td width=/"136/" height=/"185/" align=/"center/" valign=/"middle/"><table width=/"140/" height=/"140/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
                      divstr+="<tr>";
                        divstr+="<td align=/"center/" valign=/"middle/" bgcolor=/"#FFFFFF/"><span id=player1></span></td>";

                      divstr+="</tr>";
                    divstr+="</table>";
                    divstr+="</td>";
                  divstr+="<td width=/"1/" valign=/"middle/"><img src=/"Images/mlline.gif/" width=/"1/" height=/"140/" /></td>";
                  divstr+="<td width=/"259/" align=/"center/" valign=/"middle/"><table width=/"80%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/">";
                      divstr+="<tr><td height=/"34/"  align=/"left/">地址:"+w_dz+"</td></tr>";
                      divstr+="<tr><td height=/"24/"  align=/"left/">电话:"+w_dh+"</td></tr>";
                      divstr+="<tr><td height=/"24/"  align=/"left/">传真:"+w_cz+"</td></tr>";                  
                      divstr+="<tr><td height=/"24/"  align=/"left/">网站:"+w_www+"</td></tr>";              
                      divstr+="<tr><td height=/"24/"  align=/"left/">邮箱:"+w_email+"</td></tr>";
                  divstr+="</table></td>";
                divstr+="</tr>";
                divstr+="<tr>";
                if(companytype=="-1"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/">><span class=/"dao1/">企业未注册></span> </td>";
                }
           
                if(companytype=="1"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/"><span class=/"dao1/"><a href=VideoWindow/free.jsp?id="+companyid+"  target=_blank>查看企业视窗</a></span> </td>";
               
                }
                if(companytype=="2"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/"><span class=/"dao1/"><a href=VideoWindow/commerce.jsp?id="+companyid+"  target=_blank>查看企业视窗</a></span> </td>";
                 }
                if(companytype=="3"){
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/"><span class=/"dao1/"><a href=VideoWindow/vip.jsp?id="+companyid+"  target=_blank>查看企业视窗</a></span> </td>";
                  }
                divstr+="</tr>";
            divstr+="</table></td>";
      divstr+="</tr>";
    divstr+="</table></td>";
    divstr+="<td width=/"116/" align=/"center/"><table width=/"100%/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
      divstr+="<tr>";

      if(companytype=="-1"){     

        divstr+="<td valign=/"middle/" bgcolor=/"#FFFFFF/"><img src=/"guanggao_img/free.jpg/" width=/"117/" height=/"239/" /></td>";
      }else{

          divstr+="<td valign=/"middle/" bgcolor=/"#FFFFFF/"><img src=/"guanggao_img/vip.jpg/" width=/"117/" height=/"239/" /></td>";
      }
      divstr+="</tr>";
    divstr+="</table></td>";
  divstr+="</tr>";
divstr+="</table>";

   mydiv.innerHTML=divstr;
if(companytype!="-1"){
FO = {movie:"flvplayer.swf",width:"150",height:"140",majorversion:"7",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",flashvars:"file=VideoWindow/Videos/"+w_uuid+".flv&image=preview.jpg" };
}else
{
FO = {movie:"flvplayer.swf",width:"150",height:"140",majorversion:"7",build:"0",bgcolor:"#FFFFFF",allowfullscreen:"true",flashvars:"file=VideoWindow/Videos/public.flv&image=preview.jpg" };

}
UFO.create(FO, "player1");
   return;
}


 function divclose(){
   var d="qych";
   var mydiv=document.getElementById(d);
   if(mydiv==null){
   return;
   }
   mydiv.style.display="none";
    
   
  }
 
 
function qychTable(){
var divstr="<table width=/"520/" height=/"240/" border=/"0/" align=/"center/" cellpadding=/"0/" cellspacing=/"0/">";
  divstr+="<tr>";
    divstr+="<td width=/"404/"><table width=/"398/" height=/"240/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
      divstr+="<tr>";
        divstr+="<td height=/"221/" valign=/"top/" bgcolor=/"#FFFFFF/"><table width=/"398/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
          divstr+="<tr>";
         
            divstr+="<td height=/"25/" valign=/"middle/" background=/"Images/mbg.gif/" bgcolor=/"#FFFFFF/"><table width=/"98%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/">";
              divstr+="<tr>";
                divstr+="<td width=/"96/" align=/"center/" class=/"dao/">企业名片</td>";
                divstr+="<td width=/"2/"><img src=/"Images/mline.gif/" width=/"2/" height=/"19/" /></td>";
                divstr+="<td  align=/"right/" class=/"dao/"><img src=/"Images/closew.gif/" style=/"cursor:hand/" width=/"16/" height=/"16/" οnclick=/"divclose();/"></td>";
                //  divstr+="<td width=/"94/" align=/"center/" class=/"dao/">自我介绍</td>";
              divstr+="</tr>";
            divstr+="</table></td>";
          divstr+="</tr>";
        divstr+="</table>";
              divstr+="<table width=/"398/" height=/"209/" border=/"0/" cellpadding=/"0/" cellspacing=/"0/">";
                divstr+="<tr>";
                  divstr+="<td width=/"136/" height=/"185/" align=/"center/" valign=/"middle/"><table width=/"84/" height=/"84/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
                      divstr+="<tr>";
                        divstr+="<td align=/"center/" valign=/"middle/" bgcolor=/"#FFFFFF/">数据加载...</td>";
                      divstr+="</tr>";
                    divstr+="</table>";
                    divstr+="</td>";
                  divstr+="<td width=/"1/" valign=/"middle/"><img src=/"Images/mlline.gif/" width=/"1/" height=/"140/" /></td>";
                  divstr+="<td width=/"259/" align=/"center/" valign=/"middle/"><table width=/"80%/" border=/"0/" cellspacing=/"0/" cellpadding=/"0/">";
                      divstr+="<tr><td height=/"34/"  align=/"left/">地址:数据加载...</td></tr>";
                      divstr+="<tr><td height=/"24/"  align=/"left/">电话:数据加载...</td></tr>";
                      divstr+="<tr><td height=/"24/"  align=/"left/">传真:数据加载...</td></tr>";                  
                      divstr+="<tr><td height=/"24/"  align=/"left/">网站:数据加载...</td></tr>";              
                      divstr+="<tr><td height=/"24/"  align=/"left/">邮箱:数据加载...</td></tr>";
                  divstr+="</table></td>";
                divstr+="</tr>";
                divstr+="<tr>";
                  divstr+="<td height=/"25/" colspan=/"3/" align=/"right/" bgcolor=/"CBEBFC/">&nbsp;&nbsp;&nbsp;&nbsp;<div align=/"left/"><a href=/"#/" οnclick=/"divclose();/" >关闭</a></div><span class=/"dao1/">数据加载...</span> </td>";
                divstr+="</tr>";
            divstr+="</table></td>";
      divstr+="</tr>";
    divstr+="</table></td>";
    divstr+="<td width=/"116/" align=/"center/"><table width=/"100%/" border=/"0/" cellpadding=/"0/" cellspacing=/"1/" bgcolor=/"99CCFF/">";
      divstr+="<tr>";
        divstr+="<td valign=/"middle/" bgcolor=/"#FFFFFF/">数据加载...</td>";
      divstr+="</tr>";
    divstr+="</table></td>";
  divstr+="</tr>";
divstr+="</table>";
return divstr;
}
//userid为企业的id,username为企业的用户id
function clickcompany(userid,keyname){
  jingjiaManager.ClickMyCompany(userid,clientIP,keyname); 
 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值