function moveErrLayer(left,top){document.getElementById("myLayer").style.left=left+"px";document.getElementById("myLayer").style.top=top+"px";}
function ShowNote(notetitle,msg){document.getElementById("errnote").innerHTML =notetitle;document.getElementById("errmsg").innerHTML =msg;document.getElementById("myLayer").style.visibility="visible";}
function ShowNoteNew(ctl,notetitle,msg){document.getElementById("errnote").innerHTML =notetitle;document.getElementById("errmsg").innerHTML =msg;document.getElementById("myLayer").style.visibility="visible";if(ctl!=null &&ctl.disabled==false){ctl.focus();}}
function ShowNoteForCom(frmid,fntid,msg){var fntmsg;var strmsg;if(document.getElementById(fntid)==null){if(fntid==null)fntmsg="";else fntmsg=fntid;}else{fntmsg=document.getElementById(fntid).innerHTML;}strmsg=fntmsg+msg;ShowNoteNew(document.getElementById(frmid),"Note",strmsg);}
function ShowError(ctl,msg){var tmpStr=g_errorInfo;if(tmpStr=="undefined"){tmpStr="Error";}document.getElementById("errnote").innerHTML =tmpStr;document.getElementById("errmsg").innerHTML =msg;document.getElementById("myLayer").style.visibility="visible";if(ctl!=null &&ctl.disabled==false){ctl.focus();}}
function ShowErrorForCom(frmid,fntid,msg){var fntmsg;var strmsg;if(document.getElementById(fntid)==null){if(fntid==null)fntmsg="";else fntmsg=fntid;}else{fntmsg=document.getElementById(fntid).innerHTML;}strmsg=fntmsg+msg;ShowError(document.getElementById(frmid),strmsg);}
function getMsgFormArray(str,arg){var errid=0;var min =0;var max=0;var param=-1;var msg="";var num=arg.length;if(num==1){errid=arg[0];}else if(num==3){errid=arg[0];min =arg[1];max=arg[2];}else if(num==2){errid=arg[0];param=arg[1];}else return null;for(var i=0;i<str.length;i++){if(typeof(str[i])=="undefined"){alert("数组初始化有误，请检查代码！ i = "+i);return null;}if(errid==str[i][0]){if(min ==max&&min ==0){if(param==-1){msg=str[i][1];}else {msg=str[i][1]+param+str[i+1][1];}}else msg=str[i][1]+min +"~"+max+str[i+1][1];return msg;}}return null;}
function setTextFocusEnd(){var srcElement=event.srcElement;var textRange=srcElement.createTextRange();textRange.moveStart('character',srcElement.value.length);textRange.collapse(true);textRange.select();}
