    var _AllowFormSubmission = true;
    function allowFormSubmission(reset) {
        var afs = _AllowFormSubmission;
        if (reset) _AllowFormSubmission = true;
        return afs;
    }
    
    function popup(mylink, windowname)
    {
        if (!window.focus) return true;
        var href;
        if (typeof(mylink) == 'string')
            href = mylink;
        else
            href = mylink.href + window.location.search;
            
        window.open(href, windowname);
        return false;
    }
    
    function safePopup(mylink, windowname)
    {
        if (popup(mylink, windowname)) location.href = mylink;
    }

    function goBack(num)
    {
        history.go(0-num);
    }
    
    function clearInitText(ctrl, initText)
    {
        if (ctrl.value == initText && ctrl.className == 'initializedText')
        {
            ctrl.value = '';
            ctrl.className = '';
        }
    }
        
    function initText(ctrl, initText)
    {
        if (ctrl.value == '' && ctrl.className == '')
        {
            ctrl.value = initText;
            ctrl.className = 'initializedText';
        }
    }

var g_InfoPanel_ResetBodyClick = null;
var g_InfoPanel_PanelElement = null;
function showInfoPanel(baseCtrl, html, offCtrlRight, offCtrlDown, width)
{
    infoPanel_RemovePanel();
    
    var ctrlLeftPos =  0;
    var ctrlTopPos = 0;

    if (baseCtrl.offsetParent)
    {
        do {
            ctrlLeftPos += baseCtrl.offsetLeft;
            ctrlTopPos += baseCtrl.offsetTop;
        } while (baseCtrl = baseCtrl.offsetParent);
    }

    var infoDiv = document.createElement('div');

    infoDiv.style.width = width;
    infoDiv.style.position = "absolute";
    infoDiv.style.left = (ctrlLeftPos + offCtrlRight) + 'px';
    infoDiv.style.top = (ctrlTopPos + offCtrlDown) + 'px';
    infoDiv.className = 'panelInfo';
    infoDiv.innerHTML = html;
    
    document.forms[0].appendChild(infoDiv);

    g_InfoPanel_ResetBodyClick = document.body.onclick;
    g_InfoPanel_PanelElement = infoDiv;
    
    setTimeout("document.body.onclick = infoPanel_RemovePanel", 1);
}

function infoPanel_RemovePanel()
{
    if (g_InfoPanel_PanelElement == null) return;
    
    document.body.onclick = g_InfoPanel_ResetBodyClick;
    document.forms[0].removeChild(g_InfoPanel_PanelElement);

    g_InfoPanel_ResetBodyClick = null;
    g_InfoPanel_PanelElement = null;
}
