﻿// JScript 文件
window.IncludeFile={"header":"head.html","tailer":"tail.html"};
window.JsModule=["system/jqframe.js","js/all_jpgys.js"];
function WebMain()
{ 
	//$.SetFormat("zh","jjtscl","<div style=\"float: left; width: 152px; height: 112px; margin: 15px 0 0 5px;\"><img src=\"#5#\" alt=\"图片\" style=\"border:1px solid #D9D9D9;display:block;width: 152px;height: 112px;\"/></div><div  style=\"float: left; width: 265px; height: 140px; margin-left: 10px; overflow:hidden;\"><h3 style='color: #3F3E3C;margin:10px 0 0 0;font-size:14px; text-align:center;'>#1#</h3><p style='text-align:center; line-height:150%;'>作者：#2#</p><p style='text-align:center;'>发布时间：#3#</p><p style='text-indent: 2em; line-height:160%;height:70px;'>#4#<a href=\"news.html?{'id':#0#}\"> [详细]</a></p></div>","","");
    $.SetFormat("zh","rdzx","<li><a style='width:250px;' href=\"news.html?{'id':#0#}\" target=\"_blank\">#1#</a></li>","","");
    $.SetFormat("zh","hydt","<li><a style='width:250px;' href=\"news.html?{'id':#0#}\" target=\"_blank\">#1#</a></li>","","");
    $.SetFormat("zh","newslist","<li><a style='width:424px;' href=\"news.html?{'id':#0#}\" target=\"_blank\">#1#</a></li>","","");
    $.SetFormat("zh","hyqy","<li class='linkover'><a style='width:250px;' href=\"#2#\" target=\"_blank\">#1#</a></li>","","");
    
	
    /*简介特殊处理*/$.SendMessage({callback:firstNews,bLoading:false,type:"DBSelect",id:"jjtscl",pm :"<@ehai_detail%16Id%16Id,Title,Author,CreateTime,dContent,Imgurl%16%16%16Isup desc,CreateTime desc%160%16MenuId=7 and IsCheck=1 and IsShow=1@>%16",start:0,total:1});  
    /*热点资讯*/$("#rdzx").SendMessage({bLoading:false,type:"DBSelect",id:"rdzx",pm :"<@ehai_detail%16Id%16Id,Title%16%16%16Isup desc,Counts desc%160%16MenuId=7 and IsCheck=1 and IsShow=1@>%16",format:"rdzx",start:0,total:8});    
    /*行业动态*/$("#hydt").SendMessage({bLoading:false,type:"DBSelect",id:"hydt",pm :"<@ehai_detail%16Id%16Id,Title%16%16%16Isup desc,CreateTime desc%160%16MenuId=8 and IsCheck=1 and IsShow=1@>%16",format:"hydt",start:0,total:11});  
    /*新闻列表*/$("#newslist").SendMessage({bLoading:false,type:"DBSelect",id:"newslist",pm :"<@ehai_detail%16Id%16Id,Title%16%16%16Isup desc,CreateTime desc%160%16IsEnglish=0 and IsCheck=1 and IsShow=1@>%16",format:"newslist",start:0,total:21}); 
    /*会员企业*/$("#hyqy").SendMessage({bLoading:false,type:"DBSelect",id:"hyqys",pm :"<@ehai_user%16Id%16Id,Company,WebSite%16%16%16CreateTime desc%160%16RoleType=1@>%16",format:"hyqy",start:0,total:8});
    getAdsInfo(5);
}
function firstNews(re)
{
	if(re && ! re.wrong && ! re.error)
	{
		var s = "<div style=\"float: left; width: 152px; height: 112px; margin: 15px 0 0 5px;\"><img src=\""+re[0][5]+"\" alt=\"图片\" style=\"border:1px solid #D9D9D9;display:block;width: 152px;height: 112px;\"/></div><div  style=\"float: left; width: 265px; height: 140px; margin-left: 10px; overflow:hidden;\"><h3 style='height:16px;overflow: hidden;color: #3F3E3C;margin:10px 0 0 0;font-size:14px; text-align:center;'>"+re[0][1]+"</h3><p style='text-align:center; line-height:150%;'>作者："+htmlreplace(re[0][2])+"</p><p style='text-align:center;'>发布时间："+re[0][3]+"</p><p style='text-indent: 2em; line-height:160%;height:60px;overflow:hidden;'>"+htmlreplace(re[0][4])+"</p><p style=\"text-align:right;\"><a href=\"news.html?{'id':"+re[0][0]+"}\"> [详细]</a></p></div>";
		$("#jjtscl").html(s);
	}
}

