function validateIndex(loginform)
{
	ok=true;
	if(loginform.amountU.value=="0")
	{
		alert("Please enter the proper Amount")
		loginform.amountU.focus();
		ok=false;
	}
	
	else if(loginform.amountU.value=="" ||  !isSpecialCharCheckRupee(loginform,'amountU'))
	{
		alert("Please enter the proper Amount check for the special char \n\n  >><>(){}[]?&*~`!#$%^=+|\\:'\",@;")
		loginform.amountU.focus();
		ok=false;
	}
	else if(loginform.amountType.value=="")
	{
		alert("Please select  amount type")
		loginform.amountType.focus();
		ok=false;
	}
	
	return ok;
 }
function validateForm(loginform)
{
	ok=true;
	 
	if(loginform.name.value=="" ||  !isSpecialChar(loginform,'name'))
	{
		alert("Please enter the name [Special Char are not allowed]")
		loginform.name.focus();
		ok=false;
	}   else if((loginform.emailid.value.indexOf('@') == -1) || (loginform.emailid.value.indexOf('.') == -1))
	    {
	 	alert("please enter valid email address")
	 	loginform.emailid.value='';
		 loginform.emailid.focus();
		 ok=false
		 }

	else if(loginform.contactnumber.value=="" || !isSpecialChar(loginform,'contactnumber'))
	{
		alert("Please enter the Contect Number  Special Chars are not allowed ")
		loginform.contactnumber.focus();
		ok=false;
	}
	else if(loginform.addr.value=="")
	{
		alert("Please enter the Address  ")
		loginform.addr.focus();
		ok=false;
	}
	else if(loginform.city.value=="" || !isSpecialChar(loginform,'city'))
	{
		alert("Please enter the city  ")
		loginform.city.focus();
		ok=false;
	}
	else if(loginform.state.value=="" || !isSpecialChar(loginform,'state'))
	{
		alert("Please enter the State  ")
		loginform.state.focus();
		ok=false;
	}

	else if(loginform.country.value=="" || !isSpecialChar(loginform,'country'))
	{
		alert("Please enter the Country  ")
		loginform.country.focus();
		ok=false;
	}
	return ok;
	
}

function isSpecialChar(loginform,fname){
	ok=true;
  var iChars = ">><>(){}[]?&*~`!#$%^=+|\\:'\",@;";
        for (var i = 0; i < document.getElementById(fname).value.length; i++) {
                if (iChars.indexOf(document.getElementById(fname).value.charAt(i)) != -1) {
					
                //alert ("The box has special characters. These are not allowed.\n");
				//loginform.fname.focus();
                ok=false;
        }
                }
				return ok;
				
}
function isSpecialCharCheckRupee(loginform,fname){
	ok=true;
  var iChars = ">><>(){}[]?&*~`!#$%^=+|\\:'\",@;  ";
        for (var i = 0; i < document.getElementById(fname).value.length; i++) {
                if (iChars.indexOf(document.getElementById(fname).value.charAt(i)) != -1) {
					
                //alert ("The box has special characters. These are not allowed.\n");
				//loginform.fname.focus();
                ok=false;
        }
                }
				return ok;
				
}


function ValidateNum(input,event){
			var keyCode = event.which ? event.which : event.keyCode;
			if(parseInt(keyCode)>=48 && parseInt(keyCode)<=57){
				return true;
			}
			return false;
		}