
{function PrintEntity()
{}
PrintEntity.DeclareType=function PrintEntity_DeclareType()
{this.DeclareMethod("_OpenPrintWindow",PrintEntity_OpenPrintWindow);this.OverrideMethod("postInitialize",PrintEntity_postInitialize);}
function PrintEntity_postInitialize(popupArguments)
{if(!popupArguments)
return;var oICViewer=this.findControlByType(Olive.Controls.controlTypeNames.InformationComponentViewer);if(!oICViewer)
{this.reportError(DHTML.newError(-1,"Cannot find the InformationComponentViewer control on the print component view HTML page"));return;}
oICViewer.m_oContentItem=popupArguments;oICViewer.getContentItemOfType(OwcContentItem_SearchQuery,true);var oPrintFormData=popupArguments.m_oPrintFormData;var oState=oPrintFormData.m_oComponentViewerState;oState.setLinkHighlightMode(false);oState.setHitHighlightMode(false);var sComponentViewMode=oState.getViewMode();if(sComponentViewMode&&sComponentViewMode==Olive.Data.InformationComponentViewerState.ViewMode.text)
oState.setChunkingMode(Olive.Data.InformationComponentViewerState.ChunkingMode.all);var sFormat=oPrintFormData.getPageFormat();var nWidth=642;var nHeight=930;switch(sFormat.toLowerCase())
{case Olive.Data.PrintFormData.FormatOfPagesToPrint.Letter:nWidth=640;nHeight=890;break;case Olive.Data.PrintFormData.FormatOfPagesToPrint.Legal:nWidth=660;nHeight=1120;break;case Olive.Data.PrintFormData.FormatOfPagesToPrint.A4:nWidth=642;nHeight=930;break;case Olive.Data.PrintFormData.FormatOfPagesToPrint._11x17:nWidth=900;nHeight=1450;break;default:break;}
var sImageOrientation=oPrintFormData.getPageOrientation();if(!sImageOrientation)
{var nTemp=nWidth;nWidth=nHeight;nHeight=nTemp;}
oState.setZoomMode(Olive.Data.InformationComponentViewerZoom.ZoomMode.pagedimensions,null,nWidth,nHeight);oICViewer.onImagesLoaded=Delegate.CreateDelegate("_OpenPrintWindow",this,Delegate.Type.Method);oICViewer.loadICViewer(null,oState);}
function PrintEntity_OpenPrintWindow()
{var oICViewer=this.findControlByType(Olive.Controls.controlTypeNames.InformationComponentViewer);var oContentItem=oICViewer.getContentItem();this.print(oContentItem);}
JScript.Type.RegisterClass("PrintEntity",PrintEntity,Olive.PrintPage);}
Olive.WindowBinder.RegisterPageClass(window,PrintEntity);
