// JavaScript Document
  function echeck(ctr) {
  document.getElementById(ctr + "validation1").style.display='none';
  var str=document.getElementById(ctr).value;
  if (str=="") return true;
  var at="@"
  var dot="."
  var lat=str.indexOf(at)
  var lstr=str.length
  var ldot=str.indexOf(dot)
  if (str.indexOf(at)==-1){
  document.getElementById(ctr + "validation1").style.display='block';
  return false
  }

  if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){
  document.getElementById(ctr + "validation1").style.display='block';
  return false
  }

  if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){
  document.getElementById(ctr + "validation1").style.display='block';
  return false
  }

  if (str.indexOf(at,(lat+1))!=-1){
  document.getElementById(ctr + "validation1").style.display='block';
  return false
  }

  if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){
  document.getElementById(ctr + "validation1").style.display='block';
  return false
  }

  if (str.indexOf(dot,(lat+2))==-1){
  document.getElementById(ctr + "validation1").style.display='block';
  return false
  }

  if (str.indexOf(" ")!=-1){
  document.getElementById(ctr + "validation1").style.display='block';
  return false
  }

  return true
  }

  function IsNumeric(ctr)
  {
  var strValidChars = "0123456789.-";
  var strChar;
  var blnResult = true;
  document.getElementById(ctr + "validation1").style.display='none';
  var strString = document.getElementById(ctr).value;


  for (i = 0; i < strString.length && blnResult == true; i++)
   {
      strChar = strString.charAt(i);
      if (strValidChars.indexOf(strChar) == -1)
         {
         document.getElementById(ctr + "validation1").style.display='block';
         }
   }
}
function hidevalidation(ctr)
{
	if (document.getElementById(ctr).value=='')
	{
		document.getElementById(ctr + "validation").style.display='block';
	}
	else
	{
		document.getElementById(ctr + "validation").style.display='none';
	}
}
function validate()
{
		document.getElementById("Namevalidation").style.display='none';
		document.getElementById("countryvalidation").style.display='none';
		document.getElementById("phonevalidation").style.display='none';
		document.getElementById("feedbackvalidation").style.display='none';
if (document.getElementById("Name").value=='')
	{
		document.getElementById("Namevalidation").style.display='block';
	}
if (document.getElementById("country").value=='')
	{
		document.getElementById("countryvalidation").style.display='block';
	}
if (document.getElementById("phone").value=='')
	{
		document.getElementById("phonevalidation").style.display='block';
	}
if (document.getElementById("feedback").value=='')
	{
		document.getElementById("feedbackvalidation").style.display='block';
		return false;
	}
return true;
}

