function myprint(haveframe) {

    var content_table = document.getElementById("_content");
    var content_pic = document.getElementById("_pic");
    
    //frame ??
    var msg_frame = null;
    if(haveframe==true){
    	msg_frame= document.frames["msgbd"]; 
    }
     	
    //alert("come here!");
    //alert(msg_frame);
  
    //alert(content_pic.innerHTML);
    fp = window.open("","test","scrollbars=yes");
   
    fp.document.write("<html>\n");
    fp.document.write("<head>\n");
    fp.document.write("<link rel='stylesheet' type='text/css' media='all' href='css/style.css' />\n");
    fp.document.write("</head>\n");
    fp.document.write("<body>\n");
   fp.document.write("<div style='width: 600px; margin-left: 100px; margin-right: 100px;margin-top: 20px; margin-bottom:50px;'>");
   
    fp.document.write("<div style='width: 600px;text-align: center'>");
    fp.document.write(content_pic.innerHTML);
    fp.document.write("</div>");
    
    fp.document.write("<div style='width: 600px;text-align: center;padding-bottom: 10px;'>");
    fp.document.write(content_table.innerHTML);
    fp.document.write("\n");
    fp.document.write("</div>");
    //alert(msg_frame);
    if(msg_frame!='undefined'&&msg_frame!=null){
    
    	
    	var content_message = msg_frame.document.getElementById("liuyan");
    	var content_title_msg = msg_frame.document.getElementById("title_msg");
    	fp.document.write("<div style='width: 600px;text-align: center;padding-bottom: 5px;'>");
	    fp.document.write(content_title_msg.innerHTML);
	    fp.document.write("\n");
	    fp.document.write("</div>");
	    
    	fp.document.write("<div style='width: 600px;text-align: center;padding-bottom: 50px;'>");
	    fp.document.write(content_message.innerHTML);
	    fp.document.write("\n");
	    fp.document.write("</div>");
    }
    fp.document.write("</div>");
    
    fp.document.write("<"+"script> window.print();</" +"script>"); 
    fp.document.write("</body>");
    fp.document.write("</html>");
    fp.location.reload(); 
    setTimeout("fp.close();",1000);
}

