﻿
function OpenPupUpWindow(theURL,winName,features) 
{ 
  window.open(theURL,winName,features);
}

function printSpecial()
{
    var html = '<html>\n';
    
    html += '<head>\n';
    
    if (document.getElementsByTagName != null)
    {
	    var headTags = document.getElementsByTagName("head");
	    if (headTags.length > 0)
	    html += headTags[0].innerHTML;
    }

    html += '\n</head>\n<body>\n';


    html += '<table class=\"tblMain\" cellpadding=0 cellspacing=0 border=0>\n';
    html += '<tr class=\"trMainContent\">\n';
    html += '<td class=\"tdW484pxT30B8L13R13 tdContent\">\n';


    var printReadyElem = document.getElementById("printPart");

    if (printReadyElem != null)
    {
	    html += printReadyElem.innerHTML;
    }
    else
    {
	    alert("Could not find the printPart div");
	    return;
    }

    html += '</td>\n'; 
    html += '</tr>\n';
    html += '</table>\n';


    html += '</body>\n';
    html += '</html>\n';

    var printWin = window.open("","printSpecial", "width=595, height=595, scrollbars=yes");
    printWin.document.open();
    printWin.document.write(html);
    printWin.document.close();
    printWin.print();
}