<!--#include file="_header.html" -->
<script id="clientEventHandlersJS" language="javascript">
<!--
function save_onclick() {	
	if(document.Form1.PhotoTitle.value == "")
	{
		alert("相片标题不能为空！");
		return false;
	}	
	 
	if(document.Form1.PhotoText.value.length > 200)
	{
		alert("相片描述长度最大为100字！"); 
		return false;
	}
	
	var modetype = '<%=ModeType%>';
	if(modetype == '1')
		return true;
	
	var allowTypes = ".gif|.jpg|.jpeg";
	var typeArr = allowTypes.split('|');	
	var photofile = document.Form1.PhotoFile.value;
	if(photofile == "")
	{
		alert("请选择要上传的相片文件！\n\n允许上传的相片文件类型:" + typeArr.join(" "));
		return false;
	}
		
	var fileext = photofile.substr(photofile.lastIndexOf('.')).toLowerCase();
	var isFoundType = false;
	for (var i=0; i<typeArr.length; i++)
	{
		if (fileext == typeArr[i].toLowerCase())
		{
			isFoundType = true;
			break;
		}
	}
	if (!isFoundType)
	{
		alert('只允许上传的文件类型为:\n\n' + typeArr.join(' '));
		return false;
	}
	return true;	
}
//-->
</script>
<div class="mainbox">
	<div class="notice">
		<span> <!--#include file="_nav.html"--></span>&nbsp;
	</div>
	<div class="notice font14"><span>
	<a href="album_index.aspx">相册首页</a> |   
	<a href="album_list.aspx">相册分类</a> |  
	<a href="album_self.aspx">我的相册</a></span>&nbsp;
	</div>
</div>
	<form id="Form1" name="Form1" method="post" action="" enctype="multipart/form-data" style="MARGIN:0px">
	<table  cellspacing="0" cellpadding="0" class="tablebox tableborder" ID="Table1">
		<tr>
			<th colspan="2" id="list_title">相片编辑</th>
		</tr>
		<tr>
			<td width="30%" align="right" >相片标题：</td>
			<td>
			<INPUT id="PhotoTitle" type="text"  onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this);" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" maxLength="50" size="65" name="PhotoTitle" value="<%=AlbumPhoto.imgtitle%>"> <span class="fon1">*
			</td>
		</tr>
		<tr>	
			<td align="right" >相片描述：</td>
			<td>
			<TEXTAREA id="PhotoText"  onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this);" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" name="PhotoText" rows="6" cols="50"><%=Server.HtmlEncode(AlbumPhoto.imgtext)%></TEXTAREA>
			</td>
		</tr>
		<tr>		
			<td align="right" >图片文件：</td>
			<td>
			  <input type="file" onFocus="IEvent('focus',this);"	onBlur="IEvent('blur',this);" onMouseOver="IEvent('mouseover',this)" onMouseOut="IEvent('mouseout',this)" id="PhotoFile" NAME="PhotoFile" size="52">*
		   </td>
		</tr>
		<tr>
			<td colspan="2" align="center">
				<input id="save" type="submit" name="save" onMousemove="this.className='button_on';" onMouseout="this.className='button_off'" value="确  定" onclick="return save_onclick()" class="button_off"/>
				<input id="return" type="button" name="return" onMousemove="this.className='button_on';" onMouseout="this.className='button_off'" value="返  回" onclick="window.location='album_photoself.aspx?albumid=<%=AlbumId.ToString()%>';"  class="button_off"/>
			</td>
		</tr>
	</TABLE>
	</form>  
<!--#include file="_footer.html" -->