<%@ page contentType="text/html; charset=GBK" session="false"%>
<%@ taglib uri="/cmsTag" prefix="cms"%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<cms:SystemDataModel id='${param.modelId}'>
			<title>添加${DataModel.modelName}</title>
			<link href="../style/blue/css/main.css" type="text/css" rel="stylesheet" />
			<link href="../style/blue/css/reset-min.css" rel="stylesheet" type="text/css" />
			<link href="../javascript/colorpicker/css/picker.css" type="text/css" rel="stylesheet" />
			<script type="text/javascript" src="../common/js/jquery-1.7.gzjs"></script>
			<script language="javascript" type="text/javascript" src="../javascript/commonUtil_src.js"></script>
			<script type="text/javascript" src="../javascript/dialog/lhgdialog.min.js?skin=iblue"></script>

			<script type="text/javascript" src="../javascript/editor/fckeditor.js"></script>
			<script type="text/javascript" src="../javascript/format/editor_content_format.js"></script>
			<script type="text/javascript" src="../javascript/colorpicker/picker.js"></script>
			<script type="text/javascript" src="../javascript/uuid.js"></script>

			<script type="text/javascript" src="../javascript/showImage/fb/jquery.mousewheel-3.0.4.pack.js"></script>
			<script type="text/javascript" src="../javascript/showImage/fb/jquery.fancybox-1.3.4.pack.js"></script>
			<link rel="stylesheet" type="text/css" href="../javascript/showImage/fb/jquery.fancybox-1.3.4.css" media="screen" />

			<script language="javascript" type="text/javascript" src="../javascript/My97DatePicker/WdatePicker.js"></script>

			<script>
			
		
			
			<cms:SysClass id="${param.classId}">
						
					    var scid = '${Class.singleContentId}';
					   
					    var ct = '${Class.classType}';
					  
					    if(ct == 3 && scid != '' && scid != null && scid != '0')
					    {
					    	window.location.href = 'EditUserDefineModelContent.jsp?contentId='+scid+'&classId=${param.classId}&modelId=${param.modelId}';
					    }
						
			</cms:SysClass>
		
			
			
			basePath='<cms:BasePath/>';
			//$(window).load(function()
			$(function()
			{
				 //颜色选择
				 $("#titleBg").bigColorpicker(
				 	"titleBgVal"
				 ); 
				 
				 $("#simpleTitleBg").bigColorpicker(
				 	"simpleTitleBgVal"
				 ); 
				 
				  //验证规则注册
				  <cms:SystemModelFiledList modelId="${param.modelId}">
						<cms:SystemModelFiled>		
					    //if('${ModelFiled.defaultValidate}' != '')
					    //{		    	
							<cms:FieldValidateConfig id="${ModelFiled.defaultValidate}" fieldId="${ModelFiled.metaDataId}">	
						
							validate('${ModelFiled.fieldSign}','${ModelFiled.isMustFill}','${Valid.regulation}','${Valid.errorMessage}');	
							//alert('${ModelFiled.fieldSign} + ${ModelFiled.isMustFill} + ${Valid.regulation} + ${Valid.errorMessage}');				
							</cms:FieldValidateConfig>
						//}
	                   </cms:SystemModelFiled>   
				</cms:SystemModelFiledList>
	
				//标题不可为空
 				validate('title',1,null,null);		
 				
 										
			})
			
	
		 
		</script>
	</head>
	<body>
		<form id="userDefineContentForm" name="userDefineContentForm" method="post">
			<div class="breadnav">
				<table width="99.9%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td align="left">
							&nbsp;
							<img src="../style/blue/images/home.gif" width="16" height="16" class="home" />
							当前位置：
							<a href="#">内容管理</a> &raquo; <a href="#"><cms:SysClass id="${param.classId}">${Class.className}</cms:SysClass></a> &raquo; <a href="#">添加${DataModel.modelName}</a>
						</td>
						<td align="right">

						</td>
					</tr>
				</table>
			</div>
			<div style="height:25px;"></div>
			<!--新添加修稿20130804-->
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="mainbody-x">
				<tr>
					<td class="mainbody" align="left" valign="top">
						<!--main start class="mainbody"-->
						<div class="addtit">
							&nbsp;<img src="../style/icons/document-text.png" width="16" height="16" />${DataModel.modelName}基本信息
						</div>

						<table width="100%" border="0" cellpadding="0" cellspacing="0" class="form-table-big-content" style="padding-top: 8px;">

							<tr>
								<td width="17%" class="input-title">
									主标:
								</td>
								<td class="td-input">
									<input id="title" name="title" type="text" size="85" maxlength="120" style="width: 443px;${Info.titleStyle}" class="form-input-title titlerule" onkeyup="textCounter(this, 'currCharLen');" />
									<span class="red">*</span>
									<font><span id="currCharLen">&nbsp;0</span>字</font> &nbsp;

									<img src="../../core/style/blue/icons/edit_r1_c7.jpg" height="16" width="16" title="颜色" id="titleBg" class="cursor img-icon" />&nbsp;<img src="../../core/style/blue/icons/edit_r1_c1.jpg" height="16" width="16" title="粗体" id="strongTitle" onclick="javascript:setTitleChar(this);" class="cursor img-icon" />&nbsp;<img src="../../core/style/blue/icons/edit_r1_c3.jpg" height="16" width="16" title="斜体" id="emTitle" onclick="javascript:setTitleChar(this);" class=" cursor img-icon" />&nbsp;<img src="../../core/style/blue/icons/edit_r1_c5.jpg" height="16" width="16" title="下划线" id="underTitle" onclick="javascript:setTitleChar(this);" class=" cursor img-icon" />&nbsp;&nbsp;</span><input type="checkbox" size="55" class="form-checkbox img-icon" onclick="javascript:showTitleInput('simpleTitle','shortTitle',this);" />&nbsp;&nbsp;辅标题
									<input type="hidden" id="titleBgVal" name="titleBgVal" value="" />
								</td>
							</tr>
							<tr id="simpleTitleTr" style="display:none">
								<td class="input-title">
									副标:
								</td>
								<td class="td-input">
									<input id="simpleTitle" name="simpleTitle" type="text" style="width: 443px;" class="form-input-title titlerule" onkeyup="textCounter(this, 'currSimpleCharLen');" size="55" maxLength="60" value="${Info.simpleTitle}" />
									<font face="微软雅黑"><span id="currSimpleCharLen">0</span>字</font>
									<img src="../../core/style/blue/icons/edit_r1_c7.jpg" height="16" width="16" title="颜色" id="simpleTitleBg" class="cursor img-icon" />
									<input type="hidden" id="simpleTitleBgVal" name="simpleTitleBgVal" />
									<img src="../../core/style/blue/icons/edit_r1_c1.jpg" height="16" width="16" title="粗体" id="strongSimpleTitle" onclick="javascript:setSimpleTitleChar(this);" class="cursor img-icon" />
									<img src="../../core/style/blue/icons/edit_r1_c3.jpg" height="16" width="16" title="斜体" id="emSimpleTitle" onclick="javascript:setSimpleTitleChar(this);" class="cursor img-icon" />
									<img src="../../core/style/blue/icons/edit_r1_c5.jpg" height="16" width="16" title="下划线" id="underSimpleTitle" onclick="javascript:setSimpleTitleChar(this);" class="cursor img-icon" />
									<span class="ps">简化的标题语句</span>
								</td>

							</tr>
							<tr id="shortTitleTr" style="display:none">
								<td class="input-title">
									短标:
								</td>
								<td class="td-input">
									<input id="shortTitle" name="shortTitle" type="text" style="width: 443px;" class="form-input-title titlerule" onkeyup="textCounter(this, 'currShortCharLen');" size="55" maxLength="60" value="${Info.shortTitle}" />
									<font face="微软雅黑"><span id="currShortCharLen">0</span>字</font>&nbsp;
									<span class="ps">起主题描叙作用,一般为简单短语</span>
								</td>
							</tr>

							<tr>
								<td class="input-title">
									辅助:
								</td>
								<td class="td-input">
									<span><img src="../../core/style/blue/icon/documents-text.png" id="sysCopyContentImg" title="复制到:  " height="16" width="16" class="img-icon" /><a class="a_style" href="javascript:openCopyContentToSiteClassDialog('single','${param.modelId}','');">&nbsp;复制内容</a>[<font color=red><span id='sysCopyClassCount'>0</span></font>]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<img src="../../core/style/blue/icon/sitemap-application.png" height="16" width="16" class="img-icon" id="sysShareContentImg" title="共享到:  " /><a class="a_style" href="javascript:openSelectSiteGroupDialog('','');">&nbsp;站群共享</a>[<font color=red><span id='shareSiteIdCount'>0</span></font>]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<span><img src="../../core/style/blue/icon/document-tree.png" height="16" width="16" class="img-icon" /><a class="a_style" href="javascript:openSelectRelatedContentDialog('-1','${param.classId}');">&nbsp;相关内容</a>[<font color=red><span id='sysRelateCount'>0</span></font>]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<span><img src="../../core/style/icons/report.png" height="16" width="16" class="img-icon" /><a class="a_style" href="javascript:openSelectSurveyDialog('', '${param.classId}');">&nbsp;所属调查</a>[<font color=red><span id='sysRelateSurveyCount'>0</span></font>]</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="checkbox" class="form-checkbox" name="allowCommend" value="0"></input>
									禁评&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="checkbox" class="form-checkbox" name="topFlag" value="1"></input>
									置顶&nbsp;&nbsp;&nbsp;&nbsp;
									<input type="checkbox" class="form-checkbox" id="outlinkc" onclick="javascript:showOutLink(this);"></input>
									外链
								</td>
							</tr>
							
							<tr id="outlinkTr" style="display:none">
									<td class="input-title">
										外链地址:
									</td>
									<td class="td-input">
										<input id="outLink" name="outLink" type="text"  style="width: 641px;" class="form-input"  value="http://" />
									</td>
							</tr>
							
							<tr>
								<td class="input-title">
									责编:
								</td>
								<td class="td-input">
									<input id="creator" name="creator" type="text" class="form-input"  style="width: 243px;" maxlength="58" />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<span class="input-title">TAG标签:</span>
									<input readonly id="tagKeyVal" name="tagKeyVal" type="text" class="form-input" style="width: 219px;" maxlength="300"  />
									<input id="tagKey" name="tagKey" type="hidden" class="form-input"  value="${Info.tagKey}" /><input type="button" value="选取TAG" onclick="javascript:openSelectTagDialog();" class="btn-1" />
								</td>
							</tr>

							<tr>
								<td class="input-title">
									来源:
								</td>
								<td class="td-input">
									<input name="author" id="author" type="text" class="form-input" style="width: 187px;" maxlength="50" />
									<input type="button" value="选取来源" onclick="javascript:openSelectContentSourceDialog();" class="btn-1" />
									&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
									<span class="input-title">关键字:</span>
									<input id="keywords" name="keywords" type="text" class="form-input" style="width: 219px;" maxlength="200" />
									<input type="button" value="自动获取" onclick="javascript:getKeywordFromContent();" class="btn-1" />
								</td>
							</tr>

							<tr>
								<td class="input-title">
									摘要:
								</td>
								<td class="td-input">
									<textarea id="summary" name="summary" style="height:55px;width:640px" class="form-textarea"></textarea>
								</td>
							</tr>


						</table>
						<!-- 自定义模型字段区域 -->
						<table width="100%" border="0" cellpadding="0" cellspacing="0" class="form-table-big-content" style="padding-top: 8px;">
							<cms:SystemModelFiledList modelId="${param.modelId}" showMode="true">
								<cms:SystemModelFiled>
									<tr>
										<td class="input-title" width="17%">
											<cms:SystemModelRowFiled >
												<!-- 图集字段区域 -->
												<cms:if test="${RowFiled.htmlElementId==14}">
													${RowFiled.showName}:																			
										</td>
										<td class="td-input">
											<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload" style="padding-top:0px;">
												<tr>
													<td>
														<!-- 图集操作 -->
														<table width="100%" border="0" cellpadding="0" cellspacing="0" style="padding-top:0px;">
															<tr style="padding-top:0px;">
																<td style="padding-top:0px;">
																	<a onclick="javascript:deleteAllGroupPhoto('${RowFiled.fieldSign}');" class="btnwithico"> <img src="../../core/style/icons/image--minus.png" alt="" /><b>全部删除&nbsp;</b> </a>
																	<a onclick="javascript:showModuleImageGroupDialog('${RowFiled.fieldSign}');" class="btnwithico"> <img src="../../core/style/icons/images.png" alt="" /><b>多图上传&nbsp;</b> </a>
																</td>
																<td style="padding-top:0px;">
																	&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" style="width:44px;" id="${RowFiled.fieldSign}CmsSysMaxWidth" class="form-input" value="${RowFiled.fieldInfo.imageW}"></input>
																	宽度&nbsp;&nbsp;&nbsp;&nbsp;<input type="text" style="width:44px;" id="${RowFiled.fieldSign}CmsSysMaxHeight" class="form-input" value="${RowFiled.fieldInfo.imageH}"></input>
																	高度&nbsp;&nbsp;&nbsp;&nbsp;<select class="form-select" id="${RowFiled.fieldSign}CmsSysDisposeMode">
																		<option value="0">
																			原宽高
																		</option>
																		<option value="1">
																			按宽度
																		</option>
																		<option value="2">
																			按高度
																		</option>
																		<option value="3">
																			按宽高&nbsp;&nbsp;
																		</option>
																	</select>
																	缩放&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;水印:<input class="form-checkbox" disabled type="checkbox" value="1" id="${RowFiled.fieldSign}CmsSysNeedMark" />&nbsp;&nbsp;&nbsp;&nbsp;图片数 [<font color=red><span id="${RowFiled.fieldSign}CmsSysImageGroupCount">-1</span></font>]&nbsp;张

																	<script>
			
																	initSelect('${RowFiled.fieldSign}CmsSysDisposeMode','${RowFiled.fieldInfo.imageDisposeMode}');	
																	//initRadio('${RowFiled.fieldSign}CmsSysNeedMark','${RowFiled.fieldInfo.needMark}');	
											
																	</script>
																</td>
															</tr>

														</table>
														<!-- 图集操作结束 -->
													</td>
												</tr>
											</table>
										</td>
									</tr>
									<!-- 图集内容开始 -->
									<tr>
										<td class="input-title" width="17%">
											<!-- 图集内容空标题 -->
										</td>
										<td class="td-input" style="padding-top:0px;">
											<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload" style="padding-top:0px;">
												<tr style="padding-top:0px;">
													<td style="padding-top:0px;">
														<input type="hidden" id="${RowFiled.fieldSign}CmsSysImageCurrentCount" name="${RowFiled.fieldSign}CmsSysImageCurrentCount" value="0" />
														<input type="hidden" id="${RowFiled.fieldSign}CmsSysImageCover" name="${RowFiled.fieldSign}CmsSysImageCover" value="" />
														<input type="hidden" id="${RowFiled.fieldSign}CmsSysImageArrayLength" name="${RowFiled.fieldSign}CmsSysImageArrayLength" value="0" />


														<div id="${RowFiled.fieldSign}CmsSysImageUploadTab">
															<!-- 图片信息区 -->
															<script>
														
														//派序用
														
														allImageGroupSortInfo['${RowFiled.fieldSign}'] = new Array();
														
														<cms:PhotoGroup  contentId="${RowFiled.info.contentId}" serverMode="true">
														addGroupPhotoToPage('${RowFiled.fieldSign}','${Photo.orderFlag}','${Photo.url}','${Photo.resizeUrl}','${Photo.resId}','${Photo.reUrl}','${Photo.photoName}','${Photo.height}','${Photo.width}','${Photo.photoDesc}');
														</cms:PhotoGroup>
														
														document.getElementById('${RowFiled.fieldSign}CmsSysImageGroupCount').innerHTML = document.getElementById('${RowFiled.fieldSign}CmsSysImageCurrentCount').value;
	
														document.getElementById('${RowFiled.fieldSign}CmsSysImageArrayLength').value = allImageGroupSortInfo['${RowFiled.fieldSign}'].length;
														//alert(document.getElementById('${RowFiled.fieldSign}CmsSysImageArrayLength').value);
														</script>
														</div>
													</td>

													<!-- 图集内容结束 -->
													</cms:if>

													<!-- 普通字段区域开始 -->
													<cms:else>
														<cms:if test="${status.index == 0}">
														${RowFiled.showName}:										
													</td>
															<td class="td-input">
															    <table  border="0"  cellpadding="0" cellspacing="0" class="form-table-upload">
																	<tr>
																		<td>
																		  <table  border="0"  cellpadding="0" cellspacing="0">
																			 <tr>
																			 	<td>
																			 		<div id="sys-obj-${RowFiled.fieldSign}">${RowFiled.inputModeLayoutHtml}
																					<cms:if test="${RowFiled.isMustFill==1}">
																						<span class="red">*</span>
																						<span class="ps"></span>
																					</cms:if>
																					</div>
																			 	</td>
																			 	<td>
																			 		<div style="width:${RowFiled.blankCount}px;"></div>
																			 	</td>
																			 </tr>
																		 
																		  </table>
																			
																		</td>
																		
																		</cms:if>
																		<cms:else>
																			<td>
																				<span class="input-title">${RowFiled.showName}:</span>&nbsp;
																			</td>
																			<td>
																			
																				<table  border="0"  cellpadding="0" cellspacing="0">
																				 <tr>
																				 	<td>
																				 		<div id="sys-obj-${RowFiled.fieldSign}">${RowFiled.inputModeLayoutHtml}
																						<cms:if test="${RowFiled.isMustFill==1}">
																								<span class="red">*</span>
																								<span class="ps"></span>
																						</cms:if>
																						</div>
																				 	</td>
																				 	<td>
																				 		<div style="width:${RowFiled.blankCount}px;"></div>
																				 	</td>
																				 </tr>
																			 
																			  	</table>
																		  
																				
																			  </td>
																			
																		</cms:else>
																		</cms:else>
																		</cms:SystemModelRowFiled>
																	</tr>
																</table>
															</td>
												</tr>
												</cms:SystemModelFiled>
												</cms:SystemModelFiledList>
											</table>
									<tr>
										<td height="5"></td>
									</tr>
						</table>
						<div style="height:5px"></div>
						<div class="addtit">
							&nbsp;<img src="../../core/style/icons/gear.png" width="16" height="16" />高级选项
						</div>
						<cms:SysClass id="${param.classId}">
						
							<table width="100%" border="0" cellspacing="0" cellpadding="0" class="form-table-big-content">
								<tr>
									<td width="18%" class="input-title">
										内容缩略图:
									</td>
									<td class="td-input">
										<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
											<tr>
												<td>
													<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
														<tr>
															<td>
																<a class="cmsSysShowSingleImage" id="contentImageCmsSysShowSingleImage" href="<cms:BasePath/>core/style/blue/images/no-image.gif"><img id="contentImageCmsSysImgShow" src="<cms:BasePath/>core/style/blue/images/no-image.gif" width="90" height="67" /> </a>
															</td>
															<td>
																<table border="0" cellpadding="0" cellspacing="0" height="65px" class="form-table-big">
																	<tr>
																		<td>
																			&nbsp;
																			<input type="button" onclick="javascript:showModuleImageDialog('contentImageCmsSysImgShow','contentImage','${Class.contentImageW}','${Class.contentImageH}','1','0')" value="上传" onclick="" class="btn-1" />
																			<input type="button" value="裁剪" onclick="javascript:disposeImage('contentImage','${Class.contentImageW}','${Class.contentImageH}',false,'-1');" class="btn-1" />
																			<input type="button" value="删除" onclick="javascript:deleteImage('contentImage');" class="btn-1" />
																		</td>
																	</tr>
																	<tr>
																		<td>
																			&nbsp;&nbsp;宽&nbsp;&nbsp;
																			<input id="contentImageCmsSysImgWidth" class="form-input" readonly type="text" style="width:44px" />
																			&nbsp;&nbsp;&nbsp;&nbsp;高&nbsp;&nbsp;
																			<input id="contentImageCmsSysImgHeight" class="form-input" readonly type="text" style="width:44px" />
																		</td>
																	</tr>
																</table>
																<input id="contentImage" name="contentImage" type="hidden" />
															</td>
														</tr>
													</table>
												</td>
												<td width="7%">

												</td>
												<td>
													<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
														<tr>
															<td class="input-title">
																栏目缩略图:&nbsp;&nbsp;&nbsp;
															</td>
															<td>
																<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
																	<tr>
																		<td>
																			<a class="cmsSysShowSingleImage" id="classImageCmsSysShowSingleImage" href="<cms:BasePath/>core/style/blue/images/no-image.gif"><img id="classImageCmsSysImgShow" src="<cms:BasePath/>core/style/blue/images/no-image.gif" width="90" height="67" /> </a>
																		</td>
																		<td>
																			<table border="0" cellpadding="0" cellspacing="0" height="65px" class="form-table-big">
																				<tr>
																					<td>
																						&nbsp;
																						<input type="button" onclick="javascript:showModuleImageDialog('classImageCmsSysImgShow','classImage','${Class.listImageW}','${Class.listImageH}','1','0')" value="上传" onclick="" class="btn-1" />
																						<input type="button" value="裁剪" onclick="javascript:disposeImage('classImage','${Class.listImageW}','${Class.listImageH}',false,'-1');" class="btn-1" />
																						<input type="button" value="删除" onclick="javascript:deleteImage('classImage');" class="btn-1" />
																					</td>
																				</tr>
																				<tr>
																					<td>
																						&nbsp;&nbsp;宽&nbsp;&nbsp;
																						<input id="classImageCmsSysImgWidth" class="form-input" readonly type="text" style="width:44px" />
																						&nbsp;&nbsp;&nbsp;&nbsp;高&nbsp;&nbsp;
																						<input id="classImageCmsSysImgHeight" class="form-input" readonly type="text" style="width:44px" />


																					</td>
																				</tr>
																			</table>
																			<input id="classImage" name="classImage" type="hidden" />
																		</td>
																	</tr>
																</table>

															</td>
														</tr>
													</table>

												</td>
											</tr>
										</table>
									</td>
								</tr>

								<tr>
									<td class="input-title">
										频道缩略图:
									</td>
									<td class="td-input">
										<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
											<tr>
												<td>
													<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
														<tr>
															<td>
																<a class="cmsSysShowSingleImage" id="channelImageCmsSysShowSingleImage" href="<cms:BasePath/>core/style/blue/images/no-image.gif"><img id="channelImageCmsSysImgShow" src="<cms:BasePath/>core/style/blue/images/no-image.gif" width="90" height="67" /> </a>
															</td>
															<td>
																<table border="0" cellpadding="0" cellspacing="0" height="65px" class="form-table-big">
																	<tr>
																		<td>
																			&nbsp;
																			<input type="button" onclick="javascript:showModuleImageDialog('channelImageCmsSysImgShow','channelImage','${Class.classImageW}','${Class.classImageH}','1','0');" value="上传" onclick="" class="btn-1" />
																			<input type="button" value="裁剪" onclick="javascript:disposeImage('channelImage','${Class.classImageW}','${Class.classImageH}',false,'-1');" class="btn-1" />
																			<input type="button" value="删除" onclick="javascript:deleteImage('channelImage');" class="btn-1" />
																		</td>
																	</tr>
																	<tr>
																		<td>
																			&nbsp;&nbsp;宽&nbsp;&nbsp;
																			<input id="channelImageCmsSysImgWidth" class="form-input" readonly type="text" style="width:44px" />
																			&nbsp;&nbsp;&nbsp;&nbsp;高&nbsp;&nbsp;
																			<input id="channelImageCmsSysImgHeight" class="form-input" readonly type="text" style="width:44px" />


																		</td>
																	</tr>
																</table>
																<input id="channelImage" name="channelImage" type="hidden" />
															</td>
														</tr>
													</table>
												</td>
												<td width="7%">

												</td>
												<td>
													<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
														<tr>
															<td class="input-title">
																首页缩略图:&nbsp;&nbsp;&nbsp;
															</td>
															<td>
																<table border="0" cellpadding="0" cellspacing="0" class="form-table-upload">
																	<tr>
																		<td>
																			<a class="cmsSysShowSingleImage" id="homeImageCmsSysShowSingleImage" href="<cms:BasePath/>core/style/blue/images/no-image.gif"><img id="homeImageCmsSysImgShow" src="<cms:BasePath/>core/style/blue/images/no-image.gif" width="90" height="67" /> </a>
																		</td>
																		<td>
																			<table border="0" cellpadding="0" cellspacing="0" height="65px" class="form-table-big">
																				<tr>
																					<td>
																						&nbsp;
																						<input type="button" onclick="javascript:showModuleImageDialog('homeImageCmsSysImgShow','homeImage','${Class.homeImageW}','${Class.homeImageH}','1','0')" value="上传" onclick="" class="btn-1" />
																						<input type="button" value="裁剪" onclick="javascript:disposeImage('homeImage','${Class.homeImageW}','${Class.homeImageH}',false,'-1');" class="btn-1" />
																						<input type="button" value="删除" onclick="javascript:deleteImage('homeImage');" class="btn-1" />
																					</td>
																				</tr>
																				<tr>
																					<td>
																						&nbsp;&nbsp;宽&nbsp;&nbsp;
																						<input id="homeImageCmsSysImgWidth" class="form-input" readonly type="text" style="width:44px" />
																						&nbsp;&nbsp;&nbsp;&nbsp;高&nbsp;&nbsp;
																						<input id="homeImageCmsSysImgHeight" class="form-input" readonly type="text" style="width:44px" />


																					</td>
																				</tr>
																			</table>
																			<input id="homeImage" name="homeImage" type="hidden" />
																		</td>
																	</tr>
																</table>
															</td>
														</tr>
													</table>

												</td>
											</tr>
										</table>
									</td>
								</tr>

								<tr>
									<td class="input-title">
										独有模板:
									</td>
									<td class="td-input">
										<input id="especialTemplateUrl" name="especialTemplateUrl" type="text" class="form-input" size="44" maxlength="220" />
										<select class="form-select" onchange="javascript:selectRule(this,'especialTemplateUrl')">
											<option value="-1">
												备选参数
											</option>
											<option value="{content-id}">
												内容ID
											</option>

											<option value="{page}">
												分页数
											</option>
										</select>
										<input type="button" value="模板..." onclick="javascript:openSelectTempletDialog('content', 'especialTemplateUrl');" class="btn-1" />
										&nbsp;
										<span class="ps">若选择了独有模板,发布此篇内容时将使用此模板 </span>
									</td>
								</tr>
								<tr>
									<td class="input-title">
										发布时间:
									</td>
									<td class="td-input">
										<input id="appearStartDateTime" name="appearStartDateTime" size="26" maxlength="30" type="text" class="form-input-date" onmousedown="javascript:WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'});" value="${Info.appearStartDateTime}" />
										&nbsp;至&nbsp;
										<input id="appearEndDateTime" name="appearEndDateTime" size="26" maxlength="30" type="text" class="form-input-date" onmousedown="javascript:WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'});" value="${Info.appearEndDateTime}" />
										&nbsp;
										<span class="input-title">内容属性:&nbsp;&nbsp;</span>
										<select name="typeFlag" id="typeFlag" class="form-select">
											<option value="-1">
												---------------- 所属信息分类 ----------------
											</option>
											<cms:SystemContentTypeList>
												<option value="${ContentType.typeFlag}">
													${ContentType.typeName}
												</option>
											</cms:SystemContentTypeList>
										</select>
									</td>
								</tr>
							</table>
						</cms:SysClass>
					</td>
				</tr>

			</table>


			<!-- hidden -->
			<input type="hidden" id="classId" name="classId" value="${param.classId}" />

			<!-- 文章模型 -->
			<input type="hidden" id="modelId" name="modelId" value="${param.modelId}" />

			<input type="hidden" id="actionId" name="actionId" />

			<input type="hidden" id="toStepId" name="toStepId" />

			<input type="hidden" id="fromStepId" name="fromStepId" />

			<!-- 标题样式 -->
			<input id='titleStyle' name="titleStyle" type="hidden" />

			<input id='simpleTitleStyle' name="simpleTitleStyle" type="hidden" />

			<!-- 稿件标志 -->
			<input id='contentAddStatus' name="contentAddStatus" type="hidden" />

			<!-- 获取keyword临时变量 -->
			<input type="hidden" id="jtopcms_sys_keyword_content" name="jtopcms_sys_keyword_content" value="" />
			
			<!-- 相关内容 -->
			<input type="hidden" id="relateIds" name="relateIds" value=""/>
			
			<!-- 相关调查 -->
			<input type="hidden" id="relateSurvey" name="relateSurvey" value=""/>

			<!-- 同步复制栏目 -->
			<input type="hidden" id="copyClassId" name="copyClassIds" />
			
			<!-- 共享到其他站点 -->
			<input type="hidden" id="shareSiteIds" name="shareSiteIds" />
		</form>

		<!--提交-->
		<div style="height:50px;"></div>
		<div class="breadnavTab">
			<table width="100%" border="0" cellspacing="0" cellpadding="0" >
				<tr class="btnbg100">
				 
					<td style="text-align:center">
						<table style="margin:auto;" border="0" cellspacing="0" cellpadding="0"  >
							<tr>
							
								<td>
									<a name="btnwithicosysflag"  onclick="javascript:submitUserDefineContentInfo('-1','','-1');"   class="btnwithico"><img id="submitFormImg" src="../style/icons/tick.png" width="16" height="16" /><b>发布&nbsp;</b> </a>
									<a name="btnwithicosysflag" onclick="javascript:javascript:submitUserDefineContentInfo('','-1','-1','true');"   class="btnwithico"><img src="../style/icons/script--pencil.png" width="16" height="16" /><b>存稿件&nbsp;</b> </a>
									<a href="javascript:backManagePage();"   class="btnwithico" ><img src="../style/icon/arrow-return-180-left.png"" width="16" height="16"/><b>取消&nbsp;</b> </a>
								</td>

							</tr>

						</table>
					</td>
				</tr>
				 
			</table>
		   <div style="height:5px;"></div>
			
		</div>


		<!--[if lt IE 7]>
        <script type="text/javascript" src="js/unitpngfix.js"></script>
