<script language=javascript>
window.Alert=function(ttl,txt,flg)
{
var table=document.createElement("TABLE");
document.body.appendChild(table);
var tbody=document.createElement("TBODY");
table.appendChild(tbody);
table.style.cssText="position:absolute;font-size:11pt;color:#33F;";
table.style.left="300";
table.style.top="200";
table.style.width="300";
table.style.height="90";
table.align="center";
table.border="1";
table.cellSpacing=3;
table.cellPadding=5;
table.style.background="#EEE";
var tr=document.createElement("TR");
tbody.appendChild(tr);
tr.align="center";
var th=document.createElement("TH");
tr.appendChild(th);
th.align ="left";
th.innerText =ttl;
var tr=document.createElement("TR");
tbody.appendChild(tr);
tr.align="left";
var td=document.createElement("TD");
tr.appendChild(td);
td.innerText=txt;
var tr=document.createElement("TR");
tbody.appendChild(tr);
tr.align="left";
var td=document.createElement("TD");
tr.appendChild(td);
td.colSpan =2;
td.align ="left";
td.innerHTML="<span style='cursor:hand;'>关闭</span>";
// td.onclick =function(){table.style.display="none";}
td.onclick =function(){table.removeNode(true);}
}
// 屏蔽所有的功能键
// Gu Laicheng, 2007.11.18
//屏蔽F1帮助
function window.onhelp()
{
void(window.open("../myoa.htm","_Help","status=no,fullscreen=no","true"));
return false;
}
function RedefineFunctionKey()
{
// F2:113, ..., F12:123
if(event.keyCode && event.keyCode==113)
{
//F2键已被屏蔽
event.keyCode=0
event.returnValue=false;
void(window.open("../myoa.htm","Main04","status=no,fullscreen=no","true"));
}
if(event.keyCode && event.keyCode==114)
{
//F3键已被屏蔽
event.keyCode=0
top.Main03.NavStatus();
event.returnValue=false;
}
if(event.keyCode && event.keyCode==115)
{
//F4键已被屏蔽
if (window.event.srcElement.tagName == "INPUT")
var o=document.getElementById("I"+window.event.srcElement.name);
if (o!=null)
{
o.onclick();
}
window.event.keyCode=0
window.event.returnValue = false;
}
if(event.keyCode && event.keyCode==116)
{
//F5键已被屏蔽
event.keyCode=0
event.returnValue=false;
alert("<%=Session("UserName")%>:欢迎使用<%=Application("A000001")+"("+Application("A000003")+" "+Application("A000004")+")"%>")
}
if(event.keyCode && event.keyCode==117)
{
//F6键已被屏蔽
event.keyCode=0
event.returnValue=false;
}
if(event.keyCode && event.keyCode==118)
{
//F7键已被屏蔽
event.keyCode=0
event.returnValue=false;
}
if(event.keyCode && event.keyCode==119)
{
//F8键已被屏蔽
event.keyCode=0
event.returnValue=false;
}
if(event.keyCode && event.keyCode==120)
{
//F9键已被屏蔽
event.keyCode=0
event.returnValue=false;
}
if(event.keyCode && event.keyCode==121)
{
//F10键已被屏蔽
event.keyCode=0
event.returnValue=false;
}
if(event.keyCode && event.keyCode==122)
{
//F11键已被屏蔽
event.keyCode=0
event.returnValue=false;
// alert("当前时间时是:"+Date());
window.showModalDialog("../CoolClock.htm", "","status:off;scroll:off;dialogWidth:850px;dialogHeight:530px;dialogLeft:120px;dialogTop:90px;")
}
if(event.keyCode && event.keyCode==123)
{
//F12键已被屏蔽
event.keyCode=0
event.returnValue=false;
void(window.open("main04.asp","Main04",""));
}
}
function RedefineCtrlKey()
{
if (window.event.ctrlKey && event.keyCode==87)
{
alert('已经屏蔽了 CTRL+W/n谢谢使用。');
window.event.returnvalue=false;
}
if (window.event.ctrlKey && event.keyCode==69)
{
alert('已经屏蔽了 CTRL+E/n谢谢使用。');
window.event.returnvalue=false;
}
if (window.event.ctrlKey && event.keyCode==82)
{
alert('已经屏蔽了 CTRL+R/n谢谢使用。');
window.event.returnvalue=false;
}
if (window.event.ctrlKey && event.keyCode==73)
{
alert('已经屏蔽了 CTRL+I/n谢谢使用。');
window.event.returnvalue=false;
}
if (window.event.ctrlKey && event.keyCode==78)
{
alert('已经屏蔽了 CTRL+N/n谢谢使用。');
window.event.returnvalue=false;
}
if (window.event.ctrlKey && event.keyCode==79)
{
alert('已经屏蔽了 CTRL+O/n谢谢使用。');
window.event.returnvalue=false;
}
if (window.event.ctrlKey && event.keyCode==76)
{
alert('已经屏蔽了 CTRL+L/n谢谢使用。');
window.event.returnvalue=false;
}
}
function RedefineShiftKey()
{
if (window.event.shiftKey && event.keyCode==121)
{
alert('已经屏蔽了SHIFT+F10/n谢谢使用。');
window.event.returnvalue=false;
}
}
function RedefineAltKey()
{
if (window.event.shiftKey && event.keyCode==121)
{
alert('已经屏蔽了SHIFT+F10/n谢谢使用。');
window.event.returnvalue=false;
}
}
function DirectorKey1()
{
if(event.keyCode)
{
if(event.keyCode==37 || event.keyCode==38)
{
//Move Up
MoveBar(0);
window.event.keyCode=0
window.event.returnValue = false;
} else if(event.keyCode==39 || event.keyCode==40)
{
//Move Down
MoveBar(1);
window.event.keyCode=0
window.event.returnValue = false;
} else if(event.keyCode==36 || event.keyCode==33)
{
//Move Top
MoveBar(2);
window.event.keyCode=0
window.event.returnValue = false;
} else if(event.keyCode==35 || event.keyCode==34)
{
//Move Button
MoveBar(3);
window.event.keyCode=0
window.event.returnValue = false;
} else if(event.keyCode==45)
{
//Insert
document.MyForm0.B0001.onclick()
window.event.keyCode=0
window.event.returnValue = false;
} else if(event.keyCode==46)
{
//Delete
document.MyForm0.B0004.onclick()
window.event.keyCode=0
window.event.returnValue = false;
}
}
}
function MoveBar(d)
{
var o = document.getElementById("Tlist1")
// for (var b in o) alert(b);
var TtlLine=o.rows.length-1;
var curline = document.MyForm0.CurLine
if (d==0)
{
curline.value = parseInt(curline.value)-1
} else if (d==1)
{
curline.value = parseInt(curline.value)+1
} else if (d==2)
{
curline.value = 1
} else if (d==3)
{
curline.value = TtlLine
}
if (curline.value>TtlLine)
{
curline.value = 1;
} else if (curline.value<1)
{
curline.value = TtlLine;
}
if (curline.value == "NaN")
{
curline.value = 1;
}
o.rows[curline.value].ondblclick();
}
function RedefineENTERKey()
{
if(event.keyCode && (event.keyCode==13)) // ENTER Key
{
if (document.MyForm0.srch!=null)
{
document.MyForm0.srch.onclick()
event.keyCode=0
event.returnValue=false;
}
}
}
document.οnkeydοwn=function()
{
RedefineFunctionKey();
RedefineCtrlKey();
RedefineShiftKey();
RedefineAltKey();
RedefineENTERKey();
}
/*
document.οncοntextmenu=function()
{
Alert("功能键帮助:",
" F1: 关于系统/n"+
" F2: 操作指南/n"+
" F3: 隐藏/显示左菜单/n"+
" F4: 打开选择窗口(在选择输入域中)/n/n"+
" F5: 显示系统版本/n"+
" F6: 显示与输入域有关的信息/n"+
" F7: 显示用户信息/n"+
" F8: 显示会话信息/n/n"+
" F9: /n"+
"F10: /n"+
"F11: 显示万年历/n"+
"F12: /n",0
);
window.event.returnValue=false;
}
*/
function AboutHHCMS()
{
window.showModalDialog("AboutME.asp", "关于HHCMS V1.0...","status:off;scroll:off;help :no;dialogWidth:350px;dialogHeight:450px;dialogLeft:220px;dialogTop:120px;")
}
</script>