//jQuery.jPrint=function(el)
//{

//$('body').append('<iframe id="frPrintWindow"></iframe>')
//var iframe=frames[0];
//var doc=null;
//$('#frPrintWindow').attr('style','position:absolute;width:0px;height:0px;left:-500px;top:-500px;');
////document.body.appendChild(iframe);
//doc=iframe.contentWindow.document;
//var links=window.document.getElementsByTagName('link');

//doc.write('<html><head>');
//for(var i=0;i<links.length;i++)
//{
//    if(links[i].rel.toLowerCase()=='stylesheet')
//    {
//        doc.write('<link type="text/css" rel="stylesheet" href="'+links[i].href+'"></link>');
//    }
//}
//doc.write('</head><body>');
//doc.write('<div class="'+$(el).attr("class")+'">'+$(el).html()+'</div>');
//doc.write('</body></html>');
//doc.close();
//iframe.contentWindow.focus();
//iframe.contentWindow.print();
//alert('Printing...');
//document.body.removeChild(iframe);
//}
jQuery.jPrint=function PrintContent(DocumentContainer)
    {
        var WindowObject = window.open();
        doc=WindowObject.document;
        var links=window.document.getElementsByTagName('link');

        doc.write('<html><head>');
        for(var i=0;i<links.length;i++)
        {
            if(links[i].rel.toLowerCase()=='stylesheet')
            {
                doc.write('<link type="text/css" rel="stylesheet" href="'+links[i].href+'"></link>');
            }
        }
        doc.write('</head><body>');
        doc.write('<div class="'+$(DocumentContainer).attr("class")+'">'+$(DocumentContainer).html()+'</div>');
        doc.write('</body></html>');
        doc.close();

        WindowObject.focus();
        WindowObject.print();
        WindowObject.close();
    }
