function checkalphachar(iptValue)
		{ 
			var temp,validChars,flag
		
		  	flag = true
		  	flag1=false
		 
		   	validChars1 = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. " 
		  	validChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. " 
		  	temp = iptValue
		  
		  	for (i=0; i<temp.length; i++)
			{
		    	if (validChars1.indexOf(temp.charAt(i)) >= 0)
				{
		           flag1 = true
		           break
		     	}
		  	}   
		     
			if (temp.length == 0)
			{
				return false;
		  	}
		  	else
			{
		    	for (i=0; i<temp.length; i++)
				{
		        	if (validChars.indexOf(temp.charAt(i)) < 0)
					{
		           		flag = false
		           		break
		        	}
		     	}  
		     	if ( (flag) && (flag1))
					return true;
		     	else
					return false;
		  	}    
		}


function subform()

{
		if(document.cyours.name.value=="")
		{
			alert("Please enter your name");
			document.cyours.name.focus();
			return false;
		}
		
		if(document.cyours.name.value!="")
		{
			name= document.cyours.name.value
			
				if(!checkalphachar(name))
				{
				alert("Please enter valid name");
				document.cyours.name.focus();
				document.cyours.name.select();
				return false;
				}
		}

		if(document.cyours.email.value=="")
		{
			alert("Please enter your eMail");
			document.cyours.email.focus();
			return false;
		}
			val_flag="no";
			if(document.cyours.email.value!="")
			{
				valu="no";
				val=document.cyours.email.value;
				for(s=0;s<val.length;s++)
				{
					if(val.charAt(s)=='@')
					{
						valu="yes";
					}
				}
				if(valu=="yes")
				{
					valu="no";
					for(s=0;s<val.length;s++)			
					{
						if(val.charAt(s)=='.')
						{
							valu="yes";
						}
						if(valu=="yes")
						{
							valu="no";
							if(val.charAt(s+4)=='')
							{
								if(val.charAt(s+2)!='')
								{
									val_flag="yes";
								}
							}
						}
					} 
				}
				if(val_flag=="no")
				{
					alert("Please enter a valid eMail");
					document.cyours.email.select();
					return false;
				}
			}


		if(document.cyours.comment.value=="")
		{
			alert("Please enter your comments");
			document.cyours.comment.focus();
			return false;
		}
		document.cyours.action="asp/comment.asp";
		document.cyours.submit();
		

}