if(typeof Effect=="undefined"){throw ("controls.js requires including script.aculo.us' effects.js library")
}var Autocompleter={};Autocompleter.Base=Class.create({baseInitialize:function(B,C,A){B=$(B);this.element=B;
this.update=$(C);this.hasFocus=false;this.changed=false;this.active=false;this.index=0;this.entryCount=0;
this.oldElementValue=this.element.value;if(this.setOptions){this.setOptions(A)}else{this.options=A||{}
}this.options.paramName=this.options.paramName||this.element.name;this.options.tokens=this.options.tokens||[];
this.options.frequency=this.options.frequency||0.4;this.options.minChars=this.options.minChars||1;this.options.onShow=this.options.onShow||function(D,E){if(!E.style.position||E.style.position=="absolute"){E.style.position="absolute";
Position.clone(D,E,{setHeight:false,offsetTop:D.offsetHeight})}Effect.Appear(E,{duration:0.15})};this.options.onHide=this.options.onHide||function(D,E){new Effect.Fade(E,{duration:0.15})
};if(typeof (this.options.tokens)=="string"){this.options.tokens=new Array(this.options.tokens)}if(!this.options.tokens.include("\n")){this.options.tokens.push("\n")
}this.observer=null;this.element.setAttribute("autocomplete","off");this.element.up("form").setAttribute("autocomplete","off");
Element.hide(this.update);Event.observe(this.element,"blur",this.onBlur.bindAsEventListener(this));if(Prototype.Browser.Gecko){Event.observe(this.element,"keypress",this.onKeyPress.bindAsEventListener(this))
}else{Event.observe(this.element,"keydown",this.onKeyPress.bindAsEventListener(this))}},show:function(){if(Element.getStyle(this.update,"display")=="none"){this.options.onShow(this.element,this.update)
}if(!this.iefix&&(Prototype.Browser.IE)&&(Element.getStyle(this.update,"position")=="absolute")){new Insertion.After(this.update,'<iframe id="'+this.update.id+'_iefix" '+'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" '+'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
this.iefix=$(this.update.id+"_iefix")}if(this.iefix){setTimeout(this.fixIEOverlapping.bind(this),50)}},fixIEOverlapping:function(){Position.clone(this.update,this.iefix,{setTop:(!this.update.style.height)});
this.iefix.style.zIndex=1;this.update.style.zIndex=2;Element.show(this.iefix)},hide:function(){this.stopIndicator();
if(Element.getStyle(this.update,"display")!="none"){this.options.onHide(this.element,this.update)}if(this.iefix){Element.hide(this.iefix)
}},startIndicator:function(){if(this.options.indicator){Element.show(this.options.indicator)}},stopIndicator:function(){if(this.options.indicator){Element.hide(this.options.indicator)
}},onKeyPress:function(A){if(this.active){switch(A.keyCode){case Event.KEY_TAB:case Event.KEY_RETURN:this.selectEntry();
Event.stop(A);case Event.KEY_ESC:this.hide();this.active=false;Event.stop(A);return ;case Event.KEY_LEFT:case Event.KEY_RIGHT:return ;
case Event.KEY_UP:this.markPrevious();this.render();if(Prototype.Browser.WebKit){Event.stop(A)}return ;
case Event.KEY_DOWN:this.markNext();this.render();if(Prototype.Browser.WebKit){Event.stop(A)}return }}else{if(A.keyCode==Event.KEY_TAB||A.keyCode==Event.KEY_RETURN||(Prototype.Browser.WebKit>0&&A.keyCode==0)){return 
}}this.changed=true;this.hasFocus=true;if(this.observer){clearTimeout(this.observer)}this.observer=setTimeout(this.onObserverEvent.bind(this),this.options.frequency*1000)
},activate:function(){this.changed=false;this.hasFocus=true;this.getUpdatedChoices()},onHover:function(B){var A=Event.findElement(B,"LI");
if(this.index!=A.autocompleteIndex){this.index=A.autocompleteIndex;this.render()}Event.stop(B)},onClick:function(B){var A=Event.findElement(B,"LI");
this.index=A.autocompleteIndex;this.selectEntry();this.hide()},onBlur:function(A){setTimeout(this.hide.bind(this),250);
this.hasFocus=false;this.active=false},render:function(){if(this.entryCount>0){for(var A=0;A<this.entryCount;
A++){this.index==A?Element.addClassName(this.getEntry(A),"selected"):Element.removeClassName(this.getEntry(A),"selected")
}if(this.hasFocus){this.show();this.active=true}}else{this.active=false;this.hide()}},markPrevious:function(){if(this.index>0){this.index--
}else{this.index=this.entryCount-1}},markNext:function(){if(this.index<this.entryCount-1){this.index++
}else{this.index=0}},getEntry:function(A){return this.update.firstChild.childNodes[A]},getCurrentEntry:function(){return this.getEntry(this.index)
},selectEntry:function(){this.active=false;this.updateElement(this.getCurrentEntry())},updateElement:function(F){if(this.options.updateElement){this.options.updateElement(F);
return }var D="";if(this.options.select){var A=$(F).select("."+this.options.select)||[];if(A.length>0){D=Element.collectTextNodes(A[0],this.options.select)
}}else{D=Element.collectTextNodesIgnoreClass(F,"informal")}var C=this.getTokenBounds();if(C[0]!=-1){var E=this.element.value.substr(0,C[0]);
var B=this.element.value.substr(C[0]).match(/^\s+/);if(B){E+=B[0]}this.element.value=E+D+this.element.value.substr(C[1])
}else{this.element.value=D}this.oldElementValue=this.element.value;this.element.focus();if(this.options.afterUpdateElement){this.options.afterUpdateElement(this.element,F)
}},updateChoices:function(C){if(!this.changed&&this.hasFocus){this.update.innerHTML=C;Element.cleanWhitespace(this.update);
Element.cleanWhitespace(this.update.down());if(this.update.firstChild&&this.update.down().childNodes){this.entryCount=this.update.down().childNodes.length;
for(var A=0;A<this.entryCount;A++){var B=this.getEntry(A);B.autocompleteIndex=A;this.addObservers(B)}}else{this.entryCount=0
}this.stopIndicator();this.index=0;if(this.entryCount==1&&this.options.autoSelect){this.selectEntry();
this.hide()}else{this.render()}}},addObservers:function(A){Event.observe(A,"mouseover",this.onHover.bindAsEventListener(this));
Event.observe(A,"click",this.onClick.bindAsEventListener(this))},onObserverEvent:function(){this.changed=false;
this.tokenBounds=null;if(this.getToken().length>=this.options.minChars){this.getUpdatedChoices()}else{this.active=false;
this.hide()}this.oldElementValue=this.element.value},getToken:function(){var A=this.getTokenBounds();
return this.element.value.substring(A[0],A[1]).strip()},getTokenBounds:function(){if(null!=this.tokenBounds){return this.tokenBounds
}var E=this.element.value;if(E.strip().empty()){return[-1,0]}var F=arguments.callee.getFirstDifferencePos(E,this.oldElementValue);
var H=(F==this.oldElementValue.length?1:0);var D=-1,C=E.length;var G;for(var B=0,A=this.options.tokens.length;
B<A;++B){G=E.lastIndexOf(this.options.tokens[B],F+H-1);if(G>D){D=G}G=E.indexOf(this.options.tokens[B],F+H);
if(-1!=G&&G<C){C=G}}return(this.tokenBounds=[D+1,C])}});Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos=function(C,A){var D=Math.min(C.length,A.length);
for(var B=0;B<D;++B){if(C[B]!=A[B]){return B}}return D};Ajax.Autocompleter=Class.create(Autocompleter.Base,{initialize:function(C,D,B,A){this.baseInitialize(C,D,A);
this.options.asynchronous=true;this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=this.options.parameters||null;
this.url=B},getUpdatedChoices:function(){this.startIndicator();var A=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());
this.options.parameters=this.options.callback?this.options.callback(this.element,A):A;if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams
}new Ajax.Request(this.url,this.options)},onComplete:function(A){this.updateChoices(A.responseText)}});
Autocompleter.Local=Class.create(Autocompleter.Base,{initialize:function(B,D,C,A){this.baseInitialize(B,D,A);
this.options.array=C},getUpdatedChoices:function(){this.updateChoices(this.options.selector(this))},setOptions:function(A){this.options=Object.extend({choices:10,partialSearch:true,partialChars:2,ignoreCase:true,fullSearch:false,selector:function(B){var D=[];
var C=[];var H=B.getToken();var G=0;for(var E=0;E<B.options.array.length&&D.length<B.options.choices;
E++){var F=B.options.array[E];var I=B.options.ignoreCase?F.toLowerCase().indexOf(H.toLowerCase()):F.indexOf(H);
while(I!=-1){if(I==0&&F.length!=H.length){D.push("<li><strong>"+F.substr(0,H.length)+"</strong>"+F.substr(H.length)+"</li>");
break}else{if(H.length>=B.options.partialChars&&B.options.partialSearch&&I!=-1){if(B.options.fullSearch||/\s/.test(F.substr(I-1,1))){C.push("<li>"+F.substr(0,I)+"<strong>"+F.substr(I,H.length)+"</strong>"+F.substr(I+H.length)+"</li>");
break}}}I=B.options.ignoreCase?F.toLowerCase().indexOf(H.toLowerCase(),I+1):F.indexOf(H,I+1)}}if(C.length){D=D.concat(C.slice(0,B.options.choices-D.length))
}return"<ul>"+D.join("")+"</ul>"}},A||{})}});Field.scrollFreeActivate=function(A){setTimeout(function(){Field.activate(A)
},1)};Ajax.InPlaceEditor=Class.create({initialize:function(C,B,A){this.url=B;this.element=C=$(C);this.prepareOptions();
this._controls={};arguments.callee.dealWithDeprecatedOptions(A);Object.extend(this.options,A||{});if(!this.options.formId&&this.element.id){this.options.formId=this.element.id+"-inplaceeditor";
if($(this.options.formId)){this.options.formId=""}}if(this.options.externalControl){this.options.externalControl=$(this.options.externalControl)
}if(!this.options.externalControl){this.options.externalControlOnly=false}this._originalBackground=this.element.getStyle("background-color")||"transparent";
this.element.title=this.options.clickToEditText;this._boundCancelHandler=this.handleFormCancellation.bind(this);
this._boundComplete=(this.options.onComplete||Prototype.emptyFunction).bind(this);this._boundFailureHandler=this.handleAJAXFailure.bind(this);
this._boundSubmitHandler=this.handleFormSubmission.bind(this);this._boundWrapperHandler=this.wrapUp.bind(this);
this.registerListeners()},checkForEscapeOrReturn:function(A){if(!this._editing||A.ctrlKey||A.altKey||A.shiftKey){return 
}if(Event.KEY_ESC==A.keyCode){this.handleFormCancellation(A)}else{if(Event.KEY_RETURN==A.keyCode){this.handleFormSubmission(A)
}}},createControl:function(G,C,B){var E=this.options[G+"Control"];var F=this.options[G+"Text"];if("button"==E){var A=document.createElement("input");
A.type="submit";A.value=F;A.className="editor_"+G+"_button";if("cancel"==G){A.onclick=this._boundCancelHandler
}this._form.appendChild(A);this._controls[G]=A}else{if("link"==E){var D=document.createElement("a");D.href="#";
D.appendChild(document.createTextNode(F));D.onclick="cancel"==G?this._boundCancelHandler:this._boundSubmitHandler;
D.className="editor_"+G+"_link";if(B){D.className+=" "+B}this._form.appendChild(D);this._controls[G]=D
}}},createEditField:function(){var C=(this.options.loadTextURL?this.options.loadingText:this.getText());
var B;if(1>=this.options.rows&&!/\r|\n/.test(this.getText())){B=document.createElement("input");B.type="text";
var A=this.options.size||this.options.cols||0;if(0<A){B.size=A}}else{B=document.createElement("textarea");
B.rows=(1>=this.options.rows?this.options.autoRows:this.options.rows);B.cols=this.options.cols||40}B.name=this.options.paramName;
B.value=C;B.className="editor_field";if(this.options.submitOnBlur){B.onblur=this._boundSubmitHandler}this._controls.editor=B;
if(this.options.loadTextURL){this.loadExternalText()}this._form.appendChild(this._controls.editor)},createForm:function(){var B=this;
function A(D,E){var C=B.options["text"+D+"Controls"];if(!C||E===false){return }B._form.appendChild(document.createTextNode(C))
}this._form=$(document.createElement("form"));this._form.id=this.options.formId;this._form.addClassName(this.options.formClassName);
this._form.onsubmit=this._boundSubmitHandler;this.createEditField();if("textarea"==this._controls.editor.tagName.toLowerCase()){this._form.appendChild(document.createElement("br"))
}if(this.options.onFormCustomization){this.options.onFormCustomization(this,this._form)}A("Before",this.options.okControl||this.options.cancelControl);
this.createControl("ok",this._boundSubmitHandler);A("Between",this.options.okControl&&this.options.cancelControl);
this.createControl("cancel",this._boundCancelHandler,"editor_cancel");A("After",this.options.okControl||this.options.cancelControl)
},destroy:function(){if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML}this.leaveEditMode();
this.unregisterListeners()},enterEditMode:function(A){if(this._saving||this._editing){return }this._editing=true;
this.triggerCallback("onEnterEditMode");if(this.options.externalControl){this.options.externalControl.hide()
}this.element.hide();this.createForm();this.element.parentNode.insertBefore(this._form,this.element);
if(!this.options.loadTextURL){this.postProcessEditField()}if(A){Event.stop(A)}},enterHover:function(A){if(this.options.hoverClassName){this.element.addClassName(this.options.hoverClassName)
}if(this._saving){return }this.triggerCallback("onEnterHover")},getText:function(){return this.element.innerHTML
},handleAJAXFailure:function(A){this.triggerCallback("onFailure",A);if(this._oldInnerHTML){this.element.innerHTML=this._oldInnerHTML;
this._oldInnerHTML=null}},handleFormCancellation:function(A){this.wrapUp();if(A){Event.stop(A)}},handleFormSubmission:function(D){var B=this._form;
var C=$F(this._controls.editor);this.prepareSubmission();var E=this.options.callback(B,C)||"";if(Object.isString(E)){E=E.toQueryParams()
}E.editorId=this.element.id;if(this.options.htmlResponse){var A=Object.extend({evalScripts:true},this.options.ajaxOptions);
Object.extend(A,{parameters:E,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});
new Ajax.Updater({success:this.element},this.url,A)}else{var A=Object.extend({method:"get"},this.options.ajaxOptions);
Object.extend(A,{parameters:E,onComplete:this._boundWrapperHandler,onFailure:this._boundFailureHandler});
new Ajax.Request(this.url,A)}if(D){Event.stop(D)}},leaveEditMode:function(){this.element.removeClassName(this.options.savingClassName);
this.removeForm();this.leaveHover();this.element.style.backgroundColor=this._originalBackground;this.element.show();
if(this.options.externalControl){this.options.externalControl.show()}this._saving=false;this._editing=false;
this._oldInnerHTML=null;this.triggerCallback("onLeaveEditMode")},leaveHover:function(A){if(this.options.hoverClassName){this.element.removeClassName(this.options.hoverClassName)
}if(this._saving){return }this.triggerCallback("onLeaveHover")},loadExternalText:function(){this._form.addClassName(this.options.loadingClassName);
this._controls.editor.disabled=true;var A=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(A,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(C){this._form.removeClassName(this.options.loadingClassName);
var B=C.responseText;if(this.options.stripLoadedTextTags){B=B.stripTags()}this._controls.editor.value=B;
this._controls.editor.disabled=false;this.postProcessEditField()}.bind(this),onFailure:this._boundFailureHandler});
new Ajax.Request(this.options.loadTextURL,A)},postProcessEditField:function(){var A=this.options.fieldPostCreation;
if(A){$(this._controls.editor)["focus"==A?"focus":"activate"]()}},prepareOptions:function(){this.options=Object.clone(Ajax.InPlaceEditor.DefaultOptions);
Object.extend(this.options,Ajax.InPlaceEditor.DefaultCallbacks);[this._extraDefaultOptions].flatten().compact().each(function(A){Object.extend(this.options,A)
}.bind(this))},prepareSubmission:function(){this._saving=true;this.removeForm();this.leaveHover();this.showSaving()
},registerListeners:function(){this._listeners={};var A;$H(Ajax.InPlaceEditor.Listeners).each(function(B){A=this[B.value].bind(this);
this._listeners[B.key]=A;if(!this.options.externalControlOnly){this.element.observe(B.key,A)}if(this.options.externalControl){this.options.externalControl.observe(B.key,A)
}}.bind(this))},removeForm:function(){if(!this._form){return }this._form.remove();this._form=null;this._controls={}
},showSaving:function(){this._oldInnerHTML=this.element.innerHTML;this.element.innerHTML=this.options.savingText;
this.element.addClassName(this.options.savingClassName);this.element.style.backgroundColor=this._originalBackground;
this.element.show()},triggerCallback:function(B,A){if("function"==typeof this.options[B]){this.options[B](this,A)
}},unregisterListeners:function(){$H(this._listeners).each(function(A){if(!this.options.externalControlOnly){this.element.stopObserving(A.key,A.value)
}if(this.options.externalControl){this.options.externalControl.stopObserving(A.key,A.value)}}.bind(this))
},wrapUp:function(A){this.leaveEditMode();this._boundComplete(A,this.element)}});Object.extend(Ajax.InPlaceEditor.prototype,{dispose:Ajax.InPlaceEditor.prototype.destroy});
Ajax.InPlaceCollectionEditor=Class.create(Ajax.InPlaceEditor,{initialize:function($super,C,B,A){this._extraDefaultOptions=Ajax.InPlaceCollectionEditor.DefaultOptions;
$super(C,B,A)},createEditField:function(){var A=document.createElement("select");A.name=this.options.paramName;
A.size=1;this._controls.editor=A;this._collection=this.options.collection||[];if(this.options.loadCollectionURL){this.loadCollection()
}else{this.checkForExternalText()}this._form.appendChild(this._controls.editor)},loadCollection:function(){this._form.addClassName(this.options.loadingClassName);
this.showLoadingText(this.options.loadingCollectionText);var options=Object.extend({method:"get"},this.options.ajaxOptions);
Object.extend(options,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(transport){var js=transport.responseText.strip();
if(!/^\[.*\]$/.test(js)){throw"Server returned an invalid collection representation."}this._collection=eval(js);
this.checkForExternalText()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadCollectionURL,options)
},showLoadingText:function(B){this._controls.editor.disabled=true;var A=this._controls.editor.firstChild;
if(!A){A=document.createElement("option");A.value="";this._controls.editor.appendChild(A);A.selected=true
}A.update((B||"").stripScripts().stripTags())},checkForExternalText:function(){this._text=this.getText();
if(this.options.loadTextURL){this.loadExternalText()}else{this.buildOptionList()}},loadExternalText:function(){this.showLoadingText(this.options.loadingText);
var A=Object.extend({method:"get"},this.options.ajaxOptions);Object.extend(A,{parameters:"editorId="+encodeURIComponent(this.element.id),onComplete:Prototype.emptyFunction,onSuccess:function(B){this._text=B.responseText.strip();
this.buildOptionList()}.bind(this),onFailure:this.onFailure});new Ajax.Request(this.options.loadTextURL,A)
},buildOptionList:function(){this._form.removeClassName(this.options.loadingClassName);this._collection=this._collection.map(function(D){return 2===D.length?D:[D,D].flatten()
});var B=("value" in this.options)?this.options.value:this._text;var A=this._collection.any(function(D){return D[0]==B
}.bind(this));this._controls.editor.update("");var C;this._collection.each(function(E,D){C=document.createElement("option");
C.value=E[0];C.selected=A?E[0]==B:0==D;C.appendChild(document.createTextNode(E[1]));this._controls.editor.appendChild(C)
}.bind(this));this._controls.editor.disabled=false;Field.scrollFreeActivate(this._controls.editor)}});
Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions=function(A){if(!A){return }function B(C,D){if(C in A||D===undefined){return 
}A[C]=D}B("cancelControl",(A.cancelLink?"link":(A.cancelButton?"button":A.cancelLink==A.cancelButton==false?false:undefined)));
B("okControl",(A.okLink?"link":(A.okButton?"button":A.okLink==A.okButton==false?false:undefined)));B("highlightColor",A.highlightcolor);
B("highlightEndColor",A.highlightendcolor)};Object.extend(Ajax.InPlaceEditor,{DefaultOptions:{ajaxOptions:{},autoRows:3,cancelControl:"link",cancelText:"cancel",clickToEditText:"Click to edit",externalControl:null,externalControlOnly:false,fieldPostCreation:"activate",formClassName:"inplaceeditor-form",formId:null,highlightColor:"#ffff99",highlightEndColor:"#ffffff",hoverClassName:"",htmlResponse:true,loadingClassName:"inplaceeditor-loading",loadingText:"Loading...",okControl:"button",okText:"ok",paramName:"value",rows:1,savingClassName:"inplaceeditor-saving",savingText:"Saving...",size:0,stripLoadedTextTags:false,submitOnBlur:false,textAfterControls:"",textBeforeControls:"",textBetweenControls:""},DefaultCallbacks:{callback:function(A){return Form.serialize(A)
},onComplete:function(B,A){new Effect.Highlight(A,{startcolor:this.options.highlightColor,keepBackgroundImage:true})
},onEnterEditMode:null,onEnterHover:function(A){A.element.style.backgroundColor=A.options.highlightColor;
if(A._effect){A._effect.cancel()}},onFailure:function(B,A){alert("Error communication with the server: "+B.responseText.stripTags())
},onFormCustomization:null,onLeaveEditMode:null,onLeaveHover:function(A){A._effect=new Effect.Highlight(A.element,{startcolor:A.options.highlightColor,endcolor:A.options.highlightEndColor,restorecolor:A._originalBackground,keepBackgroundImage:true})
}},Listeners:{click:"enterEditMode",keydown:"checkForEscapeOrReturn",mouseover:"enterHover",mouseout:"leaveHover"}});
Ajax.InPlaceCollectionEditor.DefaultOptions={loadingCollectionText:"Loading options..."};Form.Element.DelayedObserver=Class.create({initialize:function(B,A,C){this.delay=A||0.5;
this.element=$(B);this.callback=C;this.timer=null;this.lastValue=$F(this.element);Event.observe(this.element,"keyup",this.delayedListener.bindAsEventListener(this))
},delayedListener:function(A){if(this.lastValue==$F(this.element)){return }if(this.timer){clearTimeout(this.timer)
}this.timer=setTimeout(this.onTimerEvent.bind(this),this.delay*1000);this.lastValue=$F(this.element)},onTimerEvent:function(){this.timer=null;
this.callback(this.element,$F(this.element))}});var Prototip={Version:"1.1.0",REQUIRED_Prototype:"1.6.0",REQUIRED_Scriptaculous:"1.8.0",start:function(){this.require("Prototype")
},require:function(A){if((typeof window[A]=="undefined")||(this.convertVersionString(window[A].Version)<this.convertVersionString(this["REQUIRED_"+A]))){throw ("Prototip requires "+A+" >= "+this["REQUIRED_"+A])
}},convertVersionString:function(A){var B=A.split(".");return parseInt(B[0])*100000+parseInt(B[1])*1000+parseInt(B[2])
},viewport:{getDimensions:function(){var A={};var C=Prototype.Browser;$w("width height").each(function(E){var B=E.capitalize();
if(C.Opera){A[E]=document.body["client"+B]}else{if(C.WebKit){A[E]=self["inner"+B]}else{A[E]=document.documentElement["client"+B]
}}});return A}}};Prototip.start();var Tips={closeButtons:false,zIndex:5000000,fixIE:(function(B){var A=new RegExp("MSIE ([\\d.]+)").exec(B);
return A?(parseFloat(A[1])<=6):false})(navigator.userAgent),tips:[],visible:[],add:function(A){this.tips.push(A)
},remove:function(A){var B=this.tips.find(function(C){return C.element==$(A)});if(B){B.deactivate();if(B.tooltip){B.wrapper.remove();
if(Tips.fixIE){B.iframeShim.remove()}}this.tips=this.tips.without(B)}},zIndexRestore:5000000,raise:function(C){var A=this.zIndexHighest();
if(!A){C.style.zIndex=this.zIndexRestore;return }var B=(C.style.zIndex!=A)?A+1:A;this.tips.pluck("wrapper").invoke("removeClassName","highest");
C.setStyle({zIndex:B}).addClassName("highest")},zIndexHighest:function(){var A=this.visible.max(function(B){return B.style.zIndex
});return A},addVisibile:function(A){this.removeVisible(A);this.visible.push(A)},removeVisible:function(A){this.visible=this.visible.without(A)
}};var Tip=Class.create({initialize:function(A,B){this.element=$(A);Tips.remove(this.element);this.content=B;
var D=(arguments[2]&&arguments[2].hook);var C=(arguments[2]&&arguments[2].showOn=="click");this.options=Object.extend({className:"default",closeButton:Tips.closeButtons,delay:!C?0.2:false,duration:0.3,effect:false,hideOn:"mouseout",hook:false,offset:D?{x:0,y:0}:{x:16,y:16},fixed:D?true:false,showOn:"mousemove",target:this.element,title:false,memType:"tip",viewport:D?false:true},arguments[2]||{});
this.target=$(this.options.target);this.setup();if(this.options.effect){Prototip.require("Scriptaculous");
this.queue={position:"end",limit:1,scope:this.wrapper.identify()}}Tips.add(this);this.activate()},setup:function(){this.wrapper=new Element("div",{"class":"prototip"}).setStyle({display:"none",zIndex:Tips.zIndex++});
this.wrapper.identify();if(Tips.fixIE){this.iframeShim=new Element("iframe",{"class":"iframeShim",src:"javascript:false;"}).setStyle({display:"none",zIndex:Tips.zIndexRestore-1})
}this.tip=new Element("div",{"class":"content"}).update(this.content);this.tip.insert(new Element("div").setStyle({clear:"both"}));
if(this.options.closeButton||(this.options.hideOn.element&&this.options.hideOn.element=="closeButton")){this.closeButton=new Element("a",{href:"javascript:;","class":"close"})
}},build:function(){if(Tips.fixIE){document.body.appendChild(this.iframeShim).setOpacity(0)}var D="wrapper";
if(this.options.effect){this.effectWrapper=this.wrapper.appendChild(new Element("div",{"class":"effectWrapper"}));
D="effectWrapper"}this.tooltip=this[D].appendChild(new Element("div",{"class":"tooltip "+this.options.className}));
if(this.options.title||this.options.closeButton){this.toolbar=this.tooltip.appendChild(new Element("div",{"class":"toolbar"}));
this.title=this.toolbar.appendChild(new Element("div",{"class":"title"}).update(this.options.title||" "))
}this.tooltip.insert(this.tip);document.body.appendChild(this.wrapper);var A=(this.options.effect)?[this.wrapper,this.effectWrapper]:[this.wrapper];
if(Tips.fixIE){A.push(this.iframeShim)}var C=this.wrapper.getWidth();A.invoke("setStyle",{width:C+"px"});
if(this.toolbar){this.wrapper.setStyle({visibility:"hidden"}).show();this.toolbar.setStyle({width:this.toolbar.getWidth()+"px"});
this.wrapper.hide().setStyle({visibility:"visible"})}if(this.closeButton){this.title.insert({top:this.closeButton}).insert(new Element("div").setStyle({clear:"both"}))
}var B=this.wrapper.getHeight();A.invoke("setStyle",{width:C+"px",height:B+"px"});this[this.options.effect?D:"tooltip"].hide()
},activate:function(){this.eventShow=this.showDelayed.bindAsEventListener(this);this.eventHide=this.hide.bindAsEventListener(this);
if(this.options.fixed&&this.options.showOn=="mousemove"){this.options.showOn="mouseover"}if(this.options.showOn==this.options.hideOn){this.eventToggle=this.toggle.bindAsEventListener(this);
this.element.observe(this.options.showOn,this.eventToggle)}this.hideElement=Object.isUndefined(this.options.hideOn.element)?"element":this.options.hideOn.element;
var A={"element":this.eventToggle?[]:[this.element],"target":this.eventToggle?[]:[this.target],"tip":this.eventToggle?[]:[this.wrapper],"closeButton":[],".close":this.tip.select(".close")};
this.hideTargets=A[this.hideElement];if(this.element&&!this.eventToggle){this.element.observe(this.options.showOn,this.eventShow)
}this.hideAction=(this.options.hideOn.event||this.options.hideOn);if(this.hideTargets){this.hideTargets.invoke("observe",this.hideAction,this.eventHide)
}if(!this.options.fixed&&this.options.showOn=="click"){this.eventPosition=this.position.bindAsEventListener(this);
this.element.observe("mousemove",this.eventPosition)}if(this.closeButton){this.closeButton.observe("click",this.eventHide)
}if(this.options.showOn!="click"&&this.hideElement!="element"){this.eventCheckDelay=this.checkDelay.bindAsEventListener(this);
this.element.observe("mouseout",this.eventCheckDelay)}this.wrapper.observe("mouseover",function(){Tips.raise(this.wrapper)
}.bind(this))},deactivate:function(){if(this.options.showOn==this.options.hideOn){this.element.stopObserving(this.options.showOn,this.eventToggle)
}else{this.element.stopObserving(this.options.showOn,this.eventShow);this.hideTargets.invoke("stopObserving",this.hideAction,this.eventHide)
}if(this.eventPosition){this.element.stopObserving("mousemove",this.eventPosition)}if(this.closeButton){this.closeButton.stopObserving()
}if(this.eventCheckDelay){this.element.stopObserving("mouseout",this.eventCheckDelay)}this.wrapper.stopObserving()
},showDelayed:function(A){if(!this.tooltip){this.build()}this.position(A);if(this.wrapper.visible()){return 
}this.checkDelay();this.timer=this.show.bind(this).delay(this.options.delay)},checkDelay:function(){if(this.timer){clearTimeout(this.timer);
this.timer=null}},show:function(){if(this.wrapper.visible()&&this.options.effect!="appear"){return }if(Tips.fixIE){this.iframeShim.show()
}Tips.addVisibile(this.wrapper);this.wrapper.show();if(!this.options.effect){this.tooltip.show()}else{if(this.activeEffect){Effect.Queues.get(this.queue.scope).remove(this.activeEffect)
}this.activeEffect=Effect[Effect.PAIRS[this.options.effect][0]](this.effectWrapper,{duration:this.options.duration,queue:this.queue})
}},hide:function(){this.checkDelay();if(!this.wrapper.visible()){return }if(!this.options.effect){if(Tips.fixIE){this.iframeShim.hide()
}this.tooltip.hide();this.wrapper.hide();Tips.removeVisible(this.wrapper)}else{if(this.activeEffect){Effect.Queues.get(this.queue.scope).remove(this.activeEffect)
}this.activeEffect=Effect[Effect.PAIRS[this.options.effect][1]](this.effectWrapper,{duration:this.options.duration,queue:this.queue,afterFinish:function(){if(Tips.fixIE){this.iframeShim.hide()
}this.wrapper.hide();Tips.removeVisible(this.wrapper)}.bind(this)})}},toggle:function(A){if(this.wrapper&&this.wrapper.visible()){this.hide(A)
}else{this.showDelayed(A)}},position:function(A){if(!this.wrapper.hasClassName("highest")){Tips.raise(this.wrapper)
}var E={left:this.options.offset.x,top:this.options.offset.y};var B=this.wrapper.getDimensions();if(this.options.memType=="tip"){var F=Position.cumulativeOffset(A.target);
var I={left:Event.pointerX(A),top:Event.pointerY(A)}}else{var F=Position.cumulativeOffset(this.target);
var I={left:(this.options.fixed)?F[0]:Event.pointerX(A),top:(this.options.fixed)?F[1]:Event.pointerY(A)}
}I.left+=E.left;I.top+=E.top;if(this.options.hook){var K={target:this.target.getDimensions(),tip:B};var L={target:Position.cumulativeOffset(this.target),tip:Position.cumulativeOffset(this.target)};
for(var H in L){switch(this.options.hook[H]){case"topRight":L[H][0]+=K[H].width;break;case"topMiddle":L[H][0]+=(K[H].width/2);
break;case"rightMiddle":L[H][0]+=K[H].width;L[H][1]+=(K[H].height/2);break;case"bottomLeft":L[H][1]+=K[H].height;
break;case"bottomRight":L[H][0]+=K[H].width;L[H][1]+=K[H].height;break;case"bottomMiddle":L[H][0]+=(K[H].width/2);
L[H][1]+=K[H].height;break;case"leftMiddle":L[H][1]+=(K[H].height/2);break}}I.left+=-1*(L.tip[0]-L.target[0]);
I.top+=-1*(L.tip[1]-L.target[1])}if(!this.options.fixed&&this.element!==this.target){var C=Position.cumulativeOffset(this.element);
I.left+=-1*(C[0]-F[0]);I.top+=-1*(C[1]-F[1])}if(!this.options.fixed&&this.options.viewport){var J=document.viewport.getScrollOffsets();
var G=Prototip.viewport.getDimensions();var D={left:"width",top:"height"};for(var H in D){if((I[H]+B[D[H]]-J[H])>G[D[H]]){I[H]=I[H]-B[D[H]]-2*E[H]
}}}var M={left:I.left+"px",top:I.top+"px"};this.wrapper.setStyle(M);if(Tips.fixIE){this.iframeShim.setStyle(M)
}}});var Lightbox={lightboxType:null,lightboxCurrentContentID:null,showBoxString:function(D,C,E,F,A){this.setLightboxDimensions(C,E);
this.lightboxType="string";var B=$("boxContents");B.update(D);if(F){$("boxTitle").innerHTML=F}else{$("boxTitle").innerHTML=""
}if(A){this.redirAfterClose=A}this.showBox();return false},showBoxImage:function(A,D){this.lightboxType="image";
var C=$("boxContents");var B=document.createElement("img");B.setAttribute("id","lightboxImage");C.appendChild(B);
imgPreload=new Image();imgPreload.onload=function(){B.src=A;if(D){$("boxTitle").innerHTML=D}else{$("boxTitle").innerHTML=""
}Lightbox.showBox()};imgPreload.src=A;return false},showBoxByID:function(F,C,D,E){this.lightboxType="id";
this.lightboxCurrentContentID=F;this.setLightboxDimensions(C,D);var A=$(F);var B=$("boxContents");B.appendChild(A);
Element.show(F);if(E){$("boxTitle").innerHTML=E}else{$("boxTitle").innerHTML=""}this.showBox();return false
},showBoxByAJAX:function(A,C,E,G,F){this.lightboxType="ajax";this.setLightboxDimensions(C,E);var B=$("boxContents");
var D=new Ajax.Updater(B,A,{method:"get",evalScripts:true});if(G){$("boxTitle").innerHTML=G}else{$("boxTitle").innerHTML=""
}if(F){$("close").onclick=F}this.showBox();return false},setLightboxDimensions:function(E,A){var D=this.getPageDimensions();
if(E){if(E<D[0]){var C=E+"px"}else{var C=(D[0]-50)+"px"}}if(A){if(A<D[1]){var B=A+"px"}else{var B=(D[1]-50)+"px"
}}$("box").style.width=C;$("box").style.height=B;if(this.fixIE){$("lightboxshim").style.width=C;$("lightboxshim").style.height=B
}},showBox:function(){Element.show("overlay");this.center("box");return false},hideBox:function(){var B=$("boxContents");
if(this.lightboxType=="id"){var A=document.getElementsByTagName("body").item(0);Element.hide(this.lightboxCurrentContentID);
A.appendChild($(this.lightboxCurrentContentID))}B.innerHTML="";$("box").style.width=null;$("box").style.height=null;
if(this.fixIE){$("lightboxshim").hide()}Element.hide("box");Element.hide("overlay");if(this.redirAfterClose){document.location=this.redirAfterClose
}return false},getPageDimensions:function(){var C,A;if(window.innerHeight&&window.scrollMaxY){C=document.body.scrollWidth;
A=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){C=document.body.scrollWidth;
A=document.body.scrollHeight}else{C=document.body.offsetWidth;A=document.body.offsetHeight}}var B,D;if(self.innerHeight){B=self.innerWidth;
D=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){B=document.documentElement.clientWidth;
D=document.documentElement.clientHeight}else{if(document.body){B=document.body.clientWidth;D=document.body.clientHeight
}}}if(A<D){pageHeight=D}else{pageHeight=A}if(C<B){pageWidth=B}else{pageWidth=C}arrayPageSize=new Array(B,D,pageWidth,pageHeight);
return arrayPageSize},center:function(B){try{B=document.getElementById(B)}catch(C){return }var F=this.getPageDimensions();
var A=F[0];var I=F[1];$("overlay").style.height=F[3]+"px";B.style.position="absolute";B.style.zIndex=4000000;
var G=0;if(document.documentElement&&document.documentElement.scrollTop){G=document.documentElement.scrollTop
}else{if(document.body&&document.body.scrollTop){G=document.body.scrollTop}else{if(window.pageYOffset){G=window.pageYOffset
}else{if(window.scrollY){G=window.scrollY}}}}var H=Element.getDimensions(B);var E=(A-H.width)/2;var D=(I-H.height)/2+G;
E=(E<0)?0:E;D=(D<0)?0:D;B.style.left=E+"px";B.style.top=D+"px";if(this.fixIE){$("lightboxshim").style.left=E+"px";
$("lightboxshim").style.top=D+"px";$("lightboxshim").show()}Element.show(B)},init:function(){var B='<div id="overlay" style="display:none"></div>';
B+='<div id="box" style="display:none">';B+='<div id="boxTopbar"><div id="boxTitle">hi</div><img id="close" align="right" src="/images/close.gif" onClick="Lightbox.hideBox()" alt="Close" title="Close this window" /></div>';
B+='<div id="boxContents"></div>';B+="</div>";var A=document.getElementsByTagName("body").item(0);new Insertion.Bottom(A,B);
if(this.fixIE){lightboxshim=new Element("iframe",{"id":"lightboxshim","class":"iframeShim","src":"javascript:false;"});
lightboxshim.setStyle({display:"none",zIndex:9500,padding:"13px"});document.body.appendChild(lightboxshim).setOpacity(0)
}},fixIE:(function(B){var A=new RegExp("MSIE ([\\d.]+)").exec(B);return A?(parseFloat(A[1])<=6):false
})(navigator.userAgent)};AIM={frame:function(D){var C="f"+Math.floor(Math.random()*99999);var B=document.createElement("DIV");
B.innerHTML='<iframe style="display:none" src="about:blank" id="'+C+'" name="'+C+'" onload="AIM.loaded(\''+C+"')\"></iframe>";
document.body.appendChild(B);var A=document.getElementById(C);if(D&&typeof (D.onComplete)=="function"){A.onComplete=D.onComplete
}return C},form:function(B,A){B.setAttribute("target",A)},submit:function(A,B){AIM.form(A,AIM.frame(B));
if(B&&typeof (B.onStart)=="function"){return B.onStart()}else{return true}},loaded:function(C){var A=document.getElementById(C);
if(A.contentDocument){var B=A.contentDocument}else{if(A.contentWindow){var B=A.contentWindow.document
}else{var B=window.frames[C].document}}if(B.location.href=="about:blank"){return }if(typeof (A.onComplete)=="function"){A.onComplete(B.body.innerHTML)
}}};function ErrorResponse(A,B){this.sErrorCode=A;this.sErrorMessage=B}ErrorResponse.prototype.toString=function(){return this.sErrorCode+":"+this.sErrorMessage
};function File(B){this.id=null;this.sContentType=null;this.idForeignKey=null;this.sShared="yes";var A=this;
Object.extend(A,B)}function FilingCabinet(A){this.id=null;this.aFiles=new Array();var B=this;Object.extend(B,A)
}function User(B){this.id=0;this.sEmailAddress="";this.idChallenge=0;this.sChallenge="";this.sUnsubscribed="no";
this.aFilingCabinets=new Array();this.aAttributes=new Array();var A=this;Object.extend(A,B)}User.prototype.getAttribute=function(A){debug("USER getAttribute",A);
if(!this.aAttributes[A]||this.aAttributes[A]==null){return""}return this.aAttributes[A]};User.prototype.toString=function(){if(this.aAttributes["sFirstName"]!=null&&this.aAttributes.sLastName!=null){return this.aAttributes["sFirstName"]+"&nbsp;"+this.aAttributes.sLastName
}else{if(this.aAttributes.sFirstName!=null){return this.aAttributes.sFirstName}else{if(this.sEmailAddress!=null){return this.sEmailAddress
}}}return null};User.prototype.addressToString=function(){var A=this.sStreet1;if(this.sStreet2!=null){A=A+"<br/>"+sStreet2
}if(this.sCity!=null){A=A+"<br/>"+sCity}else{A=A+"<br/>"}if(this.sState!=null){A=A+"&nbsp;"+sState}if(this.sPostalCode!=null){A=A+"&nbsp;"+sPostalCode
}if(this.sCountry!=null){A=A+"<br/>"+sCountry}return A};function Category(B){this.id=null;this.sLabel=null;
this.sDescription=null;this.sUmcHtmlFile=null;this.sUmcAbsoluteUrl=null;this.aDeviceTypeIds=null;var A=this;
Object.extend(this,B)}function DeviceType(B){this.id=null;this.sLabel=null;this.sDescription=null;var A=this;
Object.extend(A,B)}DeviceType.prototype.search=function(B){if(this.sDeviceType.toLowerCase().indexOf(B.toLowerCase())>=0){return true
}else{for(var A=0;this.sDeviceTypesNP.length>A;A++){if(this.sDeviceTypesNP[A].toLowerCase().indexOf(B.toLowerCase())>=0){return true
}}}return false};function Resource(B){this.id=null;this.sResourceTitle=null;this.sResourceUrl=null;this.sResourceCoverArtUrl=null;
this.sResourceFormat=null;this.iResourceFileSize=null;this.iResourcePages=null;this.iResourceYearCopyright=null;
var A=this;Object.extend(A,B)}function Product(B){this.id=null;this.sModelName=null;this.sModelNumber=null;
this.sDescription=null;this.sManualUrl=null;this.sProductUrl=null;this.sUmcHtmlFile=null;this.sUmcAbsoluteUrl=null;
this.sImageUrl=null;this.idDeviceType=null;this.sDeviceTypeLabel=null;this.idMfg=null;this.sMfgName=null;
this.sMfgCommon=null;this.sMfgNameDisplay=null;this.aCategoryIds=new Array();var A=this;Object.extend(A,B)
}Product.prototype.toString=function(){if(this.sModelName!=null){return this.sModelName}if(this.sUmcName!=null){return this.sUmcName
}return""};Product.prototype.getTooltip=function(){var A="<strong>"+this.sModelName+" "+this.sDeviceTypeLabel+":"+this.sModelNumber+"</strong>";
if(this.sDescription!=""){A=A+"<br/>"+this.sDescription}return A};Product.prototype.hasAttribute=function(A){debug("PRODUCT hasAttribute",A);
if(!this[A]){return false}if(A=="sManualUrl"||A=="sProductUrl"){var B=/exit\.php\?.*&amp;url=$/;if(this[A].match(B)){return false
}}return true};Product.prototype.getImageUrl=function(){if(this.sImageUrl!=""){return this.sImageUrl}return"/images/icons/no_image_available.jpg"
};function Mfg(B){this.id=null;this.sMfgName=null;this.sMfgNameCommon=null;this.sMfgNameDisplay=null;
this.sMfgDescription=null;this.sMfgManualUrl=null;this.sMfgUrl=null;this.sUmcMfgDir=null;this.sUmcHtmlFile=null;
this.sUmcListAbsoluteUrl=null;this.sMfgTelephoneSupport=null;this.aProductIds=new Array();this.aDeviceTypeIds=new Array();
this.aCategoryIds=new Array();var A=this;Object.extend(A,B)}Mfg.prototype.toString=function(){return this.sName
};Mfg.prototype.hasAttribute=function(A){debug("MFG hasAttribute",A);if(!this[A]){return false}if(A=="sManualUrl"||A=="sUrl"){var B=/exit\.php\?.*&amp;url=$/;
if(this[A].match(B)){return false}return true}};Mfg.prototype.search=function(A){if(this.sMfgName.indexOf(A)<0){if(this.sMfgNameCommon.toLowerCase().indexOf(A.toLowerCase())<0){return false
}}return true};function MexResource(B){this.id=null;this.idThread=null;this.sResourceUrl=null;this.sLabel=null;
this.sResourceType=null;this.dateCreate=null;var A=this;Object.extend(A,B)}function MexThread(B){this.id=null;
this.sMfgName=null;this.title=null;var A=this;Object.extend(A,B)}function ContentRepository(){this.contentCache={};
this.get=function(E,D,C){debug("FUNCTION START","ContentRepository.get PARAMS "+E+":"+D);if(E in this.contentCache){if(D in this.contentCache[E]){C(this.contentCache[E][D]);
return }}var A=getCommonParameters();A.set("type",E);A.set("id",D);var B=this;if(E=="MexResource"){dataservUrl="/ex/resource/get"
}else{if(E=="MexThread"){A.set("short",true);A.set("idThread",D);dataservUrl="/ex/thread/view/v/json"
}else{dataservUrl=regmanUrl+"umc/javascript"}}new Ajax.Request(dataservUrl,{method:"get",asynchronous:true,parameters:A.toQueryString(),onSuccess:function(G){var F=G.responseText.evalJSON();
B.preCache(F);C(F)}})};this.remove=function(B,A){if(B in this.contentCache){if(A in this.contentCache[B]){delete this.contentCache[B][A];
return }}};this.clearCache=function(A){debug("FUNCTION START","ContentRepository.clearCache");if(A in this.contentCache){this.contentCache[A]={}
}else{this.contentCache={}}};this.preCache=function(A){if(A instanceof Product){var B="Product"}else{if(A instanceof Mfg){var B="Mfg"
}else{if(A instanceof DeviceType){var B="DeviceType"}else{if(A instanceof Category){var B="Category"}else{if(A instanceof MexResource){var B="MexResource"
}else{if(A instanceof MexThread){var B="MexThread"}else{return }}}}}}if(!(B in this.contentCache)){this.contentCache[B]={}
}this.contentCache[B][A.id]=A}}var PM=new ContentRepository();function updateSGCookie(C,F,D,E){if(E==null){E="-br"
}var G="";var H=true;if(D>0){G+="p|"+D;H=false}if(C>0){if(!H){G+=","}G+="m|"+C;H=false}if(F>0){if(!H){G+=","
}G+="d|"+F;H=false}if(!H){var A="http://"+segmentServer+"/segment/tag?s="+E+"&t[]="+G;var B=new Element("script",{"src":A,"type":"text/javascript"});
document.body.appendChild(B)}}var regmanUrl=location.protocol+"//"+location.hostname+"/regman/";var debugOn=false;
function getCommonParameters(){parameters=new Hash({"scheme":location.protocol,"host":location.hostname,"path":location.pathname,"memSessionId":memSessionId,"memSiteGenId":memSiteGenId,"cb":Math.floor(Math.random()*99999999999)});
return parameters}function goCat(){destination=$("dropbycat").options[$("dropbycat").selectedIndex].value;
if(destination){location.href=destination}}function goMfg(){destination=$("dropbymanu").options[$("dropbymanu").selectedIndex].value;
if(destination){location.href=destination}}function gotoTabAndAnchor(B,A){if(currentTab!=B){showPane(B,A)
}else{$(A).scrollTo()}}cycleHomeslide=function(){if(typeof (currentTab)!="undefined"){showPaneInternal($(currentTab+"Pane").readAttribute("nextPane"))
}};function getCookie(D){var B=D+"=";var A=document.cookie.split(";");for(var C=0;C<A.length;C++){var E=A[C];
while(E.charAt(0)==" "){E=E.substring(1,E.length)}if(E.indexOf(B)==0){return E.substring(B.length,E.length)
}}return null}function setCookie(H,E,D,C,A){var B=new Date();B.setTime(B.getTime());var F=D*1000*60*60*24;
var G=new Date(B.getTime()+(F));document.cookie=H+"="+escape(E)+((D)?";expires="+G.toGMTString():"")+((C)?";path="+C:"")+((A)?";domain="+A:"")
}if(getCookie("debugCookie")=="on"){debugOn=true}function ErrorMessage(A){if(A=="EMAIL DOMAIN"){return"Your email domain is invalid."
}else{if(A=="EMAIL SYNTAX"){return"Your email address is invalid."}else{if(A=="EMAIL TAKEN"){return"The email address already exists in the system."
}else{if(A=="UNDEFINED AJAX"){return"Error communicating with server."}else{if(A=="LOGIN ERROR"){return"Your answer does not match our records, please try again."
}else{if(A=="BAD ZIP"){return"Your postal code is invalid."}else{if(A=="UNKNOWN ZIP"){return"Your postal code is unknown."
}else{if(A=="AGREE TC"){return"Membership requires registration. Please review our terms and conditions prior to registering and check the box to indicate your acceptance."
}else{if(A=="NICKNAME TAKEN"){return"Your nickname is taken. Please choose another."}else{if(A=="INVALID NICKNAME"){return"Your nickname contains invalid characters. Please use only a-z and/or 0-9."
}else{return'<font color="purple">Unknown Error'}}}}}}}}}}}function InfoMessage(A){if(A=="profile updated"){return"Profile Updated"
}else{if(A=="PASSWORD SENT"){return"<strong>A password reminder has been sent.</strong><br/>Your login information should arrive in your inbox in a few moments."
}else{if(A=="GENERIC EMAIL REQUIRED"){return"Email address is required."}}}}function debug(B,A){if(!debugOn){return 
}now=new Date();ts=now.getHours()+":"+now.getMinutes()+":"+now.getSeconds()+"."+now.getMilliseconds();
if($("debugPane")==undefined){new Insertion.Top($("body"),'<div id="debugPane" style="border:solid 2px #000000;background:#FFFFFF;color:#666666;padding:4px;width:80%;height:100px;overflow:auto;"></div>')
}new Insertion.Top($("debugPane"),'<pre style="font-size:12px;">'+ts+" -- "+B+":"+A+"</pre>")}function autoEllipseText(B,A){if(B.length>A){return B.substring(0,A-3)+"..."
}return B}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")};String.prototype.toProperCase=function(){return this.toLowerCase().replace(/^(.)|\s(.)/g,function(A){return A.toUpperCase()
})};function logEvent(C,A,B){var D=getCommonParameters();D.set("eventType",C);D.update(A);if(!B){B=function(){}
}new Ajax.Request(regmanUrl+"session/log",{method:"get",asynchronous:true,parameters:D.toQueryString(),onComplete:B()})
}function translateKeys(A){debug("FUNCTION START","translateKeys");if(A.keyCode==13){version=0;if(navigator.appVersion.indexOf("MSIE")!=-1){temp=navigator.appVersion.split("MSIE");
version=parseFloat(temp[1])}if(version>=5.5){A.keyCode=9}}}function validateEmailAddress(B){debug("FUNCTION START","validateEmailAddress");
var A=/^([\w-]+(?:[.+][\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;return A.test(B)
}function validateNickName(A){debug("FUNCTION START","validateNickName");var B=/\w+$/;return B.test(A)
}function validateNickNameServer(nickname,callback){debug("FUNCTION START","validateNickNameServer");
var requestParameters=getCommonParameters();requestParameters.set("sUsername",nickname);new Ajax.Request(regmanUrl+"user/validateNickname",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onSuccess:function(resp){var resp=eval("("+resp.responseText+")");
callback(resp)}})}function validateEmailAddressServer(emailAddress,callback){debug("FUNCTION START","validateEmailAddressServer");
var requestParameters=getCommonParameters();requestParameters.set("sEmailAddress",emailAddress);new Ajax.Request(regmanUrl+"user/validateEmailAddress",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onSuccess:function(resp){var resp=eval("("+resp.responseText+")");
callback(resp)}})}function validatePostalCode(B){debug("FUNCTION START","validatePostalCode");var A=B.trim();
rePostalCode=/^[a-zA-Z0-9\s]+$/;if(A.length>2&&rePostalCode.test(A)){return true}return false}function validatePostalCodeServer(A,C){debug("FUNCTION START","validatePostalCodeServer");
var B=getCommonParameters();B.set("sPostalCode",A);new Ajax.Request(regmanUrl+"mem/lookupPostalCode",{method:"get",asynchronous:true,parameters:B.toQueryString(),onSuccess:function(E){var D=E.responseText.evalJSON();
if(D.sCity){C(true)}else{C(false)}}})}function getLocationWithPostalCode(D,F,C,B,A,G){debug("FUNCTION START","getLocationWithPostalCode");
if(G==null){var G=false}var E=getCommonParameters();E.set("sPostalCode",D);new Ajax.Request(regmanUrl+"mem/lookupPostalCode",{method:"get",asynchronous:true,parameters:E.toQueryString(),onSuccess:function(I){var H=I.responseText.evalJSON();
if(H.sCity){if(G||$(F).value==""){$(F).value=H.sCity}if(G||$(C).value==""){$(C).value=H.sState}if(G||$(B).value==""){$(B).value=H.sCountry
}new Element.update(A,"&nbsp;")}else{new Element.update(A,'<font color="red" style="font-size:10px;">'+H.sErrorMessage+"</font>")
}refreshView()}})}function passwordResend(B){debug("FUNCTION START","passwordResend");sEmailAddress=$F("sEmailAddressId"+B);
if(sEmailAddress==null||sEmailAddress==""){new Element.update("memUserPaneError"+B,"Email Address Required");
return }var A=getCommonParameters();A.set("sEmailAddress",sEmailAddress);new Ajax.Request(regmanUrl+"user/passwordReminder",{method:"get",asynchronous:true,parameters:A.toQueryString()});
new Element.update("memUserPaneError"+B,InfoMessage("PASSWORD SENT"));refreshView()}function MM_swapImgRestore(){var C,A,B=document.MM_sr;
for(C=0;B&&C<B.length&&(A=B[C])&&A.oSrc;C++){A.src=A.oSrc}}function MM_preloadImages(){var D=document;
if(D.images){if(!D.MM_p){D.MM_p=new Array()}var C,B=D.MM_p.length,A=MM_preloadImages.arguments;for(C=0;
C<A.length;C++){if(A[C].indexOf("#")!=0){D.MM_p[B]=new Image;D.MM_p[B++].src=A[C]}}}}function MM_findObj(E,D){var C,B,A;
if(!D){D=document}if((C=E.indexOf("?"))>0&&parent.frames.length){D=parent.frames[E.substring(C+1)].document;
E=E.substring(0,C)}if(!(A=D[E])&&D.all){A=D.all[E]}for(B=0;!A&&B<D.forms.length;B++){A=D.forms[B][E]}for(B=0;
!A&&D.layers&&B<D.layers.length;B++){A=MM_findObj(E,D.layers[B].document)}if(!A&&D.getElementById){A=D.getElementById(E)
}return A}function MM_swapImage(){var D,C=0,A,B=MM_swapImage.arguments;document.MM_sr=new Array;for(D=0;
D<(B.length-2);D+=3){if((A=MM_findObj(B[D]))!=null){document.MM_sr[C++]=A;if(!A.oSrc){A.oSrc=A.src}A.src=B[D+2]
}}}function renderTumsContent(){debug("FUNCTION START","renderTumsContent");if(memUser.id==0){var A=getCommonParameters();
new Ajax.Request(regmanUrl+"user/validateUser",{method:"get",asynchronous:true,parameters:A.toQueryString(),onSuccess:function(C){aResponse=C.responseText.evalJSON();
var B=typeof (aResponse);if(B=="object"){if(aResponse.sEmailAddress){memUser=aResponse}}},onComplete:function(){realRenderTumsContent()
}})}else{realRenderTumsContent()}}function realRenderTumsContent(){renderLoginLink();renderUserPixels();
renderGetUpdates();renderFilingCabinets();renderNotificationLinks();renderInappropriateLinks();renderLinks();
renderForms();renderToolTips()}function renderMyStuffLink(){if(memUser.id!=0&&document.location.pathname.indexOf("/homepage")!=0&&document.location.pathname.indexOf("/regman")!=0){$("navMenu").insert('<li style="border-left: 1px solid #6096D3; border-right:none"><a href="/homepage">My Stuff</a></li>')
}}function renderLoginLink(){if($("leftnav_signin")){if(memUser.id==0){$("leftnav_signin").show()}else{$("leftnav_signin").hide()
}}}function renderUserPixels(){if(memUser.id>0){if(memUser.aAttributes.sAdnetPixels){$("body").insert(memUser.aAttributes.sAdnetPixels)
}}}function renderInappropriateLinks(){if(memUser.id>0){$$(".memInappropriateLink").each(function(B){idPost=B.readAttribute("memIdPost");
var A="";A+='<a href="javascript:;" onclick="flagPost('+idPost+'); return false;" title="Flag this post as inappropriate">Inappropriate?</a>';
B.innerHTML=A})}}function renderNotificationLinks(){var B="";var A=".actionLink_notify";if($$(A)==undefined){A=".memNotificationLink"
}$$(A).each(function(E){var G=E.readAttribute("memIdThread");var D=E.readAttribute("memType");if(D==null){var D="default"
}var F=new Template(siteStrings.get("notify_enable_"+D));var C=new Template(siteStrings.get("notify_disable_"+D));
if(memUser.id>0){PM.get("MexThread",G,function(H){if(H["watch"]=="1"){E.innerHTML=C.evaluate({"idThread":G})
}else{E.innerHTML=F.evaluate({"idThread":G})}})}else{E.innerHTML=F.evaluate({"idThread":G})}})}sharedTips={};
function setSharedTip(C,A,D,B){if(!(C in sharedTips)){sharedTips[C]=new Tip($(A),D,B);sharedTips[C].build();
return }if(sharedTips[C].options.showOn=="click"){$(A).observe("click",function(E){$$(".prototip").each(function(F){F.style.display="none"
});if(sharedTips[C].wrapper.visible()){sharedTips[C].toggle(E)}sharedTips[C].toggle(E)})}else{$(A).observe("mouseover",function(E){if(sharedTips[C].wrapper.visible()){sharedTips[C].toggle(E)
}sharedTips[C].toggle(E)});$(A).observe("mouseout",function(E){if(sharedTips[C].wrapper.visible()){sharedTips[C].toggle(E)
}})}}function closeLogin(A){if($("close"+A)){$("close"+A).click()}}regForms={};function needLogin(A,B,D,C){if(memUser.id){if(D){return D()
}else{return true}}else{if(D){window.afterLoginAction=D}else{window.afterLoginAction=function(){}}if(C){C()
}}}function createLoginPopup(A,C){if(!this.created&&memUser.id==0){if(typeof (regForms[C])=="undefined"){var B=getCommonParameters();
B.set("ns",C);new Ajax.Request(regmanUrl+"login/loginForm",{method:"get",asynchronous:false,parameters:B.toQueryString(),onSuccess:function(D){regForms[C]='<div id="memUserPane'+C+'">'+D.responseText+"</div>";
regForms[C]+='<input id="close'+C+'" type="button" class="close" style="display: none;">';return }})}setSharedTip("regTip"+C,A,regForms[C],{title:'<span id="sRegTitle'+C+'">Register for Free Membership!</span>',className:"regtooltip",closeButton:true,showOn:"click",hook:{target:"rightMiddle",tip:"leftMiddle"},fixed:true,hideOn:{element:".close",event:"click"},offset:{x:0,y:-150}});
A.created=true}}function emailTest(form,ns){var sEmailAddress=$F("sEmailAddressId"+ns);if(sEmailAddress.length>0){new Element.update("memUserPaneError"+ns,"");
if(!validateEmailAddress(sEmailAddress)){$("sEmailAddressIdError"+ns).show();new Element.update("memUserPaneError"+ns,ErrorMessage("EMAIL SYNTAX"));
refreshView();return }validateEmailAddressServer(sEmailAddress,function(resp){if(resp["isValid"]!=true){$("sEmailAddressIdError"+ns).show();
new Element.update("memUserPaneError"+ns,ErrorMessage("EMAIL DOMAIN"));$("sEmailAddressId"+ns).focus();
return }else{$("sEmailAddressIdError"+ns).hide()}refreshView()});var requestParameters=getCommonParameters();
requestParameters.set("sEmailAddress",sEmailAddress);new Ajax.Request(regmanUrl+"user/getChallenge",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onSuccess:function(resp){var aResponse=eval("("+resp.responseText+")");
if(aResponse.sErrorCode){debug("AJAX ERROR",aResponse);$("sEmailAddressIdError"+ns).show();refreshView();
return }memUser.sEmailAddress=sEmailAddress;if(aResponse.sChallenge.length>0){memUser.sChallenge=aResponse.sChallenge;
showLogin(ns,false)}return }})}}function renderToolTips(){$$(".smImageTip").each(function(A){if(A.rel&&A.rel!=""){new Tip(A,'<img src="'+A.rel+'" />',{className:"smImageTipImage",viewport:false})
}});$$(".medImageTip").each(function(A){if(A.rel&&A.rel!=""){new Tip(A,'<img src="'+A.rel+'" />',{className:"medImageTipImage",viewport:false})
}});$$(".lgImageTip").each(function(A){if(A.rel&&A.rel!=""){new Tip(A,'<img src="'+A.rel+'" />',{className:"lgImageTipImage",viewport:true})
}});if(memUser.id==0||memUser.sUnsubscribed=="yes"){$$(".mexSubmit, .memImageLink, .memTextLink, .actionLink_add, .memAddCommentLink, .memNotificationLink, .actionLink_havemanual, .actionLink_notify").each(function(A){createLoginPopup(A,"Popup")
});$$(".digestEmail").each(function(A){createLoginPopup(A,"Digemail")})}else{$$(".mexSubmit, .memImageLink, .memTextLink, .actionLink_add, .memAddCommentLink, .memNotificationLink, .mexForm, .digestEmail, .actionLink_havemanual, .actionLink_notify").each(function(A){Tips.remove(A)
})}}function renderGetUpdates(){$$(".updates").each(function(A){if(memUser.id==0){A.show();$$(".digestEmailAddress").each(function(B){Event.observe(B,"focus",clearDefaultEmail.bindAsEventListener(B))
})}else{if(memUser.aAttributes.sDigestEmail!="yes"){A.show();$$(".digestEmailAddress").invoke("remove")
}else{A.hide()}}})}clearDefaultEmail=function(A){if(this.value=="Email address"){this.value=""}};function renderFilingCabinets(){debug("FUNCTION START","renderFilingCabinets");
if(!$("memFilingCabinet")){return }if($("benefitsAd")&&memUser.id>0){new Element.hide("benefitsAd")}if(memUser.id!=0&&(document.location.pathname.indexOf("/homepage")==0||document.location.pathname.indexOf("/regman")==0)){return 
}var A="20px";if(memUser.id==0){A=0}$("memFilingCabinet").setStyle({paddingBottom:A});var B=getCommonParameters();
B.set("blockName","fullfilingcablist");new Ajax.Request(regmanUrl+"user/getUserBlock",{method:"get",asynchronous:true,parameters:B.toQueryString(),onSuccess:function(C){$("memFilingCabinet").update(C.responseText);
new Element.show("memFilingCabinet")}})}function renderForms(){debug("FUNCTION START","renderForms");
aElements=$$(".mexForm");aElements.each(function(A){new Effect.Opacity($(A),{duration:0.5,to:1})});$$(".mexButton").each(function(A){A.enable()
})}function renderLinks(){if(memUser.id>0){$$(".member_req").each(function(A){A.hide()});$$(".reportbrokenlink").each(function(A){A.show()
})}else{$$(".reportbrokenlink").each(function(A){A.hide()})}}function showUserMessage(A,B){debug("FUNCTION START","showUserMessage");
new Element.update(A,B);return true}function submitRegistration(E){debug("FUNCTION START","submitRegistration");
var A=$F("sEmailAddressId"+E).length;var C=validateEmailAddress($F("sEmailAddressId"+E));var B=validatePostalCode($F("sPostalCodeId"+E));
var F=false;if($F("bTCId"+E)!=undefined){F=true}new Element.update("memUserPaneError"+E,"");if(A==0){$("sEmailAddressIdError"+E).show();
new Insertion.Bottom("memUserPaneError"+E,"Please enter an email address.<br/>")}else{if(!C){$("sEmailAddressIdError"+E).show();
new Insertion.Bottom("memUserPaneError"+E,"The email address entered is invalid.<br/>")}}if(!B){$("sPostalCodeIdError"+E).show();
new Insertion.Bottom("memUserPaneError"+E,"The postal code entered is invalid.<br/>")}if(!F){$("bTCIdError"+E).show();
new Insertion.Bottom("memUserPaneError"+E,ErrorMessage("AGREE TC"))}if(C&&B&&F){$("sSubmitId"+E).disable();
new Effect.Opacity($("sSubmitId"+E),{duration:0,from:1,to:0.65});document.body.style.cursor="wait";var D=getCommonParameters();
D.update($("sRegFormId"+E).serialize(true));new Ajax.Request(regmanUrl+"user/update",{method:"get",asynchronous:true,parameters:D.toQueryString(),onSuccess:function(H){aResponse=H.responseText.evalJSON();
var G=typeof (aResponse);if(G=="object"){if(aResponse.sErrorCode){debug("AJAX ERROR",aResponse);return 
}if(aResponse.sEmailAddress){memUser=aResponse;document.body.style.cursor="default";handleLoginSuccess(E,true);
return }else{document.body.style.cursor="default";showUserMessage("memUserPaneError"+E,"unknown system error")
}}}})}else{refreshView();return false}}function postalCodeTest(A){$("sPostalCodeIdError"+A).hide();if(!validatePostalCode($F("sPostalCodeId"+A))){$("sPostalCodeIdError"+A).show();
new Element.update("memUserPaneError"+A,ErrorMessage("BAD ZIP"));refreshView();return false}new Element.update("memUserPaneError"+A,"");
refreshView();return true}function validateTC(A){$("bTCIdError"+A).hide();if($F("bTCId"+A)=="on"){new Element.update("memUserPaneError"+A);
refreshView();return true}$("bTCIdError"+A).show();new Element.update("memUserPaneError"+A,ErrorMessage("AGREE TC"));
refreshView();return false}function showLogin(C,A){debug("FUNCTION START","showLogin");var B=getCommonParameters();
B.set("sChallenge",memUser.sChallenge);B.set("sEmailAddress",memUser.sEmailAddress);B.set("showLogin",A);
B.set("ns",C);new Effect.Opacity("memUserPane"+C,{duration:0.1,to:0,afterFinish:function(D){new Ajax.Request(regmanUrl+"login/loginForm",{method:"get",asynchronous:true,parameters:B.toQueryString(),onSuccess:function(E){$("memUserPane"+C).update(E.responseText);
if($("sAnswerId"+C)){$("sRegTitle"+C).update("Member Sign In")}else{$("sRegTitle"+C).update("Register for Free Membership!")
}new Effect.Opacity("memUserPane"+C,{duration:0.1,to:1,afterFinish:function(F){if($F("sEmailAddressId"+C)==""){$("sEmailAddressId"+C).activate()
}else{if($("sAnswerId"+C)){$("sAnswerId"+C).activate()}else{$("sPostalCodeId"+C).activate()}}refreshView()
}});return }})}})}function loginUser(E){debug("FUNCTION START","loginUser");var C=validateEmailAddress($F("sEmailAddressId"+E));
var A=$F("sAnswerId"+E);if(A.length==0){var B=false}else{var B=true}new Element.update("memUserPaneError"+E,"");
if(!C){$("sEmailAddressIdError"+E).show();new Insertion.Bottom("memUserPaneError"+E,"The email address entered is invalid.<br/>")
}if(!B){$("sAnswerIdError"+E).show();new Insertion.Bottom("memUserPaneError"+E,"You must enter a response to the login challenge.")
}if(C&&B){var D=getCommonParameters();D.update($("sLoginFormId"+E).serialize(true));new Ajax.Request(regmanUrl+"user/login",{method:"get",asynchronous:true,parameters:D.toQueryString(),onSuccess:function(G){aResponse=G.responseText.evalJSON();
var F=typeof (aResponse);if(F=="object"){if(aResponse.sErrorCode){debug("AJAX ERROR",aResponse);new Element.update("memUserPaneError"+E,ErrorMessage(aResponse.sErrorCode)+"<br /><br />");
return }if(aResponse.sEmailAddress){memUser=aResponse;handleLoginSuccess(E,false);return }else{new Element.update("memUserPaneError"+E,ErrorMessage("LOGIN ERROR")+"<br /><br />");
new Field.activate($("sAnswerId"+E));return }}}})}else{return }}function handleLoginSuccess(B,A){debug("FUNCTION START","handleLoginSuccess, clearing cache..");
closeLogin(B);if(B=="Digemail"&&memUser.aAttributes.sDigestEmail=="yes"){Lightbox.showBoxString(siteStrings.get("digest_email_subscribe"),300,200,siteStrings.get("digest_email_title"))
}if(A){$("body").insert('<img src="http://ad.yieldmanager.com/pixel?adv=102515&code=20080927&t=2" width="1" height="1" /> ')
}renderTumsContent();if(!showCoRegForm()&&window.afterLoginAction){window.afterLoginAction();window.afterLoginAction=function(){}
}return }function addOPData(A){if(memUser.id==0){return false}else{var B=getCommonParameters();B.set("sSource",A);
if(window.idProduct){B.set("idProduct",window.idProduct)}else{if(window.sProduct){B.set("sProduct",window.sProduct)
}}if(window.idDeviceType){B.set("idDeviceType",window.idDeviceType)}else{if(window.sDeviceType){B.set("sDeviceType",window.sDeviceType)
}}if(window.idMfg){B.set("idMfg",window.idMfg)}else{if(window.sMfgName){B.set("sMfgName",window.sMfgName)
}}new Ajax.Request(regmanUrl+"user/savehititem",{method:"get",asynchronous:true,parameters:B.toQueryString(),onSuccess:function(C){renderFilingCabinets()
}})}}function goHomePage(A){if(memUser.id>0){destination="/homepage/";if(A){destination=destination+"?n=1"
}window.location.href=destination}else{return false}}function digestEmailSubscribe(B){var C=0;if(B=="notifyManualUpload"){B="Detail";
C=1}if(memUser.id==0){window.afterLoginAction=function(){addOPData("dig email sub")};if($F("digestEmailAddress"+B)!="Email address"&&$F("digestEmailAddress"+B).length>5){$("sEmailAddressIdDigemail").value=$F("digestEmailAddress"+B);
emailTest("register","Digemail")}}else{var A=getCommonParameters();new Ajax.Request(regmanUrl+"user/subscribedigestemail",{method:"get",asynchronous:true,parameters:A.toQueryString(),onComplete:function(D){aResponse=D.responseText.evalJSON();
if(aResponse.sEmailAddress){memUser=aResponse}if(C==1){Lightbox.showBoxString(siteStrings.get("conf_manual_request_notifyme"),270,160,siteStrings.get("thankyou"))
}else{Lightbox.showBoxString(siteStrings.get("digest_email_subscribe"),300,200,siteStrings.get("digest_email_title"))
}renderGetUpdates();addOPData("dig email sub")}})}}function digestEmailUnSubscribe(){if(memUser.id!=0){new Ajax.Request(regmanUrl+"user/unsubscribedigestemail",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onComplete:function(A){aResponse=A.responseText.evalJSON();
if(aResponse.sEmailAddress){memUser=aResponse}Lightbox.showBoxString(siteStrings.get("digest_email_unsubscribe"),300,200,siteStrings.get("digest_email_title"));
renderGetUpdates();renderFilingCabinets()}})}else{return false}}function isIE6(){var A=new RegExp("MSIE ([\\d.]+)").exec(navigator.userAgent);
return A?(parseFloat(A[1])<=6):false}function refreshView(){if($("centerCol")){var A=new Element("img",{"src":"/images/pixel.gif",width:"1px"});
$("centerCol").insert({bottom:A});setTimeout(function(){A.remove()},100)}}function checkOptOutStatus(){var C="http://"+segmentServer+"/segment/optoutstatus?callback=updateOptOutStatus";
var A=new Element("script",{"src":C,"type":"text/javascript"});var B=document.getElementsByTagName("head").item(0);
B.appendChild(A)}function optOut(){document.body.style.cursor="wait";var C="http://"+segmentServer+"/ut";
var A=new Element("script",{"src":C,"type":"text/javascript"});var B=document.getElementsByTagName("head").item(0);
B.appendChild(A);var D=new Element("img",{"src":"http://"+segmentServer+"/segment/optout",width:"1px"});
setTimeout(function(){$("centerCol").insert({bottom:D})},500);setTimeout(function(){checkOptOutStatus();
document.body.style.cursor="default"},1500)}function updateOptOutStatus(A){if(A==1){$("optoutstatus").update("Opted out");
if($("optoutbutton")){$("optoutbutton").hide()}}else{$("optoutstatus").update("Not Opted out")}}Ajax.CategoryAutocompleter=Class.create();
Object.extend(Object.extend(Ajax.CategoryAutocompleter.prototype,Autocompleter.Base.prototype),{initialize:function(C,E,B,D,A){this.baseInitialize(C,E,A);
this.options.asynchronous=true;this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=this.options.parameters||null;
this.url=B+"/key/ac";if($(D)){this.options.afterUpdateElement=function(G,F){debug("debug","hiddenId = "+D);
debug("debug","li = "+F);$(D).value=$(F).id.split("-")[1]}}},getUpdatedChoices:function(){this.startIndicator();
var A=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,A):A;
if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams}new Ajax.Request(this.url,this.options)
},onComplete:function(E){var D=E.responseText.evalJSON();if(D.result==1){return }var B=D.response;var F='<ul class="suggestions">';
for(var A=0;A<B.length;++A){var C=B[A];F+='<li id="category-';F+=C.id;F+='" class="suggestion">';F+=C.sCategoryName;
F+="</li>"}F+="</u1>";debug("DEBUG",F);this.updateChoices(F)}});Ajax.DeviceAutocompleter=Class.create();
Object.extend(Object.extend(Ajax.DeviceAutocompleter.prototype,Autocompleter.Base.prototype),{initialize:function(C,E,B,D,A){this.baseInitialize(C,E,A);
this.options.asynchronous=true;if(this.options.minChars<3){this.options.minChars=3}this.options.onComplete=this.onComplete.bind(this);
this.options.defaultParams=this.options.parameters||null;this.url=B+"/key/ac";if($(D)){this.options.afterUpdateElement=function(G,F){debug("debug","hiddenId = "+D);
debug("debug","li = "+F);$(D).value=$(F).id.split("-")[1]}}},getUpdatedChoices:function(){this.startIndicator();
var A=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,A):A;
if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams}new Ajax.Request(this.url,this.options)
},onComplete:function(E){var D=E.responseText.evalJSON();if(D.result==1){return }var B=D.response;var F='<ul class="suggestions">';
for(var A=0;A<B.length;++A){var C=B[A];F+='<li id="dt-';F+=C.id;F+='" class="suggestion">';F+=C.sDeviceType;
F+='<span class="informal">';F+="</span></li>"}F+="</u1>";debug("DEBUG",F);this.updateChoices(F)}});Ajax.MfgAutocompleter=Class.create();
Object.extend(Object.extend(Ajax.MfgAutocompleter.prototype,Autocompleter.Base.prototype),{initialize:function(C,F,B,D,A,E){this.baseInitialize(C,F,A);
this.options.asynchronous=true;this.idDeviceTypeElement=E;if(this.options.minChars<2){this.options.minChars=2
}this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=this.options.parameters||null;
this.url=B+"/key/ac";if($(D)){this.options.afterUpdateElement=function(H,G){debug("debug","hiddenId = "+D);
debug("debug","li = "+G);$(D).value=$(G).id.split("-")[1]}}},getUpdatedChoices:function(){this.startIndicator();
var A=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,A):A;
if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams}if(this.idDeviceTypeElement){this.options.parameters+="&idDeviceType="+encodeURIComponent($(this.idDeviceTypeElement).value)
}new Ajax.Request(this.url,this.options)},onComplete:function(E){var D=E.responseText.evalJSON();if(D.result==1){return 
}var A=D.response;var F='<ul class="suggestions">';for(var B=0;B<A.length;++B){var C=A[B];F+='<li id="mfg-';
F+=C.id;F+='" class="suggestion">';F+=C.sMfgName;F+="</li>"}F+="</u1>";this.updateChoices(F)}});Ajax.ProductAutocompleter=Class.create();
Object.extend(Object.extend(Ajax.ProductAutocompleter.prototype,Autocompleter.Base.prototype),{initialize:function(D,G,C,E,B,F,A){this.sMfgElement=F;
this.sDeviceTypeElement=A;this.baseInitialize(D,G,B);this.options.asynchronous=true;if(this.options.minChars<3){this.options.minChars=3
}this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=(this.options.parameters)||null;
this.url=C+"/key/ac";this.options.parent=this;this.options.afterUpdateElement=function(I,H){debug("debug","hiddenId = "+E);
debug("debug","li = "+H);$(E);$(E).value=$(H).id.split("-")[1];var M=H.id.split("-")[1];var L=this.parent.objResponse.response;
for(var J=0;J<L.length;++J){if(L[J].id==M){var K=L[J]}}if(K){$(this.parent.sMfgElement).value=K.sMfgName;
$(this.parent.element).value=K.model;$(this.parent.sDeviceTypeElement).value=K.sDeviceType}}},getUpdatedChoices:function(){this.startIndicator();
var A=encodeURIComponent(this.options.paramName)+"="+encodeURIComponent(this.getToken());this.options.parameters=this.options.callback?this.options.callback(this.element,A):A;
if(this.options.defaultParams){this.options.parameters+="&"+this.options.defaultParams+"&sMfgName="+encodeURIComponent($(this.sMfgElement).value)
}new Ajax.Request(this.url,this.options)},onComplete:function(F){var E=F.responseText.evalJSON();if(E.result==1){return 
}this.objResponse=E;var G=E.response;if($(this.sMfgElement).value==""){C=true}else{for(var A=1,C=false,B=G[0].sMfgName;
A<G.length;++A){if(G[A].sMfgName!=B){C=true;break}}}var H='<ul class="suggestions">';for(var A=0;A<G.length;
++A){var D=G[A];H+='<li id="product-';H+=D.id;H+='" class="suggestion">';if(C){H+=D.sMfgName+": "}H+=D.label;
H+="</li>"}H+="</u1>";this.updateChoices(H)}});Ajax.SolrAutocompleter=Class.create();Object.extend(Object.extend(Object.extend(Ajax.SolrAutocompleter.prototype,Ajax.Autocompleter.prototype),Autocompleter.Base.prototype),{initialize:function(C,D,B,A){this.baseInitialize(C,D,A);
this.options.asynchronous=true;this.options.onComplete=this.onComplete.bind(this);this.options.defaultParams=this.options.parameters||null;
this.url=B;this.tinput=C;this.options.afterUpdateElement=function(F,E){urlParts=parseUri($(E).id);logEvent("search clickthru",{"scheme":urlParts.protocol,"host":urlParts.host,"path":urlParts.path},function(){window.location.href=$(E).id
})}},onHover:function(B){var A=Event.findElement(B,"LI");if(A==undefined){return }if(this.index!=A.autocompleteIndex){this.index=A.autocompleteIndex;
this.render()}Event.stop(B)},onClick:function(B){var A=Event.findElement(B,"LI");if(A==undefined){return 
}this.index=A.autocompleteIndex;this.selectEntry();this.hide()},selectEntry:function(){this.active=false;
element=this.getCurrentEntry();if(($(element).id)&&($(element).id!="headSuggestions")){this.updateElement(element)
}else{if(this.options.afterUpdateElement){this.options.afterUpdateElement(element)}}},onComplete:function(F){var E=F.responseText.evalJSON();
if(E.result==1){return }var D=E.response.docs;var H="";if(D.length>0){var G=$(this.tinput).value.replace(/[^a-zA-Z0-9]/g,"").replace(/(.)/g,"$1[^a-zA-Z0-9]*");
var B=new RegExp(G,"gi");H="<ul>";H+='<div id="headSuggestions" class="head_suggestions">Choose a suggestion below or finish typing and click Search</div>';
for(var A=0;A<D.length;++A){var C=D[A];H+='<li id="';H+=C.url;H+='">';H+=this.snipetsOn(C.label.replace(/\s+/gi," "),B);
H+="</li>"}H+="</ul>"}else{$("autocomplete_choices").hide()}debug("DEBUG",H);this.updateChoices(H)},snipetsOn:function(H,D){var B=H.match(D);
if(B){var G="strong";var C=G.length;var A=0;for(ii=0;ii<B.length;ii++){var E=H.indexOf(B[ii],A);var F=B[ii].length;
H=H.substr(0,E)+"<"+G+">"+B[ii]+"</"+G+">"+H.substr(E+F);A=E+F+C+C+5}}return H}});function threadForm(B){var A=getCommonParameters();
A.set("type",B);if($("threadVariables")){A.update($("threadVariables").serialize(true))}var D="/ex/form/threadForm?"+A.toQueryString();
var C=siteStrings.get(B+"_title");Lightbox.showBoxByAJAX(D,500,475,C);return true}function showPaneHS(A){homeSlidePE.stop();
showPaneInternal(A)}function showPane(B,A){logEvent("tab "+B);showPaneInternal(B,A)}function showPaneInternal(B,A){if(typeof (currentTab)!="undefined"){new Effect.Fade($(currentTab+"Pane"),{delay:0.5,duration:1,queue:{position:"end",scope:"homeslide"},from:1,to:0,afterFinish:function(C){$(currentTab+"Pane").hide();
if($(currentTab+"Tab")){$(currentTab+"Tab").removeClassName("selected")}if($(B+"Tab")){$(B+"Tab").addClassName("selected")
}new Effect.Appear($(B+"Pane"),{from:0,to:1,queue:{position:"end",scope:"homeslide"},delay:0.3,duration:1,afterFinish:function(){if(A!=undefined){$(A).scrollTo()
}}});currentTab=B}})}}function showQuickPane(A){logEvent("tab "+A);$(currentTab+"Pane").hide();$(currentTab+"Tab").removeClassName("selected");
$(A+"Tab").addClassName("selected");$(A+"Pane").show();currentTab=A}function saveVote(A,C){var B=getCommonParameters();
B.set("idPost",C.identity);B.set("iRating",C.rated);new Ajax.Request("/ex/post/rate",{method:"post",asynchronous:true,parameters:B.toQueryString()})
}toggleWatch=function(A){new Ajax.Request("/ex/post/watch",{method:"post",parameters:"idThread="+A,onSuccess:function(B){PM.remove("MexThread",A);
renderNotificationLinks();renderFilingCabinets()}})};toggleWatchOn=function(A){if(memUser.id<1){return 
}toggleWatch(A);Lightbox.showBoxString(siteStrings.get("email_notify_message"),300,200,siteStrings.get("email_notify"))
};toggleWatchOff=function(B){if(memUser.id<1){return }var A=new Template(siteStrings.get("cancel_notify_message"));
Lightbox.showBoxString(A.evaluate({"idThread":B}),300,200,siteStrings.get("cancel_notify"))};post_conf=function(t,target_form){var json_response=eval("("+t.responseText+")");
if(json_response.sErrorCode){$("validate_"+target_form).update(json_response.sErrorMessage);enable_submit("submit_"+target_form)
}else{var formType=getFormType(target_form);var post_redirect_location="http://"+json_response.objThread["sSiteHost"]+"/ex/thread/view/idThread/"+json_response.objThread["id"];
var width=325;var height=200;var title_msg=siteStrings.get("thankyou_"+formType);if(target_form=="comment"){var messageString=siteStrings.get("conf_comment")
}else{var sMfgName=json_response.objThread["sMfgName"];var sDeviceType=json_response.objThread["sDeviceType"];
if(sDeviceType==null){sDeviceType="device"}var sProduct=json_response.objThread["sProduct"];if(sProduct==null){sDeviceType=""
}var messageTemplate=new Template(siteStrings.get("conf_"+formType));var messageString=messageTemplate.evaluate({"sMfgName":sMfgName,"sDeviceType":sDeviceType,"sProduct":sProduct})
}if(target_form=="notifyManualUpload"){width=270;height=160;title_msg=siteStrings.get("thankyou");var messageTemplate=new Template(siteStrings.get("conf_"+formType+"_notifyme"));
var messageString=messageTemplate.evaluate({"sMfgName":sMfgName,"sDeviceType":sDeviceType,"sProduct":sProduct});
post_redirect_location=location.href}Lightbox.showBoxString(messageString,width,height,title_msg,post_redirect_location)
}};submitPost=function(B){var A=getCommonParameters();document.body.style.cursor="wait";disable_submit("submit_"+B);
new Ajax.Request("/ex/post/add",{method:"post",parameters:A.merge(Form.serialize($(B),true)).toQueryString(),onSuccess:function(C){document.body.style.cursor="default";
post_conf(C,B)}})};function getFormType(C){var B=$("threadType_"+C);var A=B.readAttribute("type");if(A=="hidden"){return B.value
}else{if(A=="radio"){if($(C).down("input[name=threadType]:checked")){return $(C).down("input[name=threadType]:checked").value
}else{return undefined}}}}function handleFileUploadForm(B,A){parentForm=A;return AIM.submit(B,{"onStart":startFileCallback,"onComplete":completeFileCallback})
}function startFileCallback(){$("indicator_file_"+parentForm).update("Uploading...");$("submit_"+parentForm).disable();
return true}function completeFileCallback(response){$("indicator_file_"+parentForm).update("Supported file types: .doc, .pdf, .txt");
$("submit_"+parentForm).enable();var clean_response=response.stripTags();$("file_upload_message_"+parentForm).update("");
var json_response=eval("("+clean_response+")");if(json_response.sErrorCode){new Insertion.Bottom("file_upload_message_"+parentForm,"Error: "+json_response.sErrorMessage)
}else{$("idFile_"+parentForm).value=json_response.idFile;new Insertion.Bottom("file_upload_message_"+parentForm,"File uploaded successfully")
}}function handleImageUploadForm(myForm,pForm){parentForm=pForm;return AIM.submit(myForm,{"onStart":function(){$("indicator_image_"+parentForm).update("Uploading...");
$("submit_"+parentForm).disable();return true},"onComplete":function(response){$("indicator_image_"+parentForm).update("Supported file types: .jpg, .gif, .png");
$("submit_"+parentForm).enable();var clean_response=response.stripTags();var json_response=eval("("+clean_response+")");
if(json_response.sErrorCode){$("image_upload_message_"+parentForm).update("Error: "+json_response.sErrorMessage)
}else{$("image_upload_message_"+parentForm).update("");$("sImageFileName_"+parentForm).value=json_response.sFilename;
$("image_attach_"+parentForm).update('<img class="image_upload" src="'+json_response.thumbpath+'" />')
}}})}function initFormVal(A){}function reset_form(A){$(A).reset();if($("upload_image_form_"+A)){$("upload_image_form_"+A).reset();
$("image_attach_"+A).update("");$("image_upload_message_"+A).update("");$("sImageFileName_"+A).value=""
}if($("upload_file_form_"+A)){$("upload_file_form_"+A).reset();$("file_upload_message_"+A).update("");
$("idFile_"+A).value=""}if($("ohProduct_"+A)){$("hProduct_"+A).value=$("ohProduct_"+A).value}if($("ohMfg_"+A)){$("hMfg_"+A).value=$("ohMfg_"+A).value
}if($("ohDT_"+A)){$("hDT_"+A).value=$("ohDT_"+A).value}$("validate_"+A).update("")}function disable_submit(A){$(A).disable();
new Effect.Opacity($(A),{duration:0.1,from:1,to:0.5})}function enable_submit(A){$(A).enable();new Effect.Opacity($(A),{duration:0.1,from:0.5,to:1})
}function validate_form(D){if($("validate_"+D)){$("validate_"+D).update("")}var E=0;var B="";if(memUser.id<1){B=B+siteStrings.get("unknown_user");
E+=1}else{if(window.sBodyPost){$("postBody_"+D).value=window.sBodyPost}}if($F("postBody_"+D).length>512){B=B+siteStrings.get("verify_length_body");
E+=1}if(D=="comment"){if($F("postBody_"+D)==""){B=B+siteStrings.get("verify_comment_body");E+=1}}else{var A=getFormType(D);
if(A==undefined){B=B+siteStrings.get("verify_threadType");E+=1}if(A=="product_problem"||A=="product_tip"){if($F("subject_"+D)==""){B=B+siteStrings.get("verify_subject");
E+=1}if($F("postBody_"+D)==""){B=B+siteStrings.get("verify_"+A+"_body");E+=1}}if($F("postProduct_"+D)==""){B=B+siteStrings.get("verify_prod_num");
E+=1}if($F("postMfg_"+D)==""){B=B+siteStrings.get("verify_mfg");E+=1}if($F("postDeviceType_"+D)==""){B=B+siteStrings.get("verify_dt");
E+=1}if(A=="manual_post"){if($F("idFile_"+D)==""&&$F("sUrl_"+D)==""){B=B+siteStrings.get("verify_urlorfile");
E+=1}}}if($("sUrl_"+D)){var C=$F("sUrl_"+D);if(C!=""){re=/[a-zA-Z0-9-]\.[a-zA-Z0-9-]{2,}/;if(!re.test(C)){B=B+siteStrings.get("verify_url");
E+=1}}}if(E>0){if($("validate_"+D)){$("validate_"+D).update(B)}if(memUser.id<1){needLogin(this,"Popup",function(){if(validate_form(D)){submitPost(D)
}});window.sBodyPost=$("postBody_"+D).value;$$(".lightboxForm").each(function(G){var F=G.cloneNode(true);
F.style.display="none";document.body.appendChild(F)})}return false}else{return true}}function field_activate(A){if(navigator.appVersion.indexOf("MSIE")>=0){if(document.getElementById(A).value!=""){document.getElementById(A).fireEvent("onkeydown")
}}}flagpost_message=function(A){var B="post_"+A;$(B).update('<div style="background-color:#e6eef9;color:#2166b4;padding:2px;width:100%;text-align:center;margin:2px 0px;">The inappropriate content has been removed from your view.</div>');
Lightbox.showBoxString('<div id="pop_wrapper"><span class="pop_title">Thank You for Your Feedback</span><br clear="all"/> <p>One of our content administrators will be notified and the post you flagged will be reviewed.<br /><br />This post will also be removed from your view.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',300,240,"Thank You")
};flagPost=function(A){new Ajax.Request("/ex/post/flag",{method:"post",parameters:"idPost="+A,onSuccess:flagpost_message(A)})
};changeType=function(C,A,B){Lightbox.showBoxString('<div id="pop_wrapper"><span class="pop_title">Pick a new thread type</span><br clear="all"/><br /><center><form id="changeThreadType"><input type="hidden" name="idThread" value="'+C+'"><input type="hidden" name="currentType" value="'+A+'"><input type="hidden" name="refresh" value="'+B+'"><select name="sThreadType"><option value="manual_request">Manual Request</option><option value="manual_post">Manual Post</option><option value="product_problem">Product Problem</option><option value="product_tip">Product Tip</option></select><br /><br /><a onClick="saveThreadType();"><img src="/images/but_save_lg.gif"></a> <a onclick="Lightbox.hideBox();"><img src="/images/but_close.gif" /></a></form></center></div>',300,240,"Change Thread Type")
};saveThreadType=function(){var B=$("changeThreadType");var A=$F(B["currentType"]);var C=$F(B["sThreadType"]);
if(A!=C){var D=$F(B["idThread"]);new Ajax.Request("/ex/post/changeThreadType",{method:"get",asynchronous:true,parameters:"idThread="+D+"&sThreadType="+C,onSuccess:function(){$$(".thread_"+D).each(function(E){E.hide()
});Lightbox.hideBox()}})}};solvePost=function(B,A){new Ajax.Request("/ex/post/solve",{method:"post",parameters:"idThread="+B,onSuccess:function(){if(A){reload_page()
}else{$$(".thread_"+B).each(function(C){C.hide()})}}})};deletePost=function(A,B){new Ajax.Request("/ex/post/delete",{method:"post",parameters:"idPost="+A,onSuccess:function(){if(B){reload_page()
}else{$("post_"+A).hide()}}})};reviewPost=function(A,B){new Ajax.Request("/ex/post/review",{method:"post",parameters:"idPost="+A,onSuccess:function(){if(B){reload_page()
}else{$("post_"+A).hide()}}})};reload_page=function(){window.location.reload()};ugc_concierge=function(G){var E=$("hProduct_"+G).value;
var A=$("hMfg_"+G).value;var D=$("postProduct_"+G).value;var H=$("postMfg_"+G).value;var F=false;var B=false;
var C=getCommonWidgetParameters();C.set("host",undefined);C.set("fields","url");C.set("key","uc");C.set("noAppendKey","true");
C.set("withResource","true");if(E){C.set("idProduct",E);C.set("fields","sResUrl");new Ajax.Request("/dataserv/resource/list",{method:"post",asynchronous:false,parameters:C.toQueryString(),valJSON:true,onSuccess:function(K){var J=K.responseJSON.response;
if(J.length>0){for(var I=0;I<J.length;I++){B=J[I].sResUrl}}}});C.set("id",E);C.set("fields","label,m.sMfgName,d.sDeviceType");
new Ajax.Request("/dataserv/product/list",{method:"post",asynchronous:false,parameters:C.toQueryString(),valJSON:true,onSuccess:function(I){F=ugc_concierge_render(G,I.responseJSON.response,B)
}})}else{if(A){C.set("idMfg",A)}C.set("fields","label,m.sMfgName,d.sDeviceType");C.set("str",D);C.set("wc","re");
new Ajax.Request("/dataserv/product/list",{method:"post",asynchronous:false,parameters:C.toQueryString(),valJSON:true,onSuccess:function(I){F=ugc_concierge_render(G,I.responseJSON.response,false)
}})}return F};ugc_concierge_render=function(J,A,C){var B=320;var M=220;var D="";var I="";var K="";var F="#";
var E=false;if(A.length>0){if(C){D=siteStrings.get("concierge_title");I=new Template(siteStrings.get("concierge_text"));
for(var H=0;H<A.length;H++){K=I.evaluate({"sMfgName":A[H].sMfgName,"model":A[H].model,"sDeviceType":A[H].sDeviceType,"url":A[H].url,"idProduct":A[H].id,"res_url":C})
}Lightbox.showBoxString(K,B,M,D,F)}else{D=siteStrings.get("concierge_title_suggestion");I=new Template(siteStrings.get("concierge_text_suggestion"));
var L="";for(var H=0;H<A.length;H++){var G='<a href="'+A[H].url+'" onClick="logUCClick(this.href); return false;">'+A[H].sMfgName+" "+A[H].model+" "+A[H].sDeviceType+"</a><br/>";
L+=G}K=I.evaluate({"list_suggestions":L});Lightbox.showBoxString(K,B,M,D,F);Event.observe("continue_and_submit","click",function(){submitPost(J)
})}}else{E=true}return E};function logUCClick(A){urlParts=parseUri(A);logEvent("uc clickthru",{"scheme":urlParts.protocol,"host":urlParts.host,"path":urlParts.path},function(){window.location.href=A
});return false}function showImageForm(B,A){var C=getCommonParameters();C.set("blockName",B);if(B=="editavatar"){boxWidth=300;
boxHeight=300}if(B=="editprodimage"){boxWidth=300;boxHeight=300;C.set("idFile",A)}new Ajax.Request(regmanUrl+"user/getUserBlock",{method:"get",asynchronous:true,parameters:C.toQueryString(),onSuccess:function(D){Lightbox.showBoxString(D.responseText,boxWidth,boxHeight,"Change Image")
}})}function editProfile(){var A=getCommonParameters();A.set("blockName","editprofile");new Ajax.Request(regmanUrl+"user/getUserBlock",{method:"get",asynchronous:true,parameters:A.toQueryString(),onSuccess:function(B){Lightbox.showBoxString(B.responseText,680,520,"Edit Profile");
if($F("pusPostalCodeId")!=""&&($F("pusCityId")==""&&$F("pusStateId")==""&&$F("pusCountryId")=="")){getLocationWithPostalCode($F("pusPostalCodeId"),"pusCityId","pusStateId","pusCountryId","popupWindowMessage",false)
}if($F("pusEmailAddressId")==""){$("pusEmailAddressId").focus()}else{$("pusNickName").focus()}Event.observe($("pusAnswerId"),"keyup",function(C){if($F("pusAnswerId")!=$F("opusAnswerId")){$("pusChallengeIdLabel").className="requiredYes";
$("pusAnswerIdLabel").className="requiredYes"}else{$("pusChallengeIdLabel").className="requiredNo";$("pusAnswerIdLabel").className="requiredNo"
}});Event.observe($("pusNickName"),"blur",function(C){if($F("pusNickName")!=""){if(validateNickName($("pusNickName").value)){validateNickNameServer($F("pusNickName"),function(D){if(D["isTaken"]==true){new Element.update("popupWindowMessage",ErrorMessage("NICKNAME TAKEN"));
$("pusNickNameError").style.display="inline";$("pusNickName").value=memUser.sUsername;$("pusNickName").focus()
}else{new Element.update("popupWindowMessage","");$("pusNickNameError").style.display="none";memUser.sUsername=$F("pusNickName")
}})}else{$("pusNickNameError").style.display="inline";new Element.update("popupWindowMessage",ErrorMessage("INVALID NICKNAME"));
$("pusNickName").focus()}}else{new Element.update("popupWindowMessage","");$("pusNickNameError").style.display="none"
}},true);Event.observe($("pusPostalCodeId"),"change",function(C){if($F("pusCityId")==""&&$F("pusStateId")==""&&$F("pusCountryId")==""){getLocationWithPostalCode($F("pusPostalCodeId"),"pusCityId","pusStateId","pusCountryId","popupWindowMessage",true)
}});Event.observe($("pusEmailAddressId"),"change",function(C){if(validateEmailAddress($F("pusEmailAddressId"))){validateEmailAddressServer($F("pusEmailAddressId"),function(D){if(D["isValid"]==true){if(D["isTaken"]==true){new Element.update("popupWindowMessage",ErrorMessage("EMAIL TAKEN"));
$("pusEmailAddressIdError").show();$("pusEmailAddressId").value=memUser.sEmailAddress;$("pusEmailAddressId").focus()
}else{new Element.update("popupWindowMessage","");$("pusEmailAddressIdError").hide();memUser.sEmailAddress=$F("pusEmailAddressId")
}}else{$("pusEmailAddressIdError").show();new Element.update("popupWindowMessage",ErrorMessage("EMAIL DOMAIN"));
$("pusEmailAddressId").focus()}})}else{$("pusEmailAddressId").focus();$("pusEmailAddressIdError").show();
new Element.update("popupWindowMessage",ErrorMessage("EMAIL SYNTAX"))}},true);Event.observe($("pusChallengeId"),"change",function(C){$("pusChallengeIdLabel").className="requiredYes";
new Field.clear($("pusAnswerId"));new Field.activate($("pusAnswerId"));$("pusAnswerIdLabel").className="requiredYes"
})}})}function validateProfileForm(){debug("FUNCTION START","validateProfileForm");$("pusEmailAddressIdError").hide();
$("pusAnswerIdError").hide();$("pusNickNameError").hide();$("pusPostalCodeIdError").hide();var A="";if(validateEmailAddress($F("pusEmailAddressId"))==false){A+="Your <b>email address</b> appears invalid.<br />";
$("pusEmailAddressIdError").show()}if($F("pusNickName")==""){A+="You must specify a <b>nickname</b><br />";
$("pusNickNameError").show()}else{if(validateNickName($("pusNickName").value)==false){A+="Your <b>nickname</b> is taken.<br />";
$("pusNickNameError").show()}}if($F("pusPostalCodeId")==""){A+="Please enter a <b>postal code</b>.<br />";
$("pusPostalCodeIdError").show()}if($F("pusAnswerId")==""){A+="You did not provide an <b>answer</b> to the login question.<br />";
$("pusAnswerIdError").show()}if(A==""){return true}showUserMessage("popupWindowMessage",A);return false
}function submitProfile(messageElement){if($F("pusAnswerId")==$F("opusAnswerId")){new Field.clear($("pusAnswerId"))
}var requestParameters=getCommonParameters();requestParameters.update($("sProfileFormId").serialize(true));
new Ajax.Request(regmanUrl+"user/update",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onSuccess:function(resp){aResponse=eval("("+resp.responseText+")");
var type=typeof (aResponse);if(type=="object"){if(aResponse.sErrorCode){return }if(aResponse.sEmailAddress){memUser=aResponse;
showPane("profile");Lightbox.hideBox();return }else{showUserMessage(messageElement,"Unknown Error")}}}})
}function profileImageUpload(){return AIM.submit($("avatar_form"),{"onStart":function(){$("imageUploadIndicator").update("Uploading...");
return true},"onComplete":function(response){var clean_response=response.stripTags();var json_response=eval("("+clean_response+")");
$("imageUploadIndicator").update("");if(json_response.sErrorCode){$("imageUploadError").update("Error: "+json_response.sErrorMessage)
}else{$("avatar_submit_button").enable();$("avatar_thumb").src=json_response.thumbpath;$("imageUploadError").update("");
if($("dashboard_user_avatar")){$("dashboard_user_avatar").src=json_response.thumbpath}$("sAvatar").value=json_response.sFilename
}return false}})}function saveProfileImage(){var requestParameters=getCommonParameters();requestParameters.update($("avatar_submit").serialize(true));
new Ajax.Request(regmanUrl+"user/update",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onSuccess:function(resp){aResponse=eval("("+resp.responseText+")");
var type=typeof (aResponse);if(type=="object"){if(aResponse.sErrorCode){return }if(aResponse.sEmailAddress){memUser=aResponse;
showPane("profile");Lightbox.hideBox();return }else{$("imageUploadError").update("Unknown Error")}}}})
}function productImageUpload(){return AIM.submit($("prodimage_form"),{"onStart":function(){$("imageUploadIndicator").update("Uploading...");
return true},"onComplete":function(response){var clean_response=response.stripTags();var json_response=eval("("+clean_response+")");
$("imageUploadIndicator").update("");if(json_response.sErrorCode){$("imageUploadError").update("Error: "+json_response.sErrorMessage)
}else{$("prodimage_submit_button").enable();$("prodimage_thumb").src=json_response.thumbpath;$("imageUploadError").update("");
$("sPhoto").value=json_response.sFilename}return false}})}function saveProductImage(A){var B=getCommonParameters();
B.update($("prodimage_submit").serialize(true));new Ajax.Request(regmanUrl+"user/saveHitMetaData",{method:"get",asynchronous:true,parameters:B.toQueryString(),onSuccess:function(C){refresh_rooms();
Lightbox.hideBox();return }})}window.showStuffDetails=function(A){Lightbox.init();var B=getCommonParameters().toQueryString();
var C="/regman/user/getuserblock?blockName=filingcabdetail&idStuff="+A+"&"+B;Lightbox.showBoxByAJAX(C,600,600,"My Stuff Details");
$("box").hide()};window.editStuffDetails=function(A){Lightbox.init();var B=getCommonParameters().toQueryString();
var C="/regman/user/getuserblock?blockName=editstuffdetails&idStuff="+A+"&"+B;Lightbox.showBoxByAJAX(C,600,600,"Edit My Stuff Details");
$("box").hide()};window.addStuffInRoom=function(A){window.hit_current_room=A;Lightbox.init();var B=getCommonParameters().toQueryString();
var C="/regman/user/getuserblock?blockName=hit"+"&"+B;Lightbox.showBoxByAJAX(C,700,550,"Home Inventory Tool");
$("box").hide()};window.print_home_inventory=function(){window.open("/regman/user/printhomeinventory/?"+getCommonParameters().toQueryString(),"print","")
};var Starboxes={inverse:false,locked:false,onRate:Prototype.emptyFunction,overlayImages:"/images/starbox/",overlay:"default.png",rerate:false,REQUIRED_Prototype:"1.6.0",REQUIRED_Scriptaculous:"1.8.0",load:function(){this.require("Prototype");
this.imageSource=this.overlayImages},require:function(A){if((typeof window[A]=="undefined")||(this.convertVersionString(window[A].Version)<this.convertVersionString(this["REQUIRED_"+A]))){throw ("Starbox requires "+A+" >= "+this["REQUIRED_"+A])
}},convertVersionString:function(A){var B=A.split(".");return parseInt(B[0])*100000+parseInt(B[1])*1000+parseInt(B[2])
},fixIE:(function(B){var A=new RegExp("MSIE ([\\d.]+)").exec(B);return A?(parseFloat(A[1])<=6):false})(navigator.userAgent),imagecache:[],cacheImage:function(A){if(!this.getCachedImage(A.src)){this.imagecache.push(A)
}return A},getCachedImage:function(A){return this.imagecache.find(function(B){return B.src==A})},buildQueue:[],queueBuild:function(A){this.buildQueue.push(A)
},processBuildQueue:function(){if(!this.buildQueue[0]){this.batchLoading=true;return }this.cacheBuildBatch(this.buildQueue[0])
},cacheBuildBatch:function(C){var E=[];var B=C.options.overlay;var A=this.getCachedImage(B);this.buildQueue.each(function(F){if(F.options.overlay==B){E.push(F);
this.buildQueue=this.buildQueue.without(F)}}.bind(this));if(!A){var D=new Image();D.onload=function(){var F=this.cacheImage({src:B,height:D.height,width:D.width,fullsrc:D.src});
this.buildBatch(E,F)}.bind(this);D.src=Starboxes.imageSource+B}else{this.buildBatch(E,A)}},buildBatch:function(B,A){B.each(function(C){C.imageInfo=A;
C.build()});this.processBuildQueue()}};Starboxes.load();document.observe("dom:loaded",Starboxes.processBuildQueue.bind(Starboxes));
var Starbox=Class.create({initialize:function(A,B){this.element=$(A),this.average=B;this.options=Object.extend({buttons:5,className:"default",color:false,duration:0.6,effect:{mouseover:false,mouseout:(window.Effect&&Effect.Morph)},hoverColor:false,hoverClass:"hover",ghostColor:false,ghosting:false,ratedClass:"rated",identity:false,indicator:false,inverse:Starboxes.inverse,locked:false,max:5,onRate:Starboxes.onRate,rerate:Starboxes.rerate,rated:false,overlay:Starboxes.overlay,stars:5,total:0},arguments[2]||{});
this.rated=this.options.rated;this.total=this.options.total;this.locked=this.options.locked||(this.rated&&!this.options.rerate);
if(this.options.effect&&(this.options.effect.mouseover||this.options.effect.mouseout)){Starboxes.require("Scriptaculous")
}Starboxes.queueBuild(this);if(Starboxes.batchLoading){Starboxes.processBuildQueue()}},enable:function(){if(!Prototype.Browser.IE){this.onMouseout=this.onMouseout.wrap(function(C,B){var A=B.relatedTarget,D=B.currentTarget;
if(A&&A.nodeType==Node.TEXT_NODE){A=A.parentNode}if(A&&A!=D&&!(A.descendantOf(D))){C(B)}})}$w("mouseout mouseover click").each(function(B){var A=B.capitalize();
this["on"+A+"_cached"]=this["on"+A].bindAsEventListener(this);this.starbar.observe(B,this["on"+A+"_cached"])
}.bind(this));this.buttons.invoke("setStyle",{cursor:"pointer"})},disable:function(){$w("mouseover mouseout click").each(function(A){this.starbar.stopObserving(A,this["on"+A.capitalize()+"_cached"])
}.bind(this));this.buttons.invoke("setStyle",{cursor:"auto"})},build:function(){this.starWidth=this.imageInfo.width;
this.starHeight=this.imageInfo.height;this.starSrc=this.imageInfo.fullsrc;this.boxWidth=this.starWidth*this.options.stars;
this.buttonWidth=this.boxWidth/this.options.buttons;this.buttonRating=this.options.max/this.options.buttons;
if(this.options.effect){this.zeroPosition=this.getBarPosition(0);this.maxPosition=this.getBarPosition(this.options.max)
}var B={absolute:{position:"absolute",top:0,left:0,width:this.boxWidth+"px",height:this.starHeight+"px"},base:{position:"relative",width:this.boxWidth+"px",height:this.starHeight+"px"},star:{position:"absolute",top:0,left:0,width:this.starWidth+"px",height:this.starHeight+"px"}};
this.element.addClassName("starbox");this.container=new Element("div",{"class":this.options.className||""}).setStyle({position:"relative"});
this.status=this.container.appendChild(new Element("div"));if(this.rated){this.status.addClassName("rated")
}if(this.locked){this.status.addClassName("locked")}this.hover=this.status.appendChild(new Element("div"));
this.wrapper=this.hover.appendChild(new Element("div",{"class":"stars"}));this.wrapper.setStyle(Object.extend({overflow:"hidden"},B.base));
if(this.options.ghosting){this.ghost=this.wrapper.appendChild(new Element("div",{"class":"ghost"}).setStyle(B.absolute));
if(this.options.ghostColor){this.ghost.setStyle({background:this.options.ghostColor})}if(this.options.effect){this.ghost.scope=this.ghost.identify()
}this.setBarPosition(this.ghost,this.average,(window.Effect&&Effect.Morph))}this.colorbar=this.wrapper.appendChild(new Element("div",{"class":"colorbar"}).setStyle(B.absolute));
if(this.options.color){this.colorbar.setStyle({background:this.options.color})}if(this.options.effect){this.colorbar.scope=this.colorbar.identify()
}var A=this.wrapper.appendChild(new Element("div").setStyle(B.absolute));this.starbar=A.appendChild(new Element("div").setStyle(B.base));
this.options.stars.times(function(C){var D=this.starbar.appendChild(new Element("div").setStyle(Object.extend({background:"url("+this.starSrc+") top left no-repeat"},B.star)));
D.setStyle({left:this.starWidth*C+"px"});if(Starboxes.fixIE){D.setStyle({background:"none","filter":"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+this.starSrc+"'', sizingMethod='scale')"})
}}.bind(this));this.buttons=[];this.options.buttons.times(function(E){var D=this.options.inverse?this.boxWidth-this.buttonWidth*(E+1):this.buttonWidth*E;
var C=this.starbar.appendChild(new Element("div",{href:"javascript:;"}).setStyle({position:"absolute",top:0,left:D+"px",width:this.buttonWidth+(Prototype.Browser.IE?1:0)+"px",height:this.starHeight+"px"}));
C.rating=this.buttonRating*E+this.buttonRating;this.buttons.push(C)}.bind(this));this.setBarPosition(this.colorbar,this.average);
this.element.update(this.container);if(this.options.indicator){this.indicator=this.hover.appendChild(new Element("div",{"class":"indicator"}));
this.updateIndicator()}if(!this.locked){this.enable()}},updateAverage:function(A){if(this.rated&&this.options.rerate){this.average=(this.total*this.average-this.rated)/(this.total-1||1)
}var B=this.rated?this.total:this.total++;this.average=(this.average==0)?A:(this.average*(this.rated?B-1:B)+A)/(this.rated?B:B+1)
},updateIndicator:function(){this.indicator.update(new Template(this.options.indicator).evaluate({max:this.options.max,total:this.total,average:(this.average*10).round()/10}))
},getBarPosition:function(B){var A=(this.boxWidth-(B/this.buttonRating)*this.buttonWidth);return parseInt(this.options.inverse?A.ceil():-1*A.floor())
},setBarPosition:function(A,B){if(this.options.effect&&this["activeEffect_"+A.scope]){Effect.Queues.get(A.scope).remove(this["activeEffect_"+A.scope])
}var D=this.getBarPosition(B);if(arguments[2]){var C=parseInt(A.getStyle("left"));var F=this.getBarPosition(B);
if(C==F){return }var E=((this.maxPosition-(C-F).abs()).abs()/this.zeroPosition.abs()).toFixed(2);this["activeEffect_"+A.scope]=new Effect.Morph(A,{style:{left:D+"px"},queue:{position:"end",limit:1,scope:A.scope},duration:(this.options.duration*E)})
}else{A.setStyle({left:D+"px"})}},onClick:function(C){var B=C.element();if(!B.rating){return }this.updateAverage(B.rating);
if(this.options.indicator){this.updateIndicator()}if(this.options.ghosting){this.setBarPosition(this.ghost,this.average,(window.Effect&&Effect.Morph))
}if(!this.rated){this.status.addClassName("rated")}var A=!!this.rated;this.rated=B.rating;if(!this.options.rerate){this.disable();
this.status.addClassName("locked");this.onMouseout(C)}var D={average:this.average,identity:this.options.identity,max:this.options.max,rated:B.rating,rerated:A,total:this.total};
this.options.onRate(this.element,D);this.element.fire("starbox:rated")},onMouseout:function(A){this.setBarPosition(this.colorbar,this.average,(this.options.effect&&this.options.effect.mouseout));
this.hovered=false;if(this.options.hoverClass){this.hover.removeClassName(this.options.hoverClass)}if(this.options.hoverColor){this.colorbar.setStyle({background:this.options.color})
}},onMouseover:function(B){var A=B.element();if(!A.rating){return }this.setBarPosition(this.colorbar,A.rating,(this.options.effect&&this.options.effect.mouseover));
if(!this.hovered&&this.options.hoverClass){this.hover.addClassName(this.options.hoverClass)}this.hovered=true;
if(this.options.hoverColor){this.colorbar.setStyle({background:this.options.hoverColor})}}});siteStrings=new Hash({"thankyou":"Thank You!","thankyou_manual_request":"Thank you for your post!","thankyou_manual_post":"Thank you for your contribution!","thankyou_product_problem":"Thank you for your post!","thankyou_product_tip":"Thank you for your contribution!","thankyou_comment":"Thank you for your contribution!","conf_manual_request":'<div id="pop_wrapper"><span class="pop_title">Thank You For Your Post!</span><br clear="all"/><p>Your post regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to the ManualsOnline membership so that members can help you.<br /><br />This post will also be added to your filing cabinet and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_manual_request_notifyme":'<div id="pop_wrapper"><p> We are constantly adding new manuals to our library. You will be notified as soon as it is added.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_manual_post":'<div id="pop_wrapper"><span class="pop_title">Thank You For Your Contribution!</span><br clear="all"/><p>Your post regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to the ManualsOnline membership to assist them.<br /><br />This post will also be added to your filing cabinet and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_product_problem":'<div id="pop_wrapper"><span class="pop_title">Thank You For Your Post!</span><br clear="all"/><p>Your problem regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to the ManualsOnline membership so that members can help you.<br /><br />This problem will also be added to your filing cabinet and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_product_tip":'<div id="pop_wrapper"><span class="pop_title">Thank You For Your Contribution!</span><br clear="all"/><p>Your tip regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to the ManualsOnline membership to assist them.<br /><br />This tip will also be added to your filing cabinet and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_comment":'<div id="pop_wrapper"><span class="pop_title">Thank You For Your Contribution!</span><br clear="all"/><p>Your comment will be displayed to the ManualsOnline membership.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/sites/exchange.manualsonline.com/but_close.gif" /></a></center></div>',"conf_manual_request":'<div id="pop_wrapper"><p>Your #{sMfgName} #{sProduct} #{sDeviceType} manual request will be displayed to the ManualsOnline membership so that members can help you.<br /><br />This post will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_manual_post":'<div id="pop_wrapper"><p>Your post regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to assist the ManualsOnline membership.<br /><br />This post will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_product_problem":'<div id="pop_wrapper"><p>Your #{sMfgName} #{sProduct} #{sDeviceType} help request will be displayed to the ManualsOnline membership so that members can help you.<br /><br />This post will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_product_tip":'<div id="pop_wrapper"><p>Your tip regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to assist the ManualsOnline membership.<br /><br />This tip will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"conf_comment":'<div id="pop_wrapper"><p>Your comment will be displayed to the ManualsOnline membership.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"response_manual_request":'<div id="pop_wrapper"><p>Your comment regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to the ManualsOnline membership.<br /><br />This request will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="window.location.reload(true)" /><img src="/images/but_close.gif" /></a></center></div>',"response_manual_post":'<div id="pop_wrapper"><p>Your comment regarding a #{sMfgName} #{sProduct} #{sDeviceType} will be displayed to the ManualsOnline membership.<br /><br />This comment will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="window.location.reload(true)" /><img src="/images/but_close.gif" /></a></center></div>',"response_product_problem":'<div id="pop_wrapper"><p>Your help regarding a #{sMfgName} #{sProduct} #{sDeviceType} problem will be displayed to the ManualsOnline membership.<br /><br />This problem will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="window.location.reload(true)" /><img src="/images/but_close.gif" /></a></center></div>',"response_product_tip":'<div id="pop_wrapper"><p>Your comment regarding a #{sMfgName} #{sProduct} #{sDeviceType} tip will be displayed to the ManualsOnline membership.<br /><br />This request will also be added to your stuff and you will be notified when members respond.</p><center><a onclick="window.location.reload(true)" /><img src="/images/but_close.gif" /></a></center></div>',"email_notify":"Email Notification Confirmation","cancel_notify":"Email Notification Cancellation","email_notify_message":'<div id="pop_wrapper"><p>You will be notified of responses via email.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"cancel_notify_message":'<div id="pop_wrapper"><p>Are you sure you want us to cancel your notification?</p><center><a onclick="toggleWatch(#{idThread});Lightbox.hideBox();" /><img src="/images/but_yes.gif" /></a> <a onclick="Lightbox.hideBox();" /><img src="/images/but_no.gif" /></a></center></div>',"manual_request_title":"Ask the Membership For Help Finding a Manual","manual_post_title":"Tell Us About a Manual You've Found","product_problem_title":"Ask ManualsOnline Members for Help With A Problem","product_tip_title":"Share a Tip With The ManualsOnline Members","verify_length_body":"Max 512 characters allowed.<br />","verify_subject":"Please enter a subject.<br />","verify_product_tip_body":"Please enter your tip.<br />","verify_product_problem_body":"Please enter a description of your problem.<br />","verify_prod_num":"Please enter a model name and/or number.<br />","verify_mfg":"Please enter a manufacturer.<br />","verify_dt":"Please enter a product type.<br />","verify_urlorfile":"Please either upload a file or enter a URL.<br />","verify_url":"The URL you have entered is invalid.","verify_comment_body":"Please enter a comment.<br />","verify_threadType":"Please choose Product Help or Manual Request.<br />","unknown_user":"Please register or login before submit.<br />","notify_disable_manual_request":'<span>You\'ll be notified when it\'s found.</span> <a style="font-size:10px; font-weight:normal;" href="#" onClick="toggleWatchOff(#{idThread}); return false;" title="Cancel your notification.">(Cancel)</a>',"notify_enable_manual_request":'<a href="#" onClick="toggleWatchOn(#{idThread}); return false;">Notify Me When It\'s found.</a>',"notify_disable_default":'<span>You will be notified of replies</span> <a style="font-size:10px; font-weight:normal;" href="#" onClick="toggleWatchOff(#{idThread}); return false;" title="Cancel your notification.">(Cancel)</a>',"notify_enable_default":'<a href="#" onClick="toggleWatchOn(#{idThread}); return false;">Get notified about comments</a>',"digest_email_title":"Email Updates","digest_email_subscribe":'<div id="pop_wrapper"><p>You will now receive updates weekly or as new information on the stuff you own becomes available.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"digest_email_unsubscribe":'<div id="pop_wrapper"><p>You will not receive updates on the stuff you own.</p><center><a onclick="Lightbox.hideBox();" /><img src="/images/but_close.gif" /></a></center></div>',"eos":"eos","concierge_title_suggestion":"Do we have a match?","concierge_text_suggestion":'<div id="pop_wrapper"><p>The links below are for manuals currently in our library that are similar to the one you\'re requesting.</p><p>#{list_suggestions}</p><br /><center><a onclick="Lightbox.hideBox();" /><img id="continue_and_submit" src="/images/but_no_submit.gif" /></a></center></div>',"concierge_title":"Good news!","concierge_text":'<div id="pop_wrapper"><p>ManualsOnline has the manual you have requested!<br/>Click the button below to download the manual for the <a href="#{url}" onClick="logUCClick(this.href); return false;">#{sMfgName} #{model} #{sDeviceType}</a></p><br /><center><a class="memLink" target="_blank" href="javascript:;" title="#{res_url}"    onclick="Lightbox.hideBox(); updateSGCookie(null,null,#{idProduct});" onmousedown="this.href = this.title" /><img src="/images/but_getmanual.gif" /></a></center></div>'});
function getCommonWidgetParameters(){parameters=new Hash({"scheme":location.protocol,"host":location.hostname,"path":location.pathname,"cb":Math.floor(Math.random()*99999999999)});
return parameters}var fpWidget=Class.create({initialize:function(J,T,R,A,G,L,N,H,E,K,Q){this.setDefaultState(G,L,H,N,E);
if(Q){this.attributeSearch=Q.attributeSearch;this.sAttributeValue=Q.attributeDefaultValue;this.titleHTML=Q.titleHTML;
this.hideFindItButton=Q.hideFindItButton;this.modeNarrowResults=Q.modeNarrowResults;this.titleMfgSearch=Q.titleMfgSearch;
this.searchFacets=Q.searchFacets;this.fnOnSelectMfg=Q.fnOnSelectMfg;this.fnOnSelectAttr=Q.fnOnSelectAttr
}if(this.sSiteHost){this.scope="site"}else{if(this.idMfg>0){this.scope="mfg"}else{this.scope="none"}}if(K){this.allowAddProduct=true
}else{this.allowAddProduct=false}if(this.scope=="none"){var D="Select a Product Type";var S="Select a Brand"
}else{var S="Loading....";var D="Loading...."}if((!this.allowAddProduct)&&(this.modeNarrowResults==undefined)){this.defaultProductText="All Models"
}else{this.defaultProductText="Select a Model"}this.idProduct=0;this.instanceName=T;this.appKey=R;if(A){this.dataservServer=A;
this.head=document.getElementsByTagName("head").item(0);var C=getCommonWidgetParameters();C.set("key",this.appKey);
var B="http://"+this.dataservServer+"/dataserv/log/imp?"+C.toQueryString();this.scriptRequest(B)}else{this.dataservServer=false
}this.target=$(J);if(this.target==null){return }var F=new Element("div",{"id":this.target.id+"_body"});
var M=new Element("div",{"id":this.target.id+"_footer"});var P="Manual Finder";if(A){var P='<img src="http://owneriq.net/images/sites/www.owneriq.net/sm_oiq_logo.gif" alt="Owner IQ"> '+P
}if(this.titleHTML){P=this.titleHTML}var I=new Element("div",{"id":this.target.id+"_title"}).update(P);
var O=new Element("form",{"id":this.target.id+"_form"});if(this.attributeSearch){this.attributeLabel=this.attributeSearch.toLowerCase();
this.attributeValuesList=new Element("select",{"class":"combo",disabled:true}).update(new Element("option",{"value":0}).update("Select a "+this.attributeSearch))
}else{this.attributeValuesList=new Element("span")}if(this.scope=="none"){this.siteList=new Element("select",{"class":"combo",disabled:true}).update(new Element("option",{"value":0}).update("Select a Category"));
O.insert(this.siteList)}if(this.scope=="mfg"){this.mfgList=""}else{if(this.searchFacets){this.mfgList=new Element("select",{"class":"combo","disabled":true}).update(new Element("option",{"value":0}).update(this.defaultMfgText))
}else{this.mfgList=new Element("select",{"class":"combo","disabled":true,"id":T+"mfgList"}).update(new Element("option",{"value":this.idMfg}).update(S))
}}this.resetButton=new Element("span",{"class":"resetButton","style":"display: none;"}).update("Reset");
this.resetButton.observe("click",this.reset.bindAsEventListener(this));this.dtList=new Element("select",{"class":"combo","disabled":true,"id":T+"dtList","style":(this.attributeLabel&&L)?"display:none;":""}).update(new Element("option",{"value":this.idDeviceType}).update(D));
this.prodList=new Element("select",{"class":"combo","disabled":true}).update(new Element("option",{"value":0}).update(this.defaultProductText));
if(this.allowAddProduct){this.prodInput=new Element("input",{"maxlength":30,"id":this.instanceName+"prodInput","disabled":true,"style":"display:none"});
this.prodInputCounter=new Element("span",{"class":"prodInputCounter","style":"display:none"}).update(""+parseInt(this.prodInput.maxLength)+" chars");
this.prodInput.observe("keyup",this.updateInputCounter.bindAsEventListener(this))}if(!this.hideFindItButton){if(T=="narrowCellphoneSearch"){this.goButton=new Element("img",{"class":"actionButton","alt":"Find It!","src":"/images/but_findit_sm.gif"})
}else{this.goButton=new Element("img",{"class":"actionButton","alt":"Find It!","src":"/images/but_findit.gif"})
}this.goButton.observe("click",this.goURL.bindAsEventListener(this))}O.insert(this.mfgList).insert(this.dtList).insert(this.attributeValuesList).insert(this.prodList).insert(this.prodInput).insert(this.prodInputCounter).insert(this.goButton).insert(this.resetButton);
if(A){this.target.addClassName("external");I.addClassName("external");O.addClassName("external");M.addClassName("external");
F.addClassName("external");F.insert("Access product self-support information for thousands of consumer products.<br /><br />")
}F.insert(O);this.target.update(I).insert(F).insert(M);if(this.scope=="none"){this.populateSiteList()
}else{if(this.scope=="site"){this.populateMfgList()}if(this.attributeSearch){this.populateAttributeSearchList()
}this.populateDtList();this.populateProdList()}if(!this.allowAddProduct&&this.hasValidTarget()){this.resetButton.show()
}if(this.searchFacets==undefined){this.setSWUrl()}},setDefaultState:function(B,D,A,C,E){if(D){this.idDeviceType=D;
this.sDeviceType=A}else{this.idDeviceType=0;this.sDeviceType=""}if(C||E){this.idMfg=C;this.sMfg=E;this.sMfgInput=E
}else{this.sMfg="";this.idMfg=0}if(B){this.sSiteHost=B}else{this.sSiteHost=false}this.defaultState={idDeviceType:this.idDeviceType,sDeviceType:this.sDeviceType,idMfg:this.idMfg,sMfg:this.sMfg,sSiteHost:B}
},updateInputCounter:function(){this.prodInputCounter.innerHTML=""+(parseInt(this.prodInput.maxLength)-parseInt((this.prodInput.value==this.prodInput.emptyVal?"":this.prodInput.value).length))+" chars"
},updateMfgDtLists:function(A,B){this.idProduct=0;this.prodList.disable();if(this.allowAddProduct){this.prodInput.value="";
this.prodInput.disable();this.prodInput.hide();this.prodInputCounter.hide();this.prodInputCounter.update(""+parseInt(this.prodInput.maxLength)+" chars")
}this.prodList.update(new Element("option",{"value":0}).update(this.defaultProductText));if(B=="site"){this.sSiteHost=this.siteList.down(this.siteList.selectedIndex).readAttribute("mem:sSiteHost");
this.idMfg=0;this.idDeviceType=0;this.sMfg="";this.sDeviceType="";this.populateMfgList();this.populateDtList()
}else{if(B=="dt"&&this.scope!="mfg"){this.populateMfgList()}if(B=="mfg"){this.populateDtList()}if(this.idMfg!=0&&this.idDeviceType!=0){this.populateProdList()
}}if(!this.allowAddProduct&&this.hasValidTarget()){this.resetButton.show()}this.setSWUrl()},reset:function(){this.resetButton.hide();
this.idMfg=0;this.sMfg="";if(this.attributeSearch){this.sAttributeValue=undefined;this.populateAttributeSearchList();
if(this.searchFacets){document.location=(document.location.href.replace(/#.*/,"").replace("?","?&").replace(/&[mc]=[^&]*/g,"")).replace("?&","?");
return }var A=getCommonWidgetParameters()}else{this.idDeviceType=0;this.sDeviceType="";this.sSiteHost=false
}if(this.scope=="site"){this.sSiteHost=this.defaultState.sSiteHost}if(this.scope=="mfg"){this.idMfg=this.defaultState.idMfg;
this.sMfg=this.defaultState.sMfg}if(this.scope=="none"||this.scope=="site"){this.mfgList.disable();this.dtList.disable()
}this.prodList.disable();if(this.allowAddProduct){this.prodInput.value="";this.prodInput.disable();this.prodInput.hide();
this.prodInputCounter.hide();this.prodInputCounter.update(""+parseInt(this.prodInput.maxLength)+" chars")
}this.prodList.update(new Element("option",{"value":0}).update(this.defaultProductText));if(this.scope=="none"){this.mfgList.update(new Element("option",{"value":0}).update("Select a Brand"));
this.mfgList.selectedIndex=0;this.dtList.update(new Element("option",{"value":0}).update("Select a Product Type"));
this.dtList.selectedIndex=0;this.siteList.selectedIndex=0}else{this.populateMfgList();this.populateDtList();
this.populateProdList()}this.targetUrl=false},populateSiteList:function(){var A=getCommonWidgetParameters();
A.set("key",this.appKey);A.set("fields","sShortLabel,sSiteHost");A.set("noAppendKey","true");if(this.dataservServer){A.set("callback",this.instanceName+".updateSiteList");
var B="http://"+this.dataservServer+"/dataserv/site/list?"+A.toQueryString();this.scriptRequest(B)}else{new Ajax.Request("/dataserv/site/list",{method:"get",asynchronous:true,parameters:A.toQueryString(),evalJSON:true,onSuccess:function(C){this.updateSiteList(C.responseJSON).bind(this)
}.bind(this)})}},updateSiteList:function(B){if(typeof (B)=="object"){var A=new Element("select",{"class":"combo"}).update(new Element("option",{"value":0}).update("Select a Category"));
B.response.each(function(C){A.insert(new Element("option",{"id":C.id,"mem:url":C.url,"mem:sSiteHost":C.sSiteHost}).update(C.sShortLabel))
}.bind(this));Element.replace(this.siteList,A);this.siteList=A;this.siteList.enable();this.siteList.observe("change",this.updateMfgDtLists.bindAsEventListener(this,"site"))
}},populateAttributeSearchList:function(){if(this.searchFacets){this.updateAttributeSearchList(this.searchFacets.carrier);
return }var A=getCommonWidgetParameters();A.set("sSiteHost",this.sSiteHost);A.set("key",this.appKey);
A.set("fields","sShortLabel,sSiteHost");if(this.idMfg){A.set("idMfg",this.idMfg)}if(this.dataservServer){A.set("callback",this.instanceName+".updateSiteList");
var B="http://"+this.dataservServer+"/dataserv/device/attributevalueslist?attributeName="+this.attributeSearch.toLowerCase()+"&idDeviceType="+this.idDeviceType+"&"+A.toQueryString();
this.scriptRequest(B)}else{new Ajax.Request("/dataserv/device/attributevalueslist?attributeName="+this.attributeLabel+"&idDeviceType="+this.idDeviceType,{method:"get",asynchronous:true,parameters:A.toQueryString(),evalJSON:true,onSuccess:function(C){this.updateAttributeSearchList(C.responseJSON.response).bind(this)
}.bind(this)})}},updateAttributeSearchList:function(E){if(E.length==undefined){E.length=E.cnt}if(E.length>0){this.tmpAttributeSearchList=new Element("select",{"class":"combo"}).update(new Element("option",{"value":0}).update("Select a "+this.attributeSearch));
for(var D=0,A=0,C="";D<E.length;D++){var B=E[D].sValue;if(this.searchFacets){B=E[D].label}C+='<option value="'+E[D].id+'">'+B+"</option>";
if(this.sAttributeValue==B){A=D+1;this.populateProdList()}}this.tmpAttributeSearchList.insert(C)}else{this.tmpAttributeSearchList=new Element("select",{"class":"combo"}).update(new Element("option",{"value":0}).update("No "+this.attributeSearch+"s Found"))
}Element.replace(this.attributeValuesList,this.tmpAttributeSearchList);this.attributeValuesList=this.tmpAttributeSearchList;
this.tmpAttributeSearchList=null;if(E.length>0){this.attributeValuesList.observe("change",this.setAttributeValue.bindAsEventListener(this));
this.attributeValuesList.enable()}else{this.attributeValuesList.disable()}this.attributeValuesList.selectedIndex=A;
this.attributeValuesList.selectedUrl=0},setAttributeValue:function(){this.sAttributeValue=this.attributeValuesList.down(this.attributeValuesList.selectedIndex).text;
this.populateMfgList();this.populateProdList();if(this.modeNarrowResults){this.likeFindItPush=true}if(this.fnOnSelectAttr){this.fnOnSelectAttr(this.sAttributeValue==("Select a "+this.attributeSearch)?"":this.sAttributeValue)
}this.setSWUrl()},populateDtList:function(){this.dtList.disable();if(this.idMfg==0&&!this.sSiteHost){return 
}this.dtList.update(new Element("option",{"value":0}).update("Loading...."));var A=getCommonWidgetParameters();
A.set("key",this.appKey);A.set("fields","sDeviceType");A.set("view","indexed");if(this.sSiteHost){A.set("sSiteHost",this.sSiteHost);
if(this.idMfg==0){A.set("useCache",1)}}if(this.idMfg!=0){A.set("idMfg",this.idMfg)}if(this.dataservServer){A.set("callback","window."+this.instanceName+".updateDtList");
var B="http://"+this.dataservServer+"/dataserv/device/list?"+A.toQueryString();this.scriptRequest(B)}else{new Ajax.Request("/dataserv/device/list",{method:"get",asynchronous:true,parameters:A.toQueryString(),evalJSON:true,onSuccess:function(C){this.updateDtList(C.responseJSON).bind(this)
}.bind(this)})}},updateDtList:function(A){if(typeof (A)=="object"){if(A.cnt>0){if(typeof (this.dtIndex)=="undefined"){this.dtIndex=new indexPicker(A.indexes,this.instanceName+"dtIndex",{element:this.dtList.id,hook:{target:"bottomLeft",indexPicker:"topLeft"},callback:this.setChosenDt.bind(this)})
}else{this.dtIndex.setColumnContents(A.indexes)}if(this.idDeviceType!=0){this.dtList.update(new Element("option").update(this.sDeviceType))
}else{this.dtList.update(new Element("option",{"value":0}).update("Select a Product Type"))}this.dtList.selectedIndex=0;
this.dtList.enable()}else{this.dtList.update(new Element("option",{"value":0}).update("No Product Types Found"))
}}},populateProdList:function(){if(this.searchFacets){this.prodList.update(new Element("option",{"value":0}).update("Loading...."));
this.updateProdList(this.searchFacets.product);return }if(this.idMfg==0||this.idDeviceType==0){return 
}var A=getCommonWidgetParameters();A.set("key",this.appKey);A.set("fields","label");A.set("view","options");
A.set("idMfg",this.idMfg);A.set("idDeviceType",this.idDeviceType);A.set("statuses","PUBLISH");if(this.attributeSearch){if(this.sAttributeValue){A.set("attributeSearch",this.attributeLabel);
A.set("sAttributeValue",this.sAttributeValue)}}if(this.sSiteHost){A.set("sSiteHost",this.sSiteHost)}if(this.dataservServer){A.set("callback","window."+this.instanceName+".updateProdList");
var B="http://"+this.dataservServer+"/dataserv/product/list?"+A.toQueryString();this.scriptRequest(B)
}else{new Ajax.Request("/dataserv/product/list",{method:"get",asynchronous:true,evalJSON:false,parameters:A.toQueryString(),onSuccess:function(C){this.updateProdList(C.responseText).bind(this)
}.bind(this)})}},updateProdList:function(D){if(D.length>0){this.tmpProdList=new Element("select",{"class":"combo"}).update(new Element("option",{"value":0}).update(this.defaultProductText));
if(this.searchFacets){for(var C=0,A=0,B="";C<D.length;C++){B+='<option value="'+D[C].id+'">'+D[C].label+"</option>"
}this.tmpProdList.insert(B)}else{this.tmpProdList.insert(D)}}else{this.tmpProdList=new Element("select",{"class":"combo"}).update(new Element("option",{"value":0}).update("No Products Found"))
}Element.replace(this.prodList,this.tmpProdList);this.prodList=this.tmpProdList;this.tmpProdList=null;
if(D.length>0){this.prodList.observe("change",this.setSWUrl.bindAsEventListener(this));this.prodList.enable()
}else{this.prodList.disable()}this.prodList.selectedIndex=0;if(this.allowAddProduct){if(D.length>0){this.prodInput.emptyVal="Or enter product model name";
this.prodInput.style.cssText="color:gray;"}else{this.prodInput.style.cssText="";this.prodInput.emptyVal="Enter product model name"
}this.prodInput.onfocus=function(){this.style.cssText="";this.value="";this.onfocus=function(){}};this.prodInput.value=this.prodInput.emptyVal;
this.prodInput.show();this.prodInputCounter.show();this.prodInput.enable()}},populateMfgList:function(){if(this.searchFacets){this.updateMfgList(this.searchFacets.mfg);
return }if(!this.sSiteHost){return }this.mfgList.disable();this.mfgList.update(new Element("option",{"value":0}).update("Loading...."));
var A=getCommonWidgetParameters();A.set("key",this.appKey);A.set("fields","sMfgName");A.set("view","indexed");
if(this.sSiteHost){A.set("sSiteHost",this.sSiteHost)}if(this.idDeviceType!=0){A.set("idDeviceType",this.idDeviceType)
}else{A.set("useCache",1)}if(this.attributeSearch){if(this.sAttributeValue){A.set("attributeSearch",this.attributeLabel);
A.set("sAttributeValue",this.sAttributeValue)}}if(this.dataservServer){A.set("callback","window."+this.instanceName+".updateMfgList");
var B="http://"+this.dataservServer+"/dataserv/mfg/list?"+A.toQueryString();this.scriptRequest(B)}else{new Ajax.Request("/dataserv/mfg/list",{method:"get",asynchronous:true,parameters:A.toQueryString(),evalJSON:true,onSuccess:function(C){this.updateMfgList(C.responseJSON).bind(this)
}.bind(this)})}},updateMfgList:function(A){if(typeof (A)=="object"){if(A.cnt>0){if(typeof (this.mfgIndex)=="undefined"){this.mfgIndex=new indexPicker(A.indexes,this.instanceName+"mfgIndex",{element:this.mfgList.id,hook:{target:"bottomLeft",indexPicker:"topLeft"},callback:this.setChosenMfg.bind(this)})
}else{this.mfgIndex.setColumnContents(A.indexes)}if(this.idMfg!=0){this.mfgList.update(new Element("option").update(this.sMfg))
}else{this.mfgList.update(new Element("option",{"value":0}).update(this.titleMfgSearch?this.titleMfgSearch:"Select a Brand"))
}if(this.searchFacets){this.setFacets(A,"mfg",this.titleMfgSearch?this.titleMfgSearch:"Select a Brand",this.sMfgInput?this.sMfgInput:undefined)
}this.mfgList.selectedIndex=0;this.mfgList.enable()}else{this.mfgList.update(new Element("option",{"value":0}).update("No Brands Found"))
}}},setFacets:function(G,D,F,E){this.tmpFacet=new Element("select",{"class":"combo"}).update(new Element("option",{"value":0}).update(F));
for(var C=0,A=0,B="";C<G.cnt;C++){B+='<option value="'+G[C].label+'">'+G[C].label+"</option>";if(E==G[C].label){A=C+1
}}if(E){this.tmpFacet.update(new Element("option").update(E))}this.tmpFacet.insert(B);if(D=="mfg"){Element.replace(this.mfgList,this.tmpFacet);
this.mfgList=this.tmpFacet;this.mfgList.observe("change",function(){this.sMfg=this.mfgList.down(this.mfgList.selectedIndex).text;
if(this.fnOnSelectMfg){this.fnOnSelectMfg(this.sMfg)}}.bindAsEventListener(this))}this.tmpFacet=null},setChosenMfg:function(B){var A=Event.element(B);
if(A.nodeName!="A"){return }this.mfgList.update(new Element("option").update(B.target.innerHTML));this.mfgList.selectedIndex=0;
this.idMfg=A.id;this.sMfg=A.innerHTML;this.mfgIndex.closeWindow();this.updateMfgDtLists(null,"mfg");if(this.attributeSearch){this.populateAttributeSearchList()
}if(this.fnOnSelectMfg){this.fnOnSelectMfg(this.sMfg)}if(this.modeNarrowResults){this.likeFindItPush=true;
this.setSWUrl()}},setChosenDt:function(B){var A=Event.element(B);if(A.nodeName!="A"){return }this.dtList.update(new Element("option").update(B.target.innerHTML));
this.dtList.selectedIndex=0;this.idDeviceType=A.id;this.sDeviceType=A.innerHTML;this.dtIndex.closeWindow();
this.updateMfgDtLists(null,"dt")},hasValidTarget:function(){if((this.scope=="site"&&this.idProduct+this.idDeviceType+this.idMfg==0)||(this.scope=="mfg"&&this.idProduct+this.idDeviceType==0)||(this.scope=="none"&&!this.sSiteHost)){return false
}else{return true}},setSWUrl:function(){this.idProduct=this.prodList.down(this.prodList.selectedIndex).value;
this.sProduct=this.prodList.down(this.prodList.selectedIndex).text;if(!this.hasValidTarget()){this.targetUrl=false
}else{if(this.idProduct!=0||this.idDeviceType!=0||this.idMfg!=0){if(this.allowAddProduct){if(this.idDeviceType!=0&&this.idMfg!=0&&this.idProduct==0){this.prodInput.show();
this.prodInputCounter.show()}else{this.prodInput.hide();this.prodInputCounter.hide()}}var B=getCommonWidgetParameters();
B.set("key",this.appKey);B.set("fields","url");B.set("noAppendKey","true");if(this.sSiteHost){B.set("sSiteHost",this.sSiteHost)
}var D="list";if(this.idProduct!=0){var A="product";B.set("id",this.idProduct);B.set("fields","label");
if(this.searchFacets){B.set("id",undefined);B.set("str",this.sProduct)}}else{if(this.idDeviceType!=0){var A="device";
if(this.attributeSearch&&this.sAttributeValue!=undefined){B.set("sAttributeValue",this.sAttributeValue);
B.set("idDeviceType",this.idDeviceType);B.set("attributeName",this.attributeLabel);B.set("sSiteHost",this.sSiteHost);
D="attributevalueslist"}else{B.set("id",this.idDeviceType)}if(this.idMfg>0){B.set("idMfg",this.idMfg)
}}else{if(this.idMfg>0){var A="mfg";B.set("id",this.idMfg)}}}if(this.dataservServer){B.set("callback","window."+this.instanceName+".updateSWUrl");
var C="http://"+this.dataservServer+"/dataserv/"+A+"/"+D+"?"+B.toQueryString();this.scriptRequest(C)}else{new Ajax.Request("/dataserv/"+A+"/"+D,{method:"get",asynchronous:true,parameters:B.toQueryString(),evalJSON:true,onSuccess:function(E){this.updateSWUrl(E.responseJSON).bind(this)
}.bind(this)})}}else{if(this.siteList&&this.sSiteHost){this.targetUrl=this.siteList.down(this.siteList.selectedIndex).readAttribute("mem:url")
}}}},updateSWUrl:function(A){if(typeof (A)=="object"){if(A.response.length>0){this.targetUrl=A.response.first().url;
if((this.idProduct!=0)||(this.likeFindItPush)){this.goURL()}}}},goURL:function(){if(this.targetUrl){if(!this.dataservServer){urlParts=parseUri(this.targetUrl);
logEvent("fpw clickthru",{"scheme":urlParts.protocol,"host":urlParts.host,"path":urlParts.path},function(){window.location.href=this.targetUrl
}.bind(this))}}return false},scriptRequest:function(B){var A=new Element("script",{"src":B,"type":"text/javascript"});
setTimeout(function(){this.head.appendChild(A)}.bind(this),0)}});var recentSidebarWidget=Class.create({initialize:function(B,C,A){if(!$("recent"+B+"Box")){return false
}this.element=$("recent"+B+"Box");this.ctrlBox=$("recent"+B+"Ctrl");this.scroller=this.element.firstDescendant();
this.requestParameters=getCommonWidgetParameters();this.requestParameters.set("key","rew");this.requestParameters.set("view","recent");
this.options=Object.extend({dataservServer:"www.owneriq.net",effectDuration:0.3,fetchMode:"ajax"},arguments[3]||{});
if(C.length==1){this.scroller.setStyle({left:"0px"})}else{this.leftButton=new Element("a").update(new Element("img",{"src":"/images/but_prev.gif","alt":"previous","width":"20","height":"19"}));
this.pauseButton=new Element("a").update(new Element("img",{"src":"/images/but_pause.gif","alt":"pause","width":"20","height":"19"}));
this.rightButton=new Element("a").update(new Element("img",{"src":"/images/but_next.gif","alt":"next","width":"20","height":"19"}));
this.leftButton.observe("click",this.clickButton.bindAsEventListener(this,"right"));this.pauseButton.observe("click",this.stop.bindAsEventListener(this));
this.rightButton.observe("click",this.clickButton.bindAsEventListener(this,"left"));this.ctrlBox.insert(this.leftButton);
this.ctrlBox.insert(this.pauseButton);this.ctrlBox.insert(this.rightButton);this.ctrlBox.show()}if(C.length==2){C[2]=C[0];
C[3]=C[1]}if(this.options.fetchMode=="jsr"){this.options.requestPath="http://"+this.options.dataservServer+"/dataserv/";
this.requestParameters.set("callback",A+".populateItems");this.scriptobjects=Array();C.each(function(E,D){this.scriptobjects[D]=new JSONscriptRequest(this.options.requestPath+E+"?"+this.requestParameters.toQueryString(),"recentItem"+D);
this.scriptobjects[D].buildScriptTag();this.scriptobjects[D].addScriptTag()},this)}else{if(this.options.fetchMode=="ajax"){this.options.requestPath="/dataserv/";
C.each(function(E,D){new Ajax.Request(this.options.requestPath+E,{method:"get",asynchronous:true,parameters:this.requestParameters.toQueryString(),onSuccess:this.populateItems.bind(this)})
},this)}}if(C.length>1){this.sideBarPE=new PeriodicalExecuter(function(){this.scroll("left")}.bind(this),5)
}},clickButton:function(A,B){this.stop();this.scroll(B)},populateItems:function(response){if(response.responseText!=undefined){html=eval(response.responseText)
}else{html=response}this.scroller.insert({bottom:html})},scroll:function(A){if(A=="left"){new Effect.MoveBy(this.scroller,0,0,{x:-300,y:0,duration:this.options.effectDuration,transition:Effect.Transitions.sinoidal,afterFinish:function(B){toBeMoved=B.element.down().remove();
B.element.setStyle({left:"-300px"});B.element.insert(toBeMoved)}})}if(A=="right"){new Effect.MoveBy(this.scroller,0,0,{x:300,y:0,duration:this.options.effectDuration,transition:Effect.Transitions.sinoidal,afterFinish:function(C){var B=C.element.childElements();
toBeMoved=B.pop();C.element.setStyle({left:"-300px"});C.element.insert({top:toBeMoved})}})}},stop:function(){this.sideBarPE.stop()
}});var indexPicker=Class.create({initialize:function(F,B){this.instanceName=B;this.options=Object.extend({width:600,height:400,element:false,hook:false,offset:{x:0,y:0},scrollDuration:0.4,itemsPerColumn:18,columnOverflowThreshold:0.8,columnWidth:300,heightOffset:86,callback:false,charsPerLine:30},arguments[2]||{});
if(Prototype.Browser.IE||Prototype.Browser.Opera||Prototype.Browser.Gecko){var D="click"}else{var D="mousedown"
}if(this.options.element){this.options.element=$(this.options.element);this.options.element.observe(D,this.showIndex.bindAsEventListener(this))
}this.indexHeader=new Element("div",{"class":"indexPickerHeader"});this.indexFooter=new Element("div",{"class":"indexPickerFooter"});
this.indexControls=new Element("div",{"class":"indexPickerControls"});var C=new Element("img",{"src":"http://owneriq.net/images/but_close_sm.gif","class":"closeButton"});
var E=new Element("a");E.innerHTML="&laquo; back";var A=new Element("a");A.innerHTML="next &raquo;";E.observe("click",this.scroll.bindAsEventListener(this,"left"));
A.observe("click",this.scroll.bindAsEventListener(this,"right"));C.observe("click",this.closeWindow.bindAsEventListener(this));
this.indexControls.insert(E);this.indexControls.insert("&nbsp;|&nbsp;");this.indexControls.insert(A);
this.indexFooter.insert(C);this.wrapper=new Element("div",{"class":"indexPickerWrapper"});this.setColumnContents(F);
this.indexPicker=new Element("div",{"class":"indexPicker"}).insert(this.indexHeader);this.indexPicker.insert(this.wrapper);
this.indexPicker.insert(this.indexControls);this.indexPicker.insert(this.indexFooter);this.wrapper.setStyle({width:this.options.width+"px",height:this.options.height-this.options.heightOffset+"px"});
this.indexPicker.setStyle({width:this.options.width+"px",height:this.options.height+"px",display:"none"});
this.indexPicker.identify();document.body.appendChild(this.indexPicker);if(this.fixIE){this.iframeShim=new Element("iframe",{"class":"iframeShim",src:"javascript:false;"});
this.iframeShim.setStyle({width:this.options.width+8+"px",height:this.options.height+"px",display:"none",zIndex:9000});
document.body.appendChild(this.iframeShim).setOpacity(0)}},setColumnContents:function(A){var A=$H(A);
if(typeof (this.scroller)!="undefined"){this.scroller.remove()}this.scroller=new Element("div",{"class":"indexPickerScroller"});
if(this.options.callback){this.scroller.observe("click",this.options.callback)}this.indexHeader.innerHTML="";
this.numColumns=1;this.counter=0;this.columnContents='<div class="indexPickerColumn">';A.each(function(B){if(this.counter!=0&&this.counter<this.options.itemsPerColumn&&B.value.length>0){this.columnContents+="<br />";
this.counter++}if(this.counter>=(this.options.itemsPerColumn*this.options.columnOverflowThreshold)){this.columnContents+='</div><div class="indexPickerColumn">';
this.numColumns++;this.counter=0}if(B.value.length>0){headerLink=new Element("a",{"href":"javascript:;"});
headerLink.innerHTML=B.key;headerLink.observe("click",this.scrollIndex.bindAsEventListener(this,B.key));
this.columnContents+='<strong id="scrollerItem'+this.instanceName+B.key+'">'+B.key+"</strong>";this.counter+=1.5;
B.value.each(function(C){if(this.counter>=this.options.itemsPerColumn){this.columnContents+='</div><div class="indexPickerColumn">';
this.numColumns++;this.counter=0}this.columnContents+='<a href="javascript:;" id="'+C.id+'">'+C.label+"</a>";
if(C.label.length>this.options.charsPerLine){this.counter++}this.counter++},this)}else{headerLink="<span>"+B.key+"</span>"
}this.indexHeader.insert(headerLink)},this);this.columnContents+='<div id="stopPoint'+this.instanceName+'"></div>';
this.scroller.insert(this.columnContents);this.scroller.setStyle({width:this.numColumns*this.options.columnWidth+"px",left:"0px"});
this.wrapper.update(this.scroller)},scrollIndex:function(B,A){targetElement=$("scrollerItem"+this.instanceName+A);
targetLocation=targetElement.up().cumulativeOffset();if(targetLocation[0]!=this.wrapperLocation[0]){new Effect.MoveBy(this.scroller,0,0,{x:this.wrapperLocation[0]-targetLocation[0],y:0,duration:this.options.scrollDuration,transition:Effect.Transitions.sinoidal})
}},scroll:function(C,B){var E=this.options.width;if(B=="right"){var A=$("stopPoint"+this.instanceName).cumulativeOffset();
if(E>A[0]-this.wrapperLocation[0]){E=A[0]-this.wrapperLocation[0]}E*=-1}else{var D=this.scroller.cumulativeOffset();
if(E>this.wrapperLocation[0]+(D[0]*-1)){E=this.wrapperLocation[0]+(D[0]*-1)}}new Effect.MoveBy(this.scroller,0,0,{x:E,y:0,duration:this.options.scrollDuration,transition:Effect.Transitions.sinoidal})
},closeWindowIfOpen:function(B){var A=$(Event.element(B)).up(".indexPicker");if(!A&&this.indexPicker.visible()){this.closeWindow()
}},closeWindow:function(){document.stopObserving("mousedown",this.closeWindowIfOpen.bindAsEventListener(this));
if(this.fixIE){this.iframeShim.hide()}this.indexPicker.hide()},setIndexLocation:function(){if(this.options.element&&this.options.hook){var D=this.options.element.cumulativeOffset();
var B=this.options.element.getDimensions();switch(this.options.hook.target){case"topLeft":this.options.left=D.left;
this.options.top=D.top;break;case"topRight":this.options.left=D.left+B.width;this.options.top=D.top;break;
case"bottomLeft":this.options.left=D.left;this.options.top=D.top+B.height;break;case"bottomRight":this.options.left=D.left+B.width;
this.options.top=D.top+B.height;break}switch(this.options.hook.indexPicker){case"topLeft":break;case"topRight":this.options.left-=this.options.width;
break;case"bottomLeft":this.options.top-=this.options.height;break;case"bottomRight":this.options.left-=this.options.width;
this.options.top-=this.options.height;break}}else{var A=document.viewport.getHeight();var C=document.viewport.getWidth();
this.options.top=((A/2)-(this.options.height/2)).ceil();this.options.left=((C/2)-(this.options.width/2)).ceil()
}this.options.left+=this.options.offset.x;this.options.top+=this.options.offset.y;this.indexPicker.setStyle({top:this.options.top+"px",left:this.options.left+"px"});
if(this.fixIE){this.iframeShim.setStyle({top:this.options.top+"px",left:this.options.left+"px"})}},showIndex:function(A){Event.stop(A);
this.options.element.blur();document.observe("mousedown",this.closeWindowIfOpen.bindAsEventListener(this));
$$(".indexPicker").invoke("hide");this.setIndexLocation();if(this.fixIE){$$(".iframeShim").invoke("hide");
this.iframeShim.show()}this.indexPicker.show().focus();if(!this.wrapperLocation){this.wrapperLocation=this.wrapper.cumulativeOffset()
}},fixIE:(function(B){var A=new RegExp("MSIE ([\\d.]+)").exec(B);return A?(parseFloat(A[1])<=6):false
})(navigator.userAgent)});function getNextQuestion(A){if(!$("opBuilder")){return }var B=getCommonParameters();
B.set("idSurvey","1");if(window.idProduct){B.set("pageContext[idProduct]",window.idProduct)}if(window.idDeviceType){B.set("pageContext[idDeviceType]",window.idDeviceType)
}if(window.idMfg){B.set("pageContext[idMfg]",window.idMfg)}if(window.idCategory){B.set("pageContext[idCategory]",window.idCategory)
}if(A){B.update($H(A))}new Ajax.Request("/survey/question/getnextquestion",{method:"get",asynchronous:true,parameters:B.toQueryString(),onSuccess:function(C){if(C.responseJSON.result==1){$("opBuilderWrapper").hide();
if($("opBuilderWrapperDummy")){$("opBuilderWrapperDummy").remove()}}else{$("opBuilder").update(C.responseJSON.html);
if(!$("opBuilderWrapper").visible()){new Effect.Appear($("opBuilderWrapper"),{duration:0.5,afterFinish:function(){var D=new Element("div",{id:"opBuilderWrapperDummy"});
var E=$("opBuilderWrapper").getDimensions();var F=$("opBuilderWrapper").cumulativeOffset();D.setStyle({height:E.height+"px"});
$("opBuilderWrapper").insert({before:D});$("opBuilderWrapper").setStyle({position:"absolute",width:E.width+"px",height:E.height+"px",top:F.top-10+"px"})
}})}else{resizeOpBuilder()}if(memUser.id!=0){renderFilingCabinets()}}},onFailure:function(){$("opBuilderWrapper").hide();
if($("opBuilderWrapperDummy")){$("opBuilderWrapperDummy").remove()}}})}function resizeOpBuilder(){var A=$("opBuilder").getDimensions();
var B=$("opBuilderWrapper").getDimensions();if(A.height!=B.height+5){new Effect.Morph($("opBuilderWrapper"),{style:{height:A.height+5+"px"},duration:0.5,afterFinish:function(){if(!isIE6()){if(A.height>50){$("opBuilderWrapper").setStyle({background:"transparent url(/images/bg_opbuilder_bottom.png) no-repeat left bottom"})
}else{$("opBuilderWrapper").setStyle({background:"transparent url(/images/bg_opbuilder_bottom.gif) no-repeat left bottom"})
}if(Prototype.Browser.Gecko){refreshView()}}}})}}function displayFooterSurvey(A){if(!isIE6()){if(typeof (A)!="undefined"){window.afterSurveyAction=function(){window.location.href=A.href
}}var B=getCommonParameters();new Ajax.Request("/survey/survey/footer-survey",{method:"get",asynchronous:true,parameters:B.toQueryString(),onSuccess:function(D){$("body").insert(D.responseText);
var C=$("footerSurveyScroller").getHeight();$("footerSurveyScroller").setStyle({top:C+"px"});new Effect.Move($("footerSurveyScroller"),{x:0,y:-1*C,duration:0.5,mode:"relative",afterFinish:function(){logEvent("footerSurveyDisplay")
}})}})}else{if(typeof (A)!="undefined"){window.location.href=A.href}}}function closeFooterSurvey(){hideFooterSurvey();
logEvent("footerSurveyClose")}function hideFooterSurvey(){if($("footerSurvey")){var A=$("footerSurveyScroller").getHeight();
new Effect.Move($("footerSurveyScroller"),{x:0,y:A,duration:0.5,mode:"relative",afterFinish:function(){$("footerSurvey").remove()
}})}if(window.afterSurveyAction){window.afterSurveyAction();window.afterSurveyAction=function(){}}}function submitFooterSurvey(){var A=getCommonParameters();
new Ajax.Request("/survey/survey/submit-footer-survey",{method:"get",asynchronous:true,parameters:A.toQueryString()+"&"+$("footerSurveyForm").serialize(),onComplete:function(){hideFooterSurvey()
}})}window.refresh_rooms=function(){new Ajax.Request("/regman/user/getOPData.json",{method:"post",options:{asynchronous:false},parameters:getCommonParameters().toQueryString(),onSuccess:function(response){window.rooms=[{sGroupName:"All Rooms"}].concat(eval(response.responseText));
renderFilingCabinets();$("print_home_inventory_link").hide();for(i=0;i<window.rooms.length;i++){if(window.rooms[i].stuff&&window.rooms[i].stuff.length){$("print_home_inventory_link").show();
break}}window.show_room()}})};window.arrows_position=0;window.arrows_cyclic_handler;window.arrows_rooms_redraw=function(A){if(!A){var A=0
}$("rooms_container").scrollLeft=window.arrows_position+A;window.arrows_position=$("rooms_container").scrollLeft;
if($("rooms_container").scrollLeft<3){$("rooms_left").className="arrow_room_inactive"}else{$("rooms_left").className=""
}if($("rooms_container").scrollLeft+3>$("rooms_container").scrollWidth-$("rooms_container").clientWidth){$("rooms_right").className="arrow_room_inactive"
}else{$("rooms_right").className=""}};window.room_width=65;window.show_room=function(){$("rooms_window").style.width="0";
for(var i=0,htmlHIT="";i<rooms.length;i++){if(i==window.current_room){htmlHIT+='<div class="room room_selected"><a href="javascript:;" onclick="select_room('+i+')"><img class="room_img" src="/images/HIT_Tool/rooms/'+((rooms[i].idGroup||i==0)?rooms[i].sGroupName:"_empty")+'.jpg" /></a><span class="room_title"><a href="javascript:;" onclick="select_room('+i+')">'+rooms[i]["sGroupName"]+"</a></span></div>"
}else{if(rooms[i].sGroupName){htmlHIT+='<div class="room"><a href="javascript:;" onclick="select_room('+i+')"><img class="room_img" src="/images/HIT_Tool/rooms/'+((rooms[i].idGroup||i==0)?rooms[i].sGroupName:"_empty")+'.jpg" /></a><span class="room_title"><a href="javascript:;" onclick="select_room('+i+')">'+rooms[i]["sGroupName"]+"</a></span></div>"
}else{continue}}$("rooms_window").style.width=parseInt($("rooms_window").style.width)+window.room_width+"px"
}$("rooms_window").innerHTML=htmlHIT;$("rooms_container").scrollLeft=(window.current_room-window.current_room%6)*window.room_width;
arrows_rooms_redraw();for(var i=0,html="",otherStuffHTML="",pleaseaddHTML="";i<rooms.length;i++){if(rooms[i]["sGroupName"]&&rooms[i].stuff&&rooms[i].stuff.length&&(i==window.current_room||window.current_room==0)){html+='<div class="centerColContent">';
html+='<h1 class="roomname"><a href="javascript:;" onClick="window.current_room='+i+";show_room();document.location='#hit_anchor'\">"+rooms[i]["sGroupName"]+"</a></h1>";
html+='<ul class="listStuff" >';for(var j=0;j<rooms[i]["stuff"].length;j++){html+='<li id="stuff-'+rooms[i].stuff[j].id+'">';
if(rooms[i].stuff[j].imageUrl){html+='<img src="'+rooms[i].stuff[j].imageUrl+"\" onLoad=\"if(this.clientWidth>60&&this.clientWidth>=this.clientHeight)this.style.cssText='width:60px;';else if(this.clientHeight>60&&this.clientWidth<=this.clientHeight)this.style.cssText='height:60px;';\">"
}html+="<strong><a "+(rooms[i].stuff[j].sUrl?('href="'+rooms[i]["stuff"][j]["sUrl"]+'"'):('href="/search.html?q='+encodeURIComponent(rooms[i].stuff[j].sMfgName+" "+rooms[i].stuff[j].sProduct)))+'">'+rooms[i].stuff[j].sMfgName+' <span id="OPData-'+rooms[i].stuff[j].id+'-sProduct">'+rooms[i].stuff[j].sProduct+"</span> "+rooms[i].stuff[j].sDeviceType+"</a></strong><br>";
html+='<div class="editStuffFooter">';html+='<a class="actionLink_edit" id="stuff-'+rooms[i].stuff[j].id+'-edit" href="javascript:;" onClick="editStuffDetails('+rooms[i].stuff[j].id+'); return false;">edit details</a>  ';
html+='<a class="actionLink_move" id="stuff-'+rooms[i].stuff[j].id+'-move" href="javascript:;" onClick="userWantsMoveStuff('+rooms[i].stuff[j].id+'); return false;">move</a> ';
html+='<a class="actionLink_ask" id="stuff-'+rooms[i].stuff[j].id+'-help"  href="javascript:;" onClick="userWantsAskStuffHelp('+rooms[i]["stuff"][j]["id"]+'); return false;">ask for product help</a> ';
html+='<a class="actionLink_remove" id="stuff-'+rooms[i].stuff[j].id+'-remove" href="javascript:;" onClick="userWantsRemoveStuff('+rooms[i]["stuff"][j]["id"]+'); return false;">remove</a>';
html+='<div id="stuffActions-'+rooms[i].stuff[j].id+'"></div>';html+="</div>";html+="</li>"}html+="</ul>";
html+="</div>"}else{if(!rooms[i]["sGroupName"]){if(rooms[i].stuff.length){otherStuffHTML+='<div class="centerColContent">';
otherStuffHTML+="<h1>Add These Products to a Room</h1>";otherStuffHTML+='<ul class="listStuff" >';for(j=0;
j<rooms[i].stuff.length;j++){otherStuffHTML+='<li id="stuff-'+rooms[i].stuff[j].id+'">';if(rooms[i].stuff[j].imageUrl){otherStuffHTML+='<img src="'+rooms[i].stuff[j].imageUrl+"\" onLoad=\"if(this.clientWidth>60&&this.clientWidth>=this.clientHeight)this.style.cssText='width:60px;';else if(this.clientHeight>60&&this.clientWidth<=this.clientHeight)this.style.cssText='height:60px;';\">"
}otherStuffHTML+="<strong><a "+(rooms[i].stuff[j].sUrl?('href="'+rooms[i]["stuff"][j]["sUrl"]+'"'):('href="/search.html?q='+encodeURIComponent(rooms[i].stuff[j].sMfgName+" "+rooms[i].stuff[j].sProduct)))+'">'+rooms[i].stuff[j].label+"</a></strong><br>";
otherStuffHTML+='<div class="editStuffFooter"> ';otherStuffHTML+='<a class="actionLink_add" id="stuff-'+rooms[i].stuff[j].id+'-move" href="javascript:;" onClick="userWantsAddOtherToRoom('+rooms[i]["stuff"][j]["id"]+'); return false;">add to a room</a> ';
otherStuffHTML+='<a class="actionLink_edit" id="stuff-'+rooms[i].stuff[j].id+'-edit" href="javascript:;" onClick="editStuffDetails('+rooms[i]["stuff"][j]["id"]+'); return false;">edit details</a> ';
otherStuffHTML+='<a class="actionLink_ask" id="stuff-'+rooms[i].stuff[j].id+'-help" href="javascript:;" onClick="userWantsAskStuffHelp('+rooms[i]["stuff"][j]["id"]+'); return false;">ask for product help</a> ';
otherStuffHTML+='<a class="actionLink_remove" id="stuff-'+rooms[i].stuff[j].id+'-remove" href="javascript:;" onClick="userWantsRemoveStuff('+rooms[i]["stuff"][j]["id"]+'); return false;">remove</a>';
otherStuffHTML+='<div id="stuffActions-'+rooms[i].stuff[j].id+'"></div>';otherStuffHTML+="</div>";otherStuffHTML+="</li>"
}otherStuffHTML+="</div>"}}}}if(otherStuffHTML&&window.current_room==0){html=otherStuffHTML+html}if(window.current_room==0||(rooms[window.current_room].stuff&&rooms[window.current_room].stuff.length)){html+='<a class="addroomlink" href="#hit_anchor"><img src="/images/but_add_new_items.gif"></a>'
}$("user_stuff").innerHTML=html;$("xxwidget_title").innerHTML='<h1>Add an Item</h1><div id="room_adder"></div>';
$("xx").className="showXX";html='<input type=hidden id="add_room_name" value="'+(window.rooms==0?"":window.rooms[window.current_room].sGroupName)+'">';
html+='<select id="room_selector">';html+='<option value="select">Select a Room</option>';for(var i=0;
i<window.rooms.length;i++){if(window.rooms[i].sGroupName&&(window.rooms[i].id||window.rooms[i].idGroup)){html+='<option value="'+i+'"'+(window.current_room==i?" selected":"")+">"+window.rooms[i].sGroupName+"</option>"
}}html+='<option style="font-style:italic;" value="new">Create New Room</option>';html+="</select>";$("room_adder").innerHTML=html;
$("add_item").onclick=function(){document.body.style.cursor="wait";var errorString="";var room="";if($("room_selector")&&$("room_selector").down($("room_selector").selectedIndex).value=="select"){errorString="Please select a room<br />"
}else{if($("room_selector")){room=$("room_selector").down($("room_selector").selectedIndex).innerHTML
}else{room=$("add_room_name").value}}if(!fpWidgetHIT.idDeviceType){errorString+="Please select a product type<br />"
}if(!fpWidgetHIT.idMfg){errorString+="Please select a manufacturer<br />"}updateSGCookie(fpWidgetHIT.idMfg,fpWidgetHIT.idDeviceType,fpWidgetHIT.idProduct);
if(errorString){document.body.style.cursor="default";$("error_message").innerHTML=errorString;window.setTimeout(function(){$("error_message").innerHTML=""
},2000);return }else{window.next_room=room;var params={sGroupLabel:room,idMfg:fpWidgetHIT.idMfg,idDeviceType:fpWidgetHIT.idDeviceType,idProduct:fpWidgetHIT.idProduct,sSource:"hit"};
if(fpWidgetHIT.prodInput&&params.idProduct==0){params.sProduct=fpWidgetHIT.prodInput.value.replace(fpWidgetHIT.prodInput.emptyVal,"")
}new Ajax.Request("/regman/user/savehititem?"+getCommonParameters().toQueryString(),{method:"post",parameters:params,onSuccess:function(transport){var response=eval("("+transport.responseText+")");
if(response.error){if(response.error&&response.error=="Product not in DB, please, specify valid Device Type"){$("postDeviceType_hit").show();
$("error_message").innerHTML=response.error}else{$("error_message").innerHTML=response.error}}else{for(var i=0;
window.rooms[i]&&window.rooms[i].sGroupName;i++){if(window.rooms[i].sGroupName==window.next_room){window.current_room=i;
break}}refresh_rooms();fpWidgetHIT.reset()}},onFailure:function(){}})}document.body.style.cursor="default"
};$("room_selector").onchange=function(){for(var i=0;i<this.childNodes.length;i++){if(this.childNodes[i].nodeName=="OPTION"&&this.childNodes[i].selected){if(parseInt(this.value)){window.current_room=parseInt(this.value);
show_room()}else{if(this.value=="select"){window.current_room=0;show_room()}else{$("room_adder").innerHTML='Enter new room name <input id="add_room_name"> or <a href="javascript:show_room()">cancel</a>'
}}}}}};window.select_room=function(A){window.current_room=A;show_room()};window.userWantsAddProductToStuff=function(x){if(window.latest_x&&window.latest_x!=x){$("prod-"+window.latest_x+"-add-stuff").style.textDecoration="underline";
$("prod-"+window.latest_x+"-actions").innerHTML=""}window.latest_x=x;if(!$("prod-"+x+"-add-stuff")){return 
}$("prod-"+x+"-add-stuff").style.textDecoration="none";var html="";html+='<div id="stuff_actions" class="AddProductToStuff">';
html+='<strong id="move_to_known_room_text">choose room </strong>';html+='<input type=hidden id="room_name_onchange">';
html+="<select onchange=\"for(var i=0;i<this.childNodes.length;i++)if(this.childNodes[i].nodeName=='OPTION'&&this.childNodes[i].selected)$('room_name_onchange').value=this.childNodes[i].value\"><option value=\"\">Select a Room</option>";
if(!window.rooms){new Ajax.Request("/regman/user/getOPData.json",{method:"get",asynchronous:false,onSuccess:function(transport,json){window.rooms=eval(transport.responseText)
}})}for(var i=0;i<window.rooms.length;i++){if(window.rooms[i].sGroupName&&(window.rooms[i].id||window.rooms[i].idGroup)){html+='<option value="'+window.rooms[i].sGroupName+'">'+window.rooms[i].sGroupName+"</option>"
}}html+="</select>";html+=' or <a href="javascript:userWantsAddProductToNewRoom('+x+')">create new room</a><br>';
html+='<br> <img src="/images/but_save.gif" class="but_save" onclick="javascript:addProductToRoom('+x+',$(\'room_name_onchange\').value)"> <img src="/images/but_cancel.gif" onclick="javascript:userWantsAddProductToStuff(false)">';
html+="</div>";$("prod-"+x+"-actions").innerHTML=html};window.userWantsAddProductToNewRoom=function(A){$("prod-"+A+"-actions").innerHTML='<div id="stuff_actions" class="MoveStuff"><strong>room name:</strong> &nbsp; <input id="room_name_onchange"> or <a href="javascript:userWantsAddProductToStuff('+A+')">choose a room</a> <br><br> <img src="/images/but_save.gif" class="but_save" onclick="javascript:addProductToRoom('+A+',$(\'room_name_onchange\').value)"> <img src="/images/but_cancel.gif" onclick="javascript:userWantsAddProductToStuff(false)"> </div>'
};window.userWantsAddProductToStuff_detail=function(x){if(window.latest_x&&window.latest_x!=x){$("prod-"+window.latest_x+"-add-stuff").style.textDecoration="underline";
$("prod-"+window.latest_x+"-actions").innerHTML=""}window.latest_x=x;if(!$("prod-"+x+"-add-stuff")){return 
}$("prod-"+x+"-add-stuff").style.textDecoration="none";var html="";html+='<div id="stuff_actions_detail" class="AddProductToStuff">';
html+='<input type=hidden id="room_name_onchange">';html+="<select onchange=\"for(var i=0;i<this.childNodes.length;i++)if(this.childNodes[i].nodeName=='OPTION'&&this.childNodes[i].selected)$('room_name_onchange').value=this.childNodes[i].value\"><option value=\"\">Select a Room</option>";
if(!window.rooms){new Ajax.Request("/regman/user/getOPData.json",{method:"get",asynchronous:false,onSuccess:function(transport,json){window.rooms=eval(transport.responseText)
}})}if(!window.rooms){return }for(var i=0;i<window.rooms.length;i++){if(window.rooms[i].sGroupName&&(window.rooms[i].id||window.rooms[i].idGroup)){html+='<option value="'+window.rooms[i].sGroupName+'">'+window.rooms[i].sGroupName+"</option>"
}}html+="</select>";html+=' or <a href="javascript:userWantsAddProductToNewRoom_detail('+x+')">create new room</a><br>';
html+='<br><img src="/images/but_save.gif" class="but_save" onclick="javascript:addProductToRoom('+x+',$(\'room_name_onchange\').value)"> <img src="/images/but_cancel.gif" onclick="javascript:userWantsAddProductToStuff(false)">';
html+="</div>";$("prod-"+x+"-actions").innerHTML=html};window.userWantsAddProductToNewRoom_detail=function(A){$("prod-"+A+"-actions").innerHTML='<div id="stuff_actions_detail" class="MoveStuff"><strong>room name </strong> <input id="room_name_onchange"> or <a href="javascript:userWantsAddProductToStuff_detail('+A+')">choose a room</a> <br><br> <img src="/images/but_save.gif" class="but_save" onclick="javascript:addProductToRoom('+A+',$(\'room_name_onchange\').value)"> <img src="/images/but_cancel.gif" onclick="javascript:userWantsAddProductToStuff_detail(false)"> </div>'
};window.addProductToRoom=function(B,A){updateSGCookie(null,null,B);if(!A){return }new Ajax.Request("/regman/user/savehititem?"+getCommonParameters().toQueryString(),{method:"post",parameters:{sGroupLabel:A,idProduct:B,sSource:"hit"},onSuccess:function(C){renderFilingCabinets();
$("prod-"+B+"-actions").innerHTML='<div id="stuff_actions" class="addProductToRoom">Product added to your '+A+'. See <a href="/homepage/">My Stuff</a>'
}})};window.userWantsRemoveStuff=function(A){show_room();$("stuff-"+A+"-remove").style.textDecoration="none";
var B='<div id="stuff_actions" class="RemoveStuff"><strong>Are you sure you want to remove this item?</strong><br>This will be permanently deleted from your stuff.<br>';
B+='<br><img src="/images/but_yes_sm.gif" onclick="javascript:deleteStuff('+A+')"> <img src="/images/but_cancel.gif" onclick="javascript:show_room()">';
$("stuffActions-"+A).innerHTML=B};window.userWantsMoveStuff=function(A){show_room();$("stuff-"+A+"-move").style.textDecoration="none";
var C="";C+='<div id="stuff_actions" class="MoveStuff">';C+='<strong id="move_to_known_room_text">move to </strong>';
C+='<input type=hidden id="room_name_onchange">';C+="<select onchange=\"for(var i=0;i<this.childNodes.length;i++)if(this.childNodes[i].nodeName=='OPTION'&&this.childNodes[i].selected)$('room_name_onchange').value=this.childNodes[i].value\"><option value=\"\">Select a Room</option>";
for(var B=0;B<window.rooms.length;B++){if(window.rooms[B].sGroupName&&(window.rooms[B].id||window.rooms[B].idGroup)){C+='<option value="'+window.rooms[B].sGroupName+'">'+window.rooms[B].sGroupName+"</option>"
}}C+="</select>";C+=' or <a href="javascript:userWantsMoveStuffToNewRoom('+A+')">create new room</a>';
C+='<br><br> <img class="but_save" src="/images/but_save.gif" onclick="javascript:moveStuffToRoom('+A+',$(\'room_name_onchange\').value)"> <img src="/images/but_cancel.gif" onclick="javascript:show_room()">';
C+="</div>";$("stuffActions-"+A).innerHTML=C};window.userWantsMoveStuffToNewRoom=function(A){$("stuffActions-"+A).innerHTML='<div id="stuff_actions"><strong>room name:</strong> &nbsp; <input id="room_name_onchange"> or <a href="javascript:userWantsMoveStuff('+A+')">choose a room</a> <br><br> <img src="/images/but_save.gif" class="but_save" onclick="javascript:moveStuffToRoom('+A+',$(\'room_name_onchange\').value)"> <img src="/images/but_cancel.gif" onclick="javascript:show_room()"> </div>'
};window.moveStuffToRoom=function(stuff,room){if(room){new Ajax.Request("/regman/user/movestufftoroom",{method:"post",parameters:{stuffId:stuff,sGroupLabel:room,sSource:"hit"},onSuccess:function(transport){var response=eval("("+transport.responseText+")");
if(response.error){if(response.error&&response.error=="Product not in DB, please, specify valid Device Type"){$("postDeviceType_hit").show();
$("error_message").innerHTML=response.error}else{$("error_message").innerHTML=response.error}}else{refresh_rooms()
}}})}};window.userWantsAddOtherToRoom=function(A){userWantsMoveStuff(A);$("move_to_known_room_text").innerHTML="Add to "
};window.userWantsAskStuffHelp=function(A){show_room();$("stuff-"+A+"-help").style.textDecoration="none";
var D;for(var C=0;C<window.rooms.length;C++){for(var B=0;window.rooms[C].stuff&&B<window.rooms[C].stuff.length;
B++){if(window.rooms[C].stuff[B].id==A){D=window.rooms[C].stuff[B]}}}html='<div id="stuff_actions" class="AskStuffHelp">';
html+='  <form action="javascript: if (validate_form(\'helpform\')) { submitPost(\'helpform\'); }" name="helpform" id="helpform">';
html+='    <input name="sImageFileName" id="sImageFileName_helpform" type="hidden" />';html+='    <input name="watchPost" type="hidden" value="1" />';
html+='    <input name="threadType" id="threadType_helpform" type="hidden" value="product_problem">';
html+='    <input name="sProduct" id="postProduct_helpform" value="'+D.sProduct+'" type="hidden" />';
html+='    <input name="sMfgName" id="postMfg_helpform" value="'+D.sMfgName+'" type="hidden" />';html+='    <input name="sDeviceType" id="postDeviceType_helpform" value="'+D.sDeviceType+'" type="hidden" />';
html+="   <strong>Subject:</strong>";html+="   <br>";html+='    <input name="sSubject" id="subject_helpform" type="text" maxlength="255" class="post" />';
html+="   <br>";html+="   <strong>Product or Problem Description:</strong>";html+="   <br>";html+='    <textarea name="sBody" id="postBody_helpform" cols="30" rows="5" class="post"></textarea>';
html+='   <div id="image_upload_message_helpform"></div>';html+="   </form>";html+="   <br>";html+='   <strong>Product Picture:</strong><span class="info">(optional)</span>';
html+='   <form onsubmit="return handleImageUploadForm(this,\'helpform\')" method="post" action="/ex/post/addImage" enctype="multipart/form-data" id="upload_image_form_helpform" name="upload_image_form_helpform">';
html+='    <input type="file" id="prod_pic_helpform" onchange="javascript:document.upload_image_form_helpform.Submit.click();" class="post mexButton" name="image" size="25"/><br/>';
html+='    <span id="indicator_image_helpform" class="info">Supported file types: .jpg, .gif, .png</span>';
html+='    <input type="submit" class="mexButton" value="upload" name="Submit" id="submit_image_helpform"/>';
html+="  </form>";html+='  <div id="image_attach_helpform"></div>';html+='  <div id="validate_helpform" class="validation"></div>';
html+=' <input type="submit" id="submit_helpform" >';html+=" <div>";html+='  <input type="image" src="/images/but_submit.gif" id="but_submit" onClick="javascript: if (validate_form(\'helpform\')) { submitPostFromStuff('+A+'); }">';
html+='  <input type="image" src="/images/but_cancel.gif" onclick="javascript:show_room()">';html+=" </div>";
html+="</div>";$("stuffActions-"+A).innerHTML=html};window.submitPostFromStuff=function(x){var requestParameters=getCommonParameters();
requestParameters=requestParameters.merge(Form.serialize($("helpform"),true)).toQueryString();document.body.style.cursor="wait";
disable_submit("helpform");new Ajax.Request("/ex/post/add",{method:"post",parameters:requestParameters,onSuccess:function(t){document.body.style.cursor="default";
var comment=eval("("+t.responseText+")");$("stuffActions-"+x).innerHTML='<div id="stuff_actions">Post submitted. <a href="/ex/thread/view/idThread/'+comment.objThread.id+'">Click to view discussion</a></div>'
}})};window.deleteStuff=function(A){new Ajax.Request("/regman/user/delhititem",{method:"post",parameters:"idItem="+A+"&"+getCommonParameters().toQueryString(),onSuccess:function(B){refresh_rooms()
}})};window.userWantsAddCommentThread=function(A){if(window.currentThreadCommentAdder){$("thread-action-"+window.currentThreadCommentAdder+"-add-comment").style.textDecoration="underline";
$("thread-action-"+window.currentThreadCommentAdder).innerHTML=""}window.currentThreadCommentAdder=A;
if(!A){return }$("thread-action-"+A+"-add-comment").style.textDecoration="none";html='<div id="stuff_actions" class="AddCommentThread">';
html+="  <form action=\"javascript: submitPost('comment-"+A+'\'); " name="comment-'+A+'" id="comment-'+A+'">';
html+='    <input name="idThread" id="threadType_comment-'+A+'" type="hidden" value="'+A+'">';html+='    <input type="hidden" name="idParent" value="'+$("thread-idFirstPost-"+A).value+'" />';
html+='    <input type="hidden" name="sImageFileName" id="sImageFileName_comment-'+A+'"/>';html+="   <br>";
html+="   <strong>Subject:</strong>";html+="   <br>";html+='    <input name="sSubject" id="subject_comment-'+A+'" type="text" maxlength="255" class="post" value="Re: '+$("thread-subject-"+A).innerHTML+'" />';
html+="   <br>";html+="   <strong>Product or Problem Description:</strong>";html+="   <br>";html+='    <textarea name="sBody" id="postBody_comment-'+A+'" cols="30" rows="5" class="post"></textarea>';
html+="   </form>";html+='   <div id="image_upload_message_comment-'+A+'" class="info"></div>';html+="   <br>";
html+='   <strong>Product Picture:</strong><span class="info">(optional)</span>';html+="   <form onsubmit=\"return handleImageUploadForm(this,'comment-"+A+'\')" method="post" action="/ex/post/addImage" enctype="multipart/form-data" id="upload_image_form_comment-'+A+'" name="upload_image_form_comment-'+A+'">';
html+='    <input type="file" id="prod_pic_comment-'+A+'" onchange="javascript:$(\'upload_image_form_comment-'+A+'\').Submit.click();" class="post" name="image" size="25"/><br/>';
html+='    <span id="indicator_image_comment-'+A+'" class="info">Supported file types: .jpg, .gif, .png</span>';
html+='    <input type="submit" class="mexButton" value="upload" name="Submit" id="submit_image_comment-'+A+'"/>';
html+="  </form>";html+='  <div id="image_attach_comment-'+A+'"></div>';html+='  <div id="validate_comment-'+A+'" class="validation"></div>';
html+=' <input type="submit" id="submit_comment-'+A+'" class="submit">';html+=" <div>";html+='  <img src="/images/but_submit.gif" class="but_submit" onClick="javascript: validateAndSubmitCommentThread('+A+');">';
html+='  <img src="/images/but_cancel.gif" onclick="javascript: userWantsAddCommentThread(0)">';html+=" </div>";
html+="</div>";$("thread-action-"+A).innerHTML=html};window.validateAndSubmitCommentThread=function(x){if(!$("postBody_comment-"+x).value){$("validate_comment-"+x).innerHTML="Can't send empty message"
}else{var requestParameters=getCommonParameters();document.body.style.cursor="wait";disable_submit("submit_comment-"+x);
new Ajax.Request("/ex/post/add",{method:"post",parameters:requestParameters.merge(Form.serialize($("comment-"+x),true)).toQueryString(),onSuccess:function(t){document.body.style.cursor="default";
var comment=eval("("+t.responseText+")");$("thread-action-"+x).innerHTML='<div id="stuff_actions">Comment submitted. <a href="/ex/thread/view/idThread/'+comment.objThread.id+'">Click to read full discussion</a></div>'
}})}};function showCoRegForm(){var A=false;var B=getCommonParameters();new Ajax.Request(regmanUrl+"user/coreg-available",{method:"get",asynchronous:false,parameters:B.toQueryString(),onSuccess:function(C){if(typeof (C.responseJSON.idDeal)=="undefined"){A=false
}else{A=C.responseJSON}}});if(A){if(memUser.id==0){A.iPopupY=parseInt(A.iPopupY)+65}if(isIE6()){A.iPopupY=parseInt(A.iPopupY)+20
}Lightbox.showBoxByAJAX("/regman/html/fetch/t/coreg/idDeal/"+A.idDeal+"/cb/"+Math.floor(Math.random()*99999999999),A.iPopupX,A.iPopupY,A.sCaption,function(){cancelCoRegForm()
});return true}return false}function offerCoReg(A){window.afterLoginAction=function(){window.location.href=A.href
};if(!showCoRegForm()){window.afterLoginAction();window.afterLoginAction=function(){};return false}return true
}function cancelCoRegForm(){Lightbox.hideBox();if(window.afterLoginAction){window.afterLoginAction();
window.afterLoginAction=function(){}}return false}function submitCoRegForm(callback){if(!validateCoRegFields()){return false
}var requestParameters=getCommonParameters();requestParameters.update($("coreg_form").serialize(true));
if(memUser.id==0&&$("oiq_subscribe")&&$("oiq_subscribe").checked){new Ajax.Request(regmanUrl+"user/update",{method:"get",asynchronous:false,parameters:requestParameters.toQueryString(),onSuccess:function(resp){aResponse=eval(resp.responseText);
if(typeof (aResponse)=="object"){if(aResponse.sErrorCode){new Ajax.Request(regmanUrl+"user/coreg",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onSuccess:function(resp){callback(resp)
}})}else{callback(resp)}}}})}else{new Ajax.Request(regmanUrl+"user/coreg",{method:"get",asynchronous:true,parameters:requestParameters.toQueryString(),onSuccess:function(resp){callback(resp)
}})}return false}coRegPopupCallback=function(resp){aResponse=eval(resp.responseText);var type=typeof (aResponse);
if(type=="object"){if(aResponse.sEmailAddress){memUser=aResponse;setTimeout(function(){renderTumsContent()
},500)}}Lightbox.hideBox();if(window.afterLoginAction){window.afterLoginAction()}};function validateCoRegFields(){var B=true;
var A=false;$$(".coreg_required").each(function(C){if((C.type=="text"&&C.value=="")||(C.type=="select-one"&&C.value==0)||(C.type=="checkbox"&&C.checked==0)||(C.id=="sEmailAddress"&&!validateEmailAddress(C.value))){if(!A){A=true;
C.focus()}$(C.id+"_error").show();B=false}else{$(C.id+"_error").hide()}});if($F("crdi")=="397"){if(($F("iBirthYear")==0||$F("iBirthMonth")==0||$F("iBirthYear")==0)&&($F("iDueYear")==0||$F("iDueMonth")==0||$F("iDueYear")==0)){if(!A){$("iBirthMonth").focus();
A=true}B=false;$("dtBirthDate_error").show();$("dtDueDate_error").show();$("coreg_error_397").show()}else{$("dtBirthDate_error").hide();
$("dtDueDate_error").hide();$("coreg_error_397").hide()}}if($F("crdi")=="420"){if($F("customField1")==0){$("customField1_error").show();
B=false;if(!A){$("customField1").focus();A=true}}else{$("customField1_error").hide()}if(($F("iBirthYear")==0||$F("iBirthMonth")==0)){if(!A){$("iBirthMonth").focus();
A=true}B=false;$("dtBirthDate_error").show()}else{$("dtBirthDate_error").hide()}}if($F("crdi")=="704"){if($F("customField2").replace(/\D/g,"").length!=3||$F("customField3").replace(/\D/g,"").length!=3||$F("customField4").replace(/\D/g,"").length!=4){$("customField2").value=$F("customField2").replace(/\D/g,"");
$("customField3").value=$F("customField3").replace(/\D/g,"");$("customField4").value=$F("customField4").replace(/\D/g,"");
$("phoneNumber_error").show();B=false;if(!A){$("customField2").focus();A=true}}else{$("phoneNumber_error").hide()
}}if($("oiq_subscribe")){if($("oiq_subscribe").checked&&!$("oiq_tandc").checked){$("coreg_error_oiqtc").show();
$("oiq_tandc_error").show();B=false}else{$("coreg_error_oiqtc").hide();$("oiq_tandc_error").hide()}}if(!B){$("coreg_error_req").show()
}else{$("coreg_error_req").hide()}return B}function parseUri(E){var D=parseUri.options,A=D.parser[D.strictMode?"strict":"loose"].exec(E),C={},B=14;
while(B--){C[D.key[B]]=A[B]||""}C[D.q.name]={};C[D.key[12]].replace(D.q.parser,function(G,F,H){if(F){C[D.q.name][F]=H
}});return C}parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
var topNav=Class.create({initialize:function(B,A){this.navName=B;this.menuItems=$A($(this.navName).getElementsByClassName("navMenu"));
this.menuItems.each(function(C){Event.observe(C,"mouseover",this.openItem.bindAsEventListener(this,C));
Event.observe(C,"mouseout",this.closeAllItems.bindAsEventListener(this,C))}.bind(this))},openItem:function(B,A){if(this.isAncestor(B,A)){return 
}this.tt=setTimeout(function(){A.addClassName("over")},500)},closeAllItems:function(B,A){if(this.isAncestor(B,A)){return 
}clearTimeout(this.tt);setTimeout(function(){A.removeClassName("over")},500)},drawContainer:function(C){var B=C.down("div");
var D=Element.cumulativeOffset(C);var A=D[0];if(!Prototype.Browser.IE){A=A-7}var E=D[1]+Element.getHeight(C);
if(C.getElementsByClassName("navContainerRt").length){A=A+Element.getWidth(C)-Element.getWidth(B)}if(C.getElementsByClassName("navContainerCtr").length){A=A+(Element.getWidth(C)-Element.getWidth(B))/2
}B.setStyle({"left":A+"px","top":E+"px"})},isAncestor:function(C,B){var A;if(C.type=="mouseover"&&C.fromElement){A=C.fromElement
}else{if(C.type=="mouseout"&&C.toElement){A=C.toElement}else{if(C.relatedTarget){A=C.relatedTarget}}}if(A==null){return true
}if(!A.descendantOf(B)&&B!=A){return false}return true}})