function ShowHide (id)
{
    el = document.getElementById(id);
    if ( el.style.display == 'none' )
    {
        //el.style.display = 'block';
        $('#'+id).show('slow');
    }
    else
    {
        //el.style.display = 'none';
        $('#'+id).hide('slow');
    }
}

function confirm_del (loc)
{
    if (confirm('Are you realy want to delete this profile?'))
    {
        document.location = loc;
    }
}


function NW (loc)
{
    window.open(loc, "displayWindow", "width=200,height=200,status=no,toolbar=no,menubar=no");
}

function check_mail_form (frm)
{
    error = "";
    if ( frm.cname.value == '' )
    {
        error += 'Numele dvs\n';
    }
    if ( frm.email.value == '' )
    {
        error += 'Adresa de email\n';
    }
    if ( frm.tel.value == '' )
    {
        error += 'Telefon\n';
    }
    var uword = hex_md5(document.getElementById('captcha2').value);

    if (uword != cword[anum-1])
    {
        error += 'Wrong Captcha\n';
    }
    if ( error != "" )
    {
        error = 'Please, fill:\n'+error;
        alert(error);
        return false;
    }
    return true;
}

function check_friend_form (frm)
{
    error = "";
    if ( frm.email.value == '' )
    {
        error += 'Email-ul lui\n';
    }
    if ( frm.from_email.value == '' )
    {
        error += 'Email-ul tau\n';
    }
    var uword = hex_md5(document.getElementById('captcha1').value);
    var img_captcha1 = document.getElementById('img_captcha1').value;

    if (uword != cword[img_captcha1 - 1])
    {
        error += 'Wrong Captcha\n';
    }
    if ( error != "" )
    {
        error = 'Please, fill:\n'+error;
        alert(error);
        return false;
    }
    return true;
}