<![endif]-->
	</body>
</html>

<script type="text/javascript">

//图片查看效果
loadImageShow();

function submitUserDefineContentInfo(actionId,fromStepId,toStepId,draft)
{  
	if('-1' == '${param.modelId}' || '' == '${param.modelId}')
	{
		$.dialog({ 
	   					title :'提示',
	    				width: '170px', 
	    				height: '70px', 
	                    lock: true, 
	    				icon: '32X32/i.png', 
	    				
	                    content: '当前栏目不存在内容模型!',       
	    				cancel: true
	    
		});
		
		return;
	}
 
	
    var hasError = false;
    var currError = false;
	<cms:SystemModelFiledList modelId="${param.modelId}">
			<cms:SystemModelFiled>		
		    //if('${ModelFiled.defaultValidate}' != '')
		    //{
				<cms:FieldValidateConfig id="${ModelFiled.defaultValidate}">		
							
				currError = submitValidate('${ModelFiled.fieldSign}','${ModelFiled.isMustFill}','${Valid.regulation}','${Valid.errorMessage}');					
				
				if(currError)
				{
					hasError = true;
				}	
				
				</cms:FieldValidateConfig>
			//}
           </cms:SystemModelFiled>   
	</cms:SystemModelFiledList>	
	
	//系统信息字段验证
    currError = submitValidate('title',1,null,null);

    if(currError)
	{
		hasError = true;
    }
    			
    if(hasError)
    {
     
	    $.dialog({ 
	   					title :'提示',
	    				width: '180px', 
	    				height: '70px', 
	                    lock: true, 
	    				icon: '32X32/i.png', 
	    				
	                    content: '包含未正确填写的数据,请参照提示填写正确!',       
	    				cancel: true
	    
		});
		
	   
	}
	else
	{
		//后台验证
		var url = "<cms:BasePath/>content/contentValidate.cmd";
	    var postData = encodeURI($("#userDefineContentForm").serialize());
	  
		$.ajax({
		      	type: "POST",
		       	url: url,
		       	async:false,
		       	data:postData,
		   
		       	success: function(msg)
		        {       
		        	hasError = false;
		            
		            if(msg != null && msg != '')
		            {
			            var jsonObj = eval("("+msg+")");
			           
			            for(var key in jsonObj)
			            { 
		　　					hasError = true;	
							showTips(key+'',jsonObj[key]+'');
						}
					}

		            if(hasError)
		            {
		               
					  	
					   $.dialog({ 
					   					title :'提示',
					    				width: '180px', 
					    				height: '70px', 
					                    lock: true, 
					    				icon: '32X32/i.png', 
					    				
					                    content: '包含未正确填写的数据,请参照提示填写正确!',
					                    
					                   
					                   cancel: true
					                    
						
						
					    });
		            
		            }
		            else
		            {
		            	//outlink
						
						var olv = document.getElementById('outLink');
						
						if('' == olv.value || 'http://' == olv.value)
						{
							olv.value = '';
						}
						
		            	//稿件模式
						if(draft)
						{
							document.getElementById('contentAddStatus').value='draft';
						}
						
						disableAnchorElementByName("btnwithicosysflag",true);
						
						$.dialog.tips('正在执行...',3600000000,'loading.gif');
						
						disposeTitleStyle();
						
						document.getElementById('actionId').value=actionId;											
						document.getElementById('fromStepId').value=fromStepId;
				    	document.getElementById('toStepId').value=toStepId;
				     
						userDefineContentForm.action="<cms:BasePath/>content/addContent.cmd";
				  		userDefineContentForm.submit();
		            }
		        }
		 });	
			
	}
}

