var gJumpPointCounter=0;$(document).ready(function(){$.blockUI.defaults.css={};Sys.Application.add_load(function(event){$("*[id$='_pnlRTInventory']").hide();$("*[id$='_imgbtnOK']").bind("click",function(event){$.unblockUI();$("*[id$='_CheckInventory']").val("false")});$("*[id$='_divResult']").hide();$("*[id$='_imgbtnContinueShop']").bind("click",function(event){$.unblockUI();$("*[id$='_ShowFavorites']").val("false")});$("*[id$='_divResult']").hide();$("*[id$='_imgbtnGo2Fav']").bind("click",function(event){$.unblockUI();$("*[id$='_ShowFavorites']").val("false")});$("*[id$='imgbtnCancelModal']").bind("click",function(event){$.unblockUI();$("*[id$='_sComp']").val("false")});$("*[id$='imgbtnDelete']").bind("click",function(event){$("*[id$='_dComplete']").val("true");$("*[id$='_sComp']").val("false");$.unblockUI()})});Sys.Application.add_init(function(){var prm=Sys.WebForms.PageRequestManager.getInstance();prm.add_endRequest(function(args,sender){var recoLink=window.location.href;var start=recoLink.indexOf("#");var recoJump=recoLink.substring(start+1,start+7);if(recoLink.indexOf(recoJump)>0&&gJumpPointCounter==0){var triggerIDName=$("a[name$='"+recoJump+"']").attr("id");var expr=/\w*[^_hlPostbackJumpPointAnchor]+/;var panelPosition=expr.exec(triggerIDName);var triggerButton=panelPosition+"_btnJpPbTrig";PostbackJump(triggerButton,"#"+recoJump);gJumpPointCounter++}var checkInventory=$("*[id$='_CheckInventory']").val();if(checkInventory=="true"){$("*[id$='_pnlRTInventory']").hide();BlockUI("*[id$='_pnlRTInventory']")}var showFavorites=$("*[id$='_ShowFavorites']").val();if(showFavorites=="true"){$("*[id$='_divResult']").hide();BlockUI("*[id$='_divResult']")}var showPrompt=$("*[id$='_sComp']").val();if(showPrompt=="true"){BlockUI("*[id$='_pnlDeleteMsg']")}})})});var gPopupMask=null;var gPopupContainer=null;var gPopFrame=null;var gReturnFunc;var gPopupIsShown=false;var gDefaultPage="";var gHideSelects=false;var isIE=(window.navigator.userAgent.indexOf("MSIE")>-1);var isOpera=(window.navigator.userAgent.indexOf("Opera")>-1);var gReturnVal=null;var overflowChanged=false;var gTabIndexes=new Array();var gTabbableTags=new Array("A","BUTTON","TEXTAREA","INPUT","IFRAME");if(!document.all){document.onkeypress=keyDownHandler}setAutoCompleteOff("__VIEWSTATE");setAutoCompleteOff("__CDWVSTATE");setAutoCompleteOff("__EVENTTARGET");setAutoCompleteOff("__EVENTARGUMENT");setAutoCompleteOff("__EVENTVALIDATION");function setAutoCompleteOff(id){var elem=document.getElementById(id);if(elem){elem.setAttribute("autocomplete","off")}}function initPopUp(){theBody=document.getElementsByTagName("BODY")[0];popmask=document.createElement("div");popmask.id="popupMask";popcont=document.createElement("div");popcont.id="popupContainer";popcont.innerHTML='<div id="popupInner"><iframe src="'+gDefaultPage+'" style="width:100%;height:100%;background-color:transparent;" scrolling="no" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame" width="100%" height="100%"></iframe></div><div id="popupShadow_E1" class="popupShadow">&nbsp;</div><div id="popupShadow_E2" class="popupShadow">&nbsp;</div><div id="popupShadow_S1" class="popupShadow">&nbsp;</div><div id="popupShadow_S2" class="popupShadow">&nbsp;</div>';theBody.appendChild(popmask);theBody.appendChild(popcont);gPopupMask=document.getElementById("popupMask");gPopupContainer=document.getElementById("popupContainer");gPopFrame=document.getElementById("popupFrame");var brsVersion=parseInt(window.navigator.appVersion.charAt(0),10);if(brsVersion<=6&&isIE){gHideSelects=true}var elms=document.getElementsByTagName("a");for(i=0;i<elms.length;i++){if(elms[i].className.indexOf("submodal")==0){elms[i].onclick=function(){var width=650;var height=580;params=this.className.split("-");if(params.length==3){width=parseInt(params[1]);height=parseInt(params[2])}showPopWin(this.href,width,height,null);return false}}}}addEvent(window,"load",initPopUp);function showPopWin(url,width,height,returnFunc,showCloseBox){gPopupIsShown=true;disableTabIndexes();gPopupMask.style.display="block";gPopupContainer.style.display="block";centerPopWin(width,height);gPopupContainer.style.width=width+"px";gPopupContainer.style.height=height+"px";setMaskSize();gPopFrame.src=url;gReturnFunc=returnFunc;if(gHideSelects==true){hideSelectBoxes()}}var gi=0;function centerPopWin(width,height){if(gPopupIsShown==true){if(width==null||isNaN(width)){width=gPopupContainer.offsetWidth}if(height==null){height=gPopupContainer.offsetHeight}var theBody=document.getElementsByTagName("BODY")[0];var scTop=parseInt(getScrollTop(),10);var scLeft=parseInt(theBody.scrollLeft,10);setMaskSize();var titleBarHeight=28;var fullHeight=getViewportHeight();var fullWidth=getViewportWidth();var top=(scTop+((fullHeight-height)/2)),left=(scLeft+((fullWidth-width)/2));gPopupContainer.style.top=top+"px";gPopupContainer.style.left=left+"px";if(isIE||isOpera){var gPopShadow=document.getElementById("popupShadow_E1");gPopShadow.style.width=width+"px";gPopShadow.style.height=height+"px";gPopShadow.style.top="6px";gPopShadow.style.left="6px";gPopShadow.style.display="block";document.getElementById("popupShadow_E2").style.visibility="hidden";document.getElementById("popupShadow_S1").style.visibility="hidden";document.getElementById("popupShadow_S2").style.visibility="hidden"}else{var gPopShadowE=document.getElementById("popupShadow_E1");gPopShadowE.style.left=width+"px";gPopShadowE.style.top="3px";gPopShadowE.style.width="2px";gPopShadowE.style.height=height+5+"px";gPopShadowE.style.display="block";gPopShadowE=document.getElementById("popupShadow_E2");gPopShadowE.style.left=width+"px";gPopShadowE.style.top="4px";gPopShadowE.style.width="5px";gPopShadowE.style.height=height+4+"px";gPopShadowE.style.display="block";var gPopShadowS=document.getElementById("popupShadow_S1");gPopShadowS.style.top=height+"px";gPopShadowS.style.left="3px";gPopShadowS.style.height="5px";gPopShadowS.style.width=width-3+"px";gPopShadowS.style.display="block";gPopShadowS=document.getElementById("popupShadow_S2");gPopShadowS.style.top=height+"px";gPopShadowS.style.left="3px";gPopShadowS.style.height="8px";gPopShadowS.style.width=width-3+"px";gPopShadowS.style.display="block"}}}addEvent(window,"resize",centerPopWin);addEvent(window,"scroll",centerPopWin);window.onscroll=centerPopWin;function setMaskSize(){var theBody=document.getElementsByTagName("BODY")[0];var fullHeight=getViewportHeight();var fullWidth=getViewportWidth();var popHeight;var popWidth;if(fullHeight>theBody.scrollHeight){popHeight=fullHeight}else{popHeight=theBody.scrollHeight}if(fullWidth>=theBody.scrollWidth){popWidth=fullWidth;if(!isIE){var oContainer=gPopupMask.parentNode;if(oContainer&&oContainer.style){oContainer.style.overflowX="hidden";overflowChanged=true}}}else{popWidth=theBody.scrollWidth}gPopupMask.style.height=popHeight+"px";gPopupMask.style.width=popWidth+"px"}function hidePopWin(callReturnFunc){gPopupIsShown=false;var theBody=document.getElementsByTagName("BODY")[0];theBody.style.overflow="";restoreTabIndexes();if(gPopupMask==null){return }gPopupMask.style.display="none";gPopupContainer.style.display="none";if(overflowChanged){var oContainer=gPopupMask.parentNode;if(oContainer&&oContainer.style){oContainer.style.overflowX="visible"}}if(callReturnFunc==true&&gReturnFunc!=null){gReturnVal=window.frames.popupFrame.returnVal;window.setTimeout("gReturnFunc(gReturnVal);",1)}gPopFrame.src=gDefaultPage;if(gHideSelects==true){displaySelectBoxes()}}function keyDownHandler(e){if(gPopupIsShown&&e.keyCode==9){return false}}function disableTabIndexes(){if(document.all){var i=0;for(var j=0;j<gTabbableTags.length;j++){var tagElements=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<tagElements.length;k++){gTabIndexes[i]=tagElements[k].tabIndex;tagElements[k].tabIndex="-1";i++}}}}function restoreTabIndexes(){if(document.all){var i=0;for(var j=0;j<gTabbableTags.length;j++){var tagElements=document.getElementsByTagName(gTabbableTags[j]);for(var k=0;k<tagElements.length;k++){tagElements[k].tabIndex=gTabIndexes[i];tagElements[k].tabEnabled=true;i++}}}}function hideSelectBoxes(){for(var i=0;i<document.forms.length;i++){for(var e=0;e<document.forms[i].length;e++){if(document.forms[i].elements[e].tagName=="SELECT"){document.forms[i].elements[e].style.visibility="hidden"}}}}function displaySelectBoxes(){for(var i=0;i<document.forms.length;i++){for(var e=0;e<document.forms[i].length;e++){if(document.forms[i].elements[e].tagName=="SELECT"){document.forms[i].elements[e].style.visibility="visible"}}}}function addEvent(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true}else{if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r}else{return false}}}function getViewportHeight(){if(window.innerHeight!=window.undefined){return window.innerHeight}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientHeight}if(document.body){return document.body.clientHeight}return window.undefined}function getViewportWidth(){var offset=17;var width=null;if(window.innerWidth!=window.undefined){return window.innerWidth}if(document.compatMode=="CSS1Compat"){return document.documentElement.clientWidth}if(document.body){return document.body.clientWidth}}function getScrollTop(){if(self.pageYOffset){return self.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){return document.documentElement.scrollTop}else{if(document.body){return document.body.scrollTop}}}}function DynamicJump(loc){try{$find(loc)._doOpen(null)}catch(err){}window.location=window.location.pathname+window.location.search+"#"+loc}function DynamicJumpContentPanel(loc,contentPanel){try{$find(contentPanel)._doOpen(null)}catch(err){DynamicJump(loc)}window.location=window.location.pathname+window.location.search+"#"+loc}function PostbackJump(loc,tag){window.location=window.location.pathname+window.location.search+tag;GenClick(loc)}function GenClick(loc){var btn=$get(loc);if(btn){btn.click()}}function toggleallBI(bundleItemCount,allCollapsedElement,imgToggleAll,lblToggleAll,behaviorID){var biCount=0;biCount=bundleItemCount;var hfBICollapsed=$get(allCollapsedElement);if(hfBICollapsed.value.toLowerCase()=="true"){for(i=1;i<=biCount;i++){var bhID=behaviorID+i;try{$find(bhID).expandPanel()}catch(err){}}hfBICollapsed.value="false";$get(imgToggleAll).src="http://img.cdw.com/content/solutions/minus-wht.gif";$get(lblToggleAll).innerHTML="Collapse All"}else{for(i=1;i<=biCount;i++){var bhID=behaviorID+i;try{$find(bhID).collapsePanel()}catch(err){}}hfBICollapsed.value="true";$get(imgToggleAll).src="http://img.cdw.com/content/solutions/plus-wht.gif";$get(lblToggleAll).innerHTML="Expand All"}}function hideButton(elementID){if(document.forms[0].elements[elementID+"_btnDdlSubmit"]){document.forms[0].elements[elementID+"_btnDdlSubmit"].style.visibility="hidden"}}function altFunction(elementID){document.getElementById(elementID).setAttribute("title","")};