var fcbParam = null; var fcbReturn = null; if (window.jQuery){ jQuery(function(){ jQuery("a[href*='?logout&redirectto=']").click(function(evt){ window.top.location.href=$(this).attr("href"); evt.preventDefault(); }); }); } function isOnPc(){ var isPc = true; if(navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry)/)) isPc = false; return isPc; } function openDBRelativeURL( elemName ){ pathName = location.pathname.split('.nsf'); location.href = pathName[0] + '.nsf/' + elemName; } function getURL(){ pathName = location.pathname.split('.nsf'); return pathName[0]+'.nsf/'; } function CloseWindow() { window.open('', '_self', ''); window.close(); } function TOff(){ var checkboxs = document.getElementsByName("cb"); if(checkboxs){ if (!checkboxs[0].checked) for (var i = 0; i < checkboxs.length; i++) checkboxs[i].checked=true; else for (var i = 0; i < checkboxs.length; i++) checkboxs[i].checked=false; } } function onclickChoXL(id){ var options="dialogTop=0; dialogLeft=0; dialogWidth="+screen.availWidth+"px; dialogHeight="+screen.availHeight+"px;scrollbars=no"; window.showModalDialog("../tudien.nsf/view_WFL_R?openform&id_vbden="+id+"",'',options); } function Xoa( setSubmitVar) { if ( confirm('Nh\u1EA5n OK \u0111\u1EC3 xo\u00E1, n\u1EBFu kh\u00F4ng xo\u00E1 nh\u1EA5n Cancel') ){ isDocBeingSubmitted = true; location.search = "?DeleteDocument"; } } function trim(aStr) { return aStr.replace(/^\s{1,}/, "").replace(/\s{1,}$/, "") } //Ham SelectOne(Sour,Dest,inUse) dung de xu ly lua chon torng listbox //no chuyen mot selectedIndex trong truong Sour chuyen sang truong Dest function SelectOne(Sour,Dest,inUse){ var flag=true; var SLength = Sour.options.length; var DLength = 0; DLength=(Dest.options.length); if(SLength > 0){ if(Sour.options[Sour.selectedIndex].value != "" && Sour.options[Sour.selectedIndex].value != "-1" ){ if(DLength==0){ Dest.options.length = Dest.options.length + 1; Dest.options[Dest.options.length - 1].value=Sour.options[Sour.selectedIndex].value; Dest.options[Dest.options.length - 1].text=Sour.options[Sour.selectedIndex].text;} else{ for(i=0;i0){ for (i=0;i0){ for (i=0;i0) dialogWidth=width; else dialogWidth=550; if (height>0) dialogHeight=height; else dialogHeight=450; if (left>0) dialogLeft=left; else dialogLeft=(maxWidth-dialogWidth)/2; if (top>0) dialogTop=top; else dialogTop=(maxHeight-dialogHeight)/2; if (Variable=='') dialogVariable='Address'; else dialogVariable= Variable; var pathname = window.location.pathname.toUpperCase(); pathname=pathname.substring(0,pathname.lastIndexOf('NSF')); pathname=pathname.substring(0,pathname.lastIndexOf('/'))+'/tudien.nsf/'; var giatri = window.showModalDialog(pathname.substring(0,(pathname.lastIndexOf('.nsf')+5))+ModalDialog_Name+'?OpenForm',dialogVariable,'status:no;resizable=no;scrollbars:no;dialogLeft:'+dialogLeft+'px;dialogTop:'+dialogTop+'px;dialogWidth:'+dialogWidth+'px;dialogHeight:'+dialogHeight+'px'); if (giatri!=null){ Sour.value=giatri; } return giatri; } //============== end open modal dialog function contactTabsPagesMouseMove(id){ id.style.color='green'; id.style.textDecoration='underline'; } function contactTabsPagesMouseOut(id){ id.style.color='black'; id.style.textDecoration='none'; } function contactTabsPagesonClick(id){ id.style.color='red'; id.style.textDecoration='none'; } function phantrang(sum,count){ var path=window.location; var pathCurr=""; path=path+""; var pageCurr=""; if (path.indexOf("&Start")<0){ pageCurr=1; pathCurr=path; }else{ pageCurrTam=path.substring(path.indexOf("&Start=")+7,path.length); pageCurrTam=parseInt(pageCurrTam); pageCurr=pageCurrTam/count+1; pathCurr=path.substring(0,path.indexOf("&Start=")); } var html=""; sum=parseInt(sum); pageBegin=0; pageEnd=1; if (sum>0){ var sotrang=Math.round(sum/count+0.5); html+=""; html+=""; html+=""; if (sotrang>0){ pageEnd=sotrang; if (pageCurr<=5){ if (pageEnd>10) pageEnd=10; for (var i=0;i"+(i+1)+""; else html+=""; }else{ if (pageCurr-1==i){ html+=""; }else{ html+=""; } } } } // end pageCurr <=5 if (pageCurr>5){ pageBegin=pageCurr-5; if ((pageCurr+5)0) pageBegin=pageEnd-10; else pageBegin=0; } for (var i=pageBegin;i"+(i+1)+""; }else{ if (i==0) html+=""; else html+=""; } } } }else{ html+=""; } html+=""; html+="
Trang "+pageCurr+"    "+(i+1)+" "+(i+1)+" "+(i+1)+" "+(i+1)+" "+(i+1)+"1 
"; } return html; } function loadPage(str,i,count,sum){ var pathCurr=""; path=str+""; var pageCurr=""; if (path.indexOf("&Start")<0){ pageCurr=1; pathCurr=path; }else{ pageCurrTam=path.substring(path.indexOf("&Start=")+7,path.length); pageCurrTam=parseInt(pageCurrTam); pageCurr=pageCurrTam/count+1; pathCurr=path.substring(0,path.indexOf("&Start=")); } sum=parseInt(sum); if ((i==1) || (i=="1")){ startNumber=(pageCurr-1)*count+count; } if ((i==-1) || (i=="-1")){ startNumber=(pageCurr-1)*count-count; } if ((startNumber=0)){ if (startNumber==0) window.open(pathCurr,'Main'); else window.open(pathCurr+"&Start="+ startNumber+"&Count="+count,'Main'); } } function phantrangF(sum,count){ var path=window.location; var pathCurr=""; path=path+""; var pageCurr=""; if (path.indexOf("&p=")<0){ pageCurr=1; pathCurr=path; }else{ pageCurrTam=path.substring(path.indexOf("&p=")+3,path.length); pageCurr=parseInt(pageCurrTam); pathCurr=path.substring(0,path.indexOf("&p=")); } var html=""; sum=parseInt(sum); pageBegin=0; pageEnd=1; if (sum>0){ var sotrang=Math.round(sum/count+0.5); html+=""; html+=""; html+=""; if (sotrang>0){ pageEnd=sotrang; if (pageCurr<=5){ if (pageEnd>10) pageEnd=10; for (var i=0;i"+(i+1)+""; else html+=""; }else{ if (pageCurr-1==i){ html+=""; }else{ html+=""; } } } } // end pageCurr <=5 if (pageCurr>5){ pageBegin=pageCurr-5; if ((pageCurr+5)0) pageBegin=pageEnd-10; else pageBegin=0; } for (var i=pageBegin;i"+(i+1)+""; }else{ if (i==0) html+=""; else html+=""; } } } }else{ html+=""; } html+=""; html+="
Trang "+pageCurr+"    "+(i+1)+" "+(i+1)+" "+(i+1)+" "+(i+1)+" "+(i+1)+"1 
"; } return html; } function loadPageF(str,i,count,sum){ var pathCurr=""; path=str+""; var pageCurr=""; if (path.indexOf("&p")<0){ pageCurr=1; pathCurr=path; }else{ pageCurrTam=path.substring(path.indexOf("&p=")+3,path.length); pageCurr=parseInt(pageCurrTam); pathCurr=path.substring(0,path.indexOf("&p=")); } sum=parseInt(sum); if ((i==1) || (i=="1")){ startNumber=pageCurr+1; } if ((i==-1) || (i=="-1")){ startNumber=pageCurr-1; } if ((startNumber<=Math.round(sum/count)+1)&&(startNumber>=0)){ if (startNumber==0) window.open(pathCurr,'Main'); else window.open(pathCurr+"&p="+ startNumber,'Main'); } } function goLite(FRM) { FRM.style.borderColor = "#666666"; } function goDim(FRM) { FRM.style.borderColor = "#000000"; } //end tdbutton /* * Function de sap xep trong view */ function sortColumnClicked(obj){ console.log(obj); }