﻿function onUpdating(){
    // get the update progress div
    var updateProgressDiv = $get('updateProgressDiv');
    var updateZoomDiv = $get('updateZoomDiv');
        
    // make it visible
    updateProgressDiv.style.display = '';
    updateZoomDiv.style.display = '';   
}

function onUpdated() {
    // get the update progress div
    var updateProgressDiv = $get('updateProgressDiv'); 
    var updateZoomDiv = $get('updateZoomDiv');
    
    // make it invisible
    updateProgressDiv.style.display = 'none';
    updateZoomDiv.style.display = 'none';
}

function changeFocus(length, from, to)
{
    var cFrom = document.getElementById(from);
    var cTo = document.getElementById(to);
    
    if (cFrom.value.length == length)
	{
		cTo.focus();
	}
}

function CheckKeyCode(e)
{
    if (navigator.appName == "Microsoft Internet Explorer")
    {
        if((e.keyCode >= 48 && e.keyCode <= 57) || (e.keyCode == 8))
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    else
    {
        if ((e.charCode >= 48 && e.charCode <= 57) || (e.charCode == 0))
        {
            return true;
        }
        else
        {
            return false;
        }
    }
}