var ACTION_PATTERN="fs"; function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i165){ MM_swapImgRestore(); secBoard(0); } if(evt.x<430 || evt.x>1120){ MM_swapImgRestore(); secBoard(0); } } var IDNO_LETTER ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; var IDNO_NUM =["10","11","12","13","14","15","16","17","34","18","19","20","21","22","35","23","24","25","26","27","28","29","32","30","31","33"]; var IDNO_MULITI =["9","8","7","6","5","4","3","2","1","1"]; function checkIDNO(idno){ if(idno==null || idno.length<8 || idno.length>10) return false; var iLen = idno.length; if(parseInt(iLen)==8){ return checkCompayUnit(idno); } if(parseInt(iLen)==9){ if(IDNO_LETTER.indexOf(idno.substring(0,1))!=-1){ return checkIsNumber(idno.substring(1,iLen)); } return false; } var s1 = idno.substring(0,1); var iPosition = IDNO_LETTER.indexOf(s1); if(iPosition==-1) return false; var iNum = parseInt(IDNO_NUM[iPosition]); var sum=0; for(var i=0;i=48 && k<=57){ sum+=doSum(parseInt(strVal.charAt(i))*CKNUM[i]); }else{ return false; } } if (sum%10==0 || (parseInt(strVal.charAt(6))==7&&(sum+1)%10==0)) return true; else return false; } function doSum(num){ if(num>9){ return (parseInt(num/10)+parseInt(num%10)); } return num; } function checkIsNumber(strVal){ var k = 0; var iLen = strVal.length; for(var i=0;i=48 && k<=57){ continue; }else{ return false; } } return true; } function checkFullCharforPass(password){ var k=0; for(var i=0;i=65 && k<=90){ return true; } } return false; } function IsIllegalPassword(password){ var k=0; var flag = false; for(var i=0;i=48 && k<=57) || (k>=65 && k<=90)|| (k>=97 && k<=122)){ continue; }else{ flag = true; break; } } return flag; } function checkFullChar(idno){ var reidno=""; for(var i=0;i65248){ var wordCode =idno.charCodeAt(i)-65248; if(wordCode>91){ wordCode-=32; } var k=parseInt(wordCode-65); reidno = reidno.concat(IDNO_LETTER.charAt(k)); }else{ reidno = reidno.concat(idno.charAt(i)); } break; default: if(idno.charCodeAt(i)>65248){ reidno = reidno.concat(idno.charCodeAt(i)-65248-48); }else{ reidno = reidno.concat(idno.charAt(i)); } break; } } return reidno; } var newWinObj = new Array(); function doOpenJustPopupWin(sUrl,sw,sh){ checkOpenWinAndClose(); var w = parseInt((screen.width-parseInt(sw))/2); var h = parseInt((screen.height-parseInt(sh))/2); var DWinObj=window.open(sUrl,"FUBON","status=no,location=no,menubar=no,resizable=1,scrollbars=1,width="+sw+",height="+sh+",top="+h+",left="+w+",screenX="+w+",screenY="+h); newWinObj[newWinObj.length]=DWinObj; } function doOpenJustPopupWinNoresize(sUrl,sw,sh){ checkOpenWinAndClose(); var w = parseInt((screen.width-parseInt(sw))/2); var h = parseInt((screen.height-parseInt(sh))/2); var DWinObj=window.open(sUrl,"FUBON","status=no,location=no,menubar=no,resizable=no,scrollbars=1,width="+sw+",height="+sh+",top="+h+",left="+w+",screenX="+w+",screenY="+h); newWinObj[newWinObj.length]=DWinObj; } function doOpenJustPopupWinWithTitle(sPageName,sTitle,sw,sh){ checkOpenWinAndClose(); var w = parseInt((screen.width-parseInt(sw))/2); var h = parseInt((screen.height-parseInt(sh))/2); var DWinObj=window.open(sPageName,"FUBON","status=no,location=no,menubar=no,resizable=yes,scrollbars=1,width="+sw+",height="+sh+",top="+h+",left="+w+",screenX="+w+",screenY="+h); newWinObj[newWinObj.length]=DWinObj; } function doNewPopupWindow(sUrl,sw,sh){ checkOpenWinAndClose(); var w = parseInt((screen.width-parseInt(sw))/2); var h = parseInt((screen.height-parseInt(sh))/2); var DWinObj=window.open(sUrl,"FUBON","status=yes,location=yes,menubar=yes,resizable=1,directories=yes,scrollbars=1,width="+sw+",height="+sh+",top="+h+",left="+w+",screenX="+w+",screenY="+h); newWinObj[newWinObj.length]=DWinObj; } function doOpenLoginWindow(sUrl,sw,sh){ checkOpenWinAndClose(); var w = parseInt((screen.width-parseInt(sw))/2); var h = parseInt((screen.height-parseInt(sh))/2); window.open(sUrl,"Login","status=no,location=no,menubar=no,resizable=1,scrollbars=0,width="+sw+",height="+sh+",top="+h+",left="+w+",screenX="+w+",screenY="+h); } var _stock_Flag = false; function doOpenStockWindow(sPageName,sTitel){ checkOpenWinAndClose(); var w = parseInt((screen.width-800)/2); var h = parseInt((screen.height-600)/2); var DWinObj=window.open("https://www.fubon-ebroker.com/fubon/stock_pop.fs?act="+sPageName,"FUBON","modal=yes,status=no,location=no,menubar=no,resizable=1,scrollbars=1,width=800,height=600,top="+h+",left="+w+",screenX="+w+",screenY="+h); newWinObj[newWinObj.length]=DWinObj; _stock_Flag = true; } function doOpenThirdMenu(sPageName){ checkOpenWinAndClose(); var w = parseInt((screen.width-980)/2); var h = parseInt((screen.height-750)/2); var DWinObj=window.open(sPageName,"FUBON","status=no,location=no,menubar=no,resizable=1,scrollbars=1,width=980,height=750,top="+h+",left="+w+",screenX="+w+",screenY="+h); newWinObj[newWinObj.length]=DWinObj; } function goContact(){ checkOpenWinAndClose(); doNewPopupWindow("https://www.fubon.com/member/quest/quest.jsp?buCate=S",800,600); } function goWarrant(){ checkOpenWinAndClose(); window.top.location="page_602."+ACTION_PATTERN; } function goPhone(){ checkOpenWinAndClose(); window.top.location="page_204."+ACTION_PATTERN; } function goMobile(){ checkOpenWinAndClose(); window.top.location="page_205."+ACTION_PATTERN; } function doLink(pagename){ checkOpenWinAndClose(); window.top.location=pagename+"."+ACTION_PATTERN; } function doLinkAppendParams(pagename,params){ checkOpenWinAndClose(); window.top.location=pagename+"."+ACTION_PATTERN+"?"+params; } function downloadNow(url,sw,sh){ checkOpenWinAndClose(); var w = parseInt((screen.width-parseInt(sw))/2); var h = parseInt((screen.height-parseInt(sh))/2); window.open(url,"Download","status=no,location=no,menubar=no,resizable=1,scrollbars=1,width="+sw+",height="+sh+",top="+h+",left="+w+",screenX="+w+",screenY="+h); } function resizeIFRAME(obj,elementName,ih1,ih2){ docHeight = document.getElementById(elementName).document.body.scrollHeight; obj.style.height = (parseInt(docHeight)*parseInt(ih1)+parseInt(ih2)) +'px'; } function detectCapsLock(elementName,e){ var valueCapsLock=e.keyCode?e.keyCode:e.which; var valueShift=e.shiftKey?e.shiftKey:((valueCapsLock==16)?true:false); if(((valueCapsLock>=65&&valueCapsLock<=90)&&!valueShift)||((valueCapsLock>=97&&valueCapsLock<=122)&&valueShift)){ document.getElementById(elementName).style.visibility='visible'; }else{ document.getElementById(elementName).style.visibility='hidden'; } } function winClose(){ try{ var sw = 497; var sh = 300; var w = parseInt((screen.width-parseInt(sw))/2); var h = parseInt((screen.height-parseInt(sh))/2); var n=window.event.screenX-window.screenLeft; var b=n>document.documentElement.scrollWidth-20; if(b&&window.event.clientY<0||window.event.altKey){ logoutToConfirmCloseWin(); window.open("logout_pop."+ACTION_PATTERN,"Logout","status=no,location=no,menubar=no,resizable=no,scrollbars=no,width="+sw+",height="+sh+",top="+h+",left="+w+",screenX="+w+",screenY="+h); } }catch(err){ doSessionClear(); } } function checkOpenWinAndClose(){ try{ for(var i=0;i