﻿//(<%=txbQuant.ClientID %>, <%=lblTotal.ClientID %>,<%=lblClubSum.ClientID %>, <%=hdnPrice.ClientID %>,<%=hdnClubPrice.ClientID %>)
function btnMore_onclick(txtBoxQuant, lblSum, lblClubSum, price, clubPrice) {
    txtBoxQuant.value++;
    //    var res = parseFloat(price.value);
//    var res =(parseFloat(price.value) *  parseFloat(2)).toFixed(2);
//    lblSum.innerHTML = res.toString();
lblClubSum.innerHTML = (parseFloat(clubPrice.value) * parseFloat(txtBoxQuant.value))*100/100;
lblSum.innerHTML = ((price.value * txtBoxQuant.value) * 100) / 100;
    //lblClubSum.innerHTML = ((clubPrice.value * txtBoxQuant.value) * 100) / 100;
}

//    clubSum.innerHTML = Math.round((clubPrice.value * txtBoxQuant.value) * 100) / 100;


   function btnLess_onclick(txtBoxQuant, lblSum, lblClubSum, price, clubPrice) {
       if (txtBoxQuant.value > 1) {
           txtBoxQuant.value--;
           lblSum.innerHTML =((price.value * txtBoxQuant.value) * 100) / 100;
           lblClubSum.innerHTML = ((clubPrice.value * txtBoxQuant.value) * 100) / 100;
       }
   }
        
//        clubSum.innerHTML = Math.round((clubPrice.value * txtBoxQuant.value) * 100) / 100;
    

//enter-ввод прямо в textbox-е
function clickButton(e, buttonid) {
    var evt = e ? e : window.event;
    var bt = document.getElementById(buttonid);
    if (bt) {
        if (evt.keyCode == 13) {
            bt.click();
            return false;
        }
    }
} 
//всплыв div
function distr(chckbox){
var evt=e||window.event;
var target = evt.target||evt.srcElement;
if(target!==tot_samyj_div)return false;

}

//equivalent height
function SetHeight(div1,div2) {
document.getElementById("div2").style.height = document.getElementById("div1").clientHeight + 'px';
}

//not overflow shopping cart
function notOverflow(d1, d2) {
    var layer = new Object();
    var layer2 = new Object();
    layer = document.getElementById("d1");
    layer2 = document.getElementById("d2");
    if (layer2.offsetHeight > layer.offsetHeight) {
        layer.style.height = layer2.offsetHeight + 'px';
    } else {
        layer2.style.height = layer.offsetHeight + 'px';
    }
}

function BackgroundImageCache(){
  /*Use Object Detection to detect IE6*/
  var  m = document.uniqueID /*IE*/
  && document.compatMode  /*>=IE6*/
  && !window.XMLHttpRequest /*<=IE6*/
  && document.execCommand ;
  try{
    if(!!m){
      m("BackgroundImageCache", false, true) /* = IE6 only */
    }
  }catch(oh){};
}




  
