/*
* Plugins JS scripts
/*/
function changeAttributesPrice( ){
  var fPriceAdd = 0;
  var fPriceNew = fPrice;
  var isVat = false;
  var fPriceVat = 0;
  var aSelects = gEBI( 'attributes' ).getElementsByTagName( 'select' );
  for( var i = 0; i < aSelects.length; i++ ){
    var aSelect = aSelects[i];
    if( aSelect.className == 'attributes' ){
      var aSelectValue = aSelect.options[aSelect.options.selectedIndex].value;
      if( aSelectValue != '' )
        var aAttribute = aSelectValue.split( "|" );
      else
        var aAttribute = Array( 0, 0 );
      if( aAttribute[1] != '' ){
		if( aSelect.name != 'aAttributes[VAT]' ) {
		  fPriceAdd += ( generatePrice( fPrice, aAttribute[1] ) - fPrice );
		  fPriceNew = fPrice + fPriceAdd;
		  
		  
		} else {
		  isVat = true;
		  //alert(generatePrice( fPriceNew, aAttribute[1] ));
		  fPriceVat = ( generatePrice( fPriceNew, aAttribute[1] ) );
		  //alert(fPriceVat);
		}
      }
    }
  } // end for
  if( !isVat ) {
    gEBI( 'priceValue' ).innerHTML = changePriceFormat( fix( fPrice * 1 + fPriceAdd ) );
  } else {
	gEBI( 'priceValue' ).innerHTML = changePriceFormat( fix( fPriceVat ) );
  }
} // end function changeAttributesPrice
