
function viewMsg(msg,Id)
{
	  
    var msgObj = document.getElementById(Id);
    msgObj.style.textTransform='capitalize';
    msgObj.innerHTML=msg;
    document.getElementById(Id).focus();
	 
}


	
function addFeedbackSubscription()
{
    	
    if(isEmpty('companyname'))
    {
        viewMsg("Company name seems invalid","companyname2_msg");
        document.getElementById('companyname').focus();
				 
    }
    else if(isNumeric('companyname'))
    {
        viewMsg("Company name seems invalid","companyname2_msg");
        document.getElementById('companyname').focus();
			 
    }
    else if(!isAlphaNumericWishSpace('companyname'))
    {
        viewMsg("Company name seems invalid","companyname2_msg");
        document.getElementById('companyname').focus();
			 
    }
    else if(isEmpty('contactname'))
    {
        viewMsg("Enter contact person","contactname_msg");
        document.getElementById('contactname').focus();
			 
    }
    else if(!isAlpha('contactname'))
    {
        viewMsg("Contact person seems invalid","contactname_msg");
        document.getElementById('contactname').focus();
			 
    }
    else if(isEmpty('designation'))
    {
        viewMsg("Enter Designation","designation_msg");
        document.getElementById('designation').focus();
			 
    }
    else if(!isAlpha('designation'))
    {
        viewMsg("Designation seems invalid","designation_msg");
        document.getElementById('designation').focus();
			 
    }
    else if(isEmpty('emailid'))
    {
        viewMsg("Enter Email Id","emailid_msg");
        document.getElementById('emailid').focus();
			 
    }
    else if(!isValidEmailId('emailid'))
    {
        viewMsg("Email id seems invalid","emailid_msg");
        document.getElementById('emailid').focus();
			 
    }
    else if(isEmpty('address'))
    {
        viewMsg("Enter contact address","address_msg");
        document.getElementById('address').focus();
			 
    }
    else if(isNumeric('address'))
    {
        viewMsg("Address seems invalid","address_msg");
        document.getElementById('address').focus();
			 
    }
    else if(!isAlphaNumericWishSpace('address'))
    {
        viewMsg("Address seems invalid","address_msg");
        document.getElementById('address').focus();
			 
    }
    else if(isEmpty('officeno'))
    {
        viewMsg("Enter office contact.","contact_no_msg");
        document.getElementById('officeno').focus();
			 
    }
    else if(isAlpha('officeno'))
    {
        viewMsg("Office no. seems invalid","contact_no_msg");
        document.getElementById('officeno').focus();
			 
    }
		
    else if(!isAlphaNumericWishSpace('officeno'))
    {
        viewMsg("Office no. seems invalid","contact_no_msg");
        document.getElementById('officeno').focus();
			 
    }
    else if(isEmpty('mobileno'))
    {
        viewMsg("Enter mobile no.","contact_no_msg");
        document.getElementById('mobileno').focus();
			 
    }
    else if(isAlpha('mobileno'))
    {
        viewMsg("Mobile No. seems invalid","contact_no_msg");
        document.getElementById('mobileno').focus();
			 
    }
		
    else if(!isAlphaNumericWishSpace('mobileno'))
    {
        viewMsg("Mobile No. seems invalid","contact_no_msg");
        document.getElementById('mobileno').focus();
			 
    }
    else if(isEmpty('feedback_suggestions'))
    {
        viewMsg("Pls Enter Feedback Suggestion","feedback_suggestions_msg");
        document.getElementById('feedback_suggestions').focus();
			 
    }
    else if(isNumeric('feedback_suggestions'))
    {
        viewMsg("Feedback Suggestion seems invalid","feedback_suggestions_msg");
        document.getElementById('feedback_suggestions').focus();
			 
    }
    else if(!isAlphaNumericWishSpace('feedback_suggestions'))
    {
        viewMsg("Feedback Suggestion seems invalid","feedback_suggestions_msg");
        document.getElementById('feedback_suggestions').focus();
			 
    }
    else
    {
		document.frm.submit();
     }
}
 
 
function newsletter_subscription_validation()
{
    if(isEmpty('companyname'))
    {
        viewMsg("Company name seems invalid","companyname2_msg");
        document.getElementById('companyname').focus();
				 
    }
    else if(isNumeric('companyname'))
    {
        viewMsg("Company name seems invalid","companyname2_msg");
        document.getElementById('companyname').focus();
			 
    }
    else if(!isAlphaNumericWishSpace('companyname'))
    {
        viewMsg("Company name seems invalid","companyname2_msg");
        document.getElementById('companyname').focus();
			 
    }
    else if(isEmpty('contactname'))
    {
        viewMsg("Enter contact person","contactname_msg");
        document.getElementById('contactname').focus();
			 
    }
    else if(!isAlpha('contactname'))
    {
        viewMsg("Contact person seems invalid","contactname_msg");
        document.getElementById('contactname').focus();
			 
    }
    else if(isEmpty('designation'))
    {
        viewMsg("Enter Designation","designation_msg");
        document.getElementById('designation').focus();
			 
    }
    else if(!isAlpha('designation'))
    {
        viewMsg("Designation seems invalid","designation_msg");
        document.getElementById('designation').focus();
			 
    }
    else if(isEmpty('emailid'))
    {
        viewMsg("Enter Email Id","emailid_msg");
        document.getElementById('emailid').focus();
			 
    }
    else if(!isValidEmailId('emailid'))
    {
        viewMsg("Email id seems invalid","emailid_msg");
        document.getElementById('emailid').focus();
			 
    }
    else if(isEmpty('address'))
    {
        viewMsg("Enter contact address","address_msg");
        document.getElementById('address').focus();
			 
    }
    else if(isNumeric('address'))
    {
        viewMsg("Address seems invalid","address_msg");
        document.getElementById('address').focus();
			 
    }
    else if(!isAlphaNumericWishSpace('address'))
    {
        viewMsg("Address seems invalid","address_msg");
        document.getElementById('address').focus();
			 
    }
    else if(isEmpty('officeno'))
    {
        viewMsg("Enter office contact.","contact_no_msg");
        document.getElementById('officeno').focus();
			 
    }
    else if(isAlpha('officeno'))
    {
        viewMsg("Office no. seems invalid","contact_no_msg");
        document.getElementById('officeno').focus();
			 
    }
		
    else if(!isAlphaNumericWishSpace('officeno'))
    {
        viewMsg("Office no. seems invalid","contact_no_msg");
        document.getElementById('officeno').focus();
			 
    }
    else if(isEmpty('mobileno'))
    {
        viewMsg("Enter mobile no.","contact_no_msg");
        document.getElementById('mobileno').focus();
			 
    }
    else if(isAlpha('mobileno'))
    {
        viewMsg("Mobile No. seems invalid","contact_no_msg");
        document.getElementById('mobileno').focus();
			 
    }
		
    else if(!isAlphaNumericWishSpace('mobileno'))
    {
        viewMsg("Mobile No. seems invalid","contact_no_msg");
        document.getElementById('mobileno').focus();
			 
    }
    else
    {
			document.frm.submit();
      
    }
}

 
 
 
