﻿//rowId is optional param
function CreatePopUp(qty, amt, rowId) {
    if (rowId == 'undefined')
        rowId = 0;

    var html;
      html ="<div style=\"width:15px; height:15px; cursor:pointer; margin-left:245px; margin-top:15px;\" onclick=\"$('.popup_cart').css('visibility','hidden')\"></div>";
      html += "<h4 >Item added to your shopping cart</h4>";
      if (qty=="1")
          html += "<p>You have <b> " + qty + " item </b> in your shopping cart</p>";
      else
          html += "<p>You have <b> " + qty + " items </b> in your shopping cart</p>";
      html += "<p><strong>Total cost: " + amt + "</strong></p>"
      html +="<div style=\"padding-left:5px; margin-top:10px;\">"
      html += "<a href=\"" + RootPath + "/shoppingcart.aspx\"><img src=\"" + RootPath + "/images/buttons/button-cart.gif\" border=\"0\" height=\"20px\" width=\"74px\" alt=\"Checkout\"/></a> "
      html += "<img src=\"" + RootPath + "/images/buttons/button-continue-shopping.gif\" onclick=\"$('.popup_cart').css('visibility','hidden')\"  align=\"top\" causesvalidation=\"false\"/></div>"
     
     return html;
}
function ClosePopUp(rowId) {
   
    if (rowId == 0)
        document.getElementById("divCartPopup").style.visibility = 'hidden';
    else
        document.getElementById("divCartPopup" + rowId).style.visibility = 'hidden';

}


