    function ShowProcessing(varDisplayMessage) {
    
         YAHOO.namespace("example.container");
            
        if (!YAHOO.example.container.wait) {
            
            // Initialize the temporary Panel to display while waiting for external content to load

            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(varDisplayMessage);
            YAHOO.example.container.wait.setBody("<img src=\"http://l.yimg.com/a/i/us/per/gr/gp/rel_interstitial_loading.gif\"/>");
            YAHOO.example.container.wait.render(document.body);
            
        }

        // Define the callback object for Connection Manager that will set the body of our content area when the content has loaded

        // Show the Panel
        YAHOO.example.container.wait.setHeader(varDisplayMessage);
        YAHOO.example.container.wait.show();
    }
    
    function StopProcessing()
    {
            try
            {                
                YAHOO.example.container.wait.hide();
                
                if(document.getElementById("lblAddwishlistmsg")!=null)
                    document.getElementById("lblAddwishlistmsg").innerHTML = '';
                    
             }
             catch(ex)
             { }
    }

   
function CreatePanel(objPanelName,PanelWidth,PanelHeight,PanelVisible, Draggable, EventName, ActionControlName, IsFloatingCartEnabled)
{    

    YAHOO.util.Event.onDOMReady(

        function() {

            // Create a panel Instance, from the 'resizablepanel' DIV standard module markup
            panel = new YAHOO.widget.Panel(objPanelName, {
                draggable: Draggable,
                width: PanelWidth + "px",               
                height: PanelHeight + "px",
                autofillheight: "body", // default value, specified here to highlight its use in the example
                constraintoviewport:false,
                context: ["showbtn", "tl", "bl"],
                visible:PanelVisible,
                close:true,
                zIndex: 15000
            });
            panel.render(document.body);
                        
            // Create Resize instance, binding it to the 'resizablepanel' DIV 
            var resize = new YAHOO.util.Resize(objPanelName, {
                handles: ["br"],
                autoRatio: false,
                minWidth: PanelWidth,
                minHeight:PanelHeight,
                status: false 
            });

            // Setup startResize handler, to constrain the resize width/height
            // if the constraintoviewport configuration property is enabled.
          
            resize.on("startResize", function(args) {

    		    if (this.cfg.getProperty("constraintoviewport")) {
                    var D = YAHOO.util.Dom;

                    var clientRegion = D.getClientRegion();
                    var elRegion = D.getRegion(this.element);
                    resize.set("maxWidth", PanelWidth);                     
                    resize.set("maxHeight", clientRegion.bottom - elRegion.top - YAHOO.widget.Overlay.VIEWPORT_OFFSET);
                                        //resize.set("maxHeight", sessionPanelHeight);
	                
	            } else {
                    resize.set("maxWidth", null);
                    resize.set("maxHeight", null);
	        	}

            }, panel, true);
            
            resize.on("resize", function(args) 
            {
                var panelHeight = args.height;
                this.cfg.setProperty("height", panelHeight + "px");                
                panel.show();
            }, panel, true);
            
            if(IsFloatingCartEnabled == "1")
                YAHOO.util.Event.on(ActionControlName, EventName, panel.show, panel, true);
            
            /*
            if(EventName == "mouseover")
            {
                YAHOO.util.Event.on(ActionControlName, "mousemove", panel.show, panel, true);
                YAHOO.util.Event.on(ActionControlName, "mouseout", panel.hide, panel, true);
            }
            */
            
        }
    );              
               
}           

//XML HTTP Request
function postRequest(url)
{
    var response=false;
    var xmlHttp = null;

    try{
	        xmlHttp=new XMLHttpRequest();
	        response=true;      
        }      
        catch(e)
        {      
            try {
                    xmlHttp = doCreateObject();
                    response=true;  
            }        
            catch(e)
            {
                response = false;  
            }
        }
        
            if(response && xmlHttp!=null)
            {   
                xmlHttp.open("GET", url, true);
                var responsetext="";
                xmlHttp.onreadystatechange = 
		                function ()
		                {
			                if (xmlHttp.readyState == 4)
			                {
				               responsetext = xmlHttp.responseText;
                							
			                }
		                }
            		    
	                xmlHttp.send(null);		 
        	        
	                var b2bMode = document.getElementById("hdnB2BModeValue").value;
                    var isUserLoggedIn = document.getElementById("hdnCheckIsUserRegistered").value;
                    var RedirectURL = document.getElementById("hdnGetRedirectURL").value;
                    
                    if(b2bMode!=null && isUserLoggedIn!=null)
                        setTimeout("B2BLoginVerification('"+b2bMode+"','"+isUserLoggedIn+"','"+RedirectURL+"')",1000);
        	           
            } 
    
}

function B2BLoginVerification(b2bMode,isUserLoggedIn, RedirectURL)
{
    if(b2bMode.toLowerCase()=="true" && isUserLoggedIn.toLowerCase()=="false")
    {            
            if(RedirectURL!=null)
            {
                
                RedirectURL = RedirectURL.replace("~/","../");
                window.location.href = RedirectURL;
                return false;
            }
    }    
}  

function doCreateObject()
{
    var i = 0;
    var msxmls = new Array(
      'Msxml2.XMLHTTP.5.0',
      'Msxml2.XMLHTTP.4.0',
      'Msxml2.XMLHTTP.3.0',
      'Msxml2.XMLHTTP',
      'Microsoft.XMLHTTP');
      
    for (i = 0; i < msxmls.length; i++) 
    {      
          try {
            return new ActiveXObject(msxmls[i]);
          } 
          catch (e) { }
    }
}