var docBody=document.getElementsByTagName("body")[0];var oldBodyKeyDown=document.onkeydown;document.onkeydown=function(a){var d=null;if(a==null){a=event;d=event.srcElement}else{d=a.target}var c=true;var b=a.keyCode;if(a.keyCode==8&&(d.form==null||d.nodeName.toUpperCase()=="OBJECT")){a.cancelBubble=true;a.returnValue=false;c=false}if(oldBodyKeyDown!=null){oldBodyKeyDown()}return c};var CPSelection_PromptControlValues=new Array();var CPSelection_ControlID;var CPSelection_ParameterID;var CPSelection_PromptDelimiter;var CPDesign_FlashWindowName;var CPDesign_FlashDesignFieldName;var CPDesign_DesignInput;function CPDesign_Init(b,a){CPDesign_FlashWindowName=b;CPDesign_FlashDesignFieldName=a}function CPDesign_IsInitialized(){return CPDesign_FlashWindowName!=null}function CPDesign_GetFlashMovie(){var a=navigator.appName.indexOf("Microsoft")!=-1;return(a)?document.getElementById(CPDesign_FlashWindowName):document[CPDesign_FlashWindowName]}function CPDesign_GetXML(){var a=CPDesign_DesignInput;return a}function CPSelection_ControlEntry(c,d,b,a){this.controlID=c;this.valueFunction=d;this.validateFunction=b;this.parameterFunction=a}function CPSelection_Init(b,c,a){CPSelection_ControlID=b;CPSelection_PromptDelimiter=c;CPSelection_ParameterID=a}function CPSelection_AddControl(c,e,b,a){var d=new CPSelection_ControlEntry(c,e,b,a);CPSelection_PromptControlValues.push(d)}function CPSelection_Submit(){var a=CPSelection_FormatValueField();if(a){var b=CPSelection_GetControlById(CPSelection_ControlID).form;b.submit()}}function CPSelection_FormatWithEdits(){if(CPSelection_ProcessEdits()){CPSelection_FormatValueField();return true}return false}function CPSelection_ProcessEdits(){var c=true;for(var a=CPSelection_PromptControlValues.length-1;a>=0;--a){var b=CPSelection_PromptControlValues[a];if(b.validateFunction!=null){if(!b.validateFunction()){c=false}}}return c}function CPSelection_FormatValueField(){CPSelect_SetMaxOrderQuantity();var a="";var h="";for(var b=0;b<CPSelection_PromptControlValues.length;++b){var e=CPSelection_PromptControlValues[b];var c="";if(e.controlID!=null&&e.controlID!=""){var g=e.valueFunction(e.controlID);if(e.parameterFunction!=null){c=e.parameterFunction(e.controlID)}}if(b==0){a=g;h=c}else{a+=CPSelection_PromptDelimiter+g;h+=CPSelection_PromptDelimiter+c}}var f=CPSelection_GetControlById(CPSelection_ControlID);f.value=a;var d=CPSelection_GetControlById(CPSelection_ParameterID);d.value=h;if(CPDesign_IsInitialized()){CPDesign_GetDesign()}return true}function CPDesign_GetDesign(){var b=CPSelection_GetControlById(CPDesign_FlashDesignFieldName);var a=CPDesign_GetFlashMovie();if(a!=null){b.value=CPDesign_GetFlashMovie().getCustomizedXML()}}function CPSelection_GetControlById(a){var b=document.getElementById(a);if(b==null){alert("Could not find control "+a);return null}return b}function CPSelection_GetHiddenValue(a){var b=document.getElementById(a);if(b==null){alert("Could not find control "+a);return null}return b.value}function CPSelection_ShowHelp(a,b){var c=window.open("/CustomProduct/CustomHelpPopup.aspx?CType="+a+"&Prompt="+b,"CPHelpText","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=520,height=490");c.focus()}function CPDropdown_SubmitTable(a){if(a.selectedIndex==0){a.selectedIndex=1}CPSelection_Submit()}var ColorGrid_PromptCategories=new Array();var ColorGrid_ColorPrompts=new Object();var ColorGrid_PromptSelections=new Object();function ColorGrid_CategoryEntry(a,b){this.selectorID=a;this.categoryID=b}function ColorGrid_SelectionEntry(a,b,c,d){this.colorValue=a;this.isPmsInput=b;this.pmsInputRowID=c;this.pmsInputControlID=d;this.getInputRow=function(){return CPSelection_GetControlById(this.pmsInputRowID)};this.getInputValue=function(){var e=CPSelection_GetControlById(this.pmsInputControlID);return e.value}}function ColorGrid_GetSelections(a){var b=ColorGrid_PromptSelections[a];if(b==null){b=new Array();ColorGrid_PromptSelections[a]=b}return b}function ColorGrid_AddSelection(a,b,d,e,f){var c=ColorGrid_GetSelections(a);c.push(new ColorGrid_SelectionEntry(b,d,e,f))}function ColorGrid_ClearSelections(a){var c=ColorGrid_GetSelections(a);var d=c.length;for(var b=0;b<d;++b){c.pop()}}function ColorGrid_SetSelections(a,b){ColorGrid_PromptSelections[a]=b}function ColorGrid_GetPmsSelection(b,c){var e=ColorGrid_GetSelections(b);for(var a=0;a<e.length;++a){var d=e[a];if(d.colorValue==c){return d}}return null}function ColorGrid_Prompt(a,f,e,b,d,c){this.numSelections=a;this.valueFieldID=f;this.selectionDivID=e;this.delimiter=b;this.selectText=d;this.selectNextText=c}function ColorGrid_InitPrompt(c,a,h,g,b,f,e,d){ColorGrid_ColorPrompts[c]=new ColorGrid_Prompt(a,h,g,b,f,e,d)}function ColorGrid_GetPrompt(a){return ColorGrid_ColorPrompts[a]}function ColorGrid_GetPromptNameByValueID(b){for(var c in ColorGrid_ColorPrompts){var a=ColorGrid_ColorPrompts[c];if(a.valueFieldID==b){return c}}return null}function ColorGrid_OnCategoryClick(e,b,f){var g=ColorGrid_PromptCategories[b];for(var h=0;h<g.length;++h){var d=CPSelection_GetControlById(g[h].categoryID);d.style.display="none";var a=CPSelection_GetControlById(g[h].selectorID);a.className="cpColorListCategory";var c=a.nextSibling;c.style.background="url(/images/tab_right_off.gif)"}var i=CPSelection_GetControlById(f);i.style.display="block";e.className="cpColorListCategorySelected";var j=e.nextSibling;j.style.background="url(/images/tab_right_on.gif)"}function ColorGrid_LoadCategory(a,b,d){var c=ColorGrid_PromptCategories[a];if(c==null){c=new Array();ColorGrid_PromptCategories[a]=c}var e=new ColorGrid_CategoryEntry(b,d);c.push(e)}function ColorGrid_onClick(c,l,h,g,k,a){if(c.className=="cpColorListCellSelected"){return}var e=(k==null?false:true);var b=ColorGrid_GetPrompt(g);var j=ColorGrid_GetSelections(g);var f=CPSelection_GetControlById(b.selectionDivID);var d=f.innerHTML;if(j.length==b.numSelections){ColorGrid_ClearSelections(g);j=ColorGrid_GetSelections(g);ColorGrid_changeUnselected(c);d=""}if(j.length==0){ColorGrid_AddSelection(g,l,e,k,a);ColorGrid_changeSelected(c);d=h}else{ColorGrid_AddSelection(g,l,e,k,a);ColorGrid_changeSelected(c)}var i=ColorGrid_GetSelections(g);CPSelection_Submit()}function ColorGrid_GetSelectionText(a,d){var c="";if(a.length==0){c=d.selectText}else{for(var b=0;b<a.length;++b){if(b>0){c+=", "}c+=a[b].colorValue}}c+="; "+d.selectNextText;return c}function ColorGrid_changeUnselected(e){var h=e.parentNode.parentNode.parentNode;var d=h.getElementsByTagName("tr");for(var g=0;g<d.length;++g){var c=d[g];var f=c.getElementsByTagName("td");for(var b=0;b<f.length;++b){var a=f[b];if(a.childNodes.length>0&&a.childNodes[0].nodeName.toUpperCase()=="DIV"){a.childNodes[0].className="cpColorListCell"}}}}function ColorGrid_OnCategoryOver(a){if(a.className=="cpColorListCategory"){a.className="cpColorListCategoryHover"}else{a.className="cpColorListCategorySelectedHover"}}function ColorGrid_OnCategoryOut(a){if(a.className=="cpColorListCategoryHover"||a.className=="cpColorListCategory"){a.className="cpColorListCategory"}else{a.className="cpColorListCategorySelected"}}function ColorGrid_changeSelected(a){a.className="cpColorListCellSelected"}function ColorGrid_MouseOut(a){if(a.className!="cpColorListCellSelected"){a.className="cpColorListCell"}}function ColorGrid_MouseOver(a){if(a.className!="cpColorListCellSelected"){a.className="cpColorListCellHover"}}function ColorGrid_getValue(d){var g=ColorGrid_GetPromptNameByValueID(d);var c=ColorGrid_GetPrompt(g);var b=ColorGrid_GetSelections(g);var e="";var h="";for(var f=0;f<b.length;++f){var i=b[f];var a=i.colorValue;if(f==0){h=a}else{h+=c.delimiter+a}if(i.isPmsInput){var j=i.getInputValue();if(j!=null&&j!=""){e+=c.delimiter+j}}}h+=e;return h}function ColorGrid_OnPmsInputBlur(a,c,b,e,f){ColorGrid_ValidatePantone(b,e);var d=ColorGrid_GetPmsSelection(a,c);ColorGrid_ProcessPantoneInputError(a,e);if(f){CPSelection_Submit()}}function ColorGrid_ValidatePantone(a,b){var c=a.value;if(c!=null&&c!=""){c=c.toUpperCase();c=c.replace(/^ +/,"");c=c.replace(/ +$/,"");if(c.match(/^[0-9]+.*/)!=null){c="PMS "+c}else{if(c.match(/^PMS[0-9]+.*/)!=null){c="PMS "+c.substring(3)}}a.value=c}}function ColorGrid_ProcessPantoneInputError(a,h){var f=CPSelection_GetControlById(h);var g=ColorGrid_GetSelections(a);var e=false;for(var c=0;c<g.length;++c){var d=g[c];if(d.isPmsInput){var b=d.getInputValue();if(b==null||b==""){e=true;break}}}if(e){f.style.visibility="visible";CPSelection_SetErrorMsg(f.innerHTML,false)}else{f.style.visibility="hidden";CPSelection_SetErrorMsgOff(f.innerHTML,false)}}var Dimension_PageUnits=new Array();function Dimension_UnitValues(b,c,d,a){this.controlID=b;this.minValue=c;this.maxValue=d;this.unit=a}function Dimension_LoadUnit(f,c,d,e,b){var a=Dimension_PageUnits[f];if(a==null){a=new Array();Dimension_PageUnits[f]=a}a.push(new Dimension_UnitValues(c,d,e,b))}function Dimension_OnFocus(d,b){var a=b.parentNode;var c=Dimension_FindUnitData(d,b);if(c!=null){c.value=b.value}}function Dimension_FindUnitData(d,b){var c=Dimension_PageUnits[d];if(c==null){return null}for(var a=0;a<c.length;++a){if(c[a].controlID==b.id){return c[a]}}return null}function Dimension_OnBlur(e,o,c,l,h,i,b){var a=true;var f=CPSelection_GetControlById(i);var d=Dimension_PageUnits[e];if(d==null){f.innerHTML="A page error occurred.  Could not find product dimension data for the dimension "+e;return}var k=Dimension_FindUnitData(e,o);var g="";for(var j=0;j<d.length;++j){if(j>0){g+=b}var m=CPSelection_GetControlById(d[j].controlID);g+=m.value}var n=CPSelection_GetControlById(c);n.value=g;return a}function Dimension_Validate(h,g,c,f){var e=CPSelection_GetControlById(f);var b=CPSelection_GetControlById(g);var d=Dimension_PageUnits[h];if(d==null){e.innerHTML="A page error occurred.  Could not find product dimension data for the dimension "+h;return}var a=b.parentNode;if(a.style.display!="none"){return Dimension_CheckRange(d,e)}return true}function Dimension_CheckRange(a,b){b.innerHTML="";var c=false;for(var e=0;e<a.length;++e){var h=a[e];var j=document.forms[0].elements.namedItem(h.controlID);var f=h.minValue;var d=h.maxValue;var g=Number(j.value);var i=h.unit;if(c){if(isNaN(g)){b.innerHTML="Please enter a valid number.";j.focus();return false}if(g>f){b.innerHTML="Please enter a value not greater than "+a[0].maxValue+" "+a[0].unit;j.focus();return false}}else{if(isNaN(g)){b.innerHTML="Please enter a valid number between "+f+" and "+d+" "+i;j.focus();return false}if(d>1){if(g<f){b.innerHTML="Please enter a value not less than "+f+" "+i;j.focus();return false}if(g>d){b.innerHTML="Please enter a value not greater than "+d+" "+i;j.focus();return false}if(g==d){c=true}}}}return true}function Dimension_DataOnChange(d,b,g,f){var e=Dimension_PageUnits[g];if(e==null){errorSpan.innerHTML="A page error occurred.  Could not find product dimension data for the dimension "+g;return}if(d.value==f){Dimension_ShowCustom(d,e)}else{Dimension_HideCustom(d,e)}var a=CPSelection_GetControlById(b);var c=d.form.elements.namedItem(e[0].controlID);if(c.type.toLowerCase()=="text"){if(d.value==f){c.value=e[0].minValue;a.value=e[0].minValue}else{c.value=d.value;a.value=d.value}}else{if(c.type.toLowerCase()=="select"){c.selectedIndex=0;a.value=d.value}}CPSelection_Submit(d.form.id)}function Dimension_ShowCustom(a,b){Dimension_SetCustomDisplay(a,b,"visible")}function Dimension_HideCustom(a,b){Dimension_SetCustomDisplay(a,b,"hidden")}function Dimension_SetCustomDisplay(e,b,d){var a=e.parentNode.parentNode;var h=a.parentNode.getElementsByTagName("tr")[1];var c=a.getElementsByTagName("td");var i=h.getElementsByTagName("td");for(var f=0;f<b.length;++f){var g=c[1+f];g.style.visiblity=d;var j=i[1+f];j.style.visiblity=d;b[f].isCustomValue=(d=="visible")}}function CPSelect_GetValue(a){if(a.nodeName.toLowerCase()=="select"){return CPSelect_GetListboxValue(a.id)}else{if(a.type.toLowerCase()=="radio"){return CPSelect_GetRadioValue(a.id)}else{return a.value}}}function CPSelect_SetValue(b,a){if(b.nodeName.toLowerCase()=="select"){return CPSelect_SetListboxValue(b.id,a)}else{if(b.type.toLowerCase()=="radio"){return CPSelect_SetRadioValue(b.id,a)}else{b.value=a}}}function Dimension_GetValue(a){var b=CPSelection_GetControlById(a);return b.value}function CPSelect_GetListboxValue(a){var b=document.getElementById(a);return b.options[b.selectedIndex].value}function CPSelect_SetListboxValue(b,c){var d=document.getElementById(b);for(var a=0;a<d.options.length;++a){if(d.options[a].value==c){d.options[a].selected=true}}}function CPSelect_GetRadioValue(e){var g=CPSelection_GetControlById(e);var f=g.name;var d=g.form;var c=d[f].length;if(c==null){return d[f].value}for(var a=0;a<c;++a){var b=d[f][a];if(b.checked){return b.value}}return""}function CPSelect_SetRadioValue(e,f){var h=CPSelection_GetControlById(e);var g=h.name;var d=h.form;var c=d[g].length;for(var a=0;a<c;++a){var b=d[g][a];if(b.value==f){b.checked=true}}}var CPSelect_CheckGroupPrompts=new Object();var CPSelect_CheckGroupSelections=new Object();var CPSelect_CheckGroupToggleState_Collapse="C";var CPSelect_CheckGroupToggleState_Expand="E";function CPSelect_CheckGroupPrompt(b,f,a,c,d,e){this.attributeName=b;this.valueFieldID=f;this.toggleImageID=a;this.ruleID=c;this.controlRegionID=d;this.expandState=e}function CPSelect_InitCheckGroupPrompt(b,f,a,c,d,e){CPSelect_CheckGroupPrompts[b]=new CPSelect_CheckGroupPrompt(b,f,a,c,d,e)}function CPSelect_GetCheckGroupPrompt(a){return CPSelect_CheckGroupPrompts[a]}function CPSelect_GroupCheckGroupPromptByValueID(b){for(var c in CPSelect_CheckGroupPrompts){var a=CPSelect_CheckGroupPrompts[c];if(a.valueFieldID==b){return c}}return null}function CPSelect_CheckGroupEntry(a){this.value=a}function CPSelect_AddCheckGroupSelection(a,c){var b=CPSelect_GetCheckGroupSelections(a);b.push(new CPSelect_CheckGroupEntry(c))}function CPSelect_RemoveCheckGroupSelection(a,e){var d=CPSelect_GetCheckGroupSelections(a);for(var b=0;b<d.length;++b){var c=d[b];if(c.value==e){d.splice(b,1);break}}}function CPSelect_CheckGroupOnClick(d,b,a){var c=CPSelect_GetCheckGroupSelections(a);if(d.checked){CPSelect_AddCheckGroupSelection(a,b)}else{CPSelect_RemoveCheckGroupSelection(a,b)}CPSelection_Submit()}function CPSelect_GetCheckGroupSelections(a){var b=CPSelect_CheckGroupSelections[a];if(b==null){b=new Array();CPSelect_CheckGroupSelections[a]=b}return b}function CPSelect_GetCheckGroupValue(e){var b=CPSelect_GroupCheckGroupPromptByValueID(e);var d=CPSelect_GetCheckGroupSelections(b);var f="";for(var a=0;a<d.length;++a){var c=d[a];var g=c.value;if(a==0){f=g}else{f+="~"+g}}return f}function CPSelect_CheckGroupToggle(g){var c=CPSelect_GroupCheckGroupPromptByValueID(g);var b=CPSelect_GetCheckGroupPrompt(c);var a="";var f="";var d=CPSelection_GetControlById(b.toggleImageID);if(b.expandState.toUpperCase()==CPSelect_CheckGroupToggleState_Collapse){a="none";b.expandState=CPSelect_CheckGroupToggleState_Expand;d.src="/images/en-US/CustomProduct/MinusCollapse.gif"}else{f="none";b.expandState=CPSelect_CheckGroupToggleState_Collapse;d.src="/images/en-US/CustomProduct/PlusExpand.gif"}var e=CPSelection_GetControlById(b.ruleID);e.style.display=a;var h=CPSelection_GetControlById(b.controlRegionID);h.style.display=f}function CPSelect_CheckGroupGetParameter(c){var b=CPSelect_GroupCheckGroupPromptByValueID(c);var a=CPSelect_GetCheckGroupPrompt(b);return a.expandState}function CPSelect_ImageOnClick(c,a,d,b){var e=CPSelection_GetControlById(c);e.value=d;var f=e.form;CPSelection_Submit(f.id)}function CPDesign_HasSequence(b){var a=document.getElementById("ConsecutiveNumbering");if(a!=null){if(b==true){a.value="Yes"}else{a.value="No"}}}var CPDesign_CopyBreaks=new Array();function CPDesign_CopyBreak(b,a){this.value=b;this.messageID=a}function CPDesign_AddCopyBreak(b,a){CPDesign_CopyBreaks.push(new CPDesign_CopyBreak(b,a))}function CPDesign_SetMaxCopyLength(c){var b=document.getElementById("MaxCopyLengthPixels");if(b!=null){var d=0;if(c>0){d=CPDesign_CopyBreaks.length-1;for(var a=0;a<CPDesign_CopyBreaks.length;++a){if(c<CPDesign_CopyBreaks[a].value){d=a-1;break}}}b.value=CPDesign_CopyBreaks[d].value;CPDesign_InitCopyBreakMessage()}}function CPDesign_InitCopyBreakMessage(){var e=document.getElementById("MaxCopyLengthPixels");if(e!=null){var d=e.value;for(var b=0;b<CPDesign_CopyBreaks.length;++b){if(CPDesign_CopyBreaks[b].messageID!=null){var a=CPDesign_CopyBreaks[b];var c=document.getElementById(a.messageID);if(d==a.value){c.style.display="";CPSelection_SetErrorMsg(document.getElementById(CPDesign_CopyBreaks[b].messageID).innerHTML,false)}else{c.style.display="none";CPSelection_SetErrorMsgOff(document.getElementById(CPDesign_CopyBreaks[b].messageID).innerHTML,false)}}}}}var CPSelect_QuantityBreaks=new Array();function CPSelect_AddQuantityBreak(a){CPSelect_QuantityBreaks.push(a)}var CPSelect_QuantityControlID=null;var CPSelect_CartonQuantity=1;var CPSelect_ConvFactor=1;function CPSelect_InitQuantityControl(c,a,b){CPSelect_QuantityControlID=c;if(a!=null){CPSelect_CartonQuantity=a}if(b!=null){CPSelect_ConvFactor=b}}function CPSelect_SetMaxOrderQuantity(){var e=document.getElementById("MaxOrderQuantity");var c=document.getElementById(CPSelect_QuantityControlID);if(e!=null&&c!=null){var b=c.value;var d=0;if(b>0){b*=CPSelect_CartonQuantity/CPSelect_ConvFactor;d=CPSelect_QuantityBreaks.length-1;for(var a=0;a<CPSelect_QuantityBreaks.length;++a){if(b<CPSelect_QuantityBreaks[a]){d=a-1;break}}}e.value=CPSelect_QuantityBreaks[d]}}var CPSelect_DollarBreaks=new Array();function CPSelect_AddDollarBreak(a){CPSelect_DollarBreaks.push(a)}var CPSelect_Price=0;function CPSelect_InitDollarControl(a){CPSelect_Price=a}function CPSelect_SetMaxOrderDollars(){var b=document.getElementById("MaxOrderDollars");var e=document.getElementById(CPSelect_PriceControlID);if(b!=null&&e!=null){var c=e.value;var d=0;if(c>0){d=CPSelect_DollarBreaks.length-1;for(var a=0;a<CPSelect_DollarBreaks.length;++a){if(c<CPSelect_DollarBreaks[a]){d=a-1;break}}}b.value=CPSelect_DollarBreaks[d]}}var CPSelect_HasArtworkControlID=null;function CPSelect_SetHasArtworkParameters(a){CPSelect_HasArtworkControlID=a}function CPSelect_SetHasArtwork(){if(CPSelect_HasArtworkControlID!=null){var a=document.getElementById(CPSelect_HasArtworkControlID);if(a!=null){if(a.type&&a.type=="radio"){CPSelect_SetRadioValue(CPSelect_HasArtworkControlID,"Yes")}else{a.value="Yes"}}}}var CPDesign_NumInksControlID;var CPDesign_InkControlID;function CPDesign_InitInks(b,a){CPDesign_InkControlID=b;CPDesign_NumInksControlID=a}function CPDesign_SetInks(g){var f=g.split("\t");var h=f.length;if(CPDesign_NumInksControlID!=null){var d=CPSelection_GetControlById(CPDesign_NumInksControlID);CPSelect_SetValue(d,h)}var e=ColorGrid_GetPromptNameByValueID(CPDesign_InkControlID);var b=ColorGrid_GetPrompt(e);var a=ColorGrid_GetSelections(e);var i=new Array();for(var c in f){i.push(a[f[c]])}ColorGrid_SetSelections(e,i)}function CPDesign_GetNumInks(){if(CPDesign_NumInksControlID!=null){var a=CPSelection_GetControlById(CPDesign_NumInksControlID);return CPSelect_GetValue(a)}}function CPOpenPrintDesign(b){var a=window.open("PrintDesign.aspx?CID="+b,"PrintDesign","menubar=0,resizable=1,scrollbars=1,width=700,height=700");if(a==null){alert("Please disable pop-up blocking to display print window.")}return false}var CPSelection_DoesPageDisplayLoading=false;var CPSelection_HasPageLoaded=false;var CPSelection_DoesFlashDisplayLoading=false;var CPSelection_HasFlashLoaded=false;function CPSelection_PageDisplaysLoading(a){CPSelection_DoesPageDisplayLoading=a}function CPSelection_FlashDisplaysLoading(a){CPSelection_DoesFlashDisplayLoading=a}function HideLoading(){CPSelection_HasFlashLoaded=true;if(CPSelection_HasPageLoaded||!CPSelection_DoesPageDisplayLoading){HideLoadingImpl()}}function HideLoading_Page(){CPSelection_HasPageLoaded=true;if(CPSelection_HasFlashLoaded||!CPSelection_DoesFlashDisplayLoading){HideLoadingImpl()}}function DisplayLoading_Page(){CPSelection_PageDisplaysLoading(true);DisplayLoadingImpl()}function DisplayLoading(){CPSelection_FlashDisplaysLoading(true);DisplayLoadingImpl()}function DisplayLoadingImpl(){var a=document.getElementById("progressBackgroundFilter");a.style.display="";a=document.getElementById("processMessage");a.style.display="";ControlSELECTItems("disable")}function HideLoadingImpl(){HideLoadingWindow();ControlSELECTItems("")}function HideLoadingWindow(){var a=document.getElementById("progressBackgroundFilter");a.style.display="none";a=document.getElementById("processMessage");a.style.display="none"}var clickCnt=0;function checkHide(a){if(a.ctrlKey&&a.shiftKey&&a.altKey){clickCnt++}if(clickCnt>=5){HideLoadingWindow();CPIsReadOnly=false;clickCnt=0}}function ControlSELECTItems(c){var e=(Sys.Browser.agent==Sys.Browser.InternetExplorer&&Sys.Browser.version<7);if(e){var b=document.getElementsByTagName("SELECT");for(var d=0;d<b.length;d++){if(c=="disable"){var a=b[d];a.style.visibility="hidden"}else{b[d].style.visibility=""}}}}var CPSelection_ItemNumber=null;var CPSelection_Quantity=null;var CPSelection_ErrorMsg="";var CPSelection_UserCPRole=null;function CPSelection_SetItemNumber(a){CPSelection_ItemNumber=a}function CPSelection_GetErrorMsg(){CPSelection_SetJavaVariable(CPSelection_ErrorMsg)}function CPSelection_SetErrorMsg(b,a){if(CPSelection_ErrorMsg==null||CPSelection_ErrorMsg==""||a==true){CPSelection_ErrorMsg=b;CPSelection_NotifyCSR()}}function CPSelection_SetErrorMsgOff(b,a){if(CPSelection_ErrorMsg==b||a==true){CPSelection_ErrorMsg="";CPSelection_NotifyCSR()}}function CPSelection_GetItemNumber(){CPSelection_SetJavaVariable(CPSelection_ItemNumber)}function CPSelection_SetQuantity(a){CPSelection_Quantity=a}function CPSelection_SetQuantity(a){CPSelection_Quantity=a}function CPSelection_GetQuantity(){CPSelection_SetJavaVariable(CPSelection_Quantity)}function CPSelection_SetJavaVariable(a){window.location=window.location.href.split("#")[0]+"#"+a}function CPSelection_ScaleImage(c,b,a){if(c.scrollHeight>a){c.style.height=a}if(c.scrollWidth>b){c.style.width=b;c.style.height=null}}function CPSelection_SetUserCPRole(a){CPSelection_UserCPRole=a}function CPSelection_NotifyCSR(){if(CPSelection_UserCPRole!=null&&CPSelection_UserCPRole=="CSR"){document.title="Done"}}var CPSelection_DesignCountControlID;var CPSelection_DesignCountStoredValue;function CPSelection_RegisterDesignCount(a,b){CPSelection_DesignCountControlID=a;CPSelection_DesignCountStoredValue=b}function CPSelection_GetDesignCount(){var a;if(CPSelection_DesignCountStoredValue!=null){a=CPSelection_DesignCountStoredValue}else{if(CPSelection_DesignCountControlID!=null){var b=document.getElementById(CPSelection_DesignCountControlID);if(b!=null){a=b.value}else{a=1}}else{a=1}}CPSelection_SetJavaVariable(a)};