﻿// JScript File
			
function CommentSubmit()
{
       var keyword=document.getElementById('searchTextBox').value

    if(keyword!="" && keyword!="Search Articles")
    {
        document.getElementById('searchTextBox').focus();
        return false;
    }
      
   if((document.getElementById('PostComment1_textname').value=="") || (document.getElementById('PostComment1_textname').value==null))
   {
	 alert("Please Enter Your Name.");
	// document.getElementById('PostComment1_textname').focus();
     return false;
   }
   
                       
   if((document.getElementById('PostComment1_Txtemail').value=="") || (document.getElementById('PostComment1_Txtemail').value==null))
						
    {
	alert("Please enter your Email ID");
	//document.getElementById('PostComment1_Txtemail').focus();
	return false;
	}
	
	
	if (isEmail(document.getElementById('PostComment1_Txtemail').value) == false)
	{
	alert("Enter your correct Email ID");
	//document.getElementById('PostComment1_Txtemail').focus();
	return false;
	}
	
 
   else if((document.getElementById('PostComment1_Txtcountry').value=="") || (document.getElementById('PostComment1_Txtcountry').value==null))
   {
	 alert("Please Enter Country .");
	// document.getElementById('PostComment1_Txtcountry').focus();
     return false;
   }
   
   
    else if((document.getElementById('PostComment1_Txtcity').value=="") || (document.getElementById('PostComment1_Txtcity').value==null))
   {
	 alert("Please Enter City .");
	// document.getElementById('PostComment1_Txtcity').focus();
	 return false;
   }

 
    else if((document.getElementById('PostComment1_txtcomment').value=="") || (document.getElementById('PostComment1_txtcomment').value==null))
   {
	 alert("Please  Enter Your Comment .");
	// document.getElementById('PostComment1_txtcomment').focus();
     return false;
   }
  
  
   else
   {
      return true;
   }
}


function isEmail(PostComment1_txtemail)
			{
			if (document.getElementById('PostComment1_Txtemail').value.indexOf("@") != "-1" && document.getElementById('PostComment1_Txtemail').value.indexOf(".") != "-1" )
			return true;
			else 
			return false;
			}

