/*

@@OBFUSCATE PREFIX@@d_

JS files needed:
	- none

*/


// formates the hit counter's value passed as a string
function formatHitCounter(containerID, value)
{
    // check container ID
    if ( !containerID )
    {
        return;
    }
    
    // get container element & check
    var containerElem = document.getElementById(containerID);
    if ( !containerElem )
    {
        return;
    }

    // check value
    if ( !value )
    {
        containerElem.innerHTML = '';
        return;
    }

    // create string value
    var strValue = new String(value);
    
    // number of digits
    var digitsNr = 7;

    // create string
    var digits = '';
    
    // add 0 digits
    for (var i = 0; i < digitsNr - strValue.length; ++i)
    {
        digits += '0';
    }
    digits += strValue;

    // set counter html/text
    document.getElementById(containerID).innerHTML = digits;
}