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(M){if(this.cfg.getProperty("constraintoviewport")){var K=YAHOO.util.Dom;var L=K.getClientRegion();var J=K.getRegion(this.element);I.set("maxWidth",B);I.set("maxHeight",L.bottom-J.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(I){var E=false;var A=null;try{A=new XMLHttpRequest();E=true}catch(F){try{A=doCreateObject();E=true}catch(F){E=false}}if(E&&A!=null){A.open("GET",I,true);var H="";A.onreadystatechange=function(){if(A.readyState==4){H=A.responseText}};A.send(null);var G=null;var B=null;var D=null;try{if(document.getElementById("hdnB2BModeValue")!=null){G=document.getElementById("hdnB2BModeValue").value}else{G=parent.document.getElementById("hdnB2BModeValue").value}if(document.getElementById("hdnCheckIsUserRegistered")!=null){B=document.getElementById("hdnCheckIsUserRegistered").value}else{B=parent.document.getElementById("hdnCheckIsUserRegistered").value}if(document.getElementById("hdnGetRedirectURL")!=null){D=document.getElementById("hdnGetRedirectURL").value}else{D=parent.document.getElementById("hdnGetRedirectURL").value}}catch(C){}if(G!=null&&B!=null){setTimeout("B2BLoginVerification('"+G+"','"+B+"','"+D+"')",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()};