// source from a forum at http://www.webdeveloper.com/forum/showthread.php?threadid=47497
// modified by Sarah Park on 11-22-2004 for accepting multiple div
var pWindow = "";
var tmpStr = "<Div class=printStyle>" 

function printContent(TargetDIV){

tmpStr += TargetDIV.innerHTML;
tmpStr += "</Div>"
pWindow = window.open('Printable.htm'); 
pWindow.opener = self; 
}

function closePrnWindow(){

	if (pWindow.document.readyState == "complete"){
		pWindow.close()};
	else{
		setTimeout("closePrnWindow()",5000)};
}

function update(){

pWindow.document.open();
pWindow.document.write(tmpStr);
pWindow.print();
pWindow.document.close();
tmpStr = "";
// commented out the line below (window closing automatically after printing)
//closePrnWindow(); 
}

