//Skrip untuk cetak... pindah masuk external ntuk html validation - 22/12/2008 - 1101AM

var gAutoPrint = true; // Tells whether to automatically call the print function

function printSpecial()
{
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</HE>\n<DIV STYLE=\"background:#FAF8CC; padding:20px; margin:40px; border:1px solid black; text-align:justify; font-family: Arial; font-size:12px;">\n';

var printReadyElem = document.getElementById("printReady");

if (printReadyElem != null)
{
html += printReadyElem.innerHTML;
}
else
{
alert("Kesalahan fungsi!, Technical error!");
return;
}

html += '\n</DIV>\n<hr><center><small>&copy;SMPKE, Prime Minister\'s Office</small></center></HT>';

var printWin = window.open("","printSpecial");
printWin.document.open();
printWin.document.write(html);
printWin.document.close();
if (gAutoPrint)
printWin.print();
}
else
{
alert("Your browser is not compatible, Pelayar anda tidak sesuai");
}
}
