function ValidateLogin(frm) 
{
    if (Trim(frm.txtEmail.value)=="") {alert("Introduceti adresa de email.");frm.txtEmail.focus() ;return false;}
    else if (!ValidateEmail(frm.txtEmail.value)) {alert("Introduceti o adresa de email valida.");frm.txtEmail.focus();return false;}
    else if (Trim(frm.txtPassword.value)=="") {alert("Introduceti parola.");frm.txtPassword.focus();return false;}
    else return true;
}


function ValidateLogin2(frm) 
{
    if (Trim(frm.txtEmail.value)=="") {alert("Introduceti adresa de email.");frm.txtEmail.focus() ;return false;}
    else if (!ValidateEmail(frm.txtEmail.value)) {alert("Introduceti o adresa de email valida.");frm.txtEmail.focus();return false;}
    else return true;
}

function ValidateNewsletter(frm) 
{
    if (Trim(frm.txtName.value)=="") {alert("Introduceti numele.");frm.txtName.focus() ;return false;}
    else if (Trim(frm.txtEmail.value)=="") {alert("Introduceti adresa de email.");frm.txtEmail.focus() ;return false;}
    else if (!ValidateEmail(frm.txtEmail.value)) {alert("Introduceti o adresa de email valida.");frm.txtEmail.focus();return false;}
    else return true;
}

function ValidateNewsletter3(frm) 
{
    if (Trim(frm.txtEmail.value)=="") {alert("Introduceti adresa de email.");frm.txtEmail.focus() ;return false;}
    else if (!ValidateEmail(frm.txtEmail.value)) {alert("Introduceti o adresa de email valida.");frm.txtEmail.focus();return false;}
    else return true;
}

function ValidateNewsletter2(frm) 
{
    if (Trim(frm.txtName.value)=="") {alert("Introduceti numele.");frm.txtName.focus() ;return false;}
    else if (Trim(frm.txtEmail.value)=="") {alert("Introduceti adresa de email.");frm.txtEmail.focus() ;return false;}
    else if (!ValidateEmail(frm.txtEmail.value)) {alert("Introduceti o adresa de email valida.");frm.txtEmail.focus();return false;}
    else return true;
}

function ValidateContactForm(frm) 
{
    if (Trim(frm.txtconNume.value)=="") {alert("Introduceti numele.");frm.txtconNume.focus() ;return false;}
    else if (Trim(frm.txtconEmail.value)=="") {alert("Introduceti adresa de email.");frm.txtconEmail.focus() ;return false;}
    else if (!ValidateEmail(frm.txtconEmail.value)) {alert("Introduceti o adresa de email valida.");frm.txtconEmail.focus();return false;}
	else if (Trim(frm.txtconMesaj.value)=="") {alert("Introduceti mesajul.");frm.txtconMesaj.focus() ;return false;}
    else return true;
}

function AddToCart(frm)
{
    if (Trim(frm.selMeasure.value)=="") {alert("Selectati marimea."); frm.selMeasure.focus(); return false;}
    else if (Trim(frm.selColor.value)=="") {alert("Selectati culoarea."); frm.selColor.focus(); return false;}
    else if (Trim(frm.txtQty.value)=="") {alert("Introduceti cantitatea."); frm.txtQty.focus(); return false;}
    else if (isNaN(Trim(frm.txtQty.value))) {alert("Cantitatea trebuie sa fie numerica.");frm.txtQty.focus();return false;} 
    else
    {
        frm.action="cart.php?act=add";
        frm.submit();
    }
}

function SearchForm(frm) 
{
    if (Trim(frm.txtSearch.value)=="") {alert("Introduceti textul de cautat.");frm.txtSearch.focus() ;return false;}
    else 
    {
        return true;
    }
}



