
PAYPAL.namespace("Beloved.Salsa");PAYPAL.Beloved.Salsa={filter:null,scrollCount:0,minWidth:55,iframe:null,menuId:null,init:function(menuId){this.menuId=menuId;this.filter=document.getElementById(menuId);if(!(this.filter||(this.filter.getElementsByTagName("ul").length>1))){return;}
this.createIFrameShim();this.hoverHack();this.initAccessibilityFilters();YUD.addClass(this.filter,"enabled");},secondaryminWidthFix:function(menuList){for(var i=0,j=menuList.length;i<j;i++){obj=menuList[i];var offsetWidth=obj.offsetWidth;if(offsetWidth!==0&&offsetWidth<PAYPAL.Beloved.Salsa.minWidth){YAHOO.util.Dom.setStyle(obj,"width",PAYPAL.Beloved.Salsa.minWidth+"px");}}},showCurrencyDropdown:function(show){if(YAHOO.env.ua.ie<=8&&YUD.get("currency_list")){YUD.setStyle(YUD.get("currency_list").parentNode,"display",((show==true)?"block":"none"));}},showHideViewDemo:function(evt,evtType,ele){var HIDE_MENU=0,SHOW_MENU=1,TOGGLE_MENU=2;var t=YUE.getTarget(evt);if(evtType==HIDE_MENU){show=false;}else if(evtType==SHOW_MENU){show=true;}else if(evtType==TOGGLE_MENU){if(YUD.hasClass(ele,"hover")){show=false;}else{show=true;}}
if(show==true){if(!YUD.hasClass(ele,"hover")){YUD.addClass(ele,"hover");}
var ul=YUD.get(ele).getElementsByTagName("ul");if(ul.length==1){PAYPAL.Beloved.Salsa.addIFrameShim(ul[0]);}
PAYPAL.Beloved.Salsa.showCurrencyDropdown(false);}else{YAHOO.util.Dom.removeClass(ele,"hover");PAYPAL.Beloved.Salsa.removeIFrameShim(evt);PAYPAL.Beloved.Salsa.showCurrencyDropdown(true);}},hoverHack:function(){if(this.menuId=='viewDemoLinks'){var mli=YUD.getAncestorByClassName(YUD.get('showVDMenu'),"last");var sli=YUD.get("viewDemoLinksSecondary").getElementsByTagName("li");YUE.addListener(mli,"click",function(evt){if(YUD.hasClass(this,"last")){YUE.preventDefault(evt);PAYPAL.Beloved.Salsa.showHideViewDemo(evt,2,this);PAYPAL.Beloved.Salsa.secondaryminWidthFix(sli);}});YUE.addListener(document,"mouseup",function(evt,menuId){var t=YUE.getTarget(evt);var menu_ele=YUD.get(menuId);if(!YUD.isAncestor(menu_ele,t)){var lastmenu=YUD.getElementsByClassName('last','li',menu_ele);PAYPAL.Beloved.Salsa.showHideViewDemo(evt,0,lastmenu);}},this.menuId);YUE.addListener(sli,"mouseover",function(evt){if(!YUD.hasClass(this,"last")){YUD.addClass(this,"hover");var ul=this.getElementsByTagName("ul");if(ul.length==1){PAYPAL.Beloved.Salsa.addIFrameShim(ul[0]);}}});YUE.addListener(sli,"mouseout",function(evt){if(!YUD.hasClass(this,"last")){YUD.removeClass(this,"hover");PAYPAL.Beloved.Salsa.removeIFrameShim(evt);}});}else{var ul=this.filter.getElementsByTagName("ul");var li=this.filter.getElementsByTagName("li");var sli=document.getElementById("filtersSecondary").getElementsByTagName("li");YAHOO.util.Event.addListener(this.filter,"mouseover",function(){if(this.id=="activityFilters"&&YAHOO.util.Event.isIE){YAHOO.util.Dom.addClass(this,"addPosition");}
PAYPAL.Beloved.Salsa.secondaryminWidthFix(sli);});YAHOO.util.Event.addListener(this.filter,"mouseout",function(){if(this.id=="activityFilters"&&YAHOO.util.Event.isIE){YAHOO.util.Dom.removeClass(this,"addPosition");}});YAHOO.util.Event.addListener(li,"mouseover",function(){YAHOO.util.Dom.addClass(this,"hover");var ul=this.getElementsByTagName("ul");if(ul.length==1){PAYPAL.Beloved.Salsa.addIFrameShim(ul[0]);}});YAHOO.util.Event.addListener(ul,"mouseout",function(evt){var hovered=YAHOO.util.Dom.getElementsByClassName("hover","li",this);YAHOO.util.Dom.removeClass(hovered,"hover");PAYPAL.Beloved.Salsa.removeIFrameShim(evt);});}},createIFrameShim:function(){var ua=navigator.userAgent.toLowerCase();if(ua.search(/safari/)>-1){this.iframe=document.createElement("iframe");this.iframe.src="javascript:false;";this.iframe.style.position="absolute";this.iframe.style.border="none";this.iframe.style.margin=0;this.iframe.style.padding=0;this.iframe.style.zIndex="1";this.iframe.style.visibility="hidden";YUD.setStyle(this.iframe,"opacity","0");document.body.appendChild(this.iframe);}},addIFrameShim:function(elem){if(!this.iframe){return;}
var xy=YUD.getXY(elem);this.iframe.style.top=xy[1]+"px";this.iframe.style.left=xy[0]+"px";this.iframe.style.height=elem.clientHeight+"px";this.iframe.style.width=elem.clientWidth+"px";this.iframe.style.visibility="visible";this.iframe.style.zIndex="1";},removeIFrameShim:function(event,elem){if(this.iframe){this.iframe.style.visibility="hidden";}}};PAYPAL.Beloved.Salsa.toggleBalanceDetails=function(e){if(e){YUE.preventDefault(e);}
if(YUD.getStyle("balanceDetails",'display')=='none')
{YUD.removeClass('balanceDetails','hide');YUD.removeClass('collapse','hide');YUD.addClass('expand','hide');PAYPAL.Beloved.Salsa.showTable("balanceDetail","show");}
else
{YUD.removeClass('expand','hide');YUD.addClass('balanceDetails','hide');YUD.addClass('collapse','hide');PAYPAL.Beloved.Salsa.showTable("balanceDetail","hide");}};PAYPAL.Beloved.Salsa.toggleGiftBalanceDetails=function(e){if(e){YUE.preventDefault(e);}
if(YUD.getStyle("giftBalances",'display')=='none')
{YUD.removeClass('giftBalances','hide');YUD.removeClass('collapseGift','hide');YUD.addClass('expandGift','hide');PAYPAL.Beloved.Salsa.showTable("giftBalance","show");}
else
{YUD.removeClass('expandGift','hide');YUD.addClass('giftBalances','hide');YUD.addClass('collapseGift','hide');PAYPAL.Beloved.Salsa.showTable("giftBalance","hide");}};PAYPAL.Beloved.Salsa.initBalanceDetails=function(){if(document.getElementById('BalanceModuleState')){if(document.getElementById('BalanceModuleState').value=='1'){YUD.removeClass('collapse','hide');}else{YUD.removeClass('expand','hide');YUD.addClass('balanceDetails','hide');}}
YUE.addListener("expandImg","click",PAYPAL.Beloved.Salsa.toggleBalanceDetails);YUE.addListener("collapseImg","click",PAYPAL.Beloved.Salsa.toggleBalanceDetails);YUE.addListener("expandLink","click",PAYPAL.Beloved.Salsa.toggleBalanceDetails);YUE.addListener("collapseLink","click",PAYPAL.Beloved.Salsa.toggleBalanceDetails);};PAYPAL.Beloved.Salsa.initGiftBalanceDetails=function(){if(document.getElementById('GiftBalanceModuleState')){if(document.getElementById('GiftBalanceModuleState').value=='1'){YUD.removeClass('collapseGift','hide');}else{YUD.removeClass('expandGift','hide');YUD.addClass('giftBalances','hide');}}
YUE.addListener("expandGiftImg","click",PAYPAL.Beloved.Salsa.toggleGiftBalanceDetails);YUE.addListener("collapseGiftImg","click",PAYPAL.Beloved.Salsa.toggleGiftBalanceDetails);YUE.addListener("expandGiftLink","click",PAYPAL.Beloved.Salsa.toggleGiftBalanceDetails);YUE.addListener("collapseGiftLink","click",PAYPAL.Beloved.Salsa.toggleGiftBalanceDetails);};PAYPAL.Beloved.Salsa.showTable=function(balance,showhide){var handleSuccess=function(o){if(o.responseText!==undefined){var result=PAYPAL.Beloved.Salsa.getTagContents("result",o.responseText);if(result!='true'){window.reload();}}};var callback={success:handleSuccess};var balanceUrl;if(balance=="balanceDetail"&&showhide=="show"){balanceUrl="webscr?cmd=_balance-module-state&state=1";}else if(balance=="balanceDetail"&&showhide=="hide"){balanceUrl="webscr?cmd=_balance-module-state&state=0";}else if(balance=="giftBalance"&&showhide=="show"){balanceUrl="webscr?cmd=_gift-balance-module-state&state=1";}else if(balance=="giftBalance"&&showhide=="hide"){balanceUrl="webscr?cmd=_gift-balance-module-state&state=0";}
YAHOO.util.Connect.asyncRequest('POST',balanceUrl,callback,null);};PAYPAL.Beloved.Salsa.displayLightbox=function(){var AXCILightbox=document.getElementById("AXCILightBox");document.body.appendChild(AXCILightbox);YUD.addClass("AXCILightBox","accessAid");var myLightbox=new PAYPAL.util.Lightbox("AXCILightBox");YUE.addListener("closer","click",function(){myLightbox.close();});myLightbox.show();};PAYPAL.Beloved.Salsa.initJCBLightBox=function(){var objLightBox=null;var imgLoading="<center><img height='42' src='/en_US/i/icon/icon_animated_prog_42wx42h.gif' width='42'></center>";var jcbintrolightbox=new PAYPAL.util.Lightbox("JCBIntroLightbox");jcbintrolightbox.setBody(imgLoading);jcbintrolightbox.show();var MiniPgURL=document.getElementById('jcbFlow').value;var param='';PAYPAL.util.Connect.send(MiniPgURL,{'method':'POST','query':param,'type':'minipage','callback':loadMini});function loadMini(data,request){var jcbDiv=document.createElement('div');jcbDiv.setAttribute('id','JCBIntroLightbox');jcbDiv.innerHTML=data.html;jcbintrolightbox.setBody(jcbDiv);}
YUE.addListener("remind_later","click",function(e){YUE.preventDefault(e);jcbintrolightbox.close();});};PAYPAL.Beloved.Salsa.displayLoading=function(divId){var loadParent=document.getElementById(divId);PAYPAL.util.Connect.submitForm('ajaxForm',{'type':'minipage','callback':function(data){oldwidget=document.getElementById('PPCreditwidget');newwidget=document.createElement('div');newwidget.innerHTML=data.html;oldwidget.parentNode.replaceChild(newwidget,oldwidget);}});loadParent.innerHTML="";var loadingImg=document.createElement('img');loadingImg.setAttribute('alt','loading...');loadingImg.setAttribute('src','/en_US/i/icon/icon_animated_prog_42wx42h.gif');var loadingDiv=document.createElement('div');YUD.addClass(loadParent,'loadingImageTable');YUD.addClass(loadingImg,'processingImg');YUD.addClass(loadingDiv,"textcenter");loadingDiv.appendChild(loadingImg);loadParent.appendChild(loadingDiv);var loadParentXY=YUD.getXY(loadParent);YUD.setXY(loadingDiv,loadParentXY);loadingDiv.style.width=loadParent.offsetWidth+"px";loadingDiv.style.paddingTop=((loadParent.offsetHeight/2)-21)+"px";loadingDiv.style.paddingBottom=((loadParent.offsetHeight/2)-21)+"px";};PAYPAL.Beloved.Salsa.getTagContents=function(sTag,sString){var sReturn="";var oRex=new RegExp("<"+sTag+">(.{1,})<");var bMatch=oRex.exec(sString);if(bMatch!==null){sReturn=bMatch[1];}
else{sReturn=null;}
return sReturn;};PAYPAL.Beloved.Salsa.checkDismiss=function(data,request,exception){var result=PAYPAL.Beloved.Salsa.getTagContents("alert_result",request.responseText);var alert_id=PAYPAL.Beloved.Salsa.getTagContents("alert_id",request.responseText);if(result=='true'){YUD.addClass(alert_id,'hide');}
else if(result===null){window.reload();}};PAYPAL.Beloved.Salsa.closeAlert=function(){var alertId=this.parentNode.id;var url="webscr?cmd=_alert-dismiss&alert_id="+alertId;PAYPAL.util.Connect.send(url,{callback:PAYPAL.Beloved.Salsa.checkDismiss});};PAYPAL.Beloved.Salsa.showAlertClose=function(){YUE.addListener(YUD.getElementsByClassName("autoTooltip","img","main"),"click",PAYPAL.Beloved.Salsa.closeAlert);};PAYPAL.Beloved.Salsa.StudentTicker={rightBoundery:0,width:0,height:0,increment:150,margin:50,viewport:null,slider:null,container:null,arrow:{right:null,left:null},init:function(){this.container=document.getElementById("studentAccounts");this.viewport=YUD.getElementsByClassName("viewport","div",this.container);if(this.viewport.length>0){this.viewport=this.viewport[0];}
else{return false;}
var dl=this.viewport.getElementsByTagName("dl");var width=0;this.slider=dl[0];for(var n=0;n<this.slider.childNodes.length;n++){var node=this.slider.childNodes[n];if(node!==undefined&&node.nodeName!="#text"){width+=node.clientWidth;width+=5;}}
this.slider.style.width=width+"px";if(width>=672){if(document.getElementById("studentAccounts")){var buttons=YUD.getElementsByClassName("leftBtn","span","studentAccounts");if(!buttons[0]){var leftSpan=document.createElement("span");leftSpan.className="leftBtn disabled";this.viewport.parentNode.insertBefore(leftSpan,this.viewport.parentNode.firstChild);var rightSpan=document.createElement("span");rightSpan.className="rightBtn rdisabled";this.viewport.parentNode.appendChild(rightSpan);}}}
this.width=width;this.height=this.container.clientHeight;if(this.viewport.clientWidth>=this.width){this.rightBoundery=0;}
else{this.rightBoundery=(this.width-this.viewport.clientWidth)*-1;}
this.arrow.right=YUD.getElementsByClassName("rightBtn","*",this.container);this.arrow.left=YUD.getElementsByClassName("leftBtn","*",this.container);this.arrow.right=this.arrow.right[0];this.arrow.left=this.arrow.left[0];YUE.addListener(this.arrow.right,"click",this.moveRight,this,true);YUE.addListener(this.arrow.left,"click",this.moveLeft,this,true);this.resetArrows();var self=this;setInterval(function(){if(self.height!=self.container.clientHeight){self.init();}},1000);},resetArrows:function(pos){if(pos===undefined){pos=this.getPos();}
if(pos>=0){YUD.addClass(this.arrow.left,"disabled");}
else{YUD.removeClass(this.arrow.left,"disabled");}
if(pos<=this.rightBoundery){YUD.addClass(this.arrow.right,"rdisabled");}
else{YUD.removeClass(this.arrow.right,"rdisabled");}},getPos:function(){var pos=parseInt(this.slider.style.left,10);if(isNaN(pos)){return 0;}
return pos;},moveRight:function(){this.move(-1);},moveLeft:function(){this.move(1);},move:function(dir){var pos=this.getPos();var moveTo=pos+(this.increment*dir);var leftButtons=YUD.getElementsByClassName("leftBtn","span","studentAccounts");var rightButtons=YUD.getElementsByClassName("rightBtn","span","studentAccounts");if(dir==1&&YUD.hasClass(leftButtons[0],"disabled")){return 0;}
if(dir==-1&&YUD.hasClass(rightButtons[0],"rdisabled")){return 0;}
PAYPAL.Beloved.Salsa.scrollCount-=dir;var scrollCount=PAYPAL.Beloved.Salsa.scrollCount;var dlist=YUD.getElementsByClassName("teen","dl","studentAccounts");var dterms=dlist[0].getElementsByTagName("dt");var dtCount=dterms.length;var currentdt=dterms[scrollCount];if(scrollCount>dtCount){scrollCount=dtCount;}
var scrollWidth=dlist[0].offsetLeft+currentdt.offsetLeft;moveTo=pos-scrollWidth;if(moveTo>0){moveTo=0;}
if(dir==1&&moveTo>=(this.margin*-1)){moveTo=0;}
var anim=new YAHOO.util.Anim(this.slider,{left:{to:moveTo}},0.5,YAHOO.util.Easing.easeOut);anim.animate();this.resetArrows(moveTo);}};YUE.addListener(window,"load",PAYPAL.Beloved.Salsa.StudentTicker.init,PAYPAL.Beloved.Salsa.StudentTicker,true);PAYPAL.Beloved.Salsa.splitButtonSecondary=function(tableSecondaryRow){var secondaryRow=tableSecondaryRow;var selectDiv=YUD.getElementsByClassName("splitButton","div",secondaryRow);if(selectDiv.length>0){var selectList=YUD.getElementsByClassName("list","ul",secondaryRow);var selectSpan=YUD.getElementsByClassName("listSpan","span",secondaryRow);var selectDivRegion=YUD.getRegion(selectDiv[0]);YUD.setStyle(selectList,'width','auto');YUD.setXY(selectList[0],[parseInt(selectDivRegion.left,10),parseInt(selectDivRegion.top,10)]);var selectListRegion=YUD.getRegion(selectList[0]);YUD.setStyle(selectSpan,'height',(parseInt(selectListRegion.bottom,10)-parseInt(selectListRegion.top,10))+'px');YUD.setXY(selectSpan,[parseInt(selectListRegion.right,10),parseInt(selectListRegion.top,10)]);}};PAYPAL.Beloved.Salsa.showHideRows=function(e){var pressedKey=YUE.getCharCode(e);var KEY_LEFT=37,KEY_RIGHT=39,KEY_SPACE=32,KEY_RETURN=13,MOUSE_CLICK=0;if((pressedKey==KEY_RIGHT&&YUD.hasClass(this.parentNode,"showCollapsedImage"))||(pressedKey==KEY_LEFT&&YUD.hasClass(this.parentNode,"showExpandedImage"))||pressedKey==KEY_RETURN||pressedKey==KEY_SPACE||pressedKey==MOUSE_CLICK){if(pressedKey==KEY_RETURN||pressedKey==KEY_SPACE||pressedKey==MOUSE_CLICK){YUE.preventDefault(e);}
var row=this.parentNode.parentNode;var flagClickSameRow=YUD.hasClass(row,"showSecondary");var hideSecondaryRows=YUD.getElementsByClassName("showSecondary");for(i=0;i<hideSecondaryRows.length;i++){if(YUD.hasClass(hideSecondaryRows[i],"primary")){YUD.removeClass(hideSecondaryRows[i],"showSecondary");}else{YUD.replaceClass(hideSecondaryRows[i],"showSecondary","hideSecondary");hideSecondaryRows[i].style.display='none';}}
var toggleSecondary=YUD.getElementsByClassName("imageCell","td",YUD.get('transactionTable'));var toggleLinks=new Array();if(toggleSecondary.length>=1){for(i=0;i<toggleSecondary.length;i++){toggleLinks[i]=toggleSecondary[i].getElementsByTagName("a")[0];}}
for(i=0;i<toggleLinks.length;i++){toggleLinks[i].setAttribute('aria-expanded','false');}
var expandImage=YUD.getElementsByClassName("showExpandedImage");if(expandImage.length==1){YUD.replaceClass(expandImage[0],"showExpandedImage","showCollapsedImage");}
if(flagClickSameRow===false){YUD.replaceClass(this.parentNode,"showCollapsedImage","showExpandedImage");this.setAttribute('aria-expanded','true');YUD.addClass(row,"showSecondary");var secondaryRows=YUD.getElementsByClassName(row.id);YUD.replaceClass(secondaryRows,"hideSecondary","showSecondary");for(j=0;j<secondaryRows.length;j++){secondaryRows[j].style.display='';PAYPAL.Beloved.Salsa.splitButtonSecondary(secondaryRows[j]);}}}};PAYPAL.Beloved.Salsa.getResultsPerPage=function(){this.parentNode.getElementsByTagName('input')[0].click();};PAYPAL.Beloved.Salsa.showReplicaAlert=function(){YUD.removeClass("replicaAlertWrapper","hide");YUD.addClass(YUD.getElementsByClassName("title"),"titleReplicaStyle");YUD.addClass("alertImage","accessAid");};PAYPAL.Beloved.Salsa.hideReplicaAlert=function(){YUD.addClass("replicaAlertWrapper","hide");YUD.removeClass(YUD.getElementsByClassName("title"),"titleReplicaStyle");YUD.removeClass("alertImage","accessAid");};PAYPAL.Beloved.Salsa.initializeDatatable=function(){if(YUD.get('tableWrapperID'))
{YUD.setStyle(YUD.get('tableWrapperID'),'overflow','visible');}
var table=document.getElementById("transactionTable");var toggleSecondary=YUD.getElementsByClassName("imageCell","td",table);var toggleLinks=new Array();if(toggleSecondary.length>=1){YUD.addClass(toggleSecondary,"showCollapsedImage");for(i=0;i<toggleSecondary.length;i++){toggleLinks[i]=toggleSecondary[i].getElementsByTagName("a")[0];}}
YUE.addListener(toggleLinks,"click",PAYPAL.Beloved.Salsa.showHideRows);YUE.addListener(toggleLinks,"keydown",PAYPAL.Beloved.Salsa.showHideRows);for(i=0;i<toggleLinks.length;i++){toggleLinks[i].setAttribute('role','treeitem');toggleLinks[i].setAttribute('aria-expanded','false');}
var hideSecondary=YUD.getElementsByClassName("secondary","tr",table);if(hideSecondary.length>0){YUD.replaceClass(hideSecondary,"secondary","hideSecondary");YUD.setStyle(hideSecondary,'display','none');}
var firstTab=YUD.getElementsByClassName("tabHeader")[0]
if(firstTab){YUD.replaceClass(YUD.getElementsByClassName("imageCell","td",firstTab)[0],"showcollapsedImage","showExpandedImage");YUD.addClass(firstTab,"showSecondary");var firstTabSecondaryRows=YUD.getElementsByClassName(firstTab.id);YUD.replaceClass(firstTabSecondaryRows,"hideSecondary","showSecondary");YUD.setStyle(firstTabSecondaryRows,'display','');}
if(document.getElementById("recent_all_selected")){document.getElementById("recent_all_selected").disabled=false;}
YUE.addListener(YUD.getElementsByClassName("resultsSelect","select","main"),"change",PAYPAL.Beloved.Salsa.getResultsPerPage);};var flagSplitbutton=0;var maxSplitButtonColumnWidth=(YUD.get('activityFilters'))?160:120;PAYPAL.Beloved.Salsa.showHideSecondary=function(event){var targetEvent=YUE.getTarget(event);var flagIsOpen=false;if(flagSplitbutton===0&&navigator.userAgent.toLowerCase().indexOf('msie 6')!=-1){var orderStatusCell=YUD.getElementsByClassName("orderStatus","td","transactionTable");if(orderStatusCell.length>0){YUD.setStyle(orderStatusCell,'position','static');}}
var listItems=YUD.getElementsByClassName("list");for(var i=0;i<listItems.length;i++){if((YUD.hasClass(listItems[i],"open"))&&!(YUD.hasClass(targetEvent,'hideSecondaryItem'))&&!(YUD.hasClass(targetEvent.parentNode,'hideSecondaryItem'))&&!(YUD.getElementsByClassName('masked','body').length>0)){flagIsOpen=listItems[i];YUD.replaceClass(listItems[i],"open","closed");var li_items=listItems[i].getElementsByTagName("li");for(var j=0;j<li_items.length;j++){var link_item=YUD.getFirstChild(li_items[j])
if(YUD.hasClass(li_items[j],"primaryItem")){YUD.setAttribute(link_item,"tabIndex",'0');}else{YUD.setAttribute(link_item,"tabIndex",'-1');}}}}
if(targetEvent.className=='listSpan'){var list=targetEvent.parentNode.parentNode.getElementsByTagName('ul')[0];if(flagIsOpen!=list){YUD.replaceClass(list,"closed","open");}}};PAYPAL.Beloved.Salsa.setOffsetWidth=function(){var listItems=YUD.getElementsByClassName("list");for(var i=0;i<listItems.length;i++){if(flagSplitbutton===0){YUD.setStyle(listItems[i],"width",listItems[i].offsetWidth+"px");YUD.setStyle(listItems[i],"margin-bottom",'1px');if(listItems.length==i+1){flagSplitbutton=1;}}}};PAYPAL.Beloved.Salsa.submitForm=function(){var pattern=/trackIssueRefund_/;if(this.parentNode.parentNode.getElementsByTagName('select')[0].id.match(pattern))
{var win=window.open(this.parentNode.parentNode.getElementsByTagName('select')[0].value,'_blank','width=425, height=450, location=0, toolbar=0, resizable=1');return win;}
else
{var flagReplica=YUD.hasClass(this.parentNode.parentNode,"flagReplica");if(!flagReplica){if(!YUD.hasClass(this,"printeRec")&&!YUD.hasClass(this,"viewNrr")){var inputSubmitButton=this.parentNode.parentNode.getElementsByTagName('input');inputSubmitButton[0].click();}}}};PAYPAL.Beloved.Salsa.showHideSecondaryHover=function(event,flag){if(YUE.getTarget(event).tagName.toLowerCase()!='li'){var t=YUD.getAncestorByTagName(YUE.getTarget(event),'li');}else{var t=YUE.getTarget(event);}
var flagReplica=YUD.hasClass(t.parentNode.parentNode,"flagReplica");if(!flagReplica){if(flag.show==true){YUD.addClass(t,"hover");}else{YUD.removeClass(t,"hover");}}};PAYPAL.Beloved.Salsa.moveLightbox=function(lightBox){if(lightBox.id=="markShippedlightbox"){YUD.addClass(YUD.getElementsByClassName("shippingCompanyName","p","markShippedlightbox"),"accessAid");YUE.addListener("markShippedUsing","change",PAYPAL.Beloved.Salsa.showShippingCompany);YUE.addListener("trackInfoNo","click",PAYPAL.Beloved.Salsa.noTrackInfoSelected);YUE.addListener("trackInfoYes","click",PAYPAL.Beloved.Salsa.noTrackInfoSelected);}else if(lightBox.id=="addTrackingLightbox"){YUD.addClass(YUD.getElementsByClassName("shippingCompanyNameAddTracking","p","addTrackingLightbox"),"accessAid");YUE.addListener("shippedUsing","change",PAYPAL.Beloved.Salsa.showShippingCompany);}};PAYPAL.Beloved.Salsa.callLightbox=function(showLightbox){if(!YUD.hasClass(showLightbox,"yui-panel")){var lightboxId=document.getElementById(showLightbox);lightboxId.parentNode.removeChild(lightboxId);document.body.appendChild(lightboxId);PAYPAL.Beloved.Salsa.moveLightbox(lightboxId);}
var lightbox=new PAYPAL.util.Lightbox(showLightbox);if(showLightbox=="addTrackingLightbox"){document.getElementById('trackingNum').value="";document.getElementById('otherShippingCompanyAddTracking').value="";document.getElementById('shipping_country_addTracking').value="";document.getElementById('shipping_quantity_addTracking').value="";}else if(showLightbox=="markShippedlightbox"){document.getElementById('trackingNumShipped').value="";document.getElementById('otherShippingCompany').value="";document.getElementById('shipping_country').value="";document.getElementById('shipping_quantity').value="";}
lightbox.show();return false;};PAYPAL.Beloved.Salsa.errorLightbox=function(){if(YUD.get("show_lightbox_error_markShipped")&&(!YUD.hasClass(YUD.get("markShippedlightbox").parentNode,'accessAid'))){PAYPAL.Beloved.Salsa.callLightbox('markShippedlightbox');}else if(YUD.get("show_lightbox_error_trakingInfo")&&(!YUD.hasClass(YUD.get("addTrackingLightbox").parentNode,'accessAid'))){PAYPAL.Beloved.Salsa.callLightbox('addTrackingLightbox');}}
YUE.addListener(window,"load",PAYPAL.Beloved.Salsa.errorLightbox);PAYPAL.Beloved.Salsa.callSecondary=function(){var flagReplica=YUD.hasClass(this.parentNode.parentNode,"flagReplica");if(!flagReplica){YUD.removeClass(this,"hover");TransactionId=this.parentNode.parentNode.parentNode.parentNode.id;if(YUD.hasClass(this,"MarkAsShipped")){document.getElementById('markAsShippedHidden').value=TransactionId;var errorElement=YUD.getElementsByClassName('error','span','markShippedlightbox');if(errorElement[0])YUD.addClass(errorElement[0],'hide');if(YUD.hasClass(this,"gspTxn")){YUD.removeClass("gspMarkAsShipped","accessAid");document.getElementById('is_gsp_txn_mSip').value="true";}else{YUD.addClass("gspMarkAsShipped","accessAid");document.getElementById('is_gsp_txn_mSip').value="";}
PAYPAL.Beloved.Salsa.callLightbox("markShippedlightbox");}else if(YUD.hasClass(this,"AddTracking")||YUD.hasClass(this,"addShippingInfo")){document.getElementById('addTrackingHidden').value=TransactionId;var errorElement=YUD.getElementsByClassName('error','span','addTrackingLightbox');if(errorElement[0])YUD.addClass(errorElement[0],'hide');if(YUD.hasClass(this,"gspTxn")){YUD.removeClass("gspAddTracking","accessAid");document.getElementById('is_gsp_txn_aTrc').value="true";}else{YUD.addClass("gspAddTracking","accessAid");document.getElementById('is_gsp_txn_aTrc').value="";}
PAYPAL.Beloved.Salsa.callLightbox("addTrackingLightbox");}else{var optionTags=this.parentNode.parentNode.getElementsByTagName('option');for(var i=0;i<optionTags.length;i++){if(optionTags[i].text==this.firstChild.firstChild.nodeValue){optionTags[i].selected=true;}}
if(!YUD.hasClass(this,"printeRec")){var inputSubmitButton=this.parentNode.parentNode.getElementsByTagName('input');inputSubmitButton[0].click();}}}};PAYPAL.Beloved.Salsa.splitButtonHover=function(event){var divAddHover;if(YUE.getTarget(event).tagName.toLowerCase()=='a'){var t=YUD.getAncestorByTagName(YUE.getTarget(event),'li');}else{var t=YUE.getTarget(event);}
var list=YUD.getAncestorByTagName(YUE.getTarget(event),'ul');if(YUD.hasClass(t.parentNode,"splitButton")){divAddHover=t.parentNode;}else{divAddHover=t.parentNode.parentNode;}
if(event.type=="mouseover"||event.type=="focus"){YUD.addClass(divAddHover,"open");}else{YUD.removeClass(divAddHover,"open");}};PAYPAL.Beloved.Salsa.splitButtonLoader=function(){var splitButtonDivs=YUD.getElementsByClassName("splitButton","div","transactionTable");var actionNode=document.createElement("ul");var maxButtonWidth=0;actionNode.className="list closed";YUD.setStyle(actionNode,"margin",0);for(var i=0;i<splitButtonDivs.length;i++){var presentElement=splitButtonDivs[i];var actionElement=actionNode.cloneNode(false);var actionList=presentElement.getElementsByTagName('select')[0];var actionListOptions=actionList.options;if(actionList.offsetWidth<maxSplitButtonColumnWidth){YUD.setStyle(actionElement,"width",(actionList.offsetWidth+4+'px'));}else{YUD.setStyle(actionElement,"width",maxSplitButtonColumnWidth+"px");}
for(var j=0;j<actionListOptions.length;j++){var actionListItem=document.createElement("li");var actionListAnchor=document.createElement("a");actionListAnchor.setAttribute("href",actionListOptions[j].value);actionListAnchor.innerHTML=actionListOptions[j].text;var cssClass=(j===0)?'primaryItem':'hideSecondaryItem';if(actionList[j].className){cssClass+=" "+actionListOptions[j].className;}
YUD.addClass(actionListItem,cssClass);actionElement.appendChild(actionListItem);actionListItem.appendChild(actionListAnchor);YUE.addListener(actionListAnchor,"click",function(e){YUE.preventDefault(e);});YUE.addListener(actionListAnchor,"keydown",PAYPAL.Beloved.Salsa.splitButtonKeyNavigationOption);if(j==0){YUD.setAttribute(actionListAnchor,"tabIndex",'0');YUE.addListener(actionListAnchor,"focus",PAYPAL.Beloved.Salsa.splitButtonHover);YUE.addListener(actionListAnchor,"blur",PAYPAL.Beloved.Salsa.splitButtonHover);YUE.addListener(actionListAnchor,"mouseover",PAYPAL.Beloved.Salsa.splitButtonHover);YUE.addListener(actionListAnchor,"mouseout",PAYPAL.Beloved.Salsa.splitButtonHover);}else{YUD.setAttribute(actionListAnchor,"tabIndex",'-1');YUE.addListener(actionListAnchor,"focus",PAYPAL.Beloved.Salsa.showHideSecondaryHover,{show:true});YUE.addListener(actionListAnchor,"blur",PAYPAL.Beloved.Salsa.showHideSecondaryHover,{show:false});YUE.addListener(actionListAnchor,"mouseover",PAYPAL.Beloved.Salsa.showHideSecondaryHover,{show:true});YUE.addListener(actionListAnchor,"mouseout",PAYPAL.Beloved.Salsa.showHideSecondaryHover,{show:false});}}
presentElement.appendChild(actionElement);if(actionList.offsetWidth<maxSplitButtonColumnWidth){YUD.setStyle(presentElement,"width",(actionList.offsetWidth+4+'px'));}else{YUD.setStyle(presentElement,"width",maxSplitButtonColumnWidth+"px");}
var listItemRegion=YUD.getRegion(actionElement);YUD.setStyle(presentElement,"height",listItemRegion.bottom-listItemRegion.top+"px");YUD.setStyle(actionList,'display','none');YUD.addClass(presentElement.getElementsByTagName('input')[0],'hide');YUD.setStyle(presentElement,'zIndex',(splitButtonDivs.length-i));var arrowSpan=document.createElement("span");arrowSpan.className='listSpan';presentElement.appendChild(arrowSpan);YUD.setStyle(arrowSpan,'height',listItemRegion.bottom-listItemRegion.top-2+'px');if(YUD.getElementsByClassName('rtl','body').length>0){YUD.setStyle(arrowSpan,'left','0px');}else{YUD.setStyle(arrowSpan,'left',presentElement.offsetWidth-arrowSpan.offsetWidth+'px');}
if(presentElement.offsetWidth>maxButtonWidth){maxButtonWidth=presentElement.offsetWidth;}}
var secondaryItemListener=YUD.getElementsByClassName("hideSecondaryItem","li","transactionTable");var primaryItemListener=YUD.getElementsByClassName("primaryItem","li","transactionTable");var listSpanListener=YUD.getElementsByClassName("listSpan","span","transactionTable");var addShippingInfoListener=YAHOO.util.Dom.getElementsByClassName("addShippingInfo","li","transactionTable");YUE.addListener(secondaryItemListener,"click",PAYPAL.Beloved.Salsa.callSecondary);YUE.addListener(primaryItemListener,"click",PAYPAL.Beloved.Salsa.submitForm);YUE.addListener(primaryItemListener,"mouseover",PAYPAL.Beloved.Salsa.splitButtonHover);YUE.addListener(primaryItemListener,"mouseout",PAYPAL.Beloved.Salsa.splitButtonHover);YUE.addListener(listSpanListener,"mouseover",PAYPAL.Beloved.Salsa.splitButtonHover);YUE.addListener(listSpanListener,"mouseout",PAYPAL.Beloved.Salsa.splitButtonHover);YUE.addListener(secondaryItemListener,"mouseover",PAYPAL.Beloved.Salsa.showHideSecondaryHover,{show:true});YUE.addListener(secondaryItemListener,"mouseout",PAYPAL.Beloved.Salsa.showHideSecondaryHover,{show:false});YUE.removeListener(addShippingInfoListener,"click",PAYPAL.Beloved.Salsa.submitForm);YUE.addListener(addShippingInfoListener,"click",PAYPAL.Beloved.Salsa.callSecondary);YUE.addListener(document,"mouseup",PAYPAL.Beloved.Salsa.showHideSecondary);if(YUD.get('actions')){if(YUD.get('actions').offsetWidth>maxSplitButtonColumnWidth){YUD.setStyle(YUD.get('actions'),'width',maxSplitButtonColumnWidth+'px');var orderStatusTDs=YUD.getElementsByClassName('orderStatus','td',YUD.get('transactionTable'));YUD.setStyle(orderStatusTDs,"width",maxSplitButtonColumnWidth+'px');}}
if(navigator.userAgent.toLowerCase().indexOf('chrome')>-1)
{PAYPAL.Beloved.Salsa.setOffsetWidth();}
if(navigator.userAgent.toLowerCase().indexOf('msie 7')>-1)
{var splitBtns=YUD.getElementsByClassName("splitButton");for(i=0;i<=splitBtns.length;i++){YUD.setStyle(splitBtns[i],'margin-bottom','0px');}}};PAYPAL.Beloved.Salsa.splitButtonKeyNavigationOption=function(e){var a=YUE.getCharCode(e);var t=YUE.getTarget(e);var list=YUD.getAncestorByTagName(t,'ul');var li_items=list.getElementsByTagName("li");var li_ele=YUD.getAncestorByTagName(t,'li');var KEY_DOWN=40,KEY_UP=38,KEY_ESCAPE=27,KEY_TAB=9;if(a==KEY_DOWN){YUE.preventDefault(e);if(YUD.hasClass(li_ele,"primaryItem")&&YUD.hasClass(list,"closed")){YUD.replaceClass(list,"closed","open");}
var nxtElement=YUD.getNextSibling(li_ele);if(nxtElement!=null){var nxtElementAnchor=YUD.getFirstChild(nxtElement);}else{var nxtElementAnchor=YUD.getFirstChild(li_items[0]);}
YUD.setAttribute(t,"tabIndex",'-1');YUD.setAttribute(nxtElementAnchor,"tabIndex",'0');try{nxtElementAnchor.focus();}catch(e){}}else if(a==KEY_UP){YUE.preventDefault(e);if(YUD.hasClass(li_ele,"primaryItem")&&YUD.hasClass(list,"closed")){YUD.replaceClass(list,"closed","open");}
var prvElement=YUD.getPreviousSibling(li_ele);if(prvElement!=null){var prvElementAnchor=YUD.getFirstChild(prvElement);}else{var prvElementAnchor=YUD.getFirstChild(li_items[li_items.length-1]);}
YUD.setAttribute(t,"tabIndex",'-1');YUD.setAttribute(prvElementAnchor,"tabIndex",'0');try{prvElementAnchor.focus();}catch(e){}}else if(a==KEY_ESCAPE){if(!YUD.hasClass(li_ele,"primaryItem")){YUD.setAttribute(t,"tabIndex",'-1');var p=YUD.getFirstChild(YUD.getFirstChild(list));try{p.focus();}catch(e){}
setTimeout('PAYPAL.Beloved.Salsa.closeSplitButtons()',1);}else{try{t.focus();}catch(e){}
if(YUD.hasClass(list,"open")){setTimeout('PAYPAL.Beloved.Salsa.closeSplitButtons()',1);}}}else if(a==KEY_TAB){if(!YUD.hasClass(li_ele,"primaryItem")){YUD.setAttribute(t,"tabIndex",'-1');}
YUD.setAttribute(YUD.getFirstChild(li_items[0]),"tabIndex",'0');if(YUD.hasClass(list,"open")){YUD.replaceClass(list,"open","closed");}}}
PAYPAL.Beloved.Salsa.closeSplitButtons=function(){var list=YUD.getElementsByClassName('list','ul');YUD.replaceClass(list,"open","closed");}
PAYPAL.Beloved.Salsa.extendDivWidth=function(){if(YUD.getElementsByClassName("divExtendWidth")[0]){if(document.getElementById("transactionTable").offsetWidth>YUD.getElementsByClassName("divExtendWidth")[0].offsetWidth){YUD.setStyle(YUD.getElementsByClassName("divExtendWidth"),"width",document.getElementById("transactionTable").offsetWidth-15+"px");}}};PAYPAL.Beloved.Salsa.setTransactionWidth=function(){var transTableMaxWidth=(YUD.get('activityFilters'))?936:691;var transTableWidth=YUD.get('transactionTable').offsetWidth;if(transTableWidth>transTableMaxWidth){var maxEmailColumnWidth=(YUD.get('activityFilters'))?165:100;var emailInfoTDs=YUD.getElementsByClassName("emailInfo","td",YUD.get('transactionTable'));var emailInfoDIVs=YUD.getElementsByClassName("wrapEmail","div",YUD.get('transactionTable'));if(emailInfoTDs[0]&&emailInfoTDs[0].offsetWidth>maxEmailColumnWidth)
{YUD.setStyle(emailInfoTDs,"width",maxEmailColumnWidth-10+"px");YUD.setStyle(emailInfoDIVs,"width",maxEmailColumnWidth-10+"px");}}
transTableWidth=YUD.get('transactionTable').offsetWidth;if(transTableWidth>transTableMaxWidth){var maxPaymentStatusWidth=(YUD.get('activityFilters'))?120:90;var paymentInfoTDs=YUD.getElementsByClassName("paymentStatusInfo","td",YUD.get('transactionTable'));var paymentInfoDIVs=YUD.getElementsByClassName("wrapPaymentStatus","div",YUD.get('transactionTable'));if(paymentInfoTDs[0]&&paymentInfoTDs[0].offsetWidth>maxPaymentStatusWidth)
{YUD.setStyle(paymentInfoTDs,"width",maxPaymentStatusWidth-10+"px");YUD.setStyle(paymentInfoDIVs,"width",maxPaymentStatusWidth-10+"px");}}}
YUE.addListener(window,"load",PAYPAL.Beloved.Salsa.setTransactionWidth);PAYPAL.Beloved.Salsa.showShippingCompany=function(){var showHideTextbox;if(this.id=="markShippedUsing"){showHideTextbox="shippingCompanyName";}else if(this.id=="shippedUsing"){showHideTextbox="shippingCompanyNameAddTracking";}
if(this.value=="9"||this.value=="19"||this.value=="26"||this.value=="37"||this.value=="45"||this.value=="52"||this.value=="62"||this.value=="72"||this.value=="95"){YUD.removeClass(YUD.getElementsByClassName(showHideTextbox),"accessAid");}else{YUD.addClass(YUD.getElementsByClassName(showHideTextbox),"accessAid");}};PAYPAL.Beloved.Salsa.noTrackInfoSelected=function(){var flag;if(this.id=="trackInfoNo"){flag=true;}else{flag=false;}
document.getElementById("markShippedUsing").disabled=flag;document.getElementById("otherShippingCompany").disabled=flag;document.getElementById("trackingNumShipped").disabled=flag;};PAYPAL.Beloved.Salsa.lastDownload=function(e){YUE.preventDefault(e);PAYPAL.Beloved.Salsa.callLightbox("downloadLightbox");var ajaxHandler={success:function(request){var result=PAYPAL.Beloved.Salsa.getTagContents("last_download_time_present",request.responseText);var download_time=PAYPAL.Beloved.Salsa.getTagContents("last_download_time_result",request.responseText);var download_time_error_content=document.getElementById("show_lightbox_error_content").value;if(result=='true'){var last_download_content=document.getElementById("lastDownloadContent").value;document.getElementById("timeFromLastDownload").innerHTML=last_download_content+download_time;}else{document.getElementById("timeFromLastDownload").innerHTML=download_time_error_content;}},failure:function(request){document.getElementById("timeFromLastDownload").innerHTML=download_time_error_content;},timeout:26000};var url="/cgi-bin/webscr?cmd=_last-download-time";YAHOO.util.Connect.asyncRequest("GET",url,ajaxHandler);};PAYPAL.Beloved.Salsa.checkElement=function(){var allElements;var flag=true;if(this.className=="archiveCheck"){if(this.id!="recent_all_selected"){if(this.checked===true){YUD.addClass(this.parentNode.parentNode,"rowFocusColor");}else{YUD.removeClass(this.parentNode.parentNode,"rowFocusColor");}}
allElements=YUD.getElementsByClassName("archiveCheck");for(var i=1;i<allElements.length;i++){if(this.id=="recent_all_selected"){allElements[i].checked=this.checked;if(this.checked===true){YUD.addClass(allElements[i].parentNode.parentNode,"rowFocusColor");}else{YUD.removeClass(allElements[i].parentNode.parentNode,"rowFocusColor");}}else{if(allElements[i].checked===false){flag=false;}
document.getElementById('recent_all_selected').checked=flag;}}}else if(this.className=="checkCurrency"){allElements=YUD.getElementsByClassName("checkCurrency");for(var j=0;j<allElements.length-1;j++){if(this.id=="allCurrency"){allElements[j].checked=this.checked;}else{if(allElements[j].checked===false){flag=false;}
document.getElementById('allCurrency').checked=flag;}}}else if(this.className=="search_In"){if(this.value=='credit_card_number'){YUD.removeClass("ccNote","hide");ppc1.setCalIconMaskPosition();ppc2.setCalIconMaskPosition();}else{YUD.addClass("ccNote","hide");ppc1.setCalIconMaskPosition();ppc2.setCalIconMaskPosition();}}else{allElements=YUD.getElementsByClassName("archiveCheck");for(var k=1;k<allElements.length;k++){if(allElements[k].checked&allElements[k].id!="recent_all_selected"){YUD.addClass(allElements[k].parentNode.parentNode,"rowFocusColor");}}}};PAYPAL.Beloved.Salsa.widgetInitialize=function(){if(document.getElementById('timeperiod')){if(document.getElementById('timeperiod').checked===true){document.getElementById('show').disabled=true;YUD.addClass("show","disabled");}}
if(document.getElementById('search_In')){if(document.getElementById('search_In').value!="credit_card_number"){YUD.addClass("ccNote","hide");}}};PAYPAL.Beloved.Salsa.widgetDisable=function(){if(document.getElementById('timeperiod')){document.getElementById('timeperiod').checked=true;document.getElementById('show').disabled=true;YUD.addClass("show","disabled");}};PAYPAL.Beloved.Salsa.widgetEnable=function(){if(document.getElementById('show')){document.getElementById('show').disabled=false;document.getElementById('dateoptions').checked=true;YUD.removeClass("show","disabled");}};PAYPAL.Beloved.Salsa.accountNameWidgetEnable=function(){if(document.getElementById('show').disabled===true){document.getElementById('show').disabled=false;YUD.removeClass("show","disabled");}};PAYPAL.Beloved.Salsa.widgetSubmit=function(){if(document.getElementById('submitshow')){document.getElementById('submitshow').click();}else if(document.getElementById('show')&&(document.history.transactionperiod.options[document.history.transactionperiod.selectedIndex].value!='0'||this.id=='currency_list')){document.history.transactionperiod.options[document.history.transactionperiod.selectedIndex].value=document.history.transactionperiod.options[document.history.transactionperiod.selectedIndex].value+"&show=Show";document.history.submit();}};var flagRemoveAlt=0;PAYPAL.Beloved.Salsa.balloonControlDisableAlt=function(e){if(flagRemoveAlt===0){var balloonList=YUD.getElementsByClassName("balloonControl","a","main");for(var i=0;i<balloonList.length;i++){var imgList=balloonList[i].getElementsByTagName("img");if(imgList.length>0){imgList[0].removeAttribute("alt");flagRemoveAlt=1;}}}};PAYPAL.Beloved.Salsa.printPage=function(e){if(e){YUE.preventDefault(e);}
window.print();};PAYPAL.Beloved.Salsa.printOnPageLoad=function(e){YUE.addListener(window,"load",function(){window.print();});};PAYPAL.Beloved.Salsa.balloonControl=function(e){YUE.preventDefault(e);};PAYPAL.Beloved.Salsa.HistorydownloadFileType=function(e){YUE.preventDefault(e);PAYPAL.Beloved.Salsa.callLightbox("downloadFileTypeLightbox");var downloadFileTypeLength=document.getElementById('download_file_type_lightbox').options.length;for(var i=0;i<downloadFileTypeLength;i++){if(document.getElementById('download_file_type_lightbox').options[i].value==this.name){document.getElementById('download_file_type_lightbox').options[i].selected=true;}}};PAYPAL.Beloved.Salsa.disableCurrencySearch=function(){var allCurrencyElements=YUD.getElementsByClassName("checkCurrency");var singleCurrency=YUD.getElementsByClassName('inlineCurrency');var flagCurrency;searchVal=YUD.get('search_In').value;if(searchVal=='trans_id'||searchVal=='store_id'||searchVal=='disbursement_id'){flagCurrency=true;}else{flagCurrency=false;}
if(allCurrencyElements.length>=1){for(var i=0;i<allCurrencyElements.length;i++){allCurrencyElements[i].disabled=flagCurrency;}}else if(document.getElementById('historyCurrencyAdvanced')){document.getElementById('historyCurrencyAdvanced').disabled=flagCurrency;}else if(singleCurrency.length>0){if(searchVal=='store_id'){YUD.addClass(singleCurrency,"hide");}else{YUD.removeClass(singleCurrency,"hide");}}};PAYPAL.Beloved.Salsa.disableDateSearch=function(){PAYPAL.Beloved.Salsa.disableCurrencySearch();if(this.value=='trans_id'||this.value=='wax_receipt'||this.value=='disbursement_id'){document.getElementById('from_date').disabled=true;document.getElementById('to_date').disabled=true;YUD.addClass(ppc1.calIconMask,"disable");YUD.addClass(ppc2.calIconMask,"disable");}else{document.getElementById('from_date').disabled=false;document.getElementById('to_date').disabled=false;YUD.removeClass(ppc1.calIconMask,"disable");YUD.removeClass(ppc2.calIconMask,"disable");}};PAYPAL.Beloved.Salsa.hideHelpText=function(){if(YUD.get("search").value==YUD.get("searchContent").value){this.value="";YUD.removeClass(this,"secondary");}};PAYPAL.Beloved.Salsa.transferToPartner=function(e){var lb=null;YUE.preventDefault(e);PAYPAL.util.Connect.sendFromLink(this.id,{'type':'minipage','callback':function(data){if(data){lb=new PAYPAL.util.Lightbox("scLbx");lb.addPage(data.html);lb.show();YUE.addListener("BuyerCreditSSO","submit",function(e){YUE.preventDefault(e);lb.close();this.target="_blank";this.submit();});YUE.addListener("cancel.x","click",function(e){YUE.preventDefault(e);lb.close();return true;});YUE.addListener('Skip','click',function(){if(document.getElementsByName('skip')[0].checked)YUE.removeListener('vendorlink','click',PAYPAL.Beloved.Salsa.transferToPartner);else YUE.addListener('vendorlink','click',PAYPAL.Beloved.Salsa.transferToPartner);});}}},{'continue':'Apply'});return true;};PAYPAL.Beloved.Salsa.initAccessibilityFilters=function(){var accessibilityFilterElements=[];moreFilterBtn=YUD.get("showMoreFiltersBtn");moreBtn=YUD.get("showMoreBtn");if(moreFilterBtn){accessibilityFilterElements.push(moreFilterBtn);}
if(moreBtn){accessibilityFilterElements.push(moreBtn);}
for(i=0;i<accessibilityFilterElements.length;i++){YUE.addListener(accessibilityFilterElements[i],"focus",function(e){YAHOO.util.Dom.addClass(this.parentNode,"hover");this.hide=false;if(YUD.get('activityFilters')&&YUE.isIE){YUD.addClass(YUD.get('activityFilters'),"addPosition");}});YUE.addListener(accessibilityFilterElements[i],"blur",function(e){try{if(this.hide===true){YUD.removeClass(this.parentNode,"hover");}}catch(er){}});YUE.addListener(accessibilityFilterElements[i],"keydown",PAYPAL.Beloved.Salsa.filterMenuKeyNavigation);}};PAYPAL.Beloved.Salsa.filterMenuKeyNavigation=function(e){var a=YUE.getCharCode(e);var t=YUE.getTarget(e);var filders=[];var moreFilters=[];var KEY_DOWN=40,KEY_ESCAPE=27;switch(a){case KEY_DOWN:filders=YUD.getNextSibling(t).getElementsByTagName("LI");YUD.addClass(filders[0],"hover");filders[0].firstChild.focus();YUD.addClass(YUD.getNextSibling(t),"addPosition");for(i=0;i<filders.length;i++){YUE.addListener(filders[i].firstChild,"keydown",PAYPAL.Beloved.Salsa.filderKeyNavigation);}
moreFilters=YUD.getNextSibling(t).getElementsByTagName("SPAN");for(i=0;i<moreFilters.length;i++){YUE.addListener(moreFilters[i],"keydown",PAYPAL.Beloved.Salsa.filderKeyNavigation);}
if(!YUD.hasClass(t.parentNode,"hover")){YAHOO.util.Dom.addClass(this.parentNode,"hover");}
YUE.preventDefault(e);break;case KEY_ESCAPE:YUD.removeClass(t.parentNode,"hover");break;default:t.hide=true;}};PAYPAL.Beloved.Salsa.filderKeyNavigation=function(e){var a=YUE.getCharCode(e);var t=YUE.getTarget(e);var KEY_TAB=9,KEY_LEFT=37,KEY_UP=38,KEY_RIGHT=39,KEY_DOWN=40,KEY_ENTER=13,KEY_ESCAPE=27;var showSubItem=false;var hideSubItem=false;switch(a){case KEY_UP:newItem=YUD.getPreviousSibling(t.parentNode);break;case KEY_DOWN:newItem=YUD.getNextSibling(t.parentNode);break;case KEY_RIGHT:showSubItem=true;newItem=YUD.getFirstChild(YUD.getNextSibling(t));break;case KEY_LEFT:case KEY_ESCAPE:hideSubItem=true;newItem=YUD.getPreviousSibling(t.parentNode.parentNode);break;default:if(a!==KEY_ENTER){YUE.preventDefault(e);return;}}
try{if(newItem===null){switch(a){case KEY_UP:newItem=YUD.getLastChild(t.parentNode.parentNode);break;case KEY_DOWN:newItem=YUD.getFirstChild(t.parentNode.parentNode);break;}}
if(newItem!==null){YUD.addClass(newItem,"hover");if(!hideSubItem){YUD.getFirstChild(newItem).focus();}else{newItem.focus();}
if(!showSubItem){YUD.removeClass(t.parentNode,"hover");}}}catch(ex)
{}
if(a!=KEY_ENTER){YUE.preventDefault(e);}};PAYPAL.Beloved.Salsa.cancelSubflow={init:function(){PAYPAL.Beloved.Salsa.cancelSubflow.setEvents();},setEvents:function(){YAHOO.util.Event.addListener('rtrCancelBtn','click',PAYPAL.Beloved.Salsa.cancelSubflow.showLightbox);},showLightbox:function(event){YUE.preventDefault(event);PAYPAL.util.Connect.sendFromLink('rtrCancelBtn',{'type':'minipage','callback':function(data){if(data){var cancelLightbox=new PAYPAL.util.Lightbox('cancelLightbox');cancelLightbox.addPage(data.html);cancelLightbox.show();var closeBtn=YUD.getElementsByClassName('container-close');if(closeBtn.length>0){YUD.get('cancelLightbox').removeChild(YUD.getElementsByClassName('container-close')[0]);}
YUE.addListener('cancelPaymentNo','click',function(e){YUE.preventDefault(e);cancelLightbox.close();});}}});}};PAYPAL.Beloved.Salsa.initPSBLightBox=function(){var expirablePSBLink=YUD.getElementsByClassName('expPSB','a');YUE.addListener(expirablePSBLink,'click',function(e){var expPSBLB=null,expPSBLBID=(e.target||e.srcElement).id;YUE.preventDefault(e);PAYPAL.util.Connect.sendFromLink(expPSBLBID,{'type':'minipage','callback':function(data){if(data){expPSBLB=new PAYPAL.util.Lightbox('expPSBLightbox');expPSBLB.addPage(data.html);expPSBLB.show();}
YUE.addListener('closeLB','click',function(e){YUE.preventDefault(e);expPSBLB.close();});}},{'view_expPSB.x':'Apply'});return true;});}
YUE.addListener(window,"load",PAYPAL.Beloved.Salsa.cancelSubflow.init);