function check_blank()
{
	
	if(document.getElementById("company_name").value == "")
	{
		alert("Please Enter Company Name !");
		document.getElementById("company_name").focus();
		return false;
	}
	if(document.getElementById("contact_person").value == "")
	{
		alert("Please Enter Contact Person !");
		document.getElementById("contact_person").focus();
		return false;
	}
	if(document.getElementById("contact_person_phone").value == "")
	{
		alert("Please Enter Contact Person Phone No !");
		document.getElementById("contact_person_phone").focus();
		return false;
	}if(document.getElementById("process_date").value == "")
	{
		alert("Please Enter Process Date !");
		document.getElementById("process_date").focus();
		return false;
	}

}
	
function chkdata(name,value,ind)
{
var checkstr=value;
var fieldname=name;
//checkstr=document.forms[0].elements[ind].value
//fieldname=document.forms[0].elements[ind].name
				
var checkOK = "0123456789";
 var allValid = true;
  var decPoints = 0;
  var allNum = "";
  for (i = 0;  i < checkstr.length;  i++)
  {
	ch = checkstr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
	  { break;}
	
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
    if (ch != ",")
      allNum += ch;
  }
  if (!allValid)
{
   alert("Enter Numeric Value");
 // document.form1.fieldname.focus();
  //document.form1.elements[ind].reset()
  document.form1.elements[ind].focus()
 //alert(name)
}
}

function check_blank1()
{
	if(document.getElementById("lead_assign_to").value == "")
	{
		alert("Please Select Employee !");
		document.getElementById("lead_assign_to").focus();
		return false;
	}
	if(document.getElementById("task_heading").value == "")
	{
		alert("Please enter heading !");
		document.getElementById("task_heading").focus();
		return false;
	}
	if(document.getElementById("task_description").value == "")
	{
		alert("Please enter description !");
		document.getElementById("task_description").focus();
		return false;
	}
	if(document.getElementById("contact_date").value == "")
	{
		alert("Please enter contact date !");
		document.getElementById("contact_date").focus();
		return false;
	}
	if(document.getElementById("contact_time").value == "00:00")
	{
		alert("Please enter contact time !");
		document.getElementById("contact_time").select();
		return false;
	}
	
}