// For BANNER SCROLL script var bNetscape4plus = (navigator.appName == "Netscape" && navigator.appVersion.substring(0,1) >= "4"); var bExplorer4plus = (navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.substring(0,1) >= "4"); function CheckUIElements(){ var yMenuFrom, yMenuTo, yButtonFrom, yButtonTo, yOffset, timeoutNextCheck; if ( bNetscape4plus ) { yMenuFrom = document["gotop"].top; yMenuTo = top.pageYOffset + 132; // gotop Layer 's First position } else if ( bExplorer4plus ) { yMenuFrom = parseInt (gotop.style.top, 10); yMenuTo = document.body.scrollTop + 132; // gotop Layer 's First position } timeoutNextCheck = 10; if ( yMenuTo + eval(gotop.style.height.substring(0,gotop.style.height.length-2)) >= document.body.scrollHeight) { yMenuTo = document.body.scrollHeight - eval(gotop.style.height.substring(0,gotop.style.height.length-2)) - 5; } if ( Math.abs (yButtonFrom - (yMenuTo + 152)) < 6 && yButtonTo < yButtonFrom ) { setTimeout ("CheckUIElements()", timeoutNextCheck); return; } if ( yButtonFrom != yButtonTo ) { yOffset = Math.ceil( Math.abs( yButtonTo - yButtonFrom ) / 5 ); if ( yButtonTo < yButtonFrom ) yOffset = -yOffset; if ( bNetscape4plus ) document["divLinkButton"].top += yOffset; else if ( bExplorer4plus ) divLinkButton.style.top = parseInt (divLinkButton.style.top, 10) + yOffset; timeoutNextCheck = 10; } if ( yMenuFrom != yMenuTo ) { yOffset = Math.ceil( Math.abs( yMenuTo - yMenuFrom ) / 5 ); if ( yMenuTo < yMenuFrom ) yOffset = -yOffset; if ( bNetscape4plus ) document["gotop"].top += yOffset; else if ( bExplorer4plus ) gotop.style.top = parseInt (gotop.style.top, 10) + yOffset; timeoutNextCheck = 10; } setTimeout ("CheckUIElements()", timeoutNextCheck); } function OnLoad() { var y; if ( top.frames.length ) if ( bNetscape4plus ) { document["gotop"].top = top.pageYOffset ; document["gotop"].visibility = "visible"; } else if ( bExplorer4plus ) { gotop.style.top = document.body.scrollTop ; gotop.style.visibility = "visible"; } CheckUIElements(); return true; } //OnLoad(); function Validate() { if( document.loginform.userId.value.length == 0 ) { alert("Vui lòng điền tên truy nhập!"); document.loginform.userId.focus(); return( false ); } /* if (document.loginform.userId.value.length < 5 || document.loginform.userId.value.length > 20) { alert("ID should be between 5 and 20 characters."); document.loginform.userId.focus(); return false; } */ if( document.loginform.password.value.length == 0 ) { alert("Nhập mật khẩu"); document.loginform.password.focus(); return( false ); } /* if( document.loginform.password.length < 4 || document.loginform.password.length > 20) { alert("The password should be between 4 and 20 characters."); document.loginform.password.focus(); return; } */ return( true ); } function signIn() { if(Validate() == true) { //document.loginform.submit(); return true; } return false; } function goFocus() { document.loginform.userId.value = ''; } -->