(function(){DF.namespace("Twc.PaymentCenters").AjaxRequests=function(){var o=null,r=function(k){try{DF.Detect.isNull(k)||k.abort()}catch(d){}},e=function(k){var d=[];for(var l in k)k.hasOwnProperty(l)&&d.push(l+"="+k[l]);return d.length===0?"":"?"+d.join("&")},i=function(k){return function(d){if(d.ok){d=d.responseText;if(!d.startsWith("while(true);"))throw"Bad json format";d=d.substring(12);d=DF.evalJson(d);k(d)}}};return{zipCheck:function(k,d){r(o);k="/Content/PaymentCenters/DivHeaderList.ashx"+
e(k);o=DF.connection.asyncConnect("GET",k,{delegate:i(function(l){d.delegate(l,d.args)})})}}}()})();
(function(){var o=DF.namespace("Twc.PaymentCenters");DF.Twc.PaymentCenters.Splash=function(){var r,e,i=function(){$(".PC_SplashFormContent").height(237)},k=function(){$(".PC_SplashFormContent").height(172)},d=function(f){for(var h=0;h<DF.PayCenters.zipRegionInfo.AllZipCodesForMarket.length;h++)if(DF.PayCenters.zipRegionInfo.AllZipCodesForMarket[h]===f)return true;return false},l=function(){var f=$("#SplashZip").val(),h='<option value="">Select your area</option>';DF.$("SplashError").style.display=
"none";if(f&&f.length===5)if(false===d(DF.$("SplashZip").value)){$("#SplashError").show();$("#SplashError").html('<span style="font-size:12px;color:red;_height:75px;">'+DF.Twc.PaymentCenters.messages.errorZipNotInArea+"</span>")}else{for(var p=0;p<DF.PayCenters.zipRegionInfo.Zips.length;p++)if(DF.PayCenters.zipRegionInfo.Zips[p].Zip===f){var n=DF.PayCenters.zipRegionInfo.Zips[p].AreaIds.length;if(n!==0){if(n===1){f=DF.PayCenters.zipRegionInfo.Zips[p].AreaIds[0];var w=DF.PayCenters.zipRegionInfo.AreaIdToName[f];
$("#DivHeaderDropDown").hide();k();$("#SplashDivHeader").html('<option value="'+f+'">'+w+"</option>");$("#SplashDivHeader").val(f)}else{jQuery.each(DF.PayCenters.zipRegionInfo.AreaIdToName,function(v,x){for(var s=parseInt(v,10),t=0;t<n;t++)if(DF.PayCenters.zipRegionInfo.Zips[p].AreaIds[t]===s){h+='<option value="'+v+'">'+x+"</option>";break}});$("#SplashDivHeader").html(h);$("#DivHeaderDropDown").show();i()}return}}jQuery.each(DF.PayCenters.zipRegionInfo.AreaIdToName,function(v,x){h+='<option value="'+
v+'">'+x+"</option>"});$("#SplashDivHeader").html(h);$("#DivHeaderDropDown").show();i()}else{$("#DivHeaderDropDown").hide();k();$("#SplashDivHeader_AutoSelect").val("")}},m=function(){var f=DF.$("SplashDivHeader");if(!f)return true;if(f&&f.length>1&&f.selectedIndex!==0)return true;if(f&&f.length<2)return true;return false},B=function(f){if(!f||!f.Placemark||!f.Status||f.Status.code!==200){if(DF.$("SplashError").style.display==="none")DF.$("SplashError").style.display="block";$("#SplashError").html('<span style="font-size:12px;color:red;font-weight:bold;_height:75px;">'+
DF.Twc.PaymentCenters.messages.couldNotFind+":</span> "+o.Page.getUserAddress(true).address)}else{var h=DF.$("SplashZip").value;if(h.length!==5)h=0;parseInt(h,10);h=DF.Cookies.Get("Level").Id+"";h>0&&isNaN(h);o.Page.completeInit();o.Page.filterAddressReturned(f);DF.$("Address").value=DF.$("SplashAddress").value;DF.$("City").value=DF.$("SplashCity").value;DF.$("State").selectedIndex=DF.$("SplashState").selectedIndex;h=parseInt(DF.$("SplashZip").value,10);if(h===0||isNaN(h))h=o.messages.zipHint;else for(h+=
"";h.length<5;)h="0"+h;DF.$("Zip").value=h;parseInt(h,10);f=DF.$("SplashDivHeader");o.Page.PageHelper().subMarketIdStatic=f.options[f.selectedIndex].value;o.Page.filterPaymentCentersByMarkteId();DF.Twc.OverlayController.hideOverlay(r);$("#PC_MainDetailWindow").css("overflow","")}},z=function(f,h){if(false===d(DF.$("SplashZip").value)){$("#SplashError").show();$("#SplashError").html('<span style="font-size:12px;color:red;_height:75px;">'+DF.Twc.PaymentCenters.messages.errorZipNotInArea+"</span>")}else this.GGeocoder.getLocations(h[1],
B)},y=function(f){f.preventDefault();if(!this.GGeocoder)this.GGeocoder=new GClientGeocoder;var h=o.Page.getUserAddress(true);f=h.address;var p=m();if(h.valid&&p){h=DF.$("SplashZip").value;if(h.length!==5)h=0;h=parseInt(h,10);p="";if(e.marketId>0&&!isNaN(e.marketId))p=e.marketId;var n=DF.$("SplashDivHeader"),w=-2;if(n&&FilterEnabled){w=n.options[n.selectedIndex].value;DF.Twc.PaymentCenters.AjaxRequests.zipCheck({ZipCode:h,Market:p,SubMarketId:w,ZIPCheck:true},{delegate:z.createDelegate(this),args:[h,
f]})}else z(null,[h,f])}else if(p){$("#SplashError").show();$("#SplashError").html('<span style="font-size:12px;color:red;_height:75px;">'+DF.Twc.PaymentCenters.messages.enterCityOrZip+"</span>")}else{$("#SplashError").show();$("#SplashError").html('<span style="font-size:12px;color:red;_height:75px;">'+DF.Twc.PaymentCenters.messages.errorSelectArea+"</span>")}},A=function(){if(e.zip)$("#SplashZip").val((e.zip+"").padLeft("0",5));else{$("#SplashZip").val(DF.Twc.PaymentCenters.messages.zipHint);$("#SplashZip").hintInput()}e.city!==
null&&e.city.length>0?$("#SplashCity").val(e.city):$("#SplashCity").val(DF.Twc.PaymentCenters.messages.cityHint);$("#SplashAddress").hintInput();$("#SplashCity").hintInput();$("#PC_SplashForm").submit(y);$("#SplashZip").keyup(l);l();if(DF.browserInformation.getBrowser().id==="Firefox"&&DF.browserInformation.getVersion()===3.5)DF.$("SplashState").style.top="1px"};return{showSplash:function(f,h){e=h;r=new DF.Twc.Overlay2("/"+DF.PageInfo.Level.ShortName+"/overlay/paymentcentersplash.ashx",{standardLayout:true,
dynamic:true,overlayShowCb:A});DF.Twc.OverlayController.showOverlay(r);$("#Overlay_CloseButton").click(function(){DF.Twc.OverlayController.hideOverlay();o.Page.defaultInit()})}}}()})();
(function(){function o(e,i){var k=[];k.push("javascript");k.push(":");if(e){k.push("DF.Twc.PaymentCenters.");k.push(e);k.push("(");i&&k.push(i.join(", "));k.push(")")}k.push(";");return k.join("")}var r=DF.namespace("Twc.PaymentCenters");DF.Twc.PaymentCenters.PayCenterData=function(e,i,k,d,l,m,B,z,y,A,f,h,p,n,w,v,x,s,t,C,E){this.preffered=C;this.pcId=e;this.latitude=i;this.longitude=k;this.name=d;this.services=l;this.payTypes=m.sort();this.address1=z;this.address2=y;this.city=A;this.state=f;this.zip=
h;this.zip4=p;this.officeTypes=B;this.phone1=n;this.phone2=w;this.imageUrl=v;this.directions=x;this.hours=s;this.comments=t;this.hidden=false;this.twcLocation=this.officeTypes.contains("TWC Office");this.subMarketExcludeList=E;if(TargetedPaymentCenter===this.pcId){this.markerHoverImg="/Images/PaymentCenters/marker5b.png";this.markerImg="/Images/PaymentCenters/marker5.png"}else if(this.twcLocation){this.markerHoverImg="/Images/PaymentCenters/marker3b.png";this.markerImg="/Images/PaymentCenters/marker3.png"}else if(C){this.markerHoverImg=
"/Images/PaymentCenters/marker2.png";this.markerImg="/Images/PaymentCenters/tealMarker.png"}else{this.markerHoverImg="/Images/PaymentCenters/marker2.png";this.markerImg=G_DEFAULT_ICON.image}};DF.Twc.PaymentCenters.PayCenterData.prototype={ExpandPCDetail:function(e){if(EnableCollapsableDetail){var i;if(e){if(document.all)e.cancelBubble=true;else e.stopPropagation();e=e.srcElement||e.target;i=e.parentNode.parentNode}else{i=DF.$(""+this.pcId).getElementsByTagName("td")[0];e=DF.$("PCDetailControl_"+this.pcId)}if(i.className.toLowerCase().indexOf("collapsed")>
-1){i.className=i.className.replace("Collapsed","Expanded");$(e).html(DF.Twc.PaymentCenters.messages.noDetail)}else{i.className=i.className.replace("Expanded","Collapsed");$(e).html(DF.Twc.PaymentCenters.messages.detail)}setTimeout(r.Page.detailWindow.adjustScrollBarHeight,0)}},registerEvents:function(){if(EnableCollapsableDetail)DF.$("PCDetailControl_"+this.pcId).onclick=this.ExpandPCDetail.createDelegate(this)},updateDetails:function(e){e=e.firstChild.firstChild.firstChild;e=$(e);e.text(this.Dist||
this.Dist===0?this.Dist.toFixed(2)+" "+DF.Twc.PaymentCenters.messages.miles:"");e.get(0).style.display=this.Dist||this.Dist===0?"block":"none"},hide:function(){this.mapMarker&&this.mapMarker.hide();this.hidden=true;DF.$(""+this.pcId).style.display="none"},show:function(){this.mapMarker&&this.mapMarker.show();this.hidden=false;DF.$(""+this.pcId).style.display="block"},isFilterValid:function(e,i,k){for(var d=false,l=0;l<e.length;l++)if(this.payTypes.contains(e[l])){d=true;break}if(!d&&e.length>0)return false;
d=false;for(e=0;e<i.length;e++)if(this.services.contains(i[e]))d=true;if(!d&&i.length>0)return false;for(i=0;i<k.length;i++)if(this.officeTypes.contains(k[i]))return true;return k.length===0},getHoverHtml:function(){if(!this.hoverHtml){var e="";e+='<div class="PC_HoverSpan">';if(this.imageUrl)e+='<img style="float:right; padding-right:12px; width:180px; height:152px;" src="'+this.imageUrl+'" />';e+='<span style="font-size:14px; font-family:arial; font-weight:bold;">'+this.name+"</span>";e+="<br />"+
this.address1+(this.address2?"<br />"+this.address2:"")+"<br />"+this.city+", "+this.state+" "+this.zip+(this.zip4?"-"+this.zip4:"");e+="<br /><br />";if(this.phone1||this.phone2){e+="<div>";e+=this.phone1?"("+this.phone1.replace("-",") ")+"<br/>":"";e+=this.phone2?"("+this.phone2.replace("-",") "):"";e+="</div><br />"}if(this.hours)e+="<b>"+DF.Twc.PaymentCenters.messages.hours+": </b>"+this.hours+"<br /><br />";if(this.payTypes.length>0){e+="<b>"+DF.Twc.PaymentCenters.messages.paymentTypes+": </b>";
for(var i=0;i<this.payTypes.length;i++)e+='<img style="margin:2px; vertical-align:-4px;" src="/images/paymentcenters/'+this.payTypes[i]+'.gif" alt="'+this.payTypes[i]+'" />';e+="<br /><br />"}if(this.services.length>0){e+="<b>"+DF.Twc.PaymentCenters.messages.services+": </b>";for(i=0;i<this.services.length;i++)e+=(i===0?"":", ")+this.services[i];e+="<br /><br />"}e+=""+(this.comments?"<b>"+DF.Twc.PaymentCenters.messages.comments+": </b>"+this.comments+"<br /><br />":"");e+=(this.directions?"<b>"+
DF.Twc.PaymentCenters.messages.directions+": </b>"+this.directions+"<br /><br />":"")+"";e+='<a class="PC_DrivingDirectionsLink" style="position:relative; zoom:1;" href="'+o("Page.getDirections",[this.pcId])+'" >'+DF.Twc.PaymentCenters.messages.drivingDirections+"</a></div>";this.hoverHtml=e}return this.hoverHtml}}})();
(function(){DF.Twc.PaymentCenters.PayCenterDetailWindow=function(o){this.underlyingElem=o};DF.Twc.PaymentCenters.PayCenterDetailWindow.prototype={hide:function(){this.underlyingElem.style.display="none"},show:function(){this.underlyingElem.style.display="block"}}})();
(function(){var o=DF.namespace("Twc.PaymentCenters");DF.Twc.PaymentCenters.MapExpanderControl=function(){this.expanded=false};DF.Twc.PaymentCenters.MapExpanderControl.prototype=new GControl;DF.Twc.PaymentCenters.MapExpanderControl.prototype.initialize=function(r){this.container=document.createElement("div");this.mouseoverDiv=document.createElement("IMG");this.mouseoverDiv.src="/Images/dot.gif";this.mouseoverDiv.id="PC_MapSizeControlMouseOver";this.container.id="PC_MapSizeControl";var e=document.createElement("span");
e.className="PC_MapControlTextSmall";e.innerHTML="Small Map";var i=document.createElement("span");i.className="PC_MapControlTextLarge";i.innerHTML="Large Map";this.container.appendChild(e);this.container.appendChild(i);this.container.innerHTML+='<img class="InActive" src="/Images/PaymentCenters/MapExpndA.png" />';this.container.innerHTML+='<img class="Active" src="/Images/PaymentCenters/MapExpndB.png" />';this.container.innerHTML+='<img class="LInActive" src="/Images/PaymentCenters/MapExpndC.png" />';
this.container.innerHTML+='<img class="LActive" src="/Images/PaymentCenters/MapExpndD.png" />';this.container.appendChild(this.mouseoverDiv);DF.evt.Event.addListener(this.mouseoverDiv,"mouseover",this.mouseOver.createDelegate(this));DF.evt.Event.addListener(this.mouseoverDiv,"mouseout",this.mouseOut.createDelegate(this));DF.evt.Event.addListener(this.mouseoverDiv,"mouseup",this.toggleMap.createDelegate(this));DF.evt.Event.addListener(document.body,"mouseup",this.unRegMUp.createDelegate(this));DF.evt.Event.addListener(this.mouseoverDiv,
"mousedown",this.RegMUp.createDelegate(this));this.container.className="InActive";this.container.zIndex=100;r.getContainer().appendChild(this.container);return this.container};DF.Twc.PaymentCenters.MapExpanderControl.prototype.unRegMUp=function(){this.fireOnMUp=false};DF.Twc.PaymentCenters.MapExpanderControl.prototype.RegMUp=function(){this.fireOnMUp=true};DF.Twc.PaymentCenters.MapExpanderControl.prototype.toggleMap=function(){if(this.fireOnMUp){o.Page.ToggleLargeGMap();this.container.className=this.expanded?
"LActive":"Active";this.fireOnMUp=false}};DF.Twc.PaymentCenters.MapExpanderControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_BOTTOM_RIGHT,new GSize(7,18))};DF.Twc.PaymentCenters.MapExpanderControl.prototype.mouseOver=function(){this.container.className=this.expanded?"LActive":"Active"};DF.Twc.PaymentCenters.MapExpanderControl.prototype.update=function(r){this.expanded=r};DF.Twc.PaymentCenters.MapExpanderControl.prototype.mouseOut=function(){this.container.className=
this.expanded?"LInActive":"InActive"}})();
(function(){DF.namespace("Twc.PaymentCenters.MapRecalculatingControl");DF.Twc.PaymentCenters.MapRecalculatingControl=function(){};DF.Twc.PaymentCenters.MapRecalculatingControl.prototype=new GControl;DF.Twc.PaymentCenters.MapRecalculatingControl.prototype.initialize=function(o){this.container=document.createElement("div");this.container.style.backgroundColor="#FFFFFF";this.container.style.height="19px";this.container.style.width="102px";this.container.style.border="solid 1px black";this.container.innerHTML=
'<img src="/Images/PaymentCenters/calculating.gif" style="display:inline; vertical-align:-1px"/> '+DF.Twc.PaymentCenters.messages.calculating+"...";o.getContainer().appendChild(this.container);this.hide();return this.container};DF.Twc.PaymentCenters.MapRecalculatingControl.prototype.show=function(){this.container.style.display="block"};DF.Twc.PaymentCenters.MapRecalculatingControl.prototype.hide=function(){this.container.style.display="none"};DF.Twc.PaymentCenters.MapRecalculatingControl.prototype.getDefaultPosition=
function(){return new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(3,25))}})();
(function(){function o(d,l){var m=[];m.push("javascript");m.push(":");if(d){m.push("DF.Twc.PaymentCenters.");m.push(d);m.push("(");l&&m.push(l.join(", "));m.push(")")}m.push(";");return m.join("")}var r=DF.namespace("Twc.PaymentCenters"),e={"1":"AL","3":"AZ","5":"CA","6":"CO","12":"HI","13":"ID","15":"IN","17":"KS","18":"KY","20":"ME","22":"MA","25":"MO","27":"MT","28":"NE","30":"NH","31":"NJ","33":"NY","34":"NC","36":"OH","39":"PA","41":"SC","44":"TX","47":"VA","48":"WA","49":"WV","50":"WI"};r.messages=
{addressHint:"Street Address (optional)",calculating:"Calculating",cityHint:"City",comments:"Comments",couldNotFind:"Could not find",detail:"Detail",directions:"Directions",drivingDirections:"Driving Directions",enterCityOrZip:"Error, please enter a City and State or a ZIP Code.",errorSelectArea:"Error, please select your area.",errorZipNotInArea:"Error, ZIP code is not in the selected area.",hours:"Hours",miles:"mi",noDetail:"No Detail",noDrivingDirections:"Failed to return Driving Directions.",
paymentTypes:"Payment Types",phone:"Phone",returnToList:"Return To List",selectArea:"Select Your Area",services:"Services",zipHint:"ZIP"};var i=DF.Twc.PaymentCenters.PageHelper=function(){function d(){}return d}(),k=DF.Twc.PaymentCenters.Page=function(){var d={};d.payCenters=[];var l,m=[],B=[],z,y,A,f,h,p,n,w,v,x,s,t,C,E,D=function(a){var b=DF.$(a?"SplashZip":"Zip"),c=DF.$(a?"SplashAddress":"Address");c=c?c.value.trim():"";c=c===DF.Twc.PaymentCenters.messages.addressHint?"":c+" ";var g=DF.$(a?"SplashCity":
"City");g=g?g.value.trim():"";g=g===DF.Twc.PaymentCenters.messages.cityHint||g.length===0?c.length>0?", ":"":g+", ";a=(a=DF.$(a?"SplashState":"State"))?a.value.trim():"";var j=b;j=j?j.value.trim():"";j=j===DF.Twc.PaymentCenters.messages.zipHint?"":j;c=c+g+a+" "+j;var q=true;if((!g||g.length===0||!a||a.length===0)&&(!j||j.length!==5))q=false;if(b)b.style.color="black";if(j.match(/[^0-9]/)){q=false;b.style.color="red"}return{valid:q,address:c.trim(),zipcode:j}},J=function(){$("#PC_DetailTable .PC_DetailRow").css("display",
"none");var a=DF.$("PC_DetailTable");a.style.display="none";for(var b=0;b<d.payCenters.length;b++)if(!d.payCenters[b].hidden){var c=DF.$(d.payCenters[b].pcId+"");d.payCenters[b].updateDetails(c);c.style.display="block";a.removeChild(c);a.appendChild(c)}a.style.display="block";$("#PC_DetailTable .PC_TargetedDetailRow").get(0)&&$("#PC_DetailTable").prepend($("#PC_DetailTable .PC_TargetedDetailRow").get(0));for(a=0;a<d.payCenters.length;a++)d.payCenters[a].registerEvents()},K=function(){var a=f.getCenter();
n.clear();DF.$("PC_NarrowSearch").style.display="none";y=true;h.update(true);z.hide();E.style.display="none";t.className="PC_LargeMapWindow";C.className="PC_LargeMapContainer";f.checkResize();f.setCenter(a)},T=function(){K();var a=f.getCenter();t.className="PC_LargeMapWindowWithDirections";C.className="PC_LargeMapConainterWithDirections";E.style.display="block";f.checkResize();f.setCenter(a)},L=function(){f.closeInfoWindow();var a=f.getCenter();n.clear();DF.$("PC_NarrowSearch").style.display="block";
y=false;h.update(false);z.show();E.style.display="none";t.className="PC_SmallMapWindow";C.className="PC_SmallMapContainer";DF.$("PC_Address_Small_Container").appendChild(x);f.checkResize();f.setCenter(a)},U=function(){t.className!=="PC_SmallMapWindow"?L():K()},V=function(a){var b=a.argument.pc;if(DF.evalJson(a.responseText).Allow){T();n.dfLastPCenter=b.pcId;n.dfRequest=[s.getPoint().lat().toFixed(6)+", "+s.getPoint().lng().toFixed(6),b.latitude.toFixed(6)+", "+b.longitude.toFixed(6)];n.loadFromWaypoints(n.dfRequest,
{preserveViewport:true})}else{if(t.className==="PC_LargeMapWindowWithDirections"){DF.$("PC_Address_Small_Container").appendChild(x);this.ExpandGMap()}a=D(false).address;b=b.address1+" "+b.address2+" "+b.city+", "+b.state+" "+b.zip;b="http://maps.google.com/maps?saddr= "+escape(a)+"&daddr= "+escape(b)+"&hl= en";window.open(b,"gmapdd").focus()}},G=function(a){if(D(false).address.length===0){L();$("#DD_PCAddressError").html('<span style="font-size:10px;color:red;font-weight:bold;">'+DF.Twc.PaymentCenters.messages.enterCityOrZip+
"</span>");$("#PCAddressError").html('<span style="font-size:10px;color:red;font-weight:bold;">'+DF.Twc.PaymentCenters.messages.enterCityOrZip+"</span>")}else{this.lastDirection=a;if(a=m[a]){a={delegate:function(c){V(c)},argument:{pc:a}};var b=document.location.href;b=b.indexOf("?")>0?b.split("?")[0]:b;DF.connection.asyncConnect("GET",b+"?action=dDirections",a,false)}}},W=function(){G(this.lastDirection)},F=function(a,b,c){if(!b&&(!a||!a.Placemark||!a.Status||a.Status.code!==200)){if(DF.$("DD_PCAddressError"))DF.$("DD_PCAddressError").innerHTML=
'<span style="font-size:10px;color:red;font-weight:bold;">'+DF.Twc.PaymentCenters.messages.couldNotFind+":</span> "+D(false).address;if(a)DF.$("PCAddressError").innerHTML='<span style="font-size:12px;color:red;font-weight:bold;">'+DF.Twc.PaymentCenters.messages.couldNotFind+":</span> "+D(false).address}else if(c){b=b?[b.getPoint().lng(),b.getPoint().lat()]:a.Placemark[0].Point.coordinates;s.setPoint(new GLatLng(b[1],b[0]));s.show();a&&f.setCenter(new GLatLng(b[1],b[0]));for(a=0;a<d.payCenters.length;a++){c=
d.payCenters[a];var g=69.1*(c.latitude-b[1]),j=53*(c.longitude-b[0]);c.Dist=Math.sqrt(j*j+g*g)}d.payCenters.sort(function(q,u){if(k.preferredFirst&&q.preffered!==u.preffered)return q.preffered?-1:1;return q.Dist-u.Dist});J();p.hide();y&&t.className==="PC_LargeMapWindowWithDirections"&&W()}else{p.show();setTimeout(F.createDelegate(this,[a,b,true]),400)}},I=function(a){DF.$("PCAddressError").innerHTML="";var b=(a?D(false):D(true)).address;if(a=/(.*, )([0-9]{1,2})(.*)$/.exec(b)){b=a[2];b=e[b]?e[b]:"";
b=a[1]+b+a[3]}if(b.length>0)A.getLocations(b,F.createDelegate(this));else if(TargetedPaymentCenter&&m[TargetedPaymentCenter]){a=m[TargetedPaymentCenter];f.setCenter(new GLatLng(a.latitude,a.longitude),14)}else{a=$("#PC_DetailTable .PC_DetailRow:first").attr("id");a=m[a];f.setCenter(new GLatLng(a.latitude,a.longitude))}b=document.getElementsByName("PayTypes");a=[];for(var c=0;c<b.length;c++)b[c].checked&&a.push(b[c].value);c=document.getElementsByName("ServiceTypes");b=[];for(var g=0;g<c.length;g++)c[g].checked&&
b.push(c[g].value);g=document.getElementsByName("OfficeType");c=[];for(var j=0;j<g.length;j++)g[j].checked&&c.push(g[j].value);for(j=g=0;j<d.payCenters.length;j++){for(var q=d.payCenters[j],u=q.subMarketExcludeList||[],M=true,H=0;H<u.length;H++){var X=parseInt(i.subMarketIdStatic,10);if(u[H]===X)M=false}q.isFilterValid(a,b,c)&&M?q.show(g++%2?"#FFFFFF":"#FFFFFF"):q.hide()}},N=function(){d.payCenters.sort(function(c,g){c.Dist=null;g.Dist=null;if(k.preferredFirst&&c.preffered!==g.preffered)return c.preffered?
-1:1;else{var j=[];j.push(c.name);j.push(g.name);j.sort();if(c.name===g.name)return 0;return j[0]===c.name?-1:1}});s.hide();for(var a=document.getElementsByName("PayTypes"),b=0;b<a.length;b++)a[b].checked=false;a=document.getElementsByName("ServiceTypes");for(b=0;b<a.length;b++)a[b].checked=false;a=document.getElementsByName("OfficeType");for(b=0;b<a.length;b++)a[b].checked=false;J();I()},Y=function(a,b){if(y){if(this.hoverPopTimeout){clearTimeout(this.hoverPopTimeout);this.hoverPopTimeout=null}b.openInfoWindowHtml(a.getHoverHtml(),
{maxWidth:a.imageUrl?400:250})}else{$("#PC_MainDetailWindow .PC_DetailRowSelected").removeClass("PC_DetailRowSelected");$("#PC_MainDetailWindow").scrollTop(0);$("#"+a.pcId).addClass("PC_DetailRowSelected");a=$("#"+a.pcId).position();$("#PC_MainDetailWindow").scrollTop(a.top)}},Z=function(a,b){b.setImage(a.markerImg);if(y){if(this.hoverPopTimeout){clearTimeout(this.hoverPopTimeout);this.hoverPopTimeout=null}}else DF.$(a.pcId).className="PC_DetailRow"},aa=function(a,b){b.setImage(a.markerHoverImg);
if(y){this.hoverPopTimeout&&clearTimeout(this.hoverPopTimeout);this.hoverPopTimeout=setTimeout(b.openInfoWindowHtml.createDelegate(b,[a.getHoverHtml(),{maxWidth:a.imageUrl?400:250}]),750)}else DF.$(a.pcId).className="PC_DetailRowHover"},O=function(){$("#PC_DirectionsSummary .PC_DirectionsSummaryError").remove();if(n.getStatus().code!==200)DF.$("PC_DirectionsSummary").innerHTML='<span style="color:red; font-weight:bold;" class="PC_DirectionsSummaryError">'+DF.Twc.PaymentCenters.messages.noDrivingDirections+
"</span>";else{n.getMarker(0).remove();n.getMarker(1).remove();f.closeInfoWindow();var a=n.dfRequest[0].split(", "),b=n.dfRequest[1].split(", "),c=[parseFloat(a[0]),parseFloat(b[0])];b=[parseFloat(a[1]),parseFloat(b[1])];a=new GLatLng((c[0]<c[1]?c[0]:c[1])-0.05,(b[0]<b[1]?b[0]:b[1])-0.05);c=new GLatLng((c[0]>c[1]?c[0]:c[1])+0.05,(b[0]>b[1]?b[0]:b[1])+0.05);c=new GLatLngBounds(a,c);a=f.getBoundsZoomLevel(c);f.setZoom(a);f.setCenter(c.getCenter());if(document.all){c=document.getElementsByTagName("svg");
for(a=0;a<c.length;a++)c[a].parentNode.className="gmprint"}c=m[n.dfLastPCenter];a=DF.$("PC_DirectionsSummary").getElementsByTagName("TR");for(b=0;b<a.length;b++)if(a[b].waypoint===0){a[b].setAttribute("xonclick","");var g=a[b].getElementsByTagName("td")[1];if(g){g.innerHTML="";v.appendChild(x);g.appendChild(w)}}else if(a[b].waypoint===1)if(g=a[b].getElementsByTagName("td")[1]){var j=c.name;j+="<br/>"+c.address1+(c.address2!==""?"<br />"+c.address2:"");j+="<br/>"+c.city+", "+c.state+" "+c.zip;j+='<div class="gmnoprint" style="padding-right:2px; float:right;"><a href="'+
o("Page.CollapseGMap")+'">'+DF.Twc.PaymentCenters.messages.returnToList+"</a></div>";g.innerHTML=j}try{DF.$("DD_PrintState").innerHTML=DF.$("City").value+", "+DF.$("State").value+" "+DF.$("Zip").value}catch(q){}}},ba=function(){d=DF.PayCenters;if(PromptLocation)this.initZoom=8;t=DF.$("PC_MapWindow");C=DF.$("PC_MapContainer");E=DF.$("PC_Directions");f=new GMap2(t);f.setCenter(new GLatLng(d.initLat,d.initLng),d.initZoom);f.addControl(new GSmallMapControl,new GControlPosition(G_ANCHOR_TOP_LEFT));f.addControl(new GMapTypeControl,
new GControlPosition(G_ANCHOR_TOP_RIGHT));h=new DF.Twc.PaymentCenters.MapExpanderControl;f.addControl(h);p=new DF.Twc.PaymentCenters.MapRecalculatingControl;f.addControl(p);f.enableScrollWheelZoom();n=new GDirections(f,DF.$("PC_DirectionsSummary"));w=document.createElement("DIV");var a=document.createElement("div");w.appendChild(a);v=document.createElement("DIV");v.id="PC_Address_DrivingDirections_Container";a.appendChild(v);x=DF.$("PC_Address_Form_Wrapper");var b=document.createElement("div");b.id=
"PC_DDUpdateBtn";b.className="gmnoprint";var c=document.createElement("div");c.className="errorDiv gmnoprint";c.id="DD_PCAddressError";var g=document.createElement("div");g.id="DD_PrintState";var j=document.createElement("div");j.className="printDiv gmnoprint";j.title="Print";j.alt="Print";j.id="DD_PCAddressPrintBtn";a.appendChild(c);a.appendChild(j);a.appendChild(b);a.appendChild(g);$(b).click(I);$(j).click(function(){window.print()});GEvent.addListener(n,"addoverlay",function(){O()});GEvent.addListener(n,
"error",function(){O()});a=new GIcon(G_DEFAULT_ICON);a.printImage=a.mozPrintImage="/Images/PaymentCenters/printableDestination.gif";a.printShadow="/Images/PaymentCenters/printableDestinationTransparent.gif";for(b=0;b<d.payCenters.length;b++){c=d.payCenters[b];g=new GLatLng(c.latitude,c.longitude);g=new GMarker(g,{icon:a,draggable:false,zIndexProcess:function(){return 1}});B[c.pcId]=g;m[c.pcId]=c;(function(q,u){GEvent.addListener(u,"mouseover",function(){aa(q,u)})})(c,g);(function(q,u){GEvent.addListener(u,
"mouseout",function(){Z(q,u)})})(c,g);(function(q,u){GEvent.addListener(u,"click",function(){Y(q,u)})})(c,g);c.mapMarker=g;f.addOverlay(g);g.setImage(c.markerImg)}a=new GIcon(G_DEFAULT_ICON);a.image="/Images/PaymentCenters/BlueHouseMarker.png";a.printImage=a.mozPrintImage="/Images/PaymentCenters/BlueHouseMarker.gif";a.printShadow="/Images/PaymentCenters/printableDestinationTransparent.gif";s=new GMarker(new GLatLng(0,0),{icon:a,draggable:true,zIndexProcess:function(){return 3}});f.addOverlay(s);s.hide();
GEvent.addListener(s,"dragend",function(){F(null,s)})},P=function(){A||(A=new GClientGeocoder);DF.$("Address").style.display="";DF.$("City").style.display="";DF.$("State").style.display="";DF.$("Zip").style.display="";ba();new DF.Twc.PaymentCenters.PayCenterFilterTabs;z=new DF.Twc.PaymentCenters.PayCenterDetailWindow(DF.$("PC_MainDetailWindow"));N()},ca=function(a){var b=[];b=d.payCenters;var c,g=parseInt(a,10);for(a=0;a<b.length;a++){var j=b[a].subMarketExcludeList;for(c=0;c<j.length;c++)j[c]===
g&&b[a].hide()}},da=function(){var a=m[this.id];f.setCenter(new GLatLng(a.latitude,a.longitude),14);$("#PC_DetailTable .PC_DetailRowSelected").removeClass("PC_DetailRowSelected");$(this).addClass("PC_DetailRowSelected")},ea=function(){var a=B[this.id];$(this).addClass("PC_DetailRowHover");a.setImage(m[this.id].markerHoverImg)},fa=function(){B[this.id].setImage(m[this.id].markerImg);$(this).removeClass("PC_DetailRowHover").css("width","").css("height","")},ga=function(){$("#PC_FiltersApply").click(function(a){a.preventDefault();
I(true)});$("#PC_FiltersClear").click(function(a){a.preventDefault();N()});$("#PC_DetailTable .PC_DetailRow").click(da);$("#PC_DetailTable .PC_DetailRow").mouseover(ea);$("#PC_DetailTable .PC_DetailRow").mouseout(fa);$("#PC_DetailTable .PC_DrivingDirections").click(function(){var a=$(this).parents(".PC_DetailRow").attr("id");G(a)})},Q=function(){$("#PC_MapContainer").css("display","block");$("#PC_NarrowSearch").css("display","block");$("#PC_MainDetailWindow").css("width","592px");$("#PC_MainDetailWindow .PC_DrivingDirections").css("display",
"block");l=function(){var a=DF.Cookies,b={};b.zip=a.Get("Zip");b.city=a.Get("City");b.state=a.Get("State");a=a.Get("Level");b.subMarketID=a.subMarketID;b.sumMarketText=a.subMarketText;return b}();DF.$("PC_MainDetailCanvas");A=null},R=function(){var a=DF.$("DivHeaderDropDown");if(a)a.style.display="none";$("#City").get(0).value=l.city?l.city:"";$("#State").get(0).value=l.state?l.state:"";$("#Zip").get(0).value=l.zip?(l.zip+"").padLeft("0",5):"";$(".PC_SplashBoxInner").addClass("PC_SplashNoHeaderSelect");
$(".PC_SplashBoxInnerTall").addClass("PC_SplashTallNoHeaderSelect");$(".PC_SplashBoxInnerWide").addClass("PC_SplashWideNoHeaderSelect");P()},S=function(){$("#Address").hintInput();$("#City").hintInput();$("#Zip").hintInput();ga()};return{performZipAjaxCheck:true,init:function(){Q();if(FilterEnabled){$("#Address").css("display","none");$("#City").css("display","none");$("#State").css("display","none");$("#Zip").css("display","none");DF.Twc.PaymentCenters.Splash.showSplash(FilterEnabled,l);l.marketId=
DF.Cookies.Get("Level").Id;l.marketId>0&&isNaN(l.marketId)}else R();S()},defaultInit:function(){Q();R();S()},getUserAddress:function(a){return D(a)},completeInit:function(){P()},filterAddressReturned:function(a){F(a)},filterPaymentCentersByMarkteId:function(){ca(i.subMarketIdStatic)},PageHelper:function(){return i},PCData:function(){return d},ToggleLargeGMap:function(){U()},getDirections:function(a){G(a)}}}();DF.namespace("Twc.PaymentCenters");DF.Twc.PaymentCenters.CheckClearText=function(d,l,m){if(d&&
d.value&&d.value.trim()===l)d.value="";d&&m&&m!==0&&d.setAttribute("maxLength",m)};DF.Twc.PaymentCenters.OnFocusElement=function(d,l){var m=DF.$(d).value;$("#"+d).focus(function(){DF.Twc.PaymentCenters.CheckClearText(DF.$(d),m,l)})};DF.Twc.PaymentCenters.PayCenterFilterTabs=function(){this.selectedIndex=0;this.tabs=[{tab:DF.$("PC_NarrowDistanceTab"),content:DF.$("PC_NarrowDistance")},{tab:DF.$("PC_NarrowPaymentTab"),content:DF.$("PC_NarrowPayment")},{tab:DF.$("PC_NarrowServiceTab"),content:DF.$("PC_NarrowService")},
{tab:DF.$("PC_NarrowOfficeTab"),content:DF.$("PC_NarrowOffice")}];for(var d=0;d<this.tabs.length;d++)this.tabs[d].tab.onclick=this.tabClicked.createDelegate(this,[d])};DF.Twc.PaymentCenters.PayCenterFilterTabs.prototype={tabClicked:function(d){if(d!==this.selectedIndex){this.tabs[this.selectedIndex].tab.className="NarrowSearchTabTop";this.tabs[this.selectedIndex].content.style.display="none";this.selectedIndex=d;this.tabs[this.selectedIndex].tab.className="NarrowSearchTabTopActive";this.tabs[this.selectedIndex].content.style.display=
"block"}}};$(document).ready(r.Page.init)})();

