﻿//Function to validate the email addresses
        function isValidEmails(strEmailvalue) 
        {
            if (trim(strEmailvalue) != "") 
            {        
                reEmail = /(([a-zA-Z0-9\-?\.?]+)@(([a-zA-Z0-9\-_]+\.)+)([a-z]{2,3})(\W?[,;]\W?(?!$))?)+$/i;
                if (!reEmail.test(strEmailvalue)) 
                {    
                    return true;
                }
            }
            else 
            {      
                return true;
            }
    
            return false;
        }
        
        function isValidEmail(val)
        {
            var re = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
            if (!val.match(re)) 
            {
                return false;
            } 
            else 
            {
                return true;
            }
        }


        //Function to trim the value
        function trim(str) 
        {
            while (str.substr(0, 1) == " ") 
            {
                str = str.substr(1);
            }
            while (str.substr(str.length - 1) == " ") 
            {
                str = str.substring(0, str.length - 1);
            }
            return str;
        }
        function GATagging(controlname,eventname,pagetitle)
        {
            _gaq.push(['_trackEvent', controlname, eventname, pagetitle])
        }
        
