﻿
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<Style>\n';
    html += 'BODY {\n';
    html += 'margin: 10px;\n';
    html += 'padding: 0px;\n';
    html += 'padding: 0px;\n';
    html += '}\n';
    html += 'TABLE.tPh,TABLE.tLine {\n';
    html += 'width: 100%;\n';
    html += '}\n';
    html += 'TABLE.tPh TR TD,TABLE.tLine TR TD {\n';
    html += 'vertical-align: top;\n';
    html += 'text-align: left;\n';
    html += '}\n';
    html += 'TABLE.tLine TR TD {\n';
    html += 'background-color: #000000;\n';
    html += '}\n';
    html += 'TABLE.tPh TD.dPhTop {\n';
    html += 'height: 30px;\n';
    html += 'width: 100%;\n';
    html += '}\n';
    html += 'TABLE.tPh TD.dPhBottom {\n';
    html += 'height: 37px;\n';
    html += 'width: 100%;\n';
    html += 'border-top:1px solid black;\n';
    html += '}\n';
    html += '#tFooter, #dCiPathNav, #dCTeaser { display: none; }\n';
    html += '</Style>\n';
    html += '</Head>\n';
    html += '<Body>\n';
    html += '<table class=tPh cellpadding=0 cellspacing=0 border=0>\n';
    html += '<tr>\n';
    html += '<td rowspan=2>\n';
    html += '<img src=/Style%20Library/Custom/Images/hd_left.gif /></td>\n'; 
    html += '<td class=dPhTop>\n';
    html += '<img src=/Style%20Library/Custom/Images/hd_top.gif /></td>\n';
    html += '<td rowspan=2>\n';
    html += '<img src=/Style%20Library/Custom/Images/hd_right.gif /></td>\n';
    html += '</tr>\n';
    html += '<tr>\n';
    html += '<td class=dPhBottom>\n';
    html += '<img src=/Style%20Library/Custom/Images/1x1.gif width=1 height=37 /></td>\n';
    html += '</tr>\n';
    html += '</table>\n';

    var printReadyElem = document.getElementById("printPart");

    if (printReadyElem != null)
    {
	    html += printReadyElem.innerHTML;
    }
    else
    {
	    alert("Could not find the printPart div");
	    return;
    }

    html += '</body>\n';
    html += '</html>\n';

    var printWin = window.open("","printSpecial", "width=595 height=595");
    printWin.document.open();
    printWin.document.write(html);
    printWin.document.close();
    printWin.print();
}