﻿    function Print() 
    {
    var ID = window.location.search.substring(1);
    window.open("printNews.aspx?Type=ENG&" + ID, "" ,"top=0,left=0,width=820,height=600,scrollbars=no, menubar=no,toolbar=no,status=no,resizable=no,addressbar=no");
    }
    
    function Email() 
    {
    var ID = window.location.search.substring(1);
    window.open("emailToFriend.aspx?Type=ENG&" + ID, "" ,"top=0,left=0,width=450,height=530,scrollbars=no, menubar=no,toolbar=no,status=no,resizable=no,addressbar=no");
    }
    
    /********a function to display the limit exceed*************
    
    $(function() {
        var limit = 400;
        var tb = $('textarea[id$=boxComment]');
        $(tb).keyup(function() {
            var len = $(this).val().length;
            if (len > limit) {
                //this.value = this.value.substring(0, 50);
                $(this).addClass('exceeded');
                $('#spn').text(len - limit + " characters exceeded");
            }
            else {
                $(this).removeClass('exceeded');
                $('#spn').text(limit - len + " characters left");
            }
        });


    });
    
    ******** End *************/
    
            $(function() {
            var limit = 400;
 
            $('textarea[id$=boxComment]').keyup(function() {
                var len = $(this).val().length;
                if (len > limit) {
                    this.value = this.value.substring(0, limit);
                }
                $('#spn').text(limit - len + " characters left");
            });
        });