/*
 *
 *
*/
// set the focus to the element with given id
function setFocus(id){
    var field = dojo.byId(id);
    field.select();
}

/*----------------------------------------------------------------------------*/
// disable the return button - && (node.class == "AutoComplete")  && (node.type == "text")

/*----------------------------------------------------------------------------*/
// hide or show an element (e.g. navigation)
function showById(id){
    dojo.byId(id).style.display = "block";
}

function hideById(id){
    dojo.byId(id).style.display = "none";
}

/*----------------------------------------------------------------------------*/
// change the language in the login screen by requesting another lang=
function _HpbJumpURL()
{
    var i=0;
    var len=0;
    var p_exit=0;
    var url="";
    var current=window.location.href;
    while (i <= current.length)
    {
        if (current.substring(i,i+1)=="?") len=i;
        i++;
    }
    if (len==0)
        url = current+"?lang=" + document.LoginForm.comboLanguages.options[document.LoginForm.comboLanguages.selectedIndex].value;
    else {
        i=0;
        while (i <= current.length && p_exit==0) {
            if (current.substring(i,i+5)=="lang=" || i==current.length) {
                var j = i;
                while (j <= current.length && p_exit==0) {
                    if (current.substring(j,j+1)=="&" || j==current.length) {
                        if (j==current.length) {
                            if (i==current.length) {
                                url = current.substring(0,i)+"&lang=" + document.LoginForm.comboLanguages.options[document.LoginForm.comboLanguages.selectedIndex].value;
                            } else {
                                url = current.substring(0,i)+"lang=" + document.LoginForm.comboLanguages.options[document.LoginForm.comboLanguages.selectedIndex].value;
                            };
                        } else {
                            url = current.substring(0,i)+"lang=" + document.LoginForm.comboLanguages.options[document.LoginForm.comboLanguages.selectedIndex].value + current.substring(j);
                        };
                        p_exit=1;
                    }
                    j++;
                };
            };
            i++;
        };
    };
    window.location = url;
}

/*----------------------------------------------------------------------------*/

