function clearText(block)
{
    $('#'+block + ' textarea').val('');
}

function addCommentHideShow(inp, block)
{
    if($('#'+block).css('display') == 'none')
    {
        $('#'+inp).hide();
        $('#'+block).show();

        $('#'+block + ' textarea').focus(function(){
        }).blur(function(){
            /*$('#'+inp).show();
             $('#'+block).hide();*/
        }/*).keypress(function(){
            valu = $(this).val();
            valu = valu.length;
            valu = Math.ceil(valu/50);
            //alert(valu);
            valu = valu*25 + 70;
            $(this).animate({ height: valu+"px"}, 300);
            //$(this).after(valu+' ');
        }*/);
        $('#'+block + ' textarea').focus();

    }else
    {
        $('#'+inp).show();
        $('#'+block).hide();

    }
}

function showHide(el)
{
   /* bl= document.getElementById(el);
    if(bl.className == 'show')
        bl.className='hid';
    else
        bl.className='show';*/

    if($('#'+el).hasClass('hid'))
    {
        $('#'+el).removeClass('hid').addClass('show');
    }else
    {
        $('#'+el).removeClass('show').addClass('hid');
    }
}

function showPopUp(link, width, height, resizable, scrollbars, toolbar)
{
    var centerX = (screen.width - width) / 2;
    var centerY = (screen.height - height) / 2;

    var params = 'directories=no,location=no,menubar=no,resizable=' + (resizable ? 'yes' : 'no') +
                 ',scrollbars=' + (scrollbars ? 'yes' : 'no') + ',status=no,toolbar=' + (toolbar ? 'yes' : 'no') + ',width=' + width +
                 ',height=' + height + ',left=' + centerX + ',top=' + centerY;
    window.open(link, '', params);
    return false
}
