/*
* Plugins JS scripts
/*/
function changeAttributesPrice( ){
  var fPriceAdd = 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] != '' ){
        fPriceAdd += ( generatePrice( fPrice, aAttribute[1] ) - fPrice );
      }
    }
  } // end for
  gEBI( 'priceValue' ).innerHTML = changePriceFormat( fix( fPrice * 1 + fPriceAdd ) );
} // end function changeAttributesPrice
function windowNew( sAdres, iWidth, iHeight, sTitle, iReturn ){
  if ( !sTitle )
    sTitle = '';
  if( !iReturn )
    iReturn = false;

	if( !iWidth )
		var iWidth = 750;
	if( !iHeight )
		var iHeight = 530;

	if( +iWidth > 750 )
		iWidth = 750;
	else
		iWidth = +iWidth + 40;

	if( +iHeight > 530 )
		iHeight = 530
	else
		iHeight = +iHeight + 40;

	var iX = ( screen.availWidth - iWidth ) / 2;
	var iY = ( screen.availHeight - iHeight ) / 2;

  var refOpen = window.open( sAdres, sTitle, "height="+iHeight+",width="+iWidth+",top="+iY+",left="+iX+",resizable=yes,scrollbars=yes,status=0;" );

  if( iReturn == true )
  	return refOpen
}