		function trim(str)
		{
		var len;
		for(i=0;i<=len;i++)
		{
		if(str.indexOf(' ')==0)
		{
		str=str.substring(1,len);
		}
		}
		return str;
		}		

		function val()
		{
				
		
		if (trim(document.frmnom.nominator_fullname.value==""))
			{
		    alert ('Please enter nominator\'s full name');
		    document.frmnom.nominator_fullname.value='';
		    document.frmnom.nominator_fullname.focus();
		    return false;
		    }
		if (trim(document.frmnom.nominator_designation.value==""))
			{
		    alert ('Please enter nominator\'s designation');
		    document.frmnom.nominator_designation.value='';
		    document.frmnom.nominator_designation.focus();
		    return false;
		    }
		if (trim(document.frmnom.nominator_company.value==""))
			{
		    alert ('Please enter nominator\'s company');
		    document.frmnom.nominator_company.value='';
		    document.frmnom.nominator_company.focus();
		    return false;
		    }
		if (trim(document.frmnom.nominator_companyaddress.value==""))
			{
		    alert ('Please enter nominator\'s address');
		    document.frmnom.nominator_companyaddress.value='';
		    document.frmnom.nominator_companyaddress.focus();
		    return false;
		    }			
		if (trim(document.frmnom.nominator_phone.value==""))
			{
		    alert ('Please enter your phone or mobile number');
		    document.frmnom.nominator_phone.value='';
		    document.frmnom.nominator_phone.focus();
		    return false;
		    }
		 
		var a=document.frmnom.nominator_email.value;
		 var b=a.indexOf('@');
		 var c=a.indexOf('.',b);
		 var d=a.substr(c+1,4);
		 var e= d.length;
		 var f= a.indexOf(' ');
		 var g=a.indexOf('@');
		 var g1=a.indexOf('.',g);
		 var g2=g+1;
		 
		if(b == -1 || b == 0 || b == 1 ||c  == -1 || e <=1 || f != -1 || g1==g2 )
		{  alert('Sorry, your email is invalid!');
		   document.frmnom.nominator_email.focus();
		   return false;
		}

		if (trim(document.frmnom.Awards_Category.value)=="")
		    {
		    alert ('Please enter your awards category');
		    document.frmnom.Awards_Category.value='';
		    document.frmnom.Awards_Category.focus();
		    return false;
		    }		
		
		if (trim(document.frmnom.fullname.value==""))
		    {
		    alert ('Please enter the nominee\'s full name');
		    document.frmnom.fullname.value='';
		    document.frmnom.fullname.focus();
		    return false;
		    }
		if (trim(document.frmnom.designation.value==""))
		    {
		    alert ('Please enter the nominee\'s designation');
		    document.frmnom.designation.value='';
		    document.frmnom.designation.focus();
		    return false;
		    }
		if (trim(document.frmnom.company.value==""))
		    {
		    alert ('Please enter the nominee\'s company');
		    document.frmnom.company.value='';
		    document.frmnom.company.focus();
		    return false;
		    }
		if (trim(document.frmnom.typeofbusiness.value==""))
		    {
		    alert ('Please enter the nominee\'s type of business');
		    document.frmnom.typeofbusiness.value='';
		    document.frmnom.typeofbusiness.focus();
		    return false;
		    }
		
		var a=document.frmnom.email.value;
		 var b=a.indexOf('@');
		 var c=a.indexOf('.',b);
		 var d=a.substr(c+1,4);
		 var e= d.length;
		 var f= a.indexOf(' ');
		 var g=a.indexOf('@');
		 var g1=a.indexOf('.',g);
		 var g2=g+1;
		 
		if(b == -1 || b == 0 || b == 1 ||c  == -1 || e <=1 || f != -1 || g1==g2 )
		{  alert('Sorry, the nominee\'s email is invalid!');
		   document.frmnom.email.focus();
		   return false;
		}
		if (trim(document.frmnom.phone.value==""))
		    {
		    alert ('Please enter the nominee\'s phone number');
		    document.frmnom.phone.value='';
		    document.frmnom.phone.focus();
		    return false;
		    }
		if (trim(document.frmnom.address.value==""))
			{
		    alert ('Please enter nominee\'s address');
		    document.frmnom.address.value='';
		    document.frmnom.address.focus();
		    return false;
		    }
		if (trim(document.frmnom.city.value==""))
			{
		    alert ('Please enter nominee\'s city');
		    document.frmnom.city.value='';
		    document.frmnom.city.focus();
		    return false;
		    }
		
		if (trim(document.frmnom.country.value==""))
		    {
		    alert ('Please enter nominee\'s country');
			// document.frmnom.country.value='';
		    document.frmnom.country.focus();
		    return false;
		    }
		
		if (trim(document.frmnom.Brief_Summary.value)=="")
		    {
		  	alert ('Please tell us more about the nominee');
		    document.frmnom.Brief_Summary.value='';
		    document.frmnom.Brief_Summary.focus();
		    return false;
		    }
		if (trim(document.frmnom.captchavalue.value)!=trim(document.frmnom.mathvalue.value))	
			{
			alert ('Security Match Sum is not correct,try again');
		    document.frmnom.captchavalue.value='';
		    document.frmnom.captchavalue.focus();
		    return false;	
				
			}
			
		}
		-->
