function createShopPopup(script,p_width,p_height) { var w = p_width != null ? p_width : 700; var h = p_height != null ? p_height : 450; var move = screen ? ',left=' + ((screen.width - w) >> 1) + ',top=' + ((screen.height - h) >> 1) : '', o_colWindow = window.open(script, null, "help=no,status=no,scrollbars=no,resizable=yes" + move + ",width=" + w + ",height=" + h + ",dependent=yes", true); o_colWindow.opener = window; o_colWindow.focus(); } function showBasket(home) { if(document.getElementById("tcurrency")) { var curr = document.getElementById("tcurrency").value; } else { curr=''; } var script = home+'/modules/shopping/basket.php?curr=' +curr; createShopPopup(script,730,500); } function addIntoBasket(home,className,itemId,price,name,quantity) { var script = home+'/modules/shopping/add.php?'; script = script+"className="+className; script = script+"&itemId="+itemId; script = script+"&price="+price; if (name != null) { script = script+"&name="+name; } if (quantity != null) { script = script+"&quantity="+quantity; } createShopPopup(script,300,250); } function addAndBuy(home,className,itemId,price,name,quantity) { var script = home+'/modules/shopping/buy.php?'; script = script+"className="+className; script = script+"&itemId="+itemId; script = script+"&price="+price; if (name != null) { script = script+"&name="+name; } if (quantity != null) { script = script+"&quantity="+quantity; } createShopPopup(script,730,500); } function refreshShoppingParentWindow(result) { var form = opener.document.getElementById('_shoppingResultCallbackForm'); if (form != null) { form.result.value = result; form.submit(); } }