<!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="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<FORM id=info_form name=info_form action=test.asp method=post encType=multipart/form-data>
<%for i=0 to 2%>
<TABLE>
<TBODY>
<TR>
<TD
style="BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; BORDER-LEFT: #000 1px solid; WIDTH: 180px; BORDER-BOTTOM: #000 1px solid; HEIGHT: 120px"
vAlign=center align=middle><IMG id=prev_icon<%=i%>
src="控制面板 - 个人基本信息设置.files/default_icon.jpg"
οnlοad="img_resize('prev_icon<%=i%>');"></TD></TR></TBODY></TABLE>
<INPUT id=fileContent<%=i%> onKeyDown="return false;" style="BORDER-RIGHT: #000 1px solid; BORDER-TOP: #000 1px solid; BORDER-LEFT: #000 1px solid; WIDTH: 180px; BORDER-BOTTOM: #000 1px solid" type=file οnchange=preview_icon<%=i%>(); name=fileContent<%=i%>>
<script language="javascript">
var br = browserDetect();
var ie = false;
if (br == 'ie6' || br == 'ie55' || br == 'ie5')
ie = true;
function preview_icon<%=i%>()
{
if ( ! ie)
return;
def_icon = '/images/default_icon.jpg';
if (document.info_form.fileContent<%=i%>.value == '')
document.getElementById('prev_icon<%=i%>').src = def_icon;
else
document.getElementById('prev_icon<%=i%>').src = document.info_form.fileContent<%=i%>.value;
//setTimeout("img_resize('prev_icon')", 1000);
}
function browserDetect(){
var sUA = navigator.userAgent.toLowerCase();
var sIE = sUA.indexOf("msie");
var sOpera = sUA.indexOf("opera");
var sMoz = sUA.indexOf("gecko");
if (sOpera != -1) return "opera";
if (sIE != -1){
nIeVer = parseFloat(sUA.substr(sIE + 5));
if (nIeVer >= 6) return "ie6";
else if (nIeVer >= 5.5) return "ie55";
else if (nIeVer >= 5 ) return "ie5";
}
if (sMoz != -1) return "moz";
return "other";
}
function img_resize(id)
{
_pObj = document.getElementById(id);
var width = 180;
var height = 120;
if(_pObj.width < width && _pObj.height < height)return;
if (width/_pObj.width < height/_pObj.height){
_pObj.width = _pObj.width * (width / _pObj.width);
}
else{
_pObj.height = _pObj.height * (height / _pObj.height);
}
//alert(_pObj.width + ' ' + _pObj.height);
}
</script>
<%next%>
</FORM>
</body>
</html>