function GetEnterKey(controlID){var e=document.getElementById(controlID);if(e&&typeof(e.click)=="undefined"){e.click=function(){var result=true;if(e.onclick){result=e.onclick()}if(typeof(result)=="undefined"||result){eval(e.href)}}}}function RemoveDefaultValue(B,A){if(B!=null){if(B.value==A){B.value=""}}}function SetDefaultValue(B,A){if(B!=null){if(Trim(B.value)==""){B.value=A}}}function Trim(A){if(A!=""){while(A.substring(0,1)==" "){A=A.substring(1,A.length)}while(A.substring(A.length-1,A.length)==" "){A=A.substring(0,A.length-1)}return A}else{return A}}function SetQtyHiddenValue(B,C){alert(B+"#"+C);if(document.getElementById(C).value!=""){B=B+"_"+document.getElementById(C).value;var A=new Array();A=B.split("~");B=getDomainName()+A[1]}else{var A=new Array();A=B.split("~");B=getDomainName()+A[1]}document.location.href=B}function SetQtyHiddenValueMyWishList(C,D,A){alert(C+"#"+D);if(document.getElementById(D).value!=""){C=C+"_"+document.getElementById(D).value;var B=new Array();B=C.split("~");C=getDomainName()+B[1]}else{var B=new Array();B=C.split("~");C=getDomainName()+B[1]}removecartitem(A);document.location.href=C}function getDomainName(){var A;A=window.location.href;if(A.indexOf("PublicStore")>=0){if(A.indexOf("https")>=0){A="https://"+document.domain+"/publicstore"}else{A="http://"+document.domain+"/publicstore"}}else{if(A.indexOf("https")>=0){A="https://"+document.domain}else{A="http://"+document.domain}}return A}function checkdate(D){var F=/^\d{2}\/\d{2}\/\d{4}$/;var E=false;if(!F.test(D.value)){alert("Invalid Date Format. Please correct and submit again.")}else{var G=D.value.split("/")[0];var C=D.value.split("/")[1];var B=D.value.split("/")[2];var A=new Date(B,G-1,C);if((A.getMonth()+1!=G)||(A.getDate()!=C)||(A.getFullYear()!=B)){alert("Invalid Day, Month, or Year range detected. Please correct and submit again.")}else{E=true}}if(E==false){D.select()}return E}function Print(){alert("Operation Completed")}function Check(){for(var A=0;A<document.forms[0].elements.length;A++){strElement=document.forms[0].elements[A].id;if(strElement.substring(strElement.length-12,strElement.length)=="chkSelectAll"){CheckAll(document.forms[0].elements[A],"chkItemId")}}}function ChkItemSelected(){var A=false;for(var B=0;B<document.forms[0].elements.length;B++){strElement=document.forms[0].elements[B].id;if(strElement.substring(strElement.length-9,strElement.length)=="chkItemId"){if(document.forms[0].elements[B].checked){A=true}}}if(A==false){alert("Please select any item to clear.");return false}return true}var dw_event={add:function(D,C,B,A){A=A||false;if(D.addEventListener){D.addEventListener(C,B,A)}else{if(D.attachEvent){D.attachEvent("on"+C,B)}}},remove:function(D,C,B,A){A=A||false;if(D.removeEventListener){D.removeEventListener(C,B,A)}else{if(D.detachEvent){D.detachEvent("on"+C,B)}}},DOMit:function(A){A=A?A:window.event;A.tgt=A.srcElement?A.srcElement:A.target;if(!A.preventDefault){A.preventDefault=function(){return false}}if(!A.stopPropagation){A.stopPropagation=function(){if(window.event){window.event.cancelBubble=true}}}return A}};var viewport={getWinWidth:function(){this.width=0;if(window.innerWidth){this.width=window.innerWidth-18}else{if(document.documentElement&&document.documentElement.clientWidth){this.width=document.documentElement.clientWidth}else{if(document.body&&document.body.clientWidth){this.width=document.body.clientWidth}}}},getWinHeight:function(){this.height=0;if(window.innerHeight){this.height=window.innerHeight-18}else{if(document.documentElement&&document.documentElement.clientHeight){this.height=document.documentElement.clientHeight}else{if(document.body&&document.body.clientHeight){this.height=document.body.clientHeight}}}},getScrollX:function(){this.scrollX=0;if(typeof window.pageXOffset=="number"){this.scrollX=window.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollLeft){this.scrollX=document.documentElement.scrollLeft}else{if(document.body&&document.body.scrollLeft){this.scrollX=document.body.scrollLeft}else{if(window.scrollX){this.scrollX=window.scrollX}}}}},getScrollY:function(){this.scrollY=0;if(typeof window.pageYOffset=="number"){this.scrollY=window.pageYOffset}else{if(document.documentElement&&document.documentElement.scrollTop){this.scrollY=document.documentElement.scrollTop}else{if(document.body&&document.body.scrollTop){this.scrollY=document.body.scrollTop}else{if(window.scrollY){this.scrollY=window.scrollY}}}}},getAll:function(){this.getWinWidth();this.getWinHeight();this.getScrollX();this.getScrollY()}};var Tooltip={followMouse:true,offX:8,offY:12,tipID:"tipDiv",showDelay:100,hideDelay:200,ready:false,timer:null,tip:null,init:function(){if(document.createElement&&document.body&&typeof document.body.appendChild!="undefined"){if(!document.getElementById(this.tipID)){var A=document.createElement("DIV");A.id=this.tipID;document.body.appendChild(A)}this.ready=true}},show:function(B,A){if(this.timer){clearTimeout(this.timer);this.timer=0}this.tip=document.getElementById(this.tipID);if(this.followMouse){dw_event.add(document,"mousemove",this.trackMouse,true)}this.writeTip("");this.writeTip(A);viewport.getAll();this.positionTip(B);this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'visible')",this.showDelay)},writeTip:function(A){if(this.tip&&typeof this.tip.innerHTML!="undefined"){this.tip.innerHTML=A}},positionTip:function(C){if(this.tip&&this.tip.style){var A=C.pageX?C.pageX:C.clientX+viewport.scrollX;var B=C.pageY?C.pageY:C.clientY+viewport.scrollY;if(A+this.tip.offsetWidth+this.offX>viewport.width+viewport.scrollX){A=A-this.tip.offsetWidth-this.offX;if(A<0){A=0}}else{A=A+this.offX}if(B+this.tip.offsetHeight+this.offY>viewport.height+viewport.scrollY){B=B-this.tip.offsetHeight-this.offY;if(B<viewport.scrollY){B=viewport.height+viewport.scrollY-this.tip.offsetHeight}}else{B=B+this.offY}this.tip.style.left=A+"px";this.tip.style.top=B+"px"}},hide:function(){if(this.timer){clearTimeout(this.timer);this.timer=0}this.timer=setTimeout("Tooltip.toggleVis('"+this.tipID+"', 'hidden')",this.hideDelay);if(this.followMouse){dw_event.remove(document,"mousemove",this.trackMouse,true)}this.tip=null},toggleVis:function(C,A){var B=document.getElementById(C);if(B){B.style.visibility=A}},trackMouse:function(A){A=dw_event.DOMit(A);Tooltip.positionTip(A)}};Tooltip.offX=4;Tooltip.offY=4;Tooltip.followMouse=false;Tooltip.timerId=0;function doTooltip(C,B){if(typeof Tooltip=="undefined"||!Tooltip.ready){return}Tooltip.clearTimer();var A=document.getElementById?document.getElementById(Tooltip.tipID):null;if(A&&A.onmouseout==null){A.onmouseout=Tooltip.tipOutCheck;A.onmouseover=Tooltip.clearTimer}Tooltip.show(C,B)}function hideTip(){if(typeof Tooltip=="undefined"||!Tooltip.ready){return}Tooltip.timerId=setTimeout("Tooltip.hide()",300)}Tooltip.tipOutCheck=function(B){B=dw_event.DOMit(B);var A=B.relatedTarget?B.relatedTarget:B.toElement;if(this!=A&&!contained(A,this)){Tooltip.hide()}};function hideTipImmediate(){if(typeof Tooltip=="undefined"||!Tooltip.ready){return}Tooltip.timerId=setTimeout("Tooltip.hide()",0)}function contained(B,A){if(!B){return}while(B=B.parentNode){if(B==A){return true}}return false}Tooltip.clearTimer=function(){if(Tooltip.timerId){clearTimeout(Tooltip.timerId);Tooltip.timerId=0}};Tooltip.unHookHover=function(){var A=document.getElementById?document.getElementById(Tooltip.tipID):null;if(A){A.onmouseover=null;A.onmouseout=null;A=null}};dw_event.add(window,"unload",Tooltip.unHookHover,true);function setFocusOnFirstElement(){var A,B;if(document.forms[0].elements.length!=null){for(A=0;A<document.forms[0].elements.length;A++){if(document.forms[0].elements[A].id=="HiddenForSetFocus"||B==A){if(document.forms[0].elements[A+1]!=null&&document.forms[0].elements[A+1]!="undefined"){if(document.forms[0].elements[A+1].disabled||document.forms[0].elements[A+1].type=="hidden"){B=A+1}else{if(((document.forms[0].elements[A+1].type=="text")||(document.forms[0].elements[A+1].type=="checkbox")||(document.forms[0].elements[A+1].type=="radio")||(document.forms[0].elements[A+1].type=="textarea")||(document.forms[0].elements[A+1].type.substring(0,6)=="select"))&&(!document.forms[0].elements[A+1].disabled)){document.forms[0].elements[A+1].focus();break}else{}}}}}}}function CheckAll(C,D){var A=document.aspnetForm;var B=C.checked;for(i=0;i<A.length;i++){e=A.elements[i];if(e.type=="checkbox"&&e.name.indexOf(D)!=-1){e.checked=B}}}var arrcounter=0;var PopupCont=0;var arrCodeQty=new Array(50);var strAddToCartQuery="";var IsBackOrderEnabled;var isStockWatchListEnabled;var IsOutofStockchkEnabled;var BaseURL;var RedirecttoShopCart;var DisplayInventory;var UserSessionValue;function SetConfigValues(D,C,B,A,E){IsBackOrderEnabled=D;isStockWatchListEnabled=C;IsOutofStockchkEnabled=B;BaseURL=A;RedirecttoShopcart=E}function SetConfigurationValues(E,D,B,A,F,C){IsBackOrderEnabled=E;isStockWatchListEnabled=D;IsOutofStockchkEnabled=B;BaseURL=A;RedirecttoShopcart=F;DisplayInventory=C}function SetUserSession(A){UserSessionValue=A}function Additem(){if(PopupCont<arrcounter){var A=arrCodeQty[PopupCont].split("`");if(DisplayInventory=="True"){if(IsBackOrderEnabled=="0"){if(parseInt(A[1])<parseInt(A[2])){straddtocart=A[0]+"_"+A[1];AddItemToCart(straddtocart)}else{straddtocart=A[0]+"_"+A[2];AddItemToCart(straddtocart)}}else{straddtocart=A[0]+"_"+A[2];AddItemToCart(straddtocart)}}else{straddtocart=A[0]+"_"+A[2];AddItemToCart(straddtocart)}}else{if(strAddToCartQuery!=""||strAddToCartQuery.length!=0){AddItemToCart("Redirect")}}}function ShowPopUp(H){var D='<div class="pop_sku_outer"> <div class="pop_sku_inner" id="PopupContentDiv">'+GetContenHTML(H)+"</div></div>";var C=document.getElementById("popupHead");if(!C){var F=document.documentElement.clientHeight;var A=document.documentElement.clientWidth;var E=parseInt((150)/2)+document.documentElement.scrollLeft;var G=parseInt((300)/2)+document.documentElement.scrollTop;var C=document.createElement("div");C.setAttribute("id","popupHead");C.className="popupdivContainer";var B=document.createElement("span");B.innerHTML=D;C.appendChild(B);C.style.top=G+"px";document.getElementsByTagName("body")[0].appendChild(C)}return false}function GetContenHTML(strvalue){var arrCartItem=strvalue.split("`");var Code=arrCartItem[0];var SKUCode=arrCartItem[1];var StockQty=arrCartItem[2];var Qty=arrCartItem[3];var cntHTML='<div><div class="popup_cancel" ><input id="btnCancel" class="float_right"  type="button" value="X"  onclick="javascript:closePopUp();"/></div><div class="pop_innertext">';if(eval(Qty)>eval(StockQty)){if(IsBackOrderEnabled=="1"){if(isStockWatchListEnabled=="1"&&IsOutofStockchkEnabled=="1"){if(eval(StockQty)<1){cntHTML=cntHTML+"<strong>Available quantity for the item "+SKUCode+" is '0'.</strong><br/><p><strong>You can either continue to add this item to your cart or <br/> you can track the item on your stock watch list and be notified when it is in stock. </strong></p><p><br/></p>";cntHTML=cntHTML+'<table cellpadding="2" cellspacing="2" align="center" ><tr><td><input id="btnAddtoCart" type="button" class="add2cart_m" onclick="javascript:AddItemToCart(\''+Code+"_"+Qty+"');\"/></td></tr><tr>";cntHTML=cntHTML+'<td><input id="btnAddtoSW" type="button"  class="add2stockwatchlist_intab" onclick="javascript:AddItemtoStockWatchList(\''+SKUCode+"','"+Qty+"');\"/></td></tr></table>"}else{if(parseInt(Qty)>parseInt(StockQty)){var RemainQty=parseInt(Qty)-parseInt(StockQty);cntHTML=cntHTML+"<p><strong>Available quantity for the item "+SKUCode+" is "+StockQty+", remaining quantity '"+RemainQty+"' will be added to your stock watch list.</br></strong></p><p><br/></p>";cntHTML=cntHTML+'<table cellpadding="2" cellspacing="2"  align="center"><tr><td><input id="btnAddtoCart" type="button" class="add2entireqtycart_intab"  onclick="javascript:AddItemToCart(\''+Code+"_"+Qty+"');\"/></td></tr><tr>";cntHTML=cntHTML+'<td><input id="btnAddtoSW" type="button" class="add2onlyavailableqtycart_intab"  onclick="javascript:AddToCartwithStockWatch(\''+Code+"','"+StockQty+"','"+RemainQty+"','"+SKUCode+"');\"/></td></tr></table>"}else{cntHTML=cntHTML+Code+"_"+Qty}}}else{cntHTML=cntHTML+Code+"_"+Qty}}else{if(IsBackOrderEnabled=="0"){if(isStockWatchListEnabled=="1"&&IsOutofStockchkEnabled=="1"){if(eval(StockQty)<1){cntHTML=cntHTML+"<p><strong>Item "+SKUCode+" added is currently not available, however you can track the item on your stock watch list and be notified when it is in stock. </br></strong></p>";cntHTML=cntHTML+'<table cellpadding="2" cellspacing="2"  align="center"><tr><td><input id="btnAddtoCart" type="button" class="cancel"   onclick="javascript:Cancel()"/></td></tr><tr>';cntHTML=cntHTML+'<td><input id="btnAddtoSW" type="button" class="add2stockwatchlist_intab"   onclick="javascript:AddItemtoStockWatchList(\''+SKUCode+"','"+Qty+"');\"/></td></tr></table>"}else{if(eval(Qty)>eval(StockQty)){var RemainQty=parseInt(Qty)-parseInt(StockQty);cntHTML=cntHTML+"<p><strong>Available quantity for the item "+SKUCode+" is '"+StockQty+"', remaining quantity '"+RemainQty+"' will be added to your stock watch list. </br></p>";cntHTML=cntHTML+'<table cellpadding="2" cellspacing="2"  align="center"><tr><td><input id="btnAddtoCart" class="cancel" type="button"  onclick="javascript:Cancel()" width="87" height="20"/></td></tr><tr>';cntHTML=cntHTML+'<td><input id="btnAddtoSW"  class="add2onlyavailableqtycart_intab" type="button"  onclick="javascript:AddToCartwithStockWatch(\''+Code+"','"+StockQty+"','"+RemainQty+"','"+SKUCode+"');\"/></td></tr></table>"}}}else{alert("Item Added is back ordered, Available quantity for item "+SKUCode+" is "+StockQty+"");return false}}}}else{cntHTML=cntHTML+Code+"_"+Qty}cntHTML=cntHTML+"</div></div>";return cntHTML}function AddItemToCart(D){if(D=="Redirect"){if(RedirecttoShopcart==0){setTimeout("ShowProcessing('Adding to your cart, please wait...')",1000);var C=BaseURL+"Basket/Purchase.aspx?skus="+strAddToCartQuery+"&closewin=0";postRequest(C);if(UserSessionValue=="True"){if(panel!=null){setTimeout("getCartItems()",1000);ClearAllMessages();if(document.getElementById("lblShowMessage")!=null){setTimeout("document.getElementById('lblShowMessage').innerHTML ='Item(s) added successfully.';",1000)}}setTimeout("StopProcessing()",1000)}else{var A=document.getElementById("hdnGetRedirectURL").value;A=A.replace("~","../");window.location.href=A}strAddToCartQuery=""}else{setTimeout("window.opener.ShowProcessing('Adding to your cart, please wait...')",1000);var C=BaseURL+"Basket/Purchase.aspx?skus="+strAddToCartQuery+"&closewin=0";window.opener.postRequest(C);if(UserSessionValue=="True"){if(window.opener.panel!=null){setTimeout("window.opener.getCartItems()",1000);if(document.getElementById("lblShowMessage")!=null){setTimeout("document.getElementById('lblShowMessage').innerHTML ='Item added successfully.';",1000)}}setTimeout("window.opener.StopProcessing()",1000)}else{var A=document.getElementById("hdnGetRedirectURL").value;A=A.replace("~","../");window.opener.location.href=A}strAddToCartQuery=""}return true}else{if(strAddToCartQuery==""){strAddToCartQuery=D}else{strAddToCartQuery=strAddToCartQuery+";"+D}PopupCont=PopupCont+1;closePopUp();var B=setTimeout("Additem()",300)}return false}function AddItemtoStockWatchList(A,B){returnVal=Ignify.eCommerce.Web.Store.MasterTemplates.Ignify.Modules.SharedModules.ProductSkusMultiModule.AddItemtoStockWatchList(A,B);PopupCont=PopupCont+1;closePopUp();var C=setTimeout("Additem()",300);return false}function AddToCartwithStockWatch(E,C,A,D){E=E+"_"+C;returnVal=Ignify.eCommerce.Web.Store.MasterTemplates.Ignify.Modules.SharedModules.ProductSkusMultiModule.AddItemtoStockWatchList(D,A);if(strAddToCartQuery==""){strAddToCartQuery=E}else{strAddToCartQuery=strAddToCartQuery+";"+E}PopupCont=PopupCont+1;closePopUp();var B=setTimeout("Additem()",300)}function closePopUp(){var A=document.getElementById("popupHead");if(!A){return}A.parentNode.removeChild(A)}function Cancel(){PopupCont=PopupCont+1;closePopUp();var A=setTimeout("Additem()",300)}function ValidateSKUforStockWatchlist(Code,Qty,StockQty,IsBackOrderEnabled,isStockWatchListEnabled,IsOutofStockchkEnabled,baseurl,SKUCode){if(eval(Qty)>eval(StockQty)){if(IsBackOrderEnabled=="1"){if(isStockWatchListEnabled=="1"&&IsOutofStockchkEnabled=="1"){if(eval(StockQty)<1){var win=window.open("../catalog/PopupMessage.aspx?Code= "+Code+"&Qty="+Qty+"&StockQty="+StockQty+"&SKUCode="+SKUCode+"&Backorder=FB&BO=True","StockWatch","height=250,width=800,scrollbars=no,screenX=250,screenY=250,left=250,top=250");win.focus()}else{if(eval(Qty)>eval(StockQty)){var win=window.open("../catalog/PopupMessage.aspx?Code= "+Code+"&Qty="+Qty+"&StockQty="+StockQty+"&SKUCode="+SKUCode+"&&Backorder=PB&BO=True","StockWatch","height=250,width=800,scrollbars=no,screenX=250,screenY=250,left=250,top=250");win.focus()}else{str=Code+"_"+Qty;setTimeout("ShowProcessing('Adding to your cart, please wait...')",1000);var url=baseurl+"Basket/Purchase.aspx?skus="+str;postRequest(url);if(panel!=null){setTimeout("getCartItems()",1000)}setTimeout("StopProcessing()",1000)}}}else{str=Code+"_"+Qty;setTimeout("ShowProcessing('Adding to your cart, please wait...')",1000);var url=baseurl+"Basket/Purchase.aspx?skus="+str;postRequest(url);if(panel!=null){setTimeout("getCartItems()",1000)}setTimeout("StopProcessing()",1000)}}else{if(IsBackOrderEnabled=="0"){if(isStockWatchListEnabled=="1"&&IsOutofStockchkEnabled=="1"){if(eval(StockQty)<1){var win=window.open("../catalog/PopupMessage.aspx?Code= "+Code+"&Qty="+Qty+"&StockQty="+StockQty+"&SKUCode="+SKUCode+"&&Backorder=FB&BO=False","StockWatch","height=250,width=800,scrollbars=no,screenX=250,screenY=250,left=250,top=10");win.focus()}else{if(eval(Qty)>eval(StockQty)){var win=window.open("../catalog/PopupMessage.aspx?Code= "+Code+"&Qty="+Qty+"&StockQty="+StockQty+"&SKUCode="+SKUCode+"&&Backorder=PB&BO=False","StockWatch","height=250,width=800,scrollbars=no,screenX=250,screenY=250,left=250,top=10");win.focus()}}}else{alert("Item Added is back ordered, Available quantity for item "+SKUCode+" is "+StockQty+"");return false}}}}else{str=Code+"_"+Qty;setTimeout("ShowProcessing('Adding to your cart, please wait...')",1000);var url=baseurl+"Basket/Purchase.aspx?skus="+str;postRequest(url);if(panel!=null){setTimeout("getCartItems()",1000)}setTimeout("StopProcessing()",1000)}return false};theObjects=document.getElementsByTagName("object");for(var i=0;i<theObjects.length;i++){theObjects[i].outerHTML=theObjects[i].outerHTML};var delayProdOverLay=null;function ShowProcessing(A){YAHOO.namespace("example.container");if(!YAHOO.example.container.wait){YAHOO.example.container.wait=new YAHOO.widget.Panel("wait",{width:"240px",fixedcenter:true,close:false,draggable:false,zindex:4,modal:true,visible:false});YAHOO.example.container.wait.setHeader(A);YAHOO.example.container.wait.setBody('<img src="'+YUICommonPath+'/images/rel_interstitial_loading.gif"/>');YAHOO.example.container.wait.render(document.body)}YAHOO.example.container.wait.setHeader(A);YAHOO.example.container.wait.show()}function StopProcessing(){try{YAHOO.example.container.wait.hide();if(document.getElementById("lblAddwishlistmsg")!=null){document.getElementById("lblAddwishlistmsg").innerHTML=""}}catch(A){}}function CreatePanel(D,B,F,A,C,E,G,H){YAHOO.util.Event.onDOMReady(function(){panel=new YAHOO.widget.Panel(D,{draggable:C,width:B+"px",height:F+"px",autofillheight:"body",constraintoviewport:false,context:["showbtn","tl","bl"],visible:A,close:true,zIndex:15000,lazyload:true,showDelay:500,effect:{effect:YAHOO.widget.ContainerEffect.FADE,duration:0.5}});panel.render(document.body);if(H=="1"){var I=new YAHOO.util.Resize(D,{handles:["br"],autoRatio:false,minWidth:B,minHeight:F,status:false});I.on("startResize",function(K){if(this.cfg.getProperty("constraintoviewport")){var M=YAHOO.util.Dom;var J=M.getClientRegion();var L=M.getRegion(this.element);I.set("maxWidth",B);I.set("maxHeight",J.bottom-L.top-YAHOO.widget.Overlay.VIEWPORT_OFFSET)}else{I.set("maxWidth",B);I.set("maxHeight",null)}},panel,true);I.on("resize",function(K){var J=K.height;this.cfg.setProperty("width",B+"px");this.cfg.setProperty("height",J+"px");panel.show()},panel,true)}if(H=="1"){YAHOO.util.Event.on(G,E,panel.show,panel,true)}SetFCHeightAndWidth()})}function postRequest(G){var C=false;var H=null;try{H=new XMLHttpRequest();C=true}catch(D){try{H=doCreateObject();C=true}catch(D){C=false}}if(C&&H!=null){H.open("GET",G,true);var F="";H.onreadystatechange=function(){if(H.readyState==4){F=H.responseText}};H.send(null);var E=null;var I=null;var B=null;try{if(document.getElementById("hdnB2BModeValue")!=null){E=document.getElementById("hdnB2BModeValue").value}else{E=parent.document.getElementById("hdnB2BModeValue").value}if(document.getElementById("hdnCheckIsUserRegistered")!=null){I=document.getElementById("hdnCheckIsUserRegistered").value}else{I=parent.document.getElementById("hdnCheckIsUserRegistered").value}if(document.getElementById("hdnGetRedirectURL")!=null){B=document.getElementById("hdnGetRedirectURL").value}else{B=parent.document.getElementById("hdnGetRedirectURL").value}}catch(A){}if(E!=null&&I!=null){setTimeout("B2BLoginVerification('"+E+"','"+I+"','"+B+"')",1000)}}}function B2BLoginVerification(B,A,C){if(B.toLowerCase()=="true"&&A.toLowerCase()=="false"){if(C!=null){C=C.replace("~/","../");if(Minitemplate==true){parent.window.location.href=C}else{window.location.href=C}return false}}}function doCreateObject(){var B=0;var A=new Array("Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP","Microsoft.XMLHTTP");for(B=0;B<A.length;B++){try{return new ActiveXObject(A[B])}catch(C){}}}function ClosePopup(){ShowFlag=false;if(parent.prdoverlay!=null){parent.prdoverlay.hide()}parent.document.getElementById("ipopup").height="0px";parent.document.getElementById("ipopup").src="../iframe.html"}function LoadUrl(A){parent.document.location.href=A}var ShowFlag=false;function LoadMiniProduct(A){ShowFlag=true;delayProdOverLay=setTimeout("LoadDetails('"+A+"')",1000)}function UnLoadMiniProducts(){if(delayProdOverLay!=null){clearTimeout(delayProdOverLay);ShowFlag=false}}function LoadDetails(A){if(ShowFlag==true){parent.prdoverlay=new YAHOO.widget.Overlay("ProductPopup",{fixedcenter:true,visible:false,zIndex:100,constraintoviewport:true,draggable:true,width:"500px",height:"700px"});if(parent.prdoverlay!=null){parent.prdoverlay.setBody("<iframe name='ipopup' frameborder='0' allowtransparency='true' SCROLLING=NO id='ipopup'> </iframe>");parent.prdoverlay.render(document.body);document.getElementById("ipopup").src=A;document.getElementById("ipopup").style.height=document.getElementById("ProductPopup").clientHeight+"px";document.getElementById("ipopup").style.width=document.getElementById("ProductPopup").clientWidth+"px";YAHOO.util.Event.onDOMReady(function(){parent.prdoverlay.show()})}}return false}function OffPopup(){UnLoadMiniProducts()};var SubTotal="0";var ToTalRowCount=0;var NoOfItems=null;var cartItemsAndSubTotal=null;var formatcurrency=null;var PHeight=null;var PWidth=null;function getCartItems(){try{serverRequest("getcartitems")}catch(B){var A=B.description}return false}function getCartItemsServer(cartItemsAndSubTotal1){try{var cartitems=null;var mycartarray=null;cartItemsAndSubTotal1=cartItemsAndSubTotal1.replace(/putq/g,'"');var splitRawData=cartItemsAndSubTotal1.split("~~SubTotal~~");if(splitRawData!=null&&splitRawData.length>0){cartitems=splitRawData[0];SubTotal=splitRawData[1];formatcurrency=splitRawData[2]}var rowArray=cartitems.split("~~Row~~");var objRowCount=eval(rowArray.length)-1;mycartarray=new Array(objRowCount);var objLblItemCount=document.getElementById("lblItemCount");if(objLblItemCount!=null){objLblItemCount.innerHTML=objRowCount+" Item(s)"}var tempRowCount=0;ToTalRowCount=0;for(tempRowCount=0;tempRowCount<objRowCount;tempRowCount++){mycartarray[tempRowCount]=new Array(3);var colArray=rowArray[tempRowCount].split("~~Coloumn~~");if(colArray!=null&&colArray.length>0){mycartarray[tempRowCount][0]=colArray[0];mycartarray[tempRowCount][1]=colArray[1];mycartarray[tempRowCount][2]=colArray[2];if(colArray[1].indexOf("Your cart is empty.")>0){ToTalRowCount=0;NoOfItems=null}else{ToTalRowCount++;NoOfItems=ToTalRowCount}}}if(IsFloatingCartEnabled=="1"){SetFCHeightAndWidth();BindDataSource(mycartarray)}GetSubTotal()}catch(ex){var exception=ex.description}return false}function BindDataSource(D){var G=null;var H=null;var I=[{key:"Image",width:50,resizeable:true,sortable:true,hidden:false},{key:"ItemDescritpion",width:150,resizeable:true,sortable:true,hidden:false},{key:"DeleteRow",width:20,resizeable:true,sortable:true,hidden:false}];H=new YAHOO.util.DataSource(D);H.responseType=YAHOO.util.DataSource.TYPE_JSARRAY;H.responseSchema={fields:["Image","ItemDescritpion","DeleteRow"]};var F={sortedBy:{key:"ItemDescritpion",dir:"asc"},draggableColumns:false};G=new YAHOO.widget.DataTable("complex",I,H,F);G.subscribe("rowClickEvent",G.onEventSelectRow);G.subscribe("cellDblclickEvent",G.onEventShowCellEditor);G.subscribe("editorBlurEvent",G.onEventSaveCellEditor);var C=function(J){var M=J.editor.getTdEl();var R=J.oldData;var Q=J.newData;var L=this.getTrEl(M);var K=YAHOO.util.Dom.getStyle(L.cells[0],"backgroundColor");var O="#ff0";var P=new YAHOO.util.ColorAnim(L.cells,{backgroundColor:{to:K,from:O},duration:2});var N=function(){P=null;YAHOO.util.Dom.setStyle(L.cells,"backgroundColor","")};P.onComplete.subscribe(N);P.animate()};G.subscribe("editorSaveEvent",C);var E=new TestObj("mytestobj1");var A=new ShowFloatingCart("mytestFC1",E);var B=new TestData("mydata1");E.event1.fire(B);return{oDS:H,oDT:G}}function DeleteCartItem(C){var A=Ignify.eCommerce.Web.Store.MasterTemplates.Ignify.Modules.SharedModules.FloatingCart.RemoveCartItem(C);if(A.value!=null&&A.value=="True"){try{getCartItems()}catch(D){var B=D.description}GetSubTotal()}}function GetSubTotal(){var E=document.getElementById("lblSubTotal");var D="";if(E!=null){if(SubTotal=="0"&&NoOfItems==null){var G=document.getElementById("lblItemCount");if(G!=null){G.innerHTML="0 Item(s)"}}else{if(SubTotal=="0"&&NoOfItems>0){var G=document.getElementById("lblItemCount");if(G!=null){G.innerHTML=NoOfItems+" Item(s)"}}}var C="0";try{if(parseFloat(SubTotal)<0){SubTotal="0"}if(formatcurrency!=null){C=formatcurrency}}catch(A){if(document.getElementById("hdnTempCurrencyCode")!=null){var B=document.getElementById("hdnTempCurrencyCode").value;if(B=="USD"&&SubTotal=="0"){C="$0.00"}}}E.innerHTML="<strong>Sub Total: "+C+"</strong>";var F=document.getElementById("lblItemSubTotal");if(F!=null){F.innerHTML=C}if(SubTotal=="0"&&NoOfItems==null){E.style.visibility="hidden";ControlVisibility(false)}else{E.style.visibility="";ControlVisibility(true)}}setTimeout("WipeMessage('lblShowProcess');",1)}function CheckoutWithPayPal(){var C=document.domain;var A=window.location.href;var B=Ignify.eCommerce.Web.Store.MasterTemplates.Ignify.Modules.SharedModules.FloatingCart.PayPalPreAuthorize(A,C);if(B.value!=null&&B.value.length>0){window.parent.location.href=B.value}return false}function RemoveAllCartItems(){var A=Ignify.eCommerce.Web.Store.MasterTemplates.Ignify.Modules.SharedModules.FloatingCart.RemoveAllCartItems();try{getCartItems()}catch(C){var B=C.description}GetSubTotal();return false}function callServer(A){setTimeout("SetMessage('Processing...','lblShowProcess');",1);setTimeout('serverRequest("'+A+'" ,"server context");',1)}function getResult(A,B){WipeMessage("lblMessage");getCartItemsServer(A)}function SetFCHeightAndWidth(){if(panel!=null){var ChkPHeight=CalcCheckoutPanelHeight();if(ToTalRowCount==0){PHeight="110";ChkPHeight=0;if(document.getElementById("InnerBody")!=null){document.getElementById("InnerBody").style.display="none"}}else{if(ToTalRowCount==1){PHeight="183";if(document.getElementById("InnerBody")!=null){document.getElementById("InnerBody").style.display="block"}}else{if(ToTalRowCount==2){PHeight="240";if(document.getElementById("InnerBody")!=null){document.getElementById("InnerBody").style.display="block"}}else{if(ToTalRowCount==3){PHeight="298";if(document.getElementById("InnerBody")!=null){document.getElementById("InnerBody").style.display="block"}}else{PHeight="353";if(document.getElementById("InnerBody")!=null){document.getElementById("InnerBody").style.display="block"}}}}}if(document.getElementById("hdnFCHeight")!=null){document.getElementById("hdnFCHeight").value=PHeight}panel.cfg.setProperty("Height",eval(PHeight-ChkPHeight)+"px")}}function CalcCheckoutPanelHeight(){var E=0;var C=GetControlVisibility(location.href);var D=C.split(";");if(D!=null&&D.length>0){var A=0;for(A=0;A<D.length;A++){var B=D[A].split(":");if(B!=null&&B.length>0){if(B[0]=="CheckoutButtons"){if(B[1]=="false"){E=43}else{E=0}}}}}return E}function TestObj(A){this.name=A;this.event1=new YAHOO.util.CustomEvent("event1",this)}function ShowFloatingCart(B,A){this.name=B;this.testObj=A;this.testObj.event1.subscribe(this.onEvent1,this)}ShowFloatingCart.prototype.onEvent1=function(B,A,C){if(IsFloatingCartEnabled!=null&&IsFloatingCartEnabled=="1"){if(panel!=null){panel.show();window.scrollTo(0,0);varFltCrtTimeOut=setTimeout("panel.hide();",3000)}}};function TestData(A){this.data=A};var mc_rating_thankYouImage=mc_ThemeBase+"Images/review/saved.gif";var mc_rating_starImages=new Array(mc_ThemeBase+"Images/review/not-rated-off.gif",mc_ThemeBase+"Images/review/1-star-off.gif",mc_ThemeBase+"Images/review/2-star-off.gif",mc_ThemeBase+"Images/review/3-star-off.gif",mc_ThemeBase+"Images/review/4-star-off.gif",mc_ThemeBase+"Images/review/5-star-off.gif");var mc_rating_nullStarMessage=mc_ThemeBase+"Images/review/not-rated-msg.gif";var mc_rating_starMap=new Array("0,0,22,20","23,0,36,20","37,0,50,20","51,0,64,20","65,0,78,20","79,0,101,20");var mc_rating_starMessages=new Array(mc_ThemeBase+"Images/review/not-rated-msg.gif",mc_ThemeBase+"Images/review/i-hate-it-msg.gif",mc_ThemeBase+"Images/review/i-dont-like-it-msg.gif",mc_ThemeBase+"Images/review/its-okay-msg.gif",mc_ThemeBase+"Images/review/i-like-it-msg.gif",mc_ThemeBase+"Images/review/i-love-it-msg.gif",mc_ThemeBase+"Images/review/saved.gif");var mc_rating_savedRatings=new Array();var mc_rating_changedRatings=new Array();var mc_rating_starTwinkler=new Array();var mc_rating_msgTwinkler=new Array();var mc_rating_delayTime=200;var mc_rating_allImages=new Array();function mc_js_preloadImages(){for(i=0;i<mc_js_preloadImages.length;i++){mc_rating_allImages[i]=new Image();mc_rating_allImages[i].src=mc_js_preloadImages.arguments[i]}}mc_js_preloadImages(mc_rating_starImages);mc_js_preloadImages(mc_rating_thankYouImage);mc_js_preloadImages(mc_rating_starMessages);function mc_js_sendRating(B,C,A){mc_js_swapStarMsgs(B,6);try{document.getElementById("hdnRating").value=A}catch(D){}}function mc_js_swapStars(A,B){if(B==undefined){B=mc_rating_savedRatings[A]}document.images["stars."+A].src=mc_rating_starImages[B]}function mc_js_swapStarMsgs(A,B){if(B==undefined){if(mc_rating_changedRatings[A]){document.images["messages."+A].src=mc_rating_starMessages[6]}else{document.images["messages."+A].src=mc_rating_nullStarMessage}}else{document.images["messages."+A].src=mc_rating_starMessages[B]}}function mc_js_sendStars(A,B){mc_rating_savedRatings[A]=B;mc_rating_changedRatings[A]=1;mc_js_sendRating(A,"onetofive",B);mc_rating_msgTwinkler[A]=window.setTimeout("mc_js_swapStarMsgs('"+A+"',"+B+")",mc_rating_delayTime)}function mc_js_starMouseOver(A,B){if(mc_rating_starTwinkler[A]!=0){window.clearTimeout(mc_rating_starTwinkler[A]);mc_rating_starTwinkler[A]=0}if(mc_rating_msgTwinkler[A]!=0){window.clearTimeout(mc_rating_msgTwinkler[A]);mc_rating_msgTwinkler[A]=0}mc_js_swapStars(A,B);mc_js_swapStarMsgs(A,B)}function mc_js_starMouseOut(A,B){mc_rating_starTwinkler[A]=window.setTimeout("mc_js_swapStars('"+A+"')",mc_rating_delayTime);mc_rating_msgTwinkler[A]=window.setTimeout("mc_js_swapStarMsgs('"+A+"',"+mc_rating_savedRatings[A]+")",mc_rating_delayTime)}function mc_js_showStars(C,E,B){var A="stars."+C;mc_rating_starTwinkler[C]=0;mc_rating_msgTwinkler[C]=0;document.write("<map name='starmap"+C+"'>");var D=0;for(D=0;D<6;D++){document.write("<area shape=rect coords='"+mc_rating_starMap[D]+"' onMouseOver=\"mc_js_starMouseOver('"+C+"',"+D+');" onMouseOut="mc_js_starMouseOut(\''+C+"',"+D+');" onClick="mc_js_sendStars(\''+C+"',"+D+');" >')}document.write("</map>");document.write("<img vspace=2 src='"+mc_rating_starImages[E]+"'");document.write(" border=0 usemap='#starmap"+C);document.write("' id='"+A+"'>")}function mc_js_showMessages(B,C){var A="messages."+B;if(C==undefined){document.write("<img vspace=2 height=11 src='"+mc_rating_nullStarMessage+"'")}else{document.write("<img vspace=2 height=11 src='"+mc_rating_starMessages[C]+"'")}document.write("' id='"+A+"'>")}function mc_js_showReview(A,C){var D="";var B=0;if(!isNaN(C)){for(B=0;B<C;B++){D+="<img src='"+mc_ThemeBase+"Images/review/star-yellow.gif' border='0' width='12' height='12' align='absmiddle'>"}for(B=0;B<5-C;B++){D+="<img src='"+mc_ThemeBase+"Images/review/star-white.gif' border='0' width='12' height='12' align='absmiddle'>"}}document.write(D)};
function SetMessage(strMsg,objControlName)
{
     if(document.getElementById(objControlName)!=null)
        {

          var objCheckout= document.getElementById(objControlName);
          if(objCheckout.lastChild != null)
            objCheckout.removeChild(objCheckout.lastChild);
          objCheckout.appendChild(document.createTextNode("("+ strMsg +")"));
        }
}
function WipeMessage(objControlName)
{
     if(document.getElementById(objControlName)!=null)
        {
                                         
          var objCheckout= document.getElementById(objControlName);   
          if(objCheckout!=null)
          {                                
            if(objCheckout.lastChild!=null)
                objCheckout.removeChild(objCheckout.lastChild);       
          }                    
                              
        }
}
function GetControlVisibility(strURL)
{
var Buttonstatus = "";        
if (strURL.length > 0)
                {
                                       
                    if ((strURL.toLowerCase().indexOf("checkout") > 0  && strURL.toLowerCase().indexOf("shoppingcart.aspx")<0 && strURL.toLowerCase().indexOf("profile")<0) ||( strURL.toLowerCase().indexOf("checkout") > 0 && strURL.toLowerCase().indexOf("shoppingcart.aspx")>0 && strURL.toLowerCase().indexOf("ordernumber")> 0 && strURL.toLowerCase().indexOf("profile")<0))
                    {
                        Buttonstatus = "CheckoutButtons:false";
                        if(document.getElementById("tblInnerBody")!=null)
                            document.getElementById("tblInnerBody").style.display="none";
                    }
                    else
                    {
                        Buttonstatus = "Checkout:true;";
                        
                        Buttonstatus = Buttonstatus + "<%=FastCheckoutButtonStatus%>";

                        Buttonstatus = Buttonstatus + "<%=ExpressCheckoutStatus%>";
                    }
                }
                //alert(Buttonstatus);
                return Buttonstatus;
}
function PanelVisibility(objStatus)
{
    if(objStatus)
    {
        if(panel!=null)
        {   
            if(varFltCrtTimeOut!=null)
                clearTimeout(varFltCrtTimeOut); 
                
                panel.show();              

        }
    }
    else
    {
        if(panel!=null)
        {                                    
            varFltCrtTimeOut = setTimeout("panel.hide();",1000);
        }
    }
}

function ProcessCallBackError(arg, context)
{
    if(document.getElementById("lblErrorMessage")!=null)
        {          
          var objCheckout= document.getElementById("lblErrorMessage");
          objCheckout.appendChild(document.createTextNode('An error has occurred...'));                                   
        }
}
function ControlVisibility(objVisible)
{             
}
function ViewCart()
{
    if(IsFloatingCartEnabled == 0)
    {
        if(document.getElementById("hdnGetShoppingCartURL")!=null)
            window.location.href= document.getElementById("hdnGetShoppingCartURL").value;
    }    
}
/*searchmodule*/

function addClickFunction(id) 
    {
            var b = document.getElementById(id);
            if (b && typeof(b.click) == 'undefined') b.click = function()
             {
             
                var result = true; if (b.onclick) result = b.onclick();
                if (typeof(result) == 'undefined' || result) 
                    {
                
                             eval(b.href); 
                
                    }                
             }
       
     }
     
     function SearchForKeyword(searchUrl, cntsearchID, cntsearchfilterID)
{
   
    var SearchValue = document.getElementById(cntsearchID).value;
    
    if(SearchValue !=null)
    {
        var len = SearchValue.length;
        for(SearchCounter=0; SearchCounter<len; SearchCounter++)
        {   
             SearchValue = SearchValue.replace("<","");
        }
        document.getElementById(cntsearchID).value = SearchValue;
       
        if((document.getElementById(cntsearchID).value == "") &&
        (document.getElementById(cntsearchfilterID).value=="0"))
        {
            alert(searchUrl);
            return false;
        }
        else
        {
         
          //  window.location.href = searchUrl + "?filter=" + document.getElementById('<%=SearchFilter.ClientID%>').value + "&search=" + SearchValue + "&type=Q"+ "&keywordoption=" + document.getElementById('<%=KeywordOption.ClientID%>').value ;
            return true;
        }
    }
}

/*Search module*/
/*Product List*/
function f_paging(pageno)
{
    var strElement;
    for(var i=0; i < document.forms[0].elements.length; i++)
    {
        strElement = document.forms[0].elements[i].id;
        if(strElement.substring(strElement.length-9, strElement.length) == "txtPageNo")
        {
            document.forms[0].elements[i].value = pageno;
            break;
        }
    }     
    __doPostBack('Page_Load',pageno);
}
 
function Loadwindow(ProductCode)
{
    var win = window.open("../catalog/VariantsAddToCart.aspx?Id="+ ProductCode , "SendToFriend", "width=800, height=570,scrollbars=yes,screenX=250,screenY=250,left=250,top=250;");
    win.focus();
}
function SearchChanged(ID)
{
    document.getElementById(ID).value = "1";
    return true;
}
function CheckValidation(ID)
{
    if(document.getElementById(ID).value!="")
    {
        str=document.getElementById(ID).value;
        if(str<=0)
        {
            alert ("Please enter valid Quantity");
            return false;
        }
    }
    return true;
}


/*Product List*/

/*Narrow Search*/
function GetSelectedItems_New(HdnSelectedValobj, hdnSeeMoreobj)
{
    var SelectedIds = "";
    if(document.forms[0].elements.length != null)
	{
        for(i=0; i < document.forms[0].elements.length; i++)
        {
            var strElement =document.forms[0].elements[i].id;
            var len = 'DropDownListID'
            if(strElement.substring(0, len.length) == 'DropDownListID')
            {        
                 if(document.forms[0].elements[i].value !="0")
                {
                    SelectedIds += document.forms[0].elements[i].value + "#";
                    
                }
            }
           
        }
    }    
    var len = SelectedIds.length;
    if(len > 0)
    {
        document.getElementById(HdnSelectedValobj).value = SelectedIds;
        document.getElementById(hdnSeeMoreobj).value = "";
    }
 __doPostBack('','');
   return true;
    
}
function ClearEnteredValue(HdnSelectedValobj, hdnSeeMoreobj)
{
   
    document.getElementById(HdnSelectedValobj).value = "";
    document.getElementById(hdnSeeMoreobj).value = "";
   
    return true;
}
/*Narrow Search*/
function ValidateZip(object,e) 
{

    if(e)
       { 
            e = e 
       } 
       else 
       {
            e = window.event 
       } 
       if(e.which)
       { 
            var keycode = e.which 
       } 
       else 
       {
            var keycode = e.keyCode 
       }
        if (keycode == 45)
        {
            if (object.value.length != 5)
            {
                object.value = object.value.substring(0,object.value.length);     
                return false;
            }
        }
    }

    /* AlphaNumericCharacter Validation */
    var _CurrentValue = '';
    function OnKeyPressEvent(obj) {
        CheckAlphaNumeric(obj)
        _CurrentValue = obj.value
        return true;
    }
    function CheckAlphaNumeric(obj) {
        var regex = /^[0-9a-zA-Zs' ']+$/;
	if(obj.value == null || obj.value == undefined || obj.value == ''){
          return true;
    	}
        if (regex.test(obj.value)) {
            return true;
        } else {
            obj.value = _CurrentValue;
        }
    }
    /* End AlphaNumericCharacter Validation */
   