var sCheckAll = true; function checkAll() { var len = document.frm.elements.length; for(var i=0; i < len; i++) { if(document.frm.elements[i].name != 'uptAble') document.frm.elements[i].checked = sCheckAll; } sCheckAll = !sCheckAll; } function checkNothing() { var len = document.frm.elements.length; var Check = false; for(var i=0; i < len; i++) { if(document.frm.elements[i].name != 'uptAble') { if(document.frm.elements[i].checked == true) Check = true; } } if(Check == true) { sCheckAll = false; checkAll(); } } function check_blank( val ) { // blank return 0 , else return 1 if(val == "" ) { return 0; } else { return 1; } } function check_length( val , chk_length ) { // error return 0 , accept return 1 if ( val.length < chk_length ) { return 0; } else { return 1; } } function checkList() { var ChkVariable = false; if (document.frm.key != null) { if(isNaN(document.frm.key.length)) { if(document.frm.key.checked) { ChkVariable = true; } } else { for(var i = 0; i <= document.frm.key.length - 1; i++) { if(document.frm.key[i].checked == true) { ChkVariable = true; } } } } return ChkVariable; } function SelectReturn() { var sReturn = ""; if (document.frm.key != null) { if(isNaN(document.frm.key.length)) { if(document.frm.key.checked) { sReturn = document.frm.key.value; } } else { for(var i = 0; i <= document.frm.key.length - 1; i++) { if(document.frm.key[i].checked == true) { sReturn = document.frm.key[i].value; } } } } return sReturn; } function SelectReturnIndex() { var sReturn = ""; if (document.frm.key != null) { if(isNaN(document.frm.key.length)) { if(document.frm.key.checked) { sReturn = -1; } } else { for(var i = 0; i <= document.frm.key.length - 1; i++) { if(document.frm.key[i].checked == true) { sReturn = i; } } } } return sReturn; } function align_center(w, h) { var LeftPosition, TopPosition, Settings LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition; return settings; } function align_max(w, h) { var LeftPosition, TopPosition, Settings LeftPosition = 0; TopPosition = 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition; return settings; } function isNumber(val) { /* if ( parseInt(val) == val ) { return true; } else { return false; } */ var valid = true; var cmp = "0123456789"; for (var i=0; i