<!-- Print Script Start-->

var gAutoPrint = true;
 

function printSpecial(pelement)

{

            if (document.getElementById != null){

                        var html = '<HTML>\n<HEAD>\n';

                        if (document.getElementsByTagName != null){

                                    var headTags = document.getElementsByTagName("head");

                                    if (headTags.length > 0)

                                                html += headTags[0].innerHTML;}

                        html += '\n</HEAD>\n';

                        var printReadyElem = document.getElementById(pelement);

                        //var printReadyElem = document.getElementById("pager");

                        if (printReadyElem != null){html += printReadyElem.innerHTML;}

                        else{

                                    //alert("Could not find the printReady function");

                                    return;}

                        html += '\n</BODY>\n</HTML>';

                        if (gAutoPrint){

                                    html += '<script language="javascript">';

                                    html += 'print();';

                                    //html += 'close();';

                                    html += 'window.setTimeout("close();", 5000);'

                                    html += '</script>';

                        }

                        var printWin = window.open("","printSpecial");

                        printWin.document.open();

                        printWin.document.write(html);

                        printWin.document.close();

/*                      if (gAutoPrint){

                                    printWin.print();

                                    //printWin.close();

                        }

*/          }

}
