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()};
