var mikExp = /[$\\@\\\#%\^\&\*\(\)\[\]\+\_\{\}\`\~\=\|]/;
function Validateform()
{

	var firstName = document.icici.name;	
	var mobileNo = document.icici.mobile;
	
	
	
	var pCity = document.icici.city;
	var emailadd=document.icici.email;

	if(firstName.value=="Name")
	{
		firstName.value=""
	}

	if(mobileNo.value=="Mobile No.")
	{
		mobileNo.value=""
	}

	
		
	

	if(firstName.value=="")
	{
		alert("Please enter Your Name");
		firstName.focus();
		return false;
	}

	if(emailadd.value=="")
	{
		alert("Please enter email;");
		emailadd.focus();
		return false;
	}

	

	if(mobileNo.value=="" && ( firstName.value=="" || emailadd.value=="") )
	{
		alert("Please Enter Mobile/Phone No.");
		mobileNo.focus();
		return false;
	}

	

}



function isInteger(num_val)
{
      
      if(isNaN(num_val.value))
        {
            alert("Please enter Numeric values only");
            num_val.value="";
            num_val.focus();              
            //num_val.select();
            return true;
        }


    return false; 
}

function validateMobile(objName)
{
	if(objName.value!="")
	{
		if(!isInteger(objName))
			{
					if(objName.value.indexOf(".")!=-1)
						{
				            alert("Please enter Numeric values only");
							objName.value=""
							objName.focus();
							return true;
						}
					
			}
	}
}





function verify_c(_f)
{
  var _x=_f.value;

  var _exp1 = new RegExp(/^[a-z]+$/i); /* any non space */
  var _test=_exp1.test(_x);
 if(_x.length >= 20)alert("Length not correct");
  else if(!_test || _x == "Name")alert("Please, Enter your name");
  
  }
  
 
 function validate_email(field)
{

apos=field.value.indexOf("@");
dotpos=field.value.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
  {alert("please enter valid email address");return false;}
}




function MM_validateForm() { //v4.0
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' please enter valid email address.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' Please enter valid Mobile No.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
    } if (errors) alert('The following error(s) occurred:\n'+errors);
    document.MM_returnValue = (errors == '');
} }