function getResultFromFrame(frameName,targetName)
{
    return document.getElementById(frameName).contentWindow.document.getElementById(targetName).value;
}
 

init();

function init()
{

	var contentImageSrc = '${Info.contentImage}';
	
	if(contentImageSrc != '')
	{
		document.getElementById('contentImageShow').src = '${Info.contentImage}';
	}
	
	//topFlag
	initRadio('topFlag','${Info.topFlag}');
}




function showShareDialog()
{
   var returnArray=window.showModalDialog("ShareArticle.jsp?currentSelectClassIdStr="+document.getElementById("selectShareIds").value+"&random="+Math.random(),"","dialogWidth=350px;dialogHeight=430px;status=no");

   if(typeof(returnArray) != 'undefined')
   {
     var selectClassIdStr=returnArray[0];
     if(typeof(selectClassIdStr) != 'undefined' && '' != selectClassIdStr  )
     {
   	   document.getElementById("selectShareIds").value=selectClassIdStr;
     }
     
     document.getElementById("shareCount").innerHTML=returnArray[1];
   }
}





//选取站群节点
function openSelectSiteGroupDialog()
{
	$.dialog({ 
		    id : 'ossgd',
	    	title : '共享到站群',
	    	width: '300px', 
	    	height: '280px', 
	    	lock: true, 
	        max: false, 
	        min: false,
	        resize: false,
	       
	        content: 'url:'+basePath+'/core/content/dialog/ShowSiteGroup.jsp?uid='+Math.random()
	
	});
}



function backManagePage()
{
	window.location = 'ManageGeneralContent.jsp?classId=${param.classId}&modelId=${param.modelId}';
}




</script>
</cms:SystemDataModel>
