// ----- PopUp Funktion -----
function pop(file) {
    var x_size = window.screen.width;
    x_size = x_size - 500;
    x_size = x_size / 2;
    x_size = Math.round(x_size);

    var y_size = window.screen.height;
    y_size = y_size - 630;
    y_size = y_size / 2;
    y_size = Math.round(y_size);
    y_size -= 30;

    popupwindow = window.open(file,"pophelp","scrollbars=no, toolbar=no,location=no,directories=no,status=no,menubar=no,width=500,height=630, left=" + x_size + ",top=" + y_size);
    popupwindow.focus();
    return false;
}

function urlencode_string (estring)
{
    hex = '0123456789ABCDEF';
    encString = '';
    e_char = '';
    e_len = estring.length;
    for( e_i = 0; e_i < e_len; e_i++ )
    {
        e_char = parseInt( estring.charCodeAt( e_i ) );
        encString += '%' + hex.charAt( (e_char >> 4) % 16 ) + hex.charAt( e_char % 16 );
    }
    return encString;
}


function tellAFriend (mod, submod)
{
    var seite;
    seite = "module/tellAFriend.php?mod=" + mod + "&id=" + submod;
    pop(seite);

    return false;
}

function vote_form (id)
{
    pop('index.php?module=vote&id=' + id);
    return false;
}

function sicher()
{
    var chk = window.confirm('Sind Sie sicher, dass Sie diese Seite löschen möchten?');
    if (chk) {
        return true;
    } else {
        return false;
    }
}

function sicher2()
{
    var chk = window.confirm('Sind Sie sicher, dass Sie diese Datei löschen möchten?');
    if (chk) {
        return true;
    } else {
        return false;
    }
}
