﻿function getCart(site_Url,productID){var url = site_Url+"basket/getCart.asp?productID="+productID;new Ajax.Updater("div_cart", url, {asynchronous:true, evalScripts:true});}
function deleteFromBasket(site_Url,deleteItem)
{
    var url = site_Url+"basket/getCart.asp?deleteItem="+deleteItem; 
    //alert(url);
    new Ajax.Updater("div_cart", url, {asynchronous:true, evalScripts:true});
}
function deleteFromBasket_all(site_Url,deleteItem)
{
    var url = site_Url+"basket/getCart.asp?deleteItem="+deleteItem; 
    //alert(url);
    new Ajax.Updater("div_basket", url, {asynchronous:true, evalScripts:true});
    new Ajax.Updater("div_cart", url, {asynchronous:true, evalScripts:true});
    document.getElementById("div_order").style.display='none';
}
function displayDivBasketBottom(display){document.getElementById("div_basket_bottom").style.display=display; }
function displayDivPrintBasket(display){if(document.getElementById("div_print_basket")){document.getElementById("div_print_basket").style.display=display; }}
function AddProduct(productID,productPrice,site_Url)
{
  var url = site_Url+"basket/getCart.asp?productID="+productID+"&productPrice="+productPrice;
  //alert(url);
  new Ajax.Updater("div_basket", url, {asynchronous:true, evalScripts:true});
}
function changeQuant(site_Url,arrItem,arrQuant)
{
   var price;
    if(document.getElementById('productPrice_'+arrItem)){price = document.getElementById('productPrice_'+arrItem).value}
    var url = site_Url+"basket/getCart.asp?arrItem="+arrItem+"&arrQuant="+arrQuant+"&productPrice="+price;
    new Ajax.Updater("div_cart", url, {asynchronous:true, evalScripts:true});
}
function onchange_select_price(site_Url,arrItem)
{
   var price;
    if(document.getElementById('productPrice_'+arrItem)){price = document.getElementById('productPrice_'+arrItem).value}
    var url = site_Url+"basket/getCart.asp?arrItem="+arrItem+"&productPrice="+price;
    //alert(url);
    new Ajax.Updater("div_cart", url, {asynchronous:true, evalScripts:true});
}
function onchange_select_deliveryCity(site_Url)
{
   var deliveryID;
    if(document.getElementById('select_deliveryID')){deliveryID = document.getElementById('select_deliveryID').value}
    var url = site_Url+"basket/getCart.asp?deliveryID="+deliveryID;
   // alert(url);
    new Ajax.Updater("div_cart", url, {asynchronous:true, evalScripts:true});
}
function DoCalAdmin(elTarget,elName) {
  if (showModalDialog) {
    var sRtn;
    sRtn = showModalDialog("calendar_birthday.asp",elTarget.value,"center=yes; dialogWidth=140pt; dialogHeight=150pt; status=0; help=0;");
    if (sRtn!=""){
       elTarget.value = sRtn;
    }
  } else
    alert("Internet Explorer 4.0 or later is required.")
 return false;
 window.document.focus;   
}
