function AddProductToCart(in_pID, in_Title, in_Msg) {
   var prodString = in_pID;
   prodString = prodString + ":" + document.getElementById("txt_Qty").value;
   prodString = prodString + ":" + document.getElementById("dd_Size").value;
   prodString = prodString + ":" + document.getElementById("dd_Color").value;
   window.parent.reloadCart(prodString, in_Title, in_Msg);
}

function checkItemsInStock(in_pID) {
   if (document.getElementById("tr_AddToBag")) {
      if (document.getElementById("dd_Color").value.indexOf("-1") > 0) {
         //document.getElementById("tr_AddToBag").style.display = "none";
      }
      else {
         //document.getElementById("tr_AddToBag").style.display = "block";
      }
   }
}

function changeColor(in_pID) {
   window.parent.setCookie('FRIGO_LastIframe',"/pages/product_detail.aspx?p= " + in_pID + "&s=" + document.getElementById("dd_Size").value + "&c=" + document.getElementById("dd_Color").value,1);
}


function reloadProdDetail(in_pID) {
   window.parent.loadFrame("/pages/product_detail.aspx?p= " + in_pID + "&s=" + document.getElementById("dd_Size").value + "&c=" + document.getElementById("dd_Color").value);
}

function ChangeQty(in_Type) {
   var CurrentValue = document.getElementById("txt_Qty").value;
   if (in_Type == "+") {
      CurrentValue++;
   }
   else {
      CurrentValue--;
      if (CurrentValue < 1) {
         CurrentValue = 1;
      }
   }
   document.getElementById("txt_Qty").value = CurrentValue;
}
