function getSelectedText() {

	if (window.getSelection) {
		return window.getSelection().toString();
		
	} else if (document.getSelection) {
		return document.getSelection();
		
	} else if (document.selection) {//IE
		return document.selection.createRange().text;
	}
}

document.onkeydown = suberror;
    function suberror(e)
    {
        var e = (typeof event != "undefined") ? window.event : e;
        var s = getSelectedText();
        if (e.ctrlKey && e.keyCode == 13) {
            if (s != "")
            {
				if(s.length>2000){
					alert("您选择的内容请不要超过2000个字符，请重新操作。");
					return;
				}else{
					document.forms['suggest'].url.value = window.location.href;
					document.forms['suggest'].errorstr.value = s;
					document.forms['suggest'].action = "/error/error.asp";
					document.forms['suggest'].target = "about:blank";
					document.forms['suggest'].submit();
				}
            } else {
                alert("请先用鼠标选择出错的内容片断！");
                return false;
            }
        }
    }
    //在 FireFox 下获取 input 或者 textarea 中选中的文字，可以用下面的方法
function getTextFieldSelection(e) {
	
	if (e.selectionStart != undefined && e.selectionEnd != undefined) {
	
		var start = e.selectionStart;
		
		var end = e.selectionEnd;
		
		return e.value.substring(start, end);
	} else {
		return "";
	}
}

document.write('<table bgcolor="ffffff" height=5 width="950" border="0" cellspacing="0" cellpadding="0" align="center" style="FONT-SIZE: 9pt;"><tr><FORM id=suggest action= method=post target=_blank><td align=center>')
document.write('<Input type=hidden name=test><Input type=hidden name=msg><Input type=hidden name=errorstr><Input type=hidden name=url><div id=information_bottom  style="FONT-SIZE: 9pt;">如果您在本页发现错误，请用鼠标选择出错内容片断，然后同时按下 <b>CTRL</b> + <b>ENTER</b> 键，以便及时将错误信息通知我们，感谢您对上海统计网的大力支持。</div>')
document.write('</td></FORM></tr></table>')

document.write('<table bgcolor="ffffff" width="950" border="0" cellspacing="0" cellpadding="0" align="center" style="FONT-SIZE: 9pt; COLOR: #000000;"><tr><td height="7" colspan="4" background="/2008shtj/images/buttom1.gif"></td></tr> <tr><td width="20%" align="center" ><img src="/2008shtj/images/footer_logo.jpg" width="162" height="44" /></td><td width="60%" align="center"><table border="0" align="center" cellpadding="0" cellspacing="0" style="FONT-SIZE: 9pt; COLOR: #000000;"><tr><td height="20" align="center" style="FONT-SIZE: 9pt; "><font color="#7D7D7D">Copyright 1999-2009 上海市统计局、国家统计局上海调查总队 版权所有 | 上海市统计局网管中心制作</font></td></tr> <tr> <td height="20" align="center" style="FONT-SIZE: 9pt; "><font color="#7D7D7D">联系电话：53857070 | 工作时间：周一至周五 | 联系地址：上海市威海路48号 | 邮政编码：200003 <br />  </font></td>  </tr>');
document.write('<tr><td height="20" align="center" style="FONT-SIZE: 9pt; "><font color="#7D7D7D">建议使用IE6.0以上版本浏览,最佳分辨率1024*768</font></td> </tr></table></td> <td width="5%" align="center" valign="middle"><img src="/2008shtj/images/footer_icp.jpg" width="19" height="20" /></td> <td width="15%" align="left" valign="middle" style="FONT-SIZE: 9pt; "><font color="#7D7D7D" ><a href="http://www.miibeian.gov.cn" target="_blank">沪ICP备05007236号</a></font></td></tr></table>');  