var maintainanceErr = "Home & Home Office is currently under maintenance"; 

                                    var emptyCart = "0 items in My Cart"; 

                                    var errMsg = "details not available";

 

                                     function displayCart(hhoCart)

                                     {

                                          var cartId = hhoCart.id;

                                          var itemSize = hhoCart.itemSize;

                                          var subtotal = hhoCart.subtotal;

                                          var checkoutURL = hhoCart.checkoutURL;

                                                  var itemText = 'Items';

                                          if(checkoutURL==" ")    checkoutURL = '#';

                                                  if(itemSize==1)    itemText = 'Item';

 

                                          document.write('<table border="0" cellpadding="0" cellspacing="0" width="170" background="http://welcome.hp-ww.com/img/s.gif"><tr><td align="left" width="10"><img src="http://welcome.hp-ww.com/img/s.gif" width="10" height="10" alt=""></td><td align="left" width="150">');

 

                                         document.write('<table border="0" cellpadding="0" cellspacing="0" width="150"><tr><td width="20" valign="middle"><img src="http://www.hp.com//united-states/images/snf25_blue_icon_cart.gif" width="20" height="13" alt="" border="0"></td><td width="130" valign="top" align="left"><a href="'+checkoutURL+'" class="udrlinebold">My Cart</a></td></tr></table>');

                                    document.write('<img src="http://welcome.hp-ww.com/img/s.gif" width="1" height="2" alt=""><br>'+itemSize+' '+itemText+': &nbsp;$'+subtotal+'<br>');

 

                                        document.write('<table border="0" cellpadding="0" cellspacing="0" width="150"><tr><td width="150" align="right"><form id="minicart" style="margin-top: 5px; margin-bottom: 0px;" name="minicart" method="post" action="'+checkoutURL+'"><input id="MinCheckOut" title="View Cart and Checkout" type="image" alt="View Cart and Checkout" src="http://www.hp.com/sbso/images/oov/common/oov_viewcart_checkout_btn.gif" value="CheckOut" border="0" name="MinCheckOut"></form></td></tr></table>'); 

 

                                        document.write('</td><td align="left" width="10"><img src="http://welcome.hp-ww.com/img/s.gif" width="10" height="10" alt=""></td></tr></table>'); 

 

                                    }

 

                                    function displayMsg(messageText)

                                    {

                                                      document.write('<table border="0" cellpadding="0" cellspacing="0" background="http://welcome.hp-ww.com/img/s.gif"><tr><td colspan="3" align="left"><img src="http://welcome.hp-ww.com/img/s.gif" width="1" height="10" alt=""></td></tr><tr><td align="left" width="10"><img src="http://welcome.hp-ww.com/img/s.gif" width="10" height="1" alt=""></td><td colspan="2" align="left"><img title="My Cart" src="http://h71016.www7.hp.com/images/snf25_blue_icon_cart.gif" alt="My Cart" border="0" width="20" height="13"><a title="My Cart" class="udrlinebold" href="'+staticCheckOutURL+'" >My Cart</a></td></tr><tr><td align="left" width="10"><img src="http://welcome.hp-ww.com/img/s.gif" width="10" height="1" alt=""></td><td colspan="2" align="left">'+messageText+'</td></tr></table>');

 

                                    }

                                    

                               try{

                                       if( isCookieExists == true &&  hhoCart != null ) {

            

                                                 if((hhoCart.checkoutURL.length > 0 ) && (hhoCart.checkoutURL== 'maintenance' ))  {

                                                            displayMsg(maintainanceErr);       

                                                 }

                                                else if( hhoCart.itemSize > 0 ) {

                                                            displayCart(hhoCart);      

                                                }

                                                else {

                                                            displayMsg(emptyCart);

                                                } 

                                      } 

                                      else {

                                                   displayMsg(emptyCart);

                                      }

                                 }

                                 catch(e){   

                                                displayMsg(errMsg);      

                                 }

