﻿function CheckForEmptyTextbox() {
    
    var name = document.getElementById(arrControlsId[0]);
    var email = document.getElementById(arrControlsId[1]);
    var phone = document.getElementById(arrControlsId[2]);
    var mess = document.getElementById(arrControlsId[3]);
    var hf = document.getElementById(arrControlsId[4]);
    var txt;
    var txt = "";
    var jlen;
    
    //alert(name.value);
    
        if (name.value == "")
    {
           txt = "Name, ";
    }
    
    if (email.value == "")
    {
        txt = txt + "Email, ";
    }
    if (email.value.indexOf("@", 0) < 0)
    {
         //txt = txt + "Email ";
    }
    if (email.value.indexOf(".", 0) < 0)
    {
        //txt = txt + "Email ";

    }

    //if ((nocall.checked == false) && (phone.value == ""))
    if (phone.value == "")
    {
        txt = txt + "Phone No, ";
    }


    if (mess.value == "")
    {
        txt = txt + "Message ";
    }

    txt = txt.trim();
    
        if(txt != "")
    {
      //jlen = txt.length();
      //alert(jlen);
      alert("Missing Relevant Info : "+ txt);
      hf.value = 1
      }
      else
      {
      hf.value = 0
     }
    
    
    return true;
}
 

function EmailValidation() 
               {
              // document.getElementById
              /* alert(eventArgs.get_value())*/
              var mcont;
              mcont = document.getElementById(arrControlsId[0]);
              mcont.value = eventArgs.get_value();
              alert(mcont.value)
               /*document.getElementById('<%=ProductId.ClientID%>').value =  eventArgs.get_value();
               document.getElementById('<%=ProductId1.ClientID%>').value =   */
               }