// create print page link on the fly if key items are supported
var hasPrintFeature = (window.print) ? true : false;
var supportsW3CDOM = ((document.createElementNS || document.createElement) && document.createTextNode && document.insertBefore && document.appendChild);
if (hasPrintFeature && supportsW3CDOM)
{
    if (typeof PRINT_PAGE_TEXT == 'string')
   {
        var a = (document.createElementNS) ? document.createElementNS(XHTML_NS_URI, 'a') : document.createElement('a');
        a.setAttribute('href', '#');
       if (typeof PRINT_TOOLTIP == 'string') 
      {
              a.setAttribute('title', PRINT_TOOLTIP);
       }
        a.onclick = function() {
            window.print();
            return false;
        }
        a.appendChild(document.createTextNode(PRINT_PAGE_TEXT));
        var refNode = document.getElementById('ServicePrintLink');
        if (refNode) {
            refNode.appendChild( a );
        } 
    }
}
