?
Path : /home/admin/domains/happytokorea.com/private_html/libs/js/ |
Current File : /home/admin/domains/happytokorea.com/private_html/libs/js/function.js |
//javascript by pom function Popup(mypage,myname,w, h) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=no,fullscreen=no,resizable=no,toolbar=no,location=no,status=no,menubar=no' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function test(){ alert('pom'); } function Popup2(mypage,myname,w, h) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,fullscreen=no,resizable,toolbar=yes,location=no,status=no,menubar=no' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function New_Win_NoOption2(mypage,myname,w, h) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,fullscreen=no,resizable,toolbar=no,location=no,status=no,menubar=no' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function new_win_layout(mypage,myname,w, h) { var winl = (screen.width - w) / 2; var wint = (screen.height - h) / 2; winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars=yes,fullscreen=yes,resizable,toolbar=no,location=no,status=no,menubar=no' win = window.open(mypage, myname, winprops) if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); } } function confirmSubmit() { var agree=confirm("do you want to delete?"); if (agree) return true ; else return false ; } function confirmSubmit2() { var agree=confirm("ѹźŷ͡?"); if (agree) return true ; else return false ; } function del_confirm(msg){ document.MM_returnValue=(confirm(unescape(msg))); } //----------------> function CheckAll(BackendForm,checkboxState) { for (a=0; a<BackendForm.elements.length; a++) { if (BackendForm.elements[a].id.indexOf("checkbox_") == 0) { BackendForm.elements[a].checked = checkboxState ; } } } function setColor_when_checked(form,checkboxState){ for(a=0;a<form.elements.length;a++){ }//end for }//end function setColor_when.. function chkEmail (input) { var str=input.value; var num_as = str.lastIndexOf("@"); var num_poin = str.lastIndexOf("."); if (num_as == -1 || num_poin ==-1) { return false; }else { return true; } } function checkbox_color(obj){ if(obj.checked){ hightLightOn (obj) ; }else{ hightLightOff (obj) ; } } /* End checkbox*/ function hightLightOn (obj) { cRef = obj.style.backgroundColor; if (cRef != "#59acff") // յ Mark { obj.style.backgroundColor = "#D2E9FF"; } } function hightLightOff (obj) { cRef = obj.style.backgroundColor; if (cRef != "#59acff") // յ Mark { obj.style.backgroundColor = "#FFFFFF"; } } function hightLightMark (obj) { var cRef = obj.style.backgroundColor; var c1 = "#59acff"; // յ Mark var c2 = "#FFFFFF"; // յ Mark ͡ if (cRef == c1){ obj.style.backgroundColor = c2; }else{ obj.style.backgroundColor = c1; } } //------------------------------> function CheckInputNumber(VInput){ var checkOK = ".0123456789"; var checkStr = VInput.value; var allValid = true; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } if (ch != ",") allNum += ch; } if (!allValid) { alert("Please enter only digit characters in field."); VInput.value=""; VInput.focus(); return (false); } } function CheckInputNumber2(VInput){ var checkOK = "0123456789"; var checkStr = VInput.value; var allValid = true; var allNum = ""; for (i = 0; i < checkStr.length; i++) { ch = checkStr.charAt(i); for (j = 0; j < checkOK.length; j++) if (ch == checkOK.charAt(j)) break; if (j == checkOK.length) { allValid = false; break; } if (ch != ",") allNum += ch; } if (!allValid) { alert("Please enter only number characters in field."); VInput.value=""; VInput.focus(); return (false); } }