   function restrictinput(maxlength,e,placeholder)
    {
       if (window.event && placeholder.value.length>=maxlength)
       {
            return false
       }
        else if (e.target&&e.target==eval(placeholder)&&e.target.value.length>=maxlength)
        {
            var pressedkey=/[a-zA-Z0-9\.\,\/]/ //detect alphanumeric keys
            if (pressedkey.test(String.fromCharCode(e.which)))
                e.stopPropagation()
        }
    }
    function textLimit(field, maxlen)
    {
        if (field.value.length > maxlen)
        {
            
            field.value = field.value.substring(0, maxlen + 1);
        }
    }
    function ValidPhone(sender, args)
    {
        var str=args.Value;
        var strValidChars="0123456789()-/ +";
        
        if(str !='Your Phone:')
        {
            if (str.length == 0)
            {
                args.IsValid = true;
                return;
            }
            // test strString consists of valid characters listed above
            for (i = 0; i < str.length; i++)
            {
                var strChar = str.charAt(i);
                if (strValidChars.indexOf(strChar) == -1)
                {
                    args.IsValid = false;
                    return;
                }
            }
        }
        args.IsValid = true;
    }
   function CountChar(sender, args)
   {
     var str=args.Value;
      if (str.length <5)
      {
         args.IsValid = false;
         return;
      }
       args.IsValid = true;
   }
   function RequiredRegularfunName(sender,args)
   {   
         var str=args.Value;
         var strValidChars="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ&_ ',.-"; 
         if(str =="Your Name:")
         {  
           
            document.getElementById('ctl00_QuickContact_customName').innerHTML="Please enter name.";
            document.getElementById('ctl00_QuickContact_customName').style.display = '';
            args.IsValid = false;
            return;
         }
         else
         {
            for (i = 0; i < str.length; i++)
            {
                var strChar = str.charAt(i);
                if (strValidChars.indexOf(strChar) == -1)
                {
                     document.getElementById('ctl00_QuickContact_customName').innerHTML="Please enter valid name.";
                     document.getElementById('ctl00_QuickContact_customName').style.display = '';
                     args.IsValid = false;
                     return;
                }
            }
            args.IsValid = true;
            return;
         }
    }
    function RequiredfunVCode(sender,args)
    {
       
         var str=args.Value;   
         if(str =="")
         {  
           document.getElementById('ctl00_QuickContact_customVerification').innerHTML="Please enter verification code.";
           document.getElementById('ctl00_QuickContact_customVerification').style.display = '';
           args.IsValid = false;
         }
         else
         {
            args.IsValid = true;
         }
   }
   function RequiredRegularfunEmail(sender,args)
   {
        var str=args.Value;
        if(str == "Your E-mail:")
        {
            document.getElementById('ctl00_QuickContact_customEmail').innerHTML="Please enter e-mail.";
            document.getElementById('ctl00_QuickContact_customEmail').style.display = '';
            args.IsValid = false;
            return;
        }
        else
        {
            if(CheckISValid_email(str) == true)
            {
                args.IsValid=true;
                return;
            }
            else
            {   
                 document.getElementById('ctl00_QuickContact_customEmail').innerHTML="Please enter valid e-mail.";
                 document.getElementById('ctl00_QuickContact_customEmail').style.display = '';
                 args.IsValid=false;
                 return;
            }
        }
   }
   function AddFocus()
   {
    
        if(document.getElementById('ctl00_QuickContact_txtName').value=="Your Name:")
        {
            document.getElementById('ctl00_QuickContact_txtName').focus();
            document.getElementById('ctl00_QuickContact_txtName').value='';
        }
   }
   
   function SetEmailFocus()
   {
        if(document.getElementById('ctl00_QuickContact_txtEmail').value=="Your E-mail:")
        {
             document.getElementById('ctl00_QuickContact_txtEmail').focus();
             document.getElementById('ctl00_QuickContact_txtEmail').value='';            
        }   
   }
   
   function SetCodeFocus()
   {
      if(document.getElementById('ctl00_QuickContact_txtVrificationCode').value=="Verification code:")
        {
             document.getElementById('ctl00_QuickContact_txtVrificationCode').focus();
             document.getElementById('ctl00_QuickContact_txtVrificationCode').value='';            
        }
   }
   
   function SetCommentFocus()
   {
      if(document.getElementById('ctl00_QuickContact_txtComment').value=="Your Comment:")
        {
             document.getElementById('ctl00_QuickContact_txtComment').focus();
             document.getElementById('ctl00_QuickContact_txtComment').value='';            
        }
   }