
(function(){DF.namespace("DF.Twc");DF.Twc.FaqSurvey=function(formId,commentsId,submitId,starListId,ratingFieldId){this.formId=formId;this.submitId=submitId;this.ratingFieldId=ratingFieldId;this.commentsId=commentsId;this.pollWindow=null;this.isSubmitted=false;this.noCommentOk=false;this.starWidget=new DF.Twc.StarSurvey(formId,starListId,ratingFieldId);DF.evt.AddLoadEvent(this.init.createDelegate(this));};DF.Twc.FaqSurvey.errorMessages={additionalComments:"Any additional comments you could provide regarding possible improvements to this FAQ would be appreciated.",rateFaq:"Please rate this FAQ."};DF.Twc.FaqSurvey.prototype={onSurveySubmit:function(e){if(!this.isSubmitted){var rank=document.getElementById('starvalue').value;var comments=DF.$(this.commentsId).value;if(rank!==null&&rank!==''){if(rank<3&&comments===''&&!this.noCommentOk){alert(DF.Twc.FaqSurvey.errorMessages.additionalComments);this.noCommentOk=true;return;}
window.open('about:blank',this.pollWindow,'height=265,width=415');this.isSubmitted=true;this.starWidget.onSubmit();DF.$(this.formId).submit();}
else{alert(DF.Twc.FaqSurvey.errorMessages.rateFaq);return;}}},init:function(){this.pollWindow=DF.$(this.formId).target;DF.evt.Event.addListener(DF.$(this.submitId),"click",this.onSurveySubmit.createDelegate(this));}};})();(function(){DF.namespace("DF.Twc");DF.Twc.StarSurvey=function(form,starList,ratingField){this.form=form;this.starList=starList;this.ratingField=ratingField;this.listClasses=['','twc_starSurvey_onestar','twc_starSurvey_twostar','twc_starSurvey_threestar','twc_starSurvey_fourstar','twc_starSurvey_fivestar'];DF.evt.AddLoadEvent(this.init.createDelegate(this));};DF.Twc.StarSurvey.prototype={ratingChangedEvent:new DF.evt.CustomEvent("ratingChanged"),_storeStarValue:function(value){this.ratingField.value=value;this.starList.className='twc_starSurvey_rating';if(value>=1&&value<this.listClasses.length){this.starList.className+=' '+this.listClasses[value];}},_onStarClick:function(event){if(!event){event=window.event;}
var target=event.target?event.target:event.srcElement;if(target.nodeType===3){target=target.parentNode;}
var value=parseInt(target.firstChild.nodeValue,10);this._storeStarValue(value);this.ratingChangedEvent.fire();return DF.evt.PreventDefault(event);},onSubmit:function(){switch(this.ratingField.value){case"1":case"2":case"3":DF.Twc.OmnitureHelper.setEvent("event45");break;case"4":case"5":DF.Twc.OmnitureHelper.setEvent("event44");break;}
DF.Twc.OmnitureHelper.submit();},rating:function(){return this.ratingField.value;},init:function(formEl,starListEl,ratingFieldEl){this.form=DF.$(this.form);this.starList=DF.$(this.starList);this.ratingField=DF.$(this.ratingField);if(this.starList){var links=this.starList.getElementsByTagName("a");for(var i=0;i<links.length;i++){DF.evt.Event.addListener(links[i],"click",this._onStarClick.createDelegate(this));}}}};})();(function(){DF.namespace("DF.Twc.SearchBox");var SearchBox=(DF.Twc.SearchBox=function(){var _SearchBox_Submit=function(event){var query=$("#queryBox")[0];if(query.value===query.title||query.value===""){alert(DF.Twc.Search.errorMessages.searchInput);query.focus();return false;}
if($("#searchRadioDiv").hasClass("Search_SearchWeb")){window.open("http://search.rr.com/search?qs="+query.value+"&clientId=aol-twc","RoadRunnerSearchWindow");return false;}};var _init=function(){$("#Search_SiteRadio").click(function(){$("#searchRadioDiv").removeClass("Search_SearchWeb");});$("#Search_GoogleRadio").click(function(){$("#searchRadioDiv").addClass("Search_SearchWeb");});$("#SearchForm").submit(_SearchBox_Submit);$("#queryBox").hintInput();};return{init:function(){_init();}};}());DF.evt.AddDomLoadEvent(SearchBox.init);})();