<!--

function showZoomIcon(obj)
{
	new Effect.Appear(obj, {
		duration:0.5
	});
}

function hideZoomIcon(obj)
{
	new Effect.Fade(obj, {
		duration:0.5
	});
}

function toggleProductDescription(productId)
{
	Element.toggle('pdescr_'+productId);
	Element.toggle('pdescr_ext_'+productId);
}

/* CART */

var cartsubmit;

function checkItemNum(field, id, vpe) {
	qty = parseInt($F(field));
	new_qty = vpe*Math.ceil(qty/vpe);
	if (new_qty != vpe*qty/vpe) {
		vpe_fieldname = 'vpe_'+id;
		new Effect.Highlight(vpe_fieldname, {
			duration:	0.3,
			startcolor:	'#ff9999',
			queue: 		'end'
		});
	}
	field.value = new_qty;
	submit_cartform();
}

function minus(fieldname,qty) {
	if (cartsubmit) {
		window.clearTimeout(cartsubmit);
	}
	if ($F(fieldname) > 0) {
		$(fieldname).value = parseInt($F(fieldname)) - parseInt(qty);
	} else {
		new Effect.Highlight(fieldname, {
			duration:	0.3,
			startcolor:	'#ff9999',
			queue: 		'end'
		});
	}
	cartsubmit = window.setTimeout('submit_cartform()', 1000);
}

function plus(fieldname,qty) {
	if (cartsubmit) {
		window.clearTimeout(cartsubmit);
	}
	$(fieldname).value = parseInt($F(fieldname)) + parseInt(qty);
	cartsubmit = window.setTimeout('submit_cartform()', 1000);
}

function submit_cartform()
{
	document.forms[0].submit();
}

/* END CART */

function checkCountry()
{
	obj = $('country');
	taxrow = $('tax_ident_fieldrow');
	if (obj && taxrow) {
		isEUCountry = obj.options[obj.selectedIndex].value.match(/BE|DK|EE|FI|FR|GF|GI|GR|GP|IE|IT|LV|LT|LU|MT|MQ|NL|AT|PL|PT|RE|SE|SK|SI|ES|CZ|HU|GB|CY/i);
		if (isEUCountry) {
			taxrow.show();
		} else {
			taxrow.hide();
		}
	}
}

function checkPrivateOrder()
{
	if (!$('private_order_1')) return false;
	if ($('private_order_1').checked) {
		setPrivateOrder();
	} else {
		unsetPrivateOrder();
	}
}

function setPrivateOrder()
{
	if (!$('private_order_1')) return false;
	$('notice_private_orders').show();
	$('company_field').hide();
	$('department_field').hide();
	$('costcenter_field').hide();
}

function unsetPrivateOrder()
{
	if (!$('private_order_1')) return false;
	$('notice_private_orders').hide();
	$('company_field').show();
	$('department_field').show();
	$('costcenter_field').show();
}

function checkShippingAddress()
{
	el = $('b_sameShippingAdress');
	if (el) {
		el.checked ? Element.hide('lieferanschrift') : Element.show('lieferanschrift');
		new Effect.Highlight('lieferanschrift_box');
	}
}

function checkPaymentType()
{
	el = $('p_payment_type_cc');
	if (el) {
		el.checked ? Element.show('kreditkarteninfo') : Element.hide('kreditkarteninfo');
		new Effect.Highlight('payment_box');
	}
}

function checkAGB()
{
	el = $('p_agb');
	if (el) {
		el.checked ? $('agb_box').className='' : $('agb_box').className='ov';
	}
}

function toggleCCRow() {
	ccRow = document.getElementById('ccrow');
	paymentSelect = document.forms[1].payment_type;
	if (paymentSelect[1].checked == true) {
		ccRow.style.display = '';
	} else {
		ccRow.style.display = 'none';
	}
}

function selectProductOption(obj) {
	Element.toggle('addToCartInstruction');
	Element.toggle('addToCart');
}

-->

