/**
 * shop.item.order.form.js - insert headline here
 *
 * COPYRIGHT: All  title   and  proprietary  rights,  including  trade
 * secrets,   in   the   Software   and   any   copies thereof and the
 * accompanying  written   materials,   are  owned  by   schukai  GmbH
 * and  are  protected  by  German  copyright  laws,  other applicable
 * copyright   laws  and  international  treaty  provisions.
 *
 * @package    alvine
 * @author     schukai GmbH <info@schukai.de>
 * @copyright  Copyright (C) 2002, 2003, 2004, 2005, 2006 schukai GmbH
 * @license    http://www.alvine.de/license/
 * @version    20061114
 * @link       http://www.alvine.de/
 */
 
function content_frontend_plugin_shop_item_order_form_init() {
}

if(typeof price == 'undefined') var price = new Object();
      
function content_frontend_plugin_shop_item_order_form_changePrice(value, boxID, index) {
  obj = getElementID('detailPrice'+boxID+index);
  if(!obj) return;  

  if(!price[boxID][index][value]) return;
  var newPrice = price[boxID][index][value];
  writeHTML(obj, newPrice);
};
 
function content_frontend_plugin_shop_item_order_form_addPrice(boxID, index, priceName, value) {
  
  if(typeof price[boxID] == 'undefined') price[boxID] = new Object();
  if(typeof price[boxID][index] == 'undefined') price[boxID][index] = new Object();
  
  price[boxID][index][priceName] = value;
};

function content_frontend_plugin_shop_item_order_form_changeAdvised(value, boxID, index) {
  obj = getElementID('detailAdvised'+boxID+index);
  if(!obj) return;  

  if(!alvine['plugin'][boxID]['advised'][index]) return;
  var text = alvine['plugin'][boxID]['advised'][index][value];
  writeHTML(obj, text);
};


function content_frontend_plugin_shop_item_order_form_addAdvised(boxID, index, variant, label) {
  
  if(typeof alvine['plugin'][boxID] == 'undefined') alvine['plugin'][boxID] = new Object();
  if(typeof alvine['plugin'][boxID]['advised'] == 'undefined') alvine['plugin'][boxID]['advised'] = new Object();
  if(typeof alvine['plugin'][boxID]['advised'][index] == 'undefined') alvine['plugin'][boxID]['advised'][index] = new Object();
  
  alvine['plugin'][boxID]['advised'][index][variant] = label;
};