1function number_format (number, decimals, dec_point, thousands_sep) { 2 number = (number + '').replace(/[^0-9+\-Ee.]/g, ''); 3 var n = !isFinite(+number) ? 0 : +number, 4 prec = !isFinite(+decimals) ? 0 : Math.abs(decimals), sep = (typeof thousands_sep === 'undefined') ? ',' : thousands_sep, 5 dec = (typeof dec_point === 'undefined') ? '.' : dec_point, 6 s = '', 7 toFixedFix = function (n, prec) { 8 var k = Math.pow(10, prec); return '' + Math.round(n * k) / k; 9 }; 10 // Fix for IE parseFloat(0.55).toFixed(0) = 0; 11 s = (prec ? toFixedFix(n, prec) : '' + Math.round(n)).split('.'); 12 if (s[0].length > 3) { s[0] = s[0].replace(/\B(?=(?:\d{3})+(?!\d))/g, sep); 13 } 14 if ((s[1] || '').length < prec) { 15 s[1] = s[1] || ''; 16 s[1] += new Array(prec - s[1].length + 1).join('0'); } 17 return s.join(dec); 18} 19 20//Display Loading Image 21function Display_Load(){ 22 $("#loading").fadeIn(900,0); 23} 24//Hide Loading Image 25function Hide_Load(){ 26 $("#loading").fadeOut('slow'); 27} 28function displayAlertMessage(title,message,button,timeOut,width,height,overflow,action) { 29 //jQuery('#messageBox').slideUp(); 30 //alert(timeOut); 31 // var timeOutEnable = false; 32 // var timeOutDefault = 5; 33 // jQuery('#messageBox').css('top',113+$(window).scrollTop()); 34 jQuery('#message_title').html(title); 35 jQuery('#message').html(message); 36 37 if(button != '0'){ 38 if(button != '1'){ 39 jQuery('#message_button').html(button); 40 } 41 jQuery('#message_button').show(); 42 }else{ 43 jQuery('#message_button').hide(); 44 } 45 46 47 if(width != ''){ 48 var mLeft = width*1/2; 49 var widthTitle = width*1-10; 50 jQuery('#messageBox').css('margin-left','-'+mLeft+'px'); 51 jQuery('#messageBox').css('width',width+'px'); 52 jQuery('#message_title').css('width',widthTitle+'px'); 53 } 54 if(height != ''){ 55 jQuery('#messageBox').css('height',height+'px'); 56 57 if(overflow == 'true'){ 58 var msgHt = height*1 - 80; 59 jQuery('#message').css('height',msgHt+'px'); 60 jQuery('#message').css('overflow','auto'); 61 jQuery('#message').css('margin-right','5px'); 62 } 63 } 64 // jQuery('#messageBox').fadeIn('fast'); 65 jQuery('#messageBox').modalBox({ 66 onClose:function(){ 67 if(action == ''){ 68 return false; 69 }else if(action == 'self'){ 70 window.location.reload(); 71 }else{ 72 //alert(action); 73 var rAction = action.split(':'); 74 if(rAction[0] == 'overlay') $('#'+rAction[1]).click(); 75 else window.location.href = action; 76 } 77 } 78 }); 79 80 // if(timeOutEnable){ 81 // if(timeOut != 'CLOSE'){ 82 // if(timeOut == '') timeOut = timeOutDefault; 83 // setTimeout(function() { 84 // jQuery('#messageBox').fadeOut('fast'); 85 // }, timeOut * 1000); 86 // } 87 // } 88 89} 90function modifyAlertMessage(title,message,button,timeOut,width,height,overflow,action) { 91 jQuery('#message_title').html(title); 92 jQuery('#message').html(message); 93 94 if(button != '0'){ 95 if(button != '1'){ 96 jQuery('#message_button').html(button); 97 } 98 jQuery('#message_button').show(); 99 }else{ 100 jQuery('#message_button').hide(); 101 } 102 103 if(width != ''){ 104 var mLeft = width*1/2; 105 var widthTitle = width*1-10; 106 jQuery('#messageBox').css('margin-left','-'+mLeft+'px'); 107 jQuery('#messageBox').css('width',width+'px'); 108 jQuery('#message_title').css('width',widthTitle+'px'); 109 } 110 if(height != ''){ 111 jQuery('#messageBox').css('height',height+'px'); 112 113 if(overflow == 'true'){ 114 var msgHt = height*1 - 80; 115 jQuery('#message').css('height',msgHt+'px'); 116 jQuery('#message').css('overflow','auto'); 117 jQuery('#message').css('margin-right','5px'); 118 } 119 } 120 // jQuery('#messageBox').fadeIn('fast'); 121 jQuery('#messageBox').modalBox({ 122 onClose:function(){ 123 if(action == ''){ 124 return false; 125 }else if(action == 'self'){ 126 window.location.reload(); 127 }else{ 128 //alert(action); 129 var rAction = action.split(':'); 130 if(rAction[0] == 'overlay') $('#'+rAction[1]).click(); 131 else window.location.href = action; 132 } 133 } 134 }); 135 136} 137function closeAlertMessage(){ 138 $.modalBox.close(); 139} 140 141function setLocalStorage(key,value){ 142 localStorage.setItem(key,value); 143} 144
145function getLocalStorage(key){ 146 return localStorage.getItem(key); 147}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.