function Subscribe()
{
    var errors = "";
    
    if (trim($("txCompanyName").value).length == 0) 
    {
        errors += "- introduceti numele firmei; \n";
    }

    if (trim($("txCUI").value) == "")
    {
        errors += "- completati campul CUI; \n";
    }
    
    if (trim($("txCity").value) == "")
    {
        errors += "- completati campul Localitate; \n";
    }
    
    if (trim($("txName").value).length == 0) 
    {
        errors += "- introduceti numele dvs; \n";
    }
   
    if (trim($("txTelefon").value).length > 0 && (!isPhoneValid($("txTelefon").value)))
    {
        errors += " - introduceti o valoare valida in campul \"Telefon\";\n";
    }  
    
    if ((trim($("txFormEmail").value) == "") || (!isEmail($("txFormEmail").value)))
    {
        errors += "- introduceti o adresa de e-mail valida; \n";
    }
    
    if (trim($("txMessage").value).length == 0) 
    {
        errors += "- completati Mesaj; \n";
    }

    if (errors.length > 0)
    {
        alert("Va rugam sa remediati urmatoarele probleme: \n" + errors);
    }
    else
    {
        $("hAction").value = "Subscribe";
        $("frmMain").submit();
    }
}
function submitOnEnter(e, action) 
{
	if (window.event && window.event.keyCode == 13) 
	{
		eval(action);
	}
	else 
	{
	    if (e.keyCode == 13) 
	    {
		    eval(action);
	    }
	}
}    

function focusOn(element)
{
    $(element).className = "inputFocused";
}

function focusOff(element)
{
    $(element).className = "input";
}