<!-- Hide from old browsers

var agent = window.navigator.userAgent;

function printFrame(frame, onfinish) 
{
  if ( !frame ) frame = window;

  if (frame.length > 0)
  {
  	  // this page is a frameset - work out the correct frame name to print
	  if (frame.location.href.indexOf("mngt")!=-1)		// management page
		  frame = frame.person
	  else if (frame.location.href.indexOf("share_graph")!=-1)		// shareprice graph page
		  frame = frame.chart
	  else
	  {
	  	  // an unknown frameset has been added - will still print in MSIE
		  // error must be flagged in a friendly manner for non MSIE browsers
		  if (agent.indexOf("MSIE") == -1)
		  {
		  	alert("Buyitdirect.com \n\nSorry but printing is not supported via this button for this page only!\n\nPlease click in the middle of the page you want to print\nand select 'Print Frame...' from your File menu.");
			return;
		  }
	  }
  }

  // can only check if document downloaded in MSIE for the moment
  if (agent.indexOf("MSIE") != -1)
  {
	  if ( frame.document.readyState != "complete" &&
    	   !confirm("The document to print is not downloaded yet! Continue with printing?") )
	  {
	    if ( onfinish ) onfinish();
		isPrinting = false;
    	return;
	}
  }

  if ( printIsNativeSupport() ) 
  {
  	if (agent.indexOf("MSIE") != -1)
	{
	    /* focus handling for this scope is IE5Beta workaround,
    	   should be gone with IE5 RTM.
	    */
    	var focused = document.activeElement; 
	    frame.focus();
	    frame.self.print();
	    if ( onfinish ) onfinish();
	    if ( focused && !focused.disabled ) focused.focus();
		isPrinting = false;
	    return;
	}
	else
	{
		// printing support for Netscape Navigator
		// (no support for onfinish event)
		frame.print();
		isPrinting = false;
		return;
	}
  }
  
  // For IE4 insert a hidden web browser object, and use its support for printing
  var eventScope = printGetEventScope(frame);
//  alert("eventScope="+eventScope)
  var focused = document.activeElement;

  window.printHelper = function() {
    execScript("on error resume next: printWB.ExecWB 6, 1", "VBScript");
    printFireEvent(frame, eventScope, "onafterprint");
    printWB.outerHTML = "";
    if ( onfinish ) onfinish();
    if ( focused && !focused.disabled ) focused.focus();
    window.printHelper = null;
  }


  document.body.insertAdjacentHTML("beforeEnd",
    "<object id=\"printWB\" width=0 height=0 \
    classid=\"clsid:8856F961-340A-11D0-A96B-00C04FD705A2\"></object>");

  printFireEvent(frame, eventScope, "onbeforeprint");
  frame.focus();
  window.printHelper = printHelper;
  setTimeout("window.printHelper()", 0);
}

// helpers
/*
 * Native support for MSIE5+ and Netscape4+
 */
function printIsNativeSupport() 
{
  var nativeSupported = false;
  if (agent.indexOf("MSIE") != -1)
  {
	var i = agent.indexOf("MSIE ")+5;
	return parseInt(agent.substr(i)) >= 5 && agent.indexOf("5.0b1") < 0;
  }
  else if(agent.indexOf("Mozilla") != -1)
  {
  	// Netscape Navigator support for printing is from version 4.0 onwards
	var version = parseFloat(window.navigator.appVersion);
	return (version >= 4.0);
  }
  return false;
}

function printFireEvent(frame, obj, name) 
{
  var handler = obj[name];
  switch ( typeof(handler) ) {
    case "string": frame.execScript(handler); break;
    case "function": handler();
  }
}

function printGetEventScope(frame) 
{
  if (document.all)
  {
	var frameset = frame.document.all.tags("FRAMESET");
	if ( frameset.length ) return frameset[0];
  }
  return frame.document.body;
}


function printContentFrame() {
	// IE 4 for the MAC does not support any form of printing
	//if (!((is.ie4)&&(is.mac)))
		printFrame (window.self,false)
}
//	Stop hiding -->
