<%@ page contentType="text/html; charset=GBK" %>
<%@ taglib uri="/cms4j" prefix="cms4j" %>

<%@ page import = "cn.com.dekn.cms.util.*,cn.com.dekn.common.util.*" %>



<%
//网站群节点ID
String NODE_ID = ParamUtil.getStrParam(request,"NODE_ID","root");


/***********************************
* TAG参数初始化
***********************************/
//要显示栏目的ID
String CLASS_ID = 		ParamUtil.getStrParam(request,"CLASS_ID","");

//过滤属性
String FILTER = 		ParamUtil.getStrParam(request,"FILTER",""); 

//排序属性
String ORDER = 			ParamUtil.getStrParam(request,"ORDER",""); 

//指定显示哪一篇文章
String ARTICLE_ID = 	ParamUtil.getStrParam(request,"ARTICLE_ID",""); 



/***********************************
* 显示特性参数初始化
***********************************/
//新闻标题长度
String PLAYER_URL = ParamUtil.getStrParam(request,"PLAYER_URL","images/flvplayer.swf");

//自动播放
String AUTO_START = ParamUtil.getStrParam(request,"AUTO_START","false");

//新闻标题长度
int TITLE_LENGTH = ParamUtil.getIntParam(request,"TITLE_LENGTH",24);

//行数
String PAGE_SIZE = ParamUtil.getStrParam(request,"PAGE_SIZE","10"); 

//每行的高度
String ROW_HEIGHT = ParamUtil.getStrParam(request,"ROW_HEIGHT","22");

//指定显示第几页的数据
int PN = ParamUtil.getIntParam(request,"PN",1);

//宽度
int WIDTH = ParamUtil.getIntParam(request,"WIDTH",224);

//高度
int HEIGHT = ParamUtil.getIntParam(request,"HEIGHT",169);


/***********************************
* 元素隐显参数初始化
***********************************/
//是否显示视频标题
boolean IS_SHOW_TITLE = ParamUtil.getBooleanParam(request,"IS_SHOW_TITLE","true");


/***********************************
* CSS样式 参数初始化
***********************************/
//CSS样式
String CSS = ParamUtil.getStrParam(request,"CSS","");

//水平对齐
String ALIGN = ParamUtil.getStrParam(request,"ALIGN","left");

%>


<script type="text/javascript" src="../../js/swfobject_source.js"></script>
<script type="text/javascript" src="../../js/swfobject.js"></script>


<table width="<%=WIDTH%>" border="0" align="<%=ALIGN%>" cellpadding="0" cellspacing="0">
                  <tr>
                    <td valign="top">
					<table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td>
						  
						  <div id="player">video</div>
							<%
								String videoUrl = "";
							%>
					
					  <cms4j:article page_size="1" class_id="<%=CLASS_ID%>" node_id="<%=NODE_ID%>" pn="1">
						<cms4j:article_list>
                        <%
							videoUrl = article_info.getLINK_TO_EXTERIOR();
						%>
						</cms4j:article_list>
					  </cms4j:article>
							  
							  
                        <script type="text/javascript"> 
						var so = new SWFObject('<%=PLAYER_URL%>','single','<%=WIDTH%>','<%=HEIGHT%>','7'); 
						so.addParam('allowfullscreen','true'); 
						//so.addVariable('displayheight','145'); 
						so.addVariable('file','<%=videoUrl%>'); 
						so.addVariable('height','<%=HEIGHT%>'); 
						so.addVariable('width','<%=WIDTH%>'); 
						so.addVariable('backcolor','0x000000'); 
						so.addVariable('frontcolor','0x999999'); 
						so.addVariable('lightcolor','0x666666'); 
						so.addVariable('autostart','<%=AUTO_START%>'); 
						so.addVariable("shuffle","false");
						so.write('player'); 
					</script>
                          </td>
                        </tr>
						
						<%if(IS_SHOW_TITLE){%>
						
							<tr>
							  <td>
							  
							  <table width="100%" border="0" cellspacing="0" cellpadding="0">
								  <cms4j:article page_size="<%=PAGE_SIZE%>"  class_id="<%=CLASS_ID%>" node_id="<%=NODE_ID%>" pn="1">
									<cms4j:article_list>
									  <tr onClick="so.addVariable('file','<%=article_info.getLINK_TO_EXTERIOR()%>');so.addVariable('autostart','true');so.write('player');"  style="cursor:pointer">
										<td height="23" class="<%=CSS%>">·<%=article_info.getTITLE()%></td>
									  </tr>
									</cms4j:article_list>
								  </cms4j:article>
							  </table>
							  </td>
							</tr>
						
						<% } %>
						
                    </table></td>
                  </tr>
				  
				  
</table>