//---------------- MISC

dt.flyouts();

function global() {

}

try {
	
	var pdialog = new YAHOO.widget.Panel("wait", {	width:"350px",
													fixedcenter:true,
													close:true,
													draggable:true,
													modal:true,
													visible:false });
													
	YAHOO.util.Event.addListener(window, "load", function(){
		pdialog.setHeader("Printing - Please wait...");
		pdialog.setBody("<a href=\"javascript:pdialog.hide()\">Click here</a> to close this message after you have finished printing");
		pdialog.render(document.body);
	});

}catch(e){}

function printPage() {

	try {
		var f_iframe, html = document.getElementById("servier_printarea").innerHTML;
		
		pdialog.show();

		try {
			document.getElementById("print_iframe").removeNode(true);
		}catch(e){}
		
		/*---- PARSE OUT UNWANTED PRINT ELEMENTS */
		html = "<img src=../images/print_header.jpg><br><br>" + html;
		html += "<br><br>&copy; 2006 Servier Laboratories Australia, an incorporated company of SERVIER All Rights Reserved";
		/*---- PARSE OUT UNWANTED PRINT ELEMENTS */
	
		print_iframe_fn = function() {
			try {
				
				try {
					print_iframe.document.createStyleSheet("../_css/universal.css");
					print_iframe.document.body.insertAdjacentHTML("afterBegin", html);
					print_iframe.focus();
					print_iframe.print();
				}catch(e) {
					var iframe_el = document.getElementById("print_iframe");
					iframe_el.contentWindow.document.write(html);
					iframe_el.contentWindow.focus();
					iframe_el.contentWindow.print();
				}
				
			}catch(e){ alert('catch');window.print() }
		}
	
		document.body.insertAdjacentHTML("beforeEnd", "<iframe id=print_iframe name=print_iframe onload=print_iframe_fn() frameborder=\"0\" height=\"0\" marginheight=\"0\" marginwidth=\"0\" width=\"0\" height=\"0\"></iframe>");
		

	} catch(e) { window.print() }
	
}

//---------------- //