
 function showCaptcha(){
         var name = $('#name').val();
         if(name == 'Name'){ name = '';}
         var email = $('#email').val();
         if(email == 'Email Address'){ email = '';}
         var message = $('#message').val();
         if(message == 'Your Message'){ message = '';}
         if(name != '' && email != '' && message != ''){
            var atpos=email.indexOf("@");
            var dotpos=email.lastIndexOf(".");
            if (atpos<1 || dotpos<atpos+2 || dotpos+2>=email.length) {
                  alert("Not a valid e-mail address");
                  return false;
              }else{
                  $("#quickform").validate();
            var addCaptchaBox = $("#captchabox");
            //if (addCommentBox.is(":hidden"))
                var addCaptchaBoxHeight     = addCaptchaBox.height();
                var addCaptchaBoxWidth     = addCaptchaBox.width();
                var windowWidth             = $(window).width();
                var windowHeight             = $(window).height();
                var pageScrollTop           = document.documentElement.scrollTop ? document.documentElement.scrollTop : (document.body.scrollTop ? document.body.scrollTop : 0);

//                var addCaptchaBoxTop        = pageScrollTop + (windowHeight - addCaptchaBoxHeight) / 2;
var addCaptchaBoxTop        = pageScrollTop / 8;
                var addCaptchaBoxLeft       = (windowWidth - addCaptchaBoxWidth) / 2;


            $("div#captchaboxshade").appendTo("body").fadeTo(0,.8).css({
                width: $("body").width(),
                height: $("body").height(),
                zIndex: 10
            }).show();
            addCaptchaBox.css({
                display : 'block',
                            position : "absolute",
                            top: addCaptchaBoxTop,
                            zIndex: 100
                        }).fadeIn("slow");
                        if ( $('#captchabox').is(':visible')){
                $('.captchaBut').hide();
                     }
         }
              }
          
             
         else{
             alert('You are not entered the required details');
         }
            return false;
 }
function popupclose()
        {
            $("#captchabox").hide();
            $("div#captchaboxshade").hide();
            $('.captchaBut').show();
        }
        function checkcaptcha()
        {
            var v = $("#recaptcha_response_field").val();
            if(v == ''){
                alert('You are not entered the captcha');
            }
            else{
                document.quickform.submit();
            }
        }

