var RESP;
function add_sponsor( Response, Success )
{
    RESP = Response;
    if( Success == 1 )
    {
        ajax_request( 'ajax/functions/add_sponsor.php',
                    'name=' + escape( encodeURI( document.getElementById('name').value ) ) +
                    '&website=' + escape( encodeURI( document.getElementById('website').value ) ) +
                    '&logo=' + escape( encodeURI( Response ) ),
                    'show_info( response ); reload_page(); if( response != "Der Sponsor wurde hinzugef&uuml;gt." ) { add_sponsor_remove_file() } else { RESP = ""; }' );
    }
    else
    {
        ajax_request( 'ajax/functions/remove_file.php', 'file=' + escape( encodeURI(  Response ) ), '' );
    }
}
function add_sponsor_remove_file()
{
    ajax_request( 'ajax/functions/remove_file.php', 'file=' + escape( encodeURI( RESP ) ), '' );
}
function change_sponsoren_logo( Response, Success )
{
    RESP = Response;
    if( Success == 1 )
    {
        ajax_request( 'ajax/functions/change_sponsoren_logo.php',
                    'logo=' + escape( encodeURI( Response ) ) +
                    '&ID=' + escape( encodeURI( document.getElementById('ID').value ) ),
                    'hide_edit(); show_info( response ); reload_page(); if( response != "Das Logo des Sponsors wurde ge&auml;ndert." ) { change_sponsoren_logo_remove_file() } else { RESP = ""; }' );
    }
    else
    {
        ajax_request( 'ajax/functions/remove_file.php', 'file=' + escape( encodeURI(  Response ) ), '' );
    }
}
function change_sponsoren_logo_remove_file()
{
    ajax_request( 'ajax/functions/remove_file.php', 'file=' + escape( encodeURI( RESP ) ), '' );
}
function change_user_bild( Response, Success )
{
    RESP = Response;
    if( Success == 1 )
    {
        ajax_request( 'ajax/functions/change_user_bild.php',
                    'bild=' + escape( encodeURI( Response ) ),
                    'hide_edit(); show_info( response ); reload_page(); if( response != "Das Bild wurde ge&auml;ndert." ) { change_user_bild_remove_file() } else { RESP = ""; }' );
    }
    else
    {
        ajax_request( 'ajax/functions/remove_file.php', 'file=' + escape( encodeURI(  Response ) ), '' );
    }
}
function change_user_bild_remove_file()
{
    ajax_request( 'ajax/functions/remove_file.php', 'file=' + escape( encodeURI( RESP ) ), '' );
}

