X-Git-Url: http://mop.ddnsfree.com/gitweb/?a=blobdiff_plain;f=web%2Fcommons.js;h=4cf95dcf437c6d21b0728f6adb1e2c8eaa8d9d71;hb=c5cc1b418c38a357bcbe6c3ae671dd2da21fd4ab;hp=f522ad538f85aa6325f28a342598947c3c23bfff;hpb=2dafd9b1a8edbf64595bee1e669be6c95921bf61;p=brisk.git diff --git a/web/commons.js b/web/commons.js index f522ad5..4cf95dc 100644 --- a/web/commons.js +++ b/web/commons.js @@ -49,6 +49,18 @@ var mlang_commons = { 'imgload_a' : { 'it' : 'Immagine caricate ', function $(id) { return document.getElementById(id); } +function dec2hex(d, padding) +{ + var hex = Number(d).toString(16); + padding = typeof (padding) === "undefined" || padding === null ? padding = 2 : padding; + + while (hex.length < padding) { + hex = "0" + hex; + } + + return hex; +} + function getStyle(x,IEstyleProp, MozStyleProp) { if (x.currentStyle) { @@ -835,7 +847,7 @@ function user_dec_and_state(el) var val_el; content = user_decorator(el); - content += state_add(el[0]); + content += state_add(el[0],(typeof(el[2]) != 'undefined' ? el[2] : null)); return (content); }