var total = new Array();
	total[ 'size' ] = 0;
	total[ 'sport2' ] = 0;
	total[ 'qty' ] = 1;
	total[ 'option' ] = 0;

function set_price() {
	var t = ( ( total[ 'size' ] + total[ 'sport2' ] + total[ 'option' ] ) * total[ 'qty' ] );
	var obj = document.getElementById( 'price' );
	if( obj != null ) {
		obj.innerHTML = ( isNaN( t ) ) ? '0' : t;
	}
	var obj = document.getElementById( 'addme' );
	if( obj != null ) {
		obj.style.display = ( t > 0 ) ? 'inline' : 'none';
	}
}

function size_up( p_obj ) {
	total[ 'size' ] = price[ p_obj.value ];
	set_price();
}

function sport_up( p_obj ) {
	var id = p_obj.name.substr(-1,1);
	var obj = document.getElementById( 'custom_sport' + id.toString() );
	if( obj != null ) {
		obj.style.display = ( p_obj.value == '@custom' ) ? 'inline' : 'none';
		obj.value = '';
	}
}

function sport2_up( p_obj ) {
	sport_up( p_obj );
	total[ 'sport2' ] = ( p_obj.value.toString().length > 0 ) ? sport2 : 0;
	set_price();
}

function qty_up( p_obj ) {
	p_obj.value = ( p_obj.value == 0 ) ? '1' : p_obj.value;
	total[ 'qty' ] = p_obj.value;
	set_price();
}

function option_up( p_obj ) {
	total[ 'option' ] = ( p_obj.value.length > 0 ) ? custom : 0;
	set_price();
}


