function changeInnerBuy(innerID,value,isbn) {
if (value=="") {value=1}; // set value at 1
var thisID = eval(innerID);
var thistext = '
' + value + '
';
thisID.innerHTML = thistext;
}
function changeInnerInspect(innerID,isbn) {
var thisID = eval(innerID);
var thistext = '
1
';
thisID.innerHTML = thistext;
}
function addtoCart(idstring,value) {
var cookieExpires = new Date();
cookieExpires.setTime(cookieExpires.getTime() + (1 * 60 * 60 * 1000 ));
getCookie('Palgrave') ? tmpCookie = getCookie('Palgrave') : tmpCookie = "";
if (value=="") {value=1}; // set value at 1
tmpCookie += idstring + "|" + value + ";";
setCookie('Palgrave', tmpCookie, cookieExpires, '/');
//window.location.reload(false);
getSummary();
thisVal="";
}
function removefromCart(id) { // remove single item from cart
getCookie('Palgrave') ? thisCookie = getCookie('Palgrave') : thisCookie = "";
var cookieExpires = new Date();
cookieExpires.setTime(cookieExpires.getTime() + (1 * 60 * 60 * 1000 ));
var thisCookieSplit = thisCookie.split(';');
var tmpCookie = "";
for (var i=0;i 1) {
s_subresult = (n_value >= 1e3 ? '00' : '') + Math.floor(n_value%1e3);
s_result = s_subresult.slice(-3) + (b_first ? '.' : ',') + s_result;
b_first = false;
n_value = n_value/1e3;
}
// add at least one integer digit
if (b_first)
s_result = '0.' + s_result;
// apply formatting and return
return b_negative
? '($' + s_result + ')'
: '$' + s_result;
}
function getTotal(type) {
var tmp = splitCookie('Palgrave');
var total = 0;
for (var i=0;i