function createTarget(form, t){
    //if (!up_check(form)) return false;
    window.open("", t, 'location=yes,height=778,width=805,left=300,top=0,toolbar=yes,menubar=yes,directories=yes,status=yes,resizable=yes,scrollbars=yes', false);
    return true;
}

function up_check(form){
    good = true;
    err = "Missing or incorrect data:\n";

    if (form.username.value.length<6){
        good=false;
        err+="User Name (at least 6 characters),\n";
    };
    if (form.username.value.length>12){
        good=false;
        err+="User Name must be max 12 symbols,\n";
    };
    if (form.password.value==''){
        good=false;
        err+="Password,\n";
    };
    if (form.password.value.length < 6){
        good=false;
        err+="Password must be at least 6 symbols,\n";
    };
    if (form.password.value == form.username.value){
        good=false;
        err+="Password and Username are Too Similar,\n";
    };
    if (form.password.value.length > 12){
        good=false;
        err+="Password must be max 12 symbols,\n";
    };

    us_pass = true;

    for (i = 0; i < form.username.value.length; i++) {
        ch = (form.username.value.substring(i, i + 1)).toLowerCase();
        if (!(((ch >= "a") && (ch <= "z")) || ((ch >= "0") && (ch <= "9")) || (ch == "_") || (ch == "-") || (ch == "."))) {
            us_pass = false;
            good = false;
        }
    }
    
    if (!us_pass) err+="Username may contain only symbols from a-z, A-Z, 0-9,\n";
    us_pass = true;
    
    for (i = 0; i < form.password.value.length; i++) {
        ch = (form.password.value.substring(i, i + 1)).toLowerCase();
        if (!(((ch >= "a") && (ch <= "z")) || ((ch >= "0") && (ch <= "9")) || (ch == "_") || (ch == "-") || (ch == "."))) {        
            us_pass = false;
            good = false;
        }
    }
    
    if (!us_pass) err+="Password may contain only symbols from a-z, A-Z, 0-9,\n";
    err+="please correct and fill the data and click Join button again.";
    
    if (!good) {
        alert(err);
    };
    
    return good;
}