var hexChars = "0123456789ABCDEF";
function Dec2Hex (dec) {
var a = dec % 16;
var b = (dec - a)/16;
var hex = "" + hexChars.charAt(b) + hexChars.charAt(a);
return hex;
}
function Hex2Dec(hex) {
return parseInt(hex,16);
}
function Dec2Hex (dec) {
var a = dec % 16;
var b = (dec - a)/16;
var hex = "" + hexChars.charAt(b) + hexChars.charAt(a);
return hex;
}
function Hex2Dec(hex) {
return parseInt(hex,16);
}