function UpdatePassword(){
    Ext.Ajax.request({
        url: 'index.php?fuse=clients&action=UpdatePassword',
        success: function(t){
            ce.parseAjaxResponse(t);
        },
        params: {new_password: document.getElementById('newpassword').value,confirm_password:document.getElementById('confirm_password').value}
    });

}

function checkPassword(){
    if ((document.getElementById('confirm_password').value !="") && (document.getElementById('newpassword').value !="")){
        if (document.getElementById('confirm_password').value != document.getElementById('newpassword').value){
            alert(lang("Your confirmation password does not match your new password"));
            return (false);
        }
    }else{
        if ((document.getElementById('confirm_password').value =="") || (document.getElementById('newpassword').value =="")){
            alert(lang("You must fill all password fields if you wish to change this password"));
            return (false);
        }
    }
    return (true);
}

if (document.images) {
    pic1= new Image(167,14);
    pic1.src="images/loading.gif";
}