// This file is part of bdpcms-nds.
// (c) 2008-2011 Michael Ross [michael@ross.cx].
// All rights reserved. See README for details.
//
// $CVSHeader: websites/bdpnds/system/admin_scripts.js,v 1.1 2011/04/19 22:30:08 cvs Exp $

function do_submit($f) {
    document.sidepic.pic.value = $f;
    document.sidepic.submit();
}

function go(action) {
    document.page_edit_form.subaction.value = action;
    document.page_edit_form.submit();
}

function submit_if_pw_match() {
    if ( document.user_edit.password1.value.length>0 )
        {
            if ( document.user_edit.password1.value == document.user_edit.password2.value )
                {
                    document.user_edit.response.value=md5(document.user_edit.password1.value);
                    document.user_edit.submit();
                }
            else
                {
                    alert("Die Passwörter stimmen nicht überein");
                }
        }
    else
        {
            document.user_edit.response.value="";
            document.user_edit.submit();
        }
}

