document.onkeydown = keyDown;
function keyDown(e){
	myLeft=(screen.width-400)/2;
	myTop=(screen.width-300)/2;
	var e=(typeof event!="undefined")?window.event:e;   // IE : Firefox
	var s=(document.getSelection)?document.getSelection():document.selection.createRange().text;
	//alert(s);
	if(e.ctrlKey && e.keyCode==13){
		if (s!="") {
			window.open("/sofpro/gecs/consulmanage/gzxxadd_error.html","123","scrollbars=yes,width=700,height=550,top=100,left=200");
		}else{
			
			
			if (s!="") {
				window.open("/sofpro/gecs/consulmanage/gzxxadd_error.html","123","scrollbars=yes,width=700,height=550,top=100,left=200");
			}else{
				alert("请先用鼠标选择出错的内容片断！");
				return false;
			}
		}
	}
}
function send_error(){
	myLeft=(screen.width-400)/2;
	myTop=(screen.width-300)/2;
	var s=(document.getSelection)?document.getSelection():document.selection.createRange().text;
	var sss=(parent.document.getSelection)?parent.document.getSelection():parent.document.selection.createRange().text;
	if (s!="" || sss!="" ) {
		window.open("/sofpro/gecs/consulmanage/gzxxadd_error.html","123","scrollbars=yes,width=700,height=550,top=100,left=200");
	}else{
		var a = parent.document.getElementsByTagName("IFRAME");
			for(var i=0; i<a.length; i++){
				if(a[i].document){
					s=(a[i].document.getSelection)?a[i].document.getSelection():a[i].document.selection.createRange().text;
					if(a[i].contentWindow){
						if(typeof a[i].contentWindow.getSelection_custom!='undefined')s=a[i].contentWindow.getSelection_custom();
					}
					if(s!="")break;
				}
			}
		if (s!="") {
				window.open("/sofpro/gecs/consulmanage/gzxxadd_error.html?text="+s,"123","scrollbars=yes,width=700,height=550,top=100,left=200");
			}else{
				alert("请先用鼠标选择出错的内容片断！");
				return false;
			}
	}
}
