
/////////////////////////////////////////////////////////////////////////////////
function change_basket(pid,pix)
/////////////////////////////////////////////////////////////////////////////////
{
		document.basketform.pid.value		= pid;
		document.basketform.pix.value		= pix;
	 	document.basketform.submit();
}//end of func

/////////////////////////////////////////////////////////////////////////////////
function checkout_basket()
/////////////////////////////////////////////////////////////////////////////////
{
		document.basketform.checkout.value		= 1;
	 	document.basketform.submit();
}//end of func



/////////////////////////////////////////////////////////////////////////////////
function set_shipping_address()
/////////////////////////////////////////////////////////////////////////////////
{

	if (document.orderform.sameasbilling.checked)
	{
		for (x = 0; x < document.orderform.shipping_country.options.length; x++)
		{
			if (document.orderform.billing_country.options[document.orderform.billing_country.options.selectedIndex].value == orderform.shipping_country.options[x].value) {orderform.shipping_country.options.selectedIndex = x;}
		}//endfor		
		
		document.orderform.shipping_street.value		= document.orderform.billing_street.value;
		document.orderform.shipping_city.value			= document.orderform.billing_city.value;
		document.orderform.shipping_zipcode.value		= document.orderform.billing_zipcode.value;
		document.orderform.shipping_name.value			= document.orderform.firstname.value + ' ' + document.orderform.lastname.value;	
	}//endif
	
	
	if (!document.orderform.sameasbilling.checked)
	{
		document.orderform.shipping_street.value		= '';
		document.orderform.shipping_city.value			= '';
		document.orderform.shipping_zipcode.value		= '';
		document.orderform.shipping_name.value			= '';	
	}

}//end of func


/////////////////////////////////////////////////////////////////////////////////
function submit_order(thisElementName,thisImageUrl,thisTxt)
/////////////////////////////////////////////////////////////////////////////////
{
	thisElement	= thisElementName;
	document.getElementById(thisElement).innerHTML = '<img src="'+thisImageUrl+'" border=0><br><span class="submittedOrderTxt">'+thisTxt+'</span>';
	document.reviewform.section.value='purchase';
	document.reviewform.submit();
	//alert('Bestellvorgang läuft | Order processing');
}//end of func



//////////////////////////////////////////////////////////////////
function ajax_switchPaymentMethodsData(thisElement,thisUrl,thisMode)
//////////////////////////////////////////////////////////////////
{
	thisElementID	= thisElement;
	
	if (document.getElementById(thisElement))
	{
			thisUrl = thisUrl + 'orderform_'+thisMode+'.php';
			document.getElementById(thisElement).innerHTML = '......am laden.......';
			xmlHttpObj.open('GET',thisUrl	,true);
			xmlHttpObj.onreadystatechange = write_element;
			xmlHttpObj.send(null);
	}//endif
	

}//end of func	


//////////////////////////////////////////////////////////////////
function ajax_switchPaymentMethodsData_ori(thisElement,tmode)
//////////////////////////////////////////////////////////////////
{
	thisElementID	= thisElement;
	
	if (document.getElementById(thisElement) && document.orderform.paymentMethodKey.options[document.orderform.paymentMethodKey.selectedIndex].value)
	{
			document.getElementById(thisElement).innerHTML = '......switching.......';
			thisUrl = CONF_Host + 'order/inc/ajax_handler.php?job=setPaymentMethodData&paymentMethodKey=' + document.orderform.paymentMethodKey.options[document.orderform.paymentMethodKey.selectedIndex].value;
			if (tmode)  {thisUrl = thisUrl + "&tmode=" + tmode;}

			xmlHttpObj.open('GET',thisUrl	,true);
			xmlHttpObj.onreadystatechange = write_element;
			xmlHttpObj.send(null);
	}//endif
	
}//end of func	





//---------------------------------------------------------------------------------------------------------------------
//======================================================[end of form.js]==========================================
//---------------------------------------------------------------------------------------------------------------------

