<%@ 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" />
		<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
		<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" />
		<script type="text/javascript" src="../common/js/jquery-1.7.gzjs"></script>
		<script type="text/javascript" src="../javascript/commonUtil_src.js"></script>
		<script type="text/javascript" src="../javascript/editor/fckeditor.js"></script>
		<script language="javascript" type="text/javascript" src="../javascript/My97DatePicker/WdatePicker.js"></script>
		<script>  
		
			var api = frameElement.api, W = api.opener;
		
			if("true"==="${param.fromFlow}")
	         {     	 	
	            W.$.dialog(
			    { 
			   					title :'提示',
			    				width: '150px', 
			    				height: '60px', 
			                    lock: true, 
			                    parent:api,
			    				icon: '32X32/i.png', 
			    				
			                    content: '新增站点公告成功!',
	
			    				ok:function()
			    				{ 
	       							W.window.location.reload();  
			    				}
				});
	                 
	         }
	         
	         var ref_flag=/^(\w){1,25}$/; 
         
             var ref_name = /^[\u0391-\uFFE5\w]{1,50}$/;

         	$(function()
		 	{
		    	validate('anTitle',1,null,null);
		    
		    	
 			
 				
		 	})

        </script>
	</head>
	<body>

		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr>
				<td align="left" valign="top">
					<!--main start-->

					<div class="addtit">
						<img src="../style/icons/clipboard-task.png" width="16" height="16" />公告
					</div>

					<form id="saForm" name="saForm" method="post">
						<table width="100%" border="0" cellpadding="0" cellspacing="0" class="form-table">


							<tr>
								<td width="17%" class="input-title">
									<strong>标题</strong>
								</td>
								<td class="td-input">
									<input type="text" size="60" id="anTitle" name="anTitle" class="form-input"></input>

								</td>
							</tr>

							<tr>
								<td class="input-title">
									<strong>公告内容</strong>
								</td>
								<td class="td-input">
									<textarea id="content" name="content" style="height:200px;width:420px" class="form-textarea"></textarea>

									<script type="text/javascript">
                                                   var editor1 = new FCKeditor('content');
                                                   editor1.BasePath = "<cms:BasePath/>core/javascript/editor/";
                                                   
                                                   editor1.ToolbarSet = 'Edit'; 
                                                   editor1.Height = 240;
                                                   editor1.Width = 430;
                                                   editor1.Config["EnterMode"] = "p";
                                                   editor1.ReplaceTextarea();   
                                 	</script>
								</td>
							</tr>
							<tr>
								<td class="input-title">
									<strong>有效时间</strong>
								</td>
								<td class="td-input">

									<input id="showStartDate" name="showStartDate" size="25" maxlength="30" type="text" class="form-input-date" onmousedown="javascript:WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd'});" />
									&nbsp;至 &nbsp;
									<input id="showEndDate" name="showEndDate" size="25" maxlength="30" type="text" class="form-input-date" onmousedown="javascript:WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd'});" />

								</td>
							</tr>

						</table>
						<!-- hidden -->
						

					</form>
					<div style="height:15px"></div>
					<div class="breadnavTab"  >
						<table width="100%" border="0" cellspacing="0" cellpadding="0" >
							<tr class="btnbg100">
								<td width="77%" class="input-title"></td>
								<td class="td-input">
									<a name="btnwithicosysflag" href="javascript:submitSa();"  class="btnwithico"><img src="../style/icons/tick.png" width="16" height="16" /><b>确认&nbsp;</b> </a>
									<a href="javascript:close();"  class="btnwithico" onclick=""><img src="../style/icon/close.png" width="16" height="16"/><b>取消&nbsp;</b> </a>
								</td>
								 
							</tr>
						</table>
					</div>


				</td>
			</tr>

			<tr>
				<td height="10">
					&nbsp;
				</td>
			</tr>
		</table>
		<!--[if lt IE 7]>
        <script type="text/javascript" src="js/unitpngfix.js"></script>
<![endif]-->
	</body>
</html>
<script>  

var api = frameElement.api, W = api.opener;

function submitSa()
{
	var hasError = false;
	//系统信息字段验证
    var currError = submitValidate('anTitle',1,null,null);
        
        if(currError)
        {
        	hasError = true;
        }
        
    
    
    			
    if(hasError)
    {
 
	    return;

	}
	
	disableAnchorElementByName("btnwithicosysflag",true);
		
    var tip = W.$.dialog.tips('正在执行...',3600000000,'loading.gif');
	
	var form = document.getElementById("saForm");
	
	form.action = '<cms:BasePath/>interflow/addAn.cmd';
	
	form.submit();
}


function close()
{
	api.close();
}
  
</script>
