var ncTextEmbedQueryComment=-1;var ncTextEmbedQueryCommentOneCell=0;var ncTextEmbedQueryCommentTwoCell=1;var ncTextEmbedWidget=0;var ncTextEmbedCoreFeature=10;var ncTextEmbedCoreFeatureAbstract=0;var ncTextEmbedCoreFeatureTitle=1;var ncTextEmbedCoreFeatureNavRoute=2;var ncTextEmbedCoreFeatureAbstract2=3;var ncTextEmbedCoreSection=11;var ncTextEmbedCoreSectionDefaultChildNav=0;var ncTextEmbedQueryInstance=12;var ncTextEmbedInternalSearch=13;var ncTextEmbedQueryField=14;var ncTextEmbedQueryFieldPrompt=15;var ncTextEmbedSaleView=16;var ncTextSaleViewSubmitButton=0;var ncTextSaleViewUpdateButton=1;var ncTextSaleViewUpdatePriceLink=3;var ncTextEmbedQueryInputField=17;var ncTextEmbedQxXView=18;var ncTextEmbedQxXViewSubmitButton=0;var ncTextEmbedCurrentFeature=19;var ncTextEmbedCurrentFeatureAbstract=0;var ncTextEmbedCurrentFeatureTitle=1;var ncTextEmbedCurrentFeatureNavRoute=2;var ncTextEmbedCurrentFeatureAbstract2=3;var ncTextEmbedFormInputBtn=21;var ncTextEmbedFormInputSubmitBtn=0;var ncTextEmbedFormInputSaveAsBtn=1;var ncTextEmbedFormInputPrompt=22;var ncTextEmbedFormInputField=23;var ncTextEmbedQueryEmptyField=24;var ncTextEmbedLoggedOutUser=26;var ncTextEmbedLoggedOutSubmitBtn=4;var ncTextEmbedSearchView=27;var ncTextEmbedSearchSubmitBtn=4;var ncTextEmbedSatelliteSearch=28;var ncTextEmbedSatelliteSearchBox=0;var ncTextEmbedSatelliteSearchBtn=1;var ncTextEmbedStandaloneSearchView=30;var ncTextEmbedQueryRecordCount=31;var ncTextEmbedSaleViewField=32;var ncTextEmbedLayoutElement=36;var ncTextEmbedMailTameSearchForm=37;var ncTextEmbedMailTameSearchSubmitBtn=9;var ncTextEmbedTextSurface=41;var ncTextEmbedPager=43;var ncTextEmbedPagerRecordContent=10;var ncTextEmbedLocalContent=44;var ncTextEmbedPanelTitle=45;var ncTextEmbedPanelContent=46;var ncTextEmbedFormTable=47;var ncTextEmbedFormTableCommentOneCell=0;var ncTextEmbedFormTableCommentTwoCell=1;var ncTextEmbedFormTablePromptInputRow=2;var ncTextEmbedInline=0;var ncTextEmbedBlock=1;var ncTextEmbedTableRow=2;var OffsetEmbedEditor, QueryInputEmbedEditor, FieldPromptEmbedEditor, ButtonEmbedEditor, LayoutElementEmbedEditor, GenericEmbedEditor;function ncEmbed(){this.Config.apply(this, arguments);}ncEmbed.prototype.Config=function(){var eo=this;var a=arguments;if(a.length>0){switch(a.length){case 1:if(typeof a[0]=='object'){eo.__MajorType=a[0].__MajorType;eo.__MinorType=a[0].__MinorType;eo.__Options=a[0].__Options;eo.__Text=a[0].__Text;eo.__IsEmailEmbed=a[0].__IsEmailEmbed;eo.ok=true;}else{eo.__MajorType=a[0];eo.__MinorType=0;eo.__Options='';eo.__Text='';eo.__IsEmailEmbed=false;eo.ok=true;}break;case 2:var oExp=/^(?:(E-)?Embed\.)?(-?\d+)\.(\d+)(?:\/(.+))?/;if(oExp.test(a[0])){eo.__IsEmailEmbed=(RegExp.$1!='');eo.__MajorType=parseInt(RegExp.$2, 10);eo.__MinorType=parseInt(RegExp.$3, 10);eo.__Options=a[0].replace(oExp, "$4");eo.__Text=a[1];eo.ok=true;}else{eo.ok=false;}break;case 5:eo.__MajorType=a[0];eo.__MinorType=a[1];eo.__Options=a[2];eo.__Text=a[3];eo.__IsEmailEmbed=a[4];eo.ok=true;break;}if(eo.ok){eo.__UpdateProperties();}else{alert('ERROR:A problem occurred initializing embed object');}}};ncEmbed.prototype.__UpdateProperties=function(){var eo=this;eo.__HasProperties=false;eo.__PropertiesEditor="";eo.__EditorTitle="";eo.__EditorDesc="";eo.__DisplayType=ncTextEmbedInline;eo.__AllowEmptyText=false; if(eo.__IsEmailEmbed){}else{switch(eo.__MajorType){case ncTextEmbedPanelTitle:case ncTextEmbedPanelContent:eo.__DisplayType=ncTextEmbedBlock;eo.__HasProperties=true;eo.__EditorTitle='Collapsible Panel '+(eo.__MajorType==ncTextEmbedPanelTitle?'Title':'Content');eo.__PropertiesEditor=GenericEmbedEditor;break;case ncTextEmbedTextSurface:eo.__DisplayType=ncTextEmbedBlock;break;case ncTextEmbedLocalContent:eo.__DisplayType=ncTextEmbedBlock;break;case ncTextEmbedWidget:eo.__DisplayType=ncTextEmbedBlock;break;case ncTextEmbedInternalSearch:eo.__PropertiesEditor="EmbedInternalSearch.htm";eo.__HasProperties=true;eo.__EditorTitle="Internal Search";eo.__EditorDesc="Specify criteria and output format for the internal search";break;case ncTextEmbedStandaloneSearchView:eo.__PropertiesEditor="EmbedSearchView2.htm";eo.__HasProperties=true;eo.__EditorTitle="Search View";eo.__EditorDesc="Specify search view to display and additional searches to trigger";eo.__DisplayType=ncTextEmbedBlock;break;case ncTextEmbedQueryInstance:eo.__DisplayType=ncTextEmbedBlock;case ncTextEmbedQueryRecordCount:eo.__PropertiesEditor="EditQueryInstance2.htm";eo.__HasProperties=true;eo.__EditorTitle=eo.__MajorType==ncTextEmbedQueryInstance?"Query":"Query Record Count";eo.__EditorDesc="Specify query details";break;case ncTextEmbedQueryFieldPrompt:eo.__HasProperties=true;eo.__PropertiesEditor=FieldPromptEmbedEditor;eo.__EditorTitle="Query Field Prompt";eo.__EditorDesc="Enter text for the prompt";break;case ncTextEmbedQueryField:var sFieldType=typeof g_oQueryFieldArr=='undefined'?'':g_oQueryFieldArr[eo.__MinorType];if(sFieldType=='dhtml'){eo.__DisplayType=ncTextEmbedBlock;}eo.__HasProperties=true;eo.__PropertiesEditor=GenericEmbedEditor;eo.__EditorTitle='Field Embed';eo.__EditorDesc="Set properties for the field";break;case ncTextEmbedQueryEmptyField:eo.__HasProperties=true;eo.__PropertiesEditor=FieldPromptEmbedEditor;eo.__EditorTitle="Empty field text";eo.__EditorDesc="Enter text for an empty field";break;case ncTextEmbedSaleView:eo.__HasProperties=eo.__MinorType==ncTextSaleViewSubmitButton||eo.__MinorType==ncTextSaleViewUpdateButton||eo.__MinorType==ncTextSaleViewUpdatePriceLink;if(eo.__HasProperties){eo.__PropertiesEditor=ButtonEmbedEditor;eo.__EditorTitle="Button";eo.__EditorDesc="Enter text for the button";}break;case ncTextEmbedSaleViewField:eo.__HasProperties=true;eo.__PropertiesEditor=FieldPromptEmbedEditor;eo.__EditorTitle="Text Field";eo.__EditorDesc="Enter the field name";break;case ncTextEmbedFormInputBtn:eo.__HasProperties=true;eo.__PropertiesEditor=ButtonEmbedEditor;eo.__EditorTitle="Button";eo.__EditorDesc="Enter text for the button";break;case ncTextEmbedFormInputField:eo.__HasProperties=true;eo.__PropertiesEditor=GenericEmbedEditor;eo.__EditorTitle="Input Field";eo.__EditorDesc="Set properties for the field";break;case ncTextEmbedLoggedOutUser:eo.__HasProperties=(eo.__MinorType==ncTextEmbedLoggedOutSubmitBtn);if(eo.__HasProperties){eo.__PropertiesEditor=ButtonEmbedEditor;eo.__EditorTitle="Button";eo.__EditorDesc="Enter text for the button";}break;case ncTextEmbedQueryInputField:if(typeof g_oQueryFieldArr!='undefined'&&g_oQueryFieldArr[eo.__MinorType]){switch(g_oQueryFieldArr[eo.__MinorType]){case "formlink":case "multiformlink":case "productfamily":case "ddloption":case "radiooption":eo.__HasProperties=true;eo.__EditorTitle="Query Input Field";eo.__PropertiesEditor=QueryInputEmbedEditor;eo.__EditorDesc="Select a formatting option for the field";break;case "text":eo.__HasProperties=true;eo.__EditorTitle="Query Input Field";eo.__EditorDesc="Enter properties for the field";eo.__PropertiesEditor=GenericEmbedEditor;break;}}break;case ncTextEmbedQxXView:eo.__HasProperties=eo.__MinorType==ncTextEmbedQxXViewSubmitButton;if(eo.__HasProperties){eo.__PropertiesEditor=ButtonEmbedEditor;eo.__EditorTitle="Submit Button";eo.__EditorDesc="Enter text for the button";} break;case ncTextEmbedSearchView:eo.__HasProperties=eo.__MinorType==ncTextEmbedSearchSubmitBtn;if(eo.__HasProperties){eo.__PropertiesEditor=ButtonEmbedEditor;eo.__EditorTitle="Submit Button";eo.__EditorDesc="Enter text for the button";} break;case ncTextEmbedSatelliteSearch:eo.__HasProperties=(eo.__MinorType==ncTextEmbedSatelliteSearchBox||eo.__MinorType==ncTextEmbedSatelliteSearchBtn);if(eo.__HasProperties){if(eo.__MinorType==ncTextEmbedSatelliteSearchBox){eo.__PropertiesEditor=FieldPromptEmbedEditor;eo.__EditorTitle="Default Search Text";eo.__EditorDesc="Enter initial text for the search box";eo.__AllowEmptyText=true;}else{eo.__PropertiesEditor=ButtonEmbedEditor;eo.__EditorTitle="Submit Button";eo.__EditorDesc="Enter text for the button";}} break;case ncTextEmbedCurrentFeature:switch(eo.__MinorType){case ncTextEmbedCurrentFeatureAbstract:case ncTextEmbedCurrentFeatureAbstract2:case ncTextEmbedCurrentFeatureNavRoute:eo.__DisplayType=ncTextEmbedBlock;case ncTextEmbedCurrentFeatureTitle:var desc=eo.__MinorType==ncTextEmbedCurrentFeatureAbstract?"Abstract":eo.__MinorType==ncTextEmbedCurrentFeatureTitle?"Title":"Navigation Route";eo.__PropertiesEditor=OffsetEmbedEditor;eo.__EditorTitle="Embedded "+desc;eo.__EditorDesc="Enter offset for the "+desc;eo.__HasProperties=true;break;}break;case ncTextEmbedCoreFeature:switch(eo.__MinorType){case ncTextEmbedCoreFeatureAbstract:case ncTextEmbedCoreFeatureAbstract2:case ncTextEmbedCoreFeatureNavRoute:eo.__DisplayType=ncTextEmbedBlock;case ncTextEmbedCoreFeatureTitle:var desc=eo.__MinorType==ncTextEmbedCoreFeatureAbstract?"Abstract":eo.__MinorType==ncTextEmbedCoreFeatureTitle?"Title":"Navigation Route";eo.__PropertiesEditor=OffsetEmbedEditor;eo.__EditorTitle="Embedded "+desc;eo.__EditorDesc="Enter offset for the "+desc;eo.__HasProperties=true;break;}break;case ncTextEmbedCoreSection:if(eo.__MinorType==ncTextEmbedCoreSectionDefaultChildNav){eo.__DisplayType=ncTextEmbedBlock;}break;case ncTextEmbedFormTable:eo.__DisplayType=ncTextEmbedTableRow;break;case ncTextEmbedFormInputPrompt:eo.__HasProperties=true;eo.__PropertiesEditor=FieldPromptEmbedEditor;eo.__EditorTitle="Form Field Prompt";eo.__EditorDesc="Enter text for the prompt";break;case ncTextEmbedLayoutElement:eo.__HasProperties=true;eo.__EditorTitle='Layout Element';eo.__EditorDesc='Specify layout element to embed';eo.__PropertiesEditor=LayoutElementEmbedEditor;eo.__DisplayType=ncTextEmbedBlock;break;case ncTextEmbedMailTameSearchForm:eo.__HasProperties=eo.__MinorType==ncTextEmbedMailTameSearchSubmitBtn;if(eo.__HasProperties){eo.__PropertiesEditor=ButtonEmbedEditor;eo.__EditorTitle="Button";eo.__EditorDesc="Enter text for the button";}break;case ncTextEmbedPager:if(eo.__MinorType==ncTextEmbedPagerRecordContent){eo.__DisplayType=ncTextEmbedBlock;}break;}}};ncEmbed.prototype.HasProperties=function(){return this.__HasProperties;};ncEmbed.prototype.PropertiesEditor=function(){return this.__PropertiesEditor;};ncEmbed.prototype.EditorTitle=function(){return this.__EditorTitle;};ncEmbed.prototype.EditorDesc=function(){return this.__EditorDesc;};ncEmbed.prototype.DisplayType=function(){return this.__DisplayType;};ncEmbed.prototype.GetData=function(){var eo=this;var sTemp=(eo.__IsEmailEmbed?"E-Embed.":"Embed.");sTemp+=eo.__MajorType+"."+eo.__MinorType;if(eo.__Options!=""){sTemp+="/"+eo.__Options.replace(/\"/g, "&quot;");}return sTemp;};ncEmbed.prototype.GetMajorType=function(){return this.__MajorType;};ncEmbed.prototype.GetMinorType=function(){return this.__MinorType;};ncEmbed.prototype.SetMinorType=function(p_lMinorType){this.__MinorType=p_lMinorType;this.__UpdateProperties();};ncEmbed.prototype.GetText=function(){return this.__Text;};ncEmbed.prototype.SetText=function(p_sText){this.__Text=p_sText;};ncEmbed.prototype.GetOptions=function(){return this.__Options;};ncEmbed.prototype.SetOptions=function(p_sOptions){this.__Options=p_sOptions.toString();};ncEmbed.prototype.AllowEmptyText=function(){return this.__AllowEmptyText;};ncEmbed.prototype.GetFormatOptions=function(){var eo=this;var options=[];switch(eo.__MajorType){case ncTextEmbedQueryInputField:switch(g_oQueryFieldArr[eo.__MinorType]){case "formlink":options[0]=["Category Search", "cat", 0];default:options[options.length]=["Drop Down List", "ddl", 0];options[options.length]=["Check Box List", "cb", 1];break;}}return options;};ncEmbed.prototype.SetFormatOption=function(p_sFormat){this.__Options=p_sFormat;};ncEmbed.prototype.GetFormatOption=function(){return this.__Options;};ncEmbed.prototype.GetTableData=function(){var oRetVal={};switch(this.__MajorType){case ncTextEmbedFormTable:oRetVal.TableClass='EditingForm';oRetVal.Cells=[{Class:'forminputprompt', Html:'Prompt'}, {Class:'forminputcell', Html:'Input'}];break;}return oRetVal;};function ncCurrencyQueryFieldEmbed(){var e=this;e.Config.apply(e, arguments);var sOptionArr=e.__Options.split('.');e.__NewLine=sOptionArr[0]? 1:0;e.__Percentage=sOptionArr.length>1?sOptionArr[1].replace('p', '.'):0;if(isNaN(e.__Percentage)){e.__Percentage==0;}}ncCurrencyQueryFieldEmbed.prototype=new ncEmbed();ncCurrencyQueryFieldEmbed.prototype.NewLine=function(){return this.__NewLine;};ncCurrencyQueryFieldEmbed.prototype.SetNewLine=function(p_lNewLine){this.__NewLine=p_lNewLine?1:0;this.__UpdateOptions();};ncCurrencyQueryFieldEmbed.prototype.GetPercentage=function(){return this.__Percentage;};ncCurrencyQueryFieldEmbed.prototype.SetPercentage=function(p_dblPercentage){this.__Percentage=p_dblPercentage;this.__UpdateOptions();};ncCurrencyQueryFieldEmbed.prototype.GetFieldId=function(){return this.__MinorType;};ncCurrencyQueryFieldEmbed.prototype.__UpdateOptions=function(){var e=this;e.__Options=e.__NewLine+'.'+e.__Percentage.replace('.', 'p');};
