function jsmBatteryLevelIMG(lvl)
{
    if (lvl > 1.5) { lvl = lvl / 100.0; }
    var battLevelType = 1;
    try {
        battLevelType = BATTERY_LEVEL_TYPE;
    } catch (e) {
        battLevelType = 1;
    }
    var battIcon = "";
    if (battLevelType == 2) {
        // percent
        if (lvl <= 0.01) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png";
        } else {
            var battLvl = numParseInt(((lvl * 100.0) + 0.5), 0);
            if (battLvl > 99) { battLvl = 99; }
            battIcon = "Marker?icon=https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png&fr=5,2,25,12,10&text="+battLvl+"%25";
        }
    } else {
        //icon
        if (lvl <= 0.01) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png";
        } else
        if (lvl <= 0.25) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt025.png";
        } else
        if (lvl <= 0.50) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt050.png";
        } else
        if (lvl <= 0.70) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt070.png";
        } else
        if (lvl <= 0.90) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt090.png";
        } else {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt100.png";
        }
    }
    return "<img src=\""+battIcon+"\"/>";
}
/**
*** Returns an icon URL based on the event battery level
*** @param e  The 'MapEventRecord' object
**/
Returns an icon URL based on the event battery level
Returns an icon URL based on the event battery level
function jsmBatteryLevelIMG(lvl)
{
    if (lvl > 1.5) { lvl = lvl / 100.0; }
    var battLevelType = 1;
    try {
        battLevelType = BATTERY_LEVEL_TYPE;
    } catch (e) {
        battLevelType = 1;
    }
    var battIcon = "";
    if (battLevelType == 2) {
        if (lvl <= 0.01) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png";
        } else {
            var battLvl = numParseInt(((lvl * 100.0) + 0.5), 0);
            if (battLvl > 99) { battLvl = 99; }
            battIcon = "Marker?icon=https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png&fr=5,2,25,12,10&text="+battLvl+"%25";
        }
    } else {
        if (lvl <= 0.01) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png";
        } else
        if (lvl <= 0.25) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt025.png";
        } else
        if (lvl <= 0.50) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt050.png";
        } else
        if (lvl <= 0.70) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt070.png";
        } else
        if (lvl <= 0.90) {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt090.png";
        } else {
            battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt100.png";
        }
    }
    return "<img src=\""+battIcon+"\"/>";
}
function jsmBatteryLevelIMG ( lvl ) { if ( lvl > 1.5 ) { lvl = lvl / 100.0 ; } var battLevelType = 1 ; try { battLevelType = BATTERY_LEVEL_TYPE ; } catch ( e ) { battLevelType = 1 ; } var battIcon = "" ; if ( battLevelType == 2 ) { if ( lvl <= 0.01 ) { battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png" ; } else { var battLvl = numParseInt ( ( ( lvl * 100.0 ) + 0.5 ) , 0 ) ; if ( battLvl > 99 ) { battLvl = 99 ; } battIcon = "Marker?icon=https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png&fr=5,2,25,12,10&text=" + battLvl + "%25" ; } } else { if ( lvl <= 0.01 ) { battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt000.png" ; } else if ( lvl <= 0.25 ) { battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt025.png" ; } else if ( lvl <= 0.50 ) { battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt050.png" ; } else if ( lvl <= 0.70 ) { battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt070.png" ; } else if ( lvl <= 0.90 ) { battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt090.png" ; } else { battIcon = "https://gbpawebdiag949.blob.core.windows.net/gbpa-web/opengts/images/Batt100.png" ; } } return "<img src=\"" + battIcon + "\"/>" ; }
Returns an icon URL based on the event battery level
Returns an icon URL based on the event battery level
// percent //icon