

	
min_price = 0.0
max_price = 0.0
price_step = 0.0

Array.prototype.swap=function(a, b)
{
	var tmp=this[a];
	this[a]=this[b];
	this[b]=tmp;
}

function swap(array,a, b)
{
	var tmp=array[a];
	array[a]=array[b];
	array[b]=tmp;
}


function partition(array, begin, end, pivot,sort_on,ascending)
{
	var piv_value = null;
	if(typeof(products[pivot][3][sort_on]) != 'undefined')
	{
		piv_value = products[pivot][3][sort_on][0][1];
	}
	var a = products[pivot][1];
	var b = products[end-1][1];
	array.swap(pivot, end-1);
	swap(product_order,a, b);
	var store=begin;
	var ix;
	
	for(ix=begin; ix<end-1; ++ix) {
		if(ascending)
		{
			if(
				piv_value==null || 
				(
					(typeof(products[ix][3][sort_on]) != 'undefined') && 				
					products[ix][3][sort_on][0][1]<=piv_value
				)
			) {
				a = products[store][1];
				b = products[ ix][1];

				array.swap(store, ix);
				swap(product_order,a,b);
				++store;
			}
		}
		else
		{
			if(
				piv_value==null || 
				(
					(typeof(products[ix][3][sort_on]) != 'undefined') && 				
					products[ix][3][sort_on][0][1]>piv_value
				)
			) {
				a = products[store][1];
				b = products[ix][1];
				array.swap(store, ix);
				swap(product_order,a,b );
				++store;
			}
		}
	}
	a = products[end-1][1];
	b = products[ store][1];
	array.swap(end-1, store);
	swap(product_order,a,b);

	return store;
}

var sortBy = null;
var sortAscending=true;
function SortBy(sort_on,ascending)
{
	// sort out the control highlighting
	jQuery(".order-asc").each(function() {
		this.src = "/images/layout/order_up.gif"; 
	});
		jQuery(".order-desc").each(function() {
		this.src = "/images/layout/order_down.gif"; 
	});
	

	if(ascending)
	{
		jQuery("#img_order_asc_" + sort_on).attr("src","/images/layout/order_up_sel.gif"); 
	}
	else
	{
		jQuery("#img_order_desc_" + sort_on).attr("src","/images/layout/order_down_sel.gif"); 
	}

	// now sort

	quick_sort(products,sort_on,ascending)
	var first = true;
	for(i=0;i<products.length;i++)
	{
		if(!first)
		{
			jQuery("#product_" + products[i-1][1]).after(jQuery("#product_" + products[i][1]));
		}
		{
			first = false;
		}
	}
	
	sortBy = sort_on;
	sortAscending = ascending;
}

function qsort(array, begin, end,sort_on,ascending)
{

	if(end-1>begin) {
		var pivot=begin+Math.floor(Math.random()*(end-begin));

		pivot=partition(array, begin, end, pivot,sort_on,ascending);

		qsort(array, begin, pivot,sort_on,ascending);
		qsort(array, pivot+1, end,sort_on,ascending);
	}
}


function quick_sort(array,sort_on,ascending)
{
	qsort(array, 0, array.length,sort_on,ascending);
}


function dosort(form)
{
	var array=form.unsorted.value.split(/ +/);

	quick_sort(array);

	form.sorted.value=array.join(' ');


}

function ShowEmptyMessageIfNecessary()
{
	var resultsEmpty = true;
	var numResults = 0;
	for(i=0;i<products.length;i++)
	{
		if(products[i][2])
		{
			resultsEmpty = false;
			numResults++;
		}
	}
	if(resultsEmpty)
	{
		jQuery('#empty_results').show();
	}
	else
	{
			jQuery('#empty_results').hide();
	}
	jQuery('#scrollbar_box').width(135*(Math.ceil(numResults/3)+1));

}
function DetermineVisibility(product)
{
	var product_hidden = false;
	// check to see if any of the other filters are preventing this from being shown

	jQuery.each(filters, function(j,value) {
 
		if(product[5][j]<=0)
		{ // if the filter for this product has negative votes, hide it
			product_hidden = true;
			return;
		}
		else
		{
		}
	})
	if(product_hidden && product[2])
	{
		jQuery('#product_' + product[1]).fadeOut();	
		product[2] = false;				
	}
	else if(!product_hidden && !product[2])
	{
		jQuery('#product_' + product[1]).fadeIn();		
		product[2] = true;			
	}
}

function CheckBoxFilterChanged(control)
{
	var values = control.value.split('_');
	var control_type = values[0];
	var value = values[1];
	var value_name = values[2];
	// we need to parse the visible list for products to remove
	if(control.checked)
	{
	
		CheckBoxChecked(control_type,value,control,value_name);
		
	}
	else
	{
		CheckBoxUnchecked(control_type,value,control,value_name);
	
	}
	ShowEmptyMessageIfNecessary();
}

function SetProductVotesForType(type,value)
{
	for(i=0;i<products.length;i++)
	{
		products[i][5][type]=value;
	}

}

function CheckBoxChecked(control_type,value,control,value_name)
{
	// this bit handles controlling which checkboxes are checked or not, and makes sure the votes are correct
	if(value=='all') 
	{
		jQuery('.regular_checkbox_'+control_type).each(function() {
			this.checked = false;
		});
		if(filters[control_type][3]==0)
		{ // 'all' wasn't, but now it is selected, therefore we need to reset visibility vote of this control type for all products to 1
			SetProductVotesForType(control_type,1)
			filters[control_type][3]=1;
		}
		jQuery('#all_control_value_' + control_type).html("Showing all");
		jQuery('#control_value_' + control_type).html("");
	}
	
	else
	{
		jQuery('.all_checkbox_'+control_type).each(function() {
			this.checked = false;
		});
		if(filters[control_type][3]==1)
		{ // 'all' was, but now it isn't selected, therefore we need to reset visibility vote of this control type for all products to 0
			SetProductVotesForType(control_type,0)
			filters[control_type][3]=0
		}
		current_control_value = jQuery('#control_value_' + control_type).html();
		if(current_control_value=="")
		{
			jQuery('#control_value_' + control_type).html(value_name);
			jQuery('#all_control_value_' + control_type).html("");
		}
		else
		{
			jQuery('#control_value_' + control_type).html(current_control_value + ", " + value_name);
		
		}
			// now set the filters array to the correct state
			filters[control_type][5][parseInt(value)][0]= 1;
	}

	// this bit handles the filtering based on selected
	for(i=0;i<products.length;i++)
	{
		var product_hidden = false;
		if(/*(value=='all') || */(typeof(products[i][3][control_type]) != 'undefined'&& typeof(products[i][3][control_type][value]) != 'undefined'))
		{ // we have selected to show all products, with or without this attribute, 
		  // or this product has this attribute
			if(typeof(control.name) != 'undefined')
			{
				control_type = control.name;
			}
			// vote to show
			products[i][5][control_type]++;
		}
		// this variable shows whether the last time the filter was run that the product was shown
		var currently_shown = products[i][2];

		DetermineVisibility(products[i]);
		
	}
	ShowEmptyMessageIfNecessary();
	


}

function CheckBoxUnchecked(control_type,value,control,value_name)
{
	// this bit handles controlling which checkboxes are checked or not, and makes sure the votes are correct
	if(value=='all') 
	{
		jQuery('.regular_checkbox_'+control_type).each(function() {
			this.checked = false;
		});
		if(filters[control_type][3]==1)
		{ // 'all' was, but now it is selected, therefore we need to reset visibility vote of this control type for all products to 0
			SetProductVotesForType(control_type,0);
			filters[control_type][3]=0;
		}
		jQuery('#all_control_value_' + control_type).html("Showing none");
		
	}
	else
	{
		// remove the text for this filter
		current_control_value = jQuery('#control_value_' + control_type).html();
		new_control_value = current_control_value.replace(", " + value_name,"");
		new_control_value = new_control_value.replace(value_name,"")
		jQuery('#control_value_' + control_type).html(new_control_value);
		filters[control_type][5][parseInt(value)][0]= 0;
	
		
	}

	
	// do the filtering
	for(i=0;i<products.length;i++)
	{
		product_hidden = false;
		/*if(value=='all')
		{
			control_type = control.name;
			// vote to hide
			products[i][5][control_type]--;		

		}
		else 
		*/ if( (typeof(products[i][3][control_type]) != 'undefined' && typeof(products[i][3][control_type][value]) != 'undefined'))
		{ // this product has this attribute
			// vote to hide
			products[i][5][control_type]--;
		}
		DetermineVisibility(products[i])
	}
		ShowEmptyMessageIfNecessary();
		// now set the filters array to the correct state

}

function RadioFilterChanged(type,value,control)
{
	// we need to parse the visible list for products to remove
	for(i=0;i<products.length;i++)
	{

		if(typeof(products[i][3][type])!='undefined' && typeof(products[i][3][type][value+value.toFixed(3)]) == 'undefined')
		{
			if(control.value=="Yes")
			{
				jQuery('#product_' + products[i][1]).fadeOut();
				products[i][2]++;
			}
			else
			{
				products[i][2]--;
				if(products[i][2]<=0)
				{
					jQuery('#product_' + products[i][1]).fadeIn();
				}
			}
		}
	}
		ShowEmptyMessageIfNecessary();

}

function SliderFilterChanged(control_type,slider)
{
	var minIndex = jQuery("#slider_" + control_type).slider("value",0)
	var maxIndex = jQuery("#slider_" + control_type).slider("value",1)
	var minValue = 0;
	var maxValue = 0;
	if(control_type=='price')
	{
		minValue = minIndex;
		maxValue = maxIndex;
	}
	else
	{
		minValue = filters[control_type][0][minIndex][0];
		maxValue = filters[control_type][0][maxIndex][0];
	}
	
	var refining = false;
	if(minValue>filters[control_type][1] || maxValue<filters[control_type][2])
	{ // if min or max have moved inwards, we are refining
		refining = true;
	}
	else if(minValue==filters[control_type][1] && maxValue==filters[control_type][2])
	{
		return;
	}
	
	

	for(i=0;i<products.length;i++)
	{
		if(refining)
		{
			SliderRefineProduct(products[i],control_type,minValue,maxValue);
		}
		else
		{
			SliderExpandProduct(products[i],control_type,minValue,maxValue);
		}
	}
	filters[control_type][1] = minValue;
	filters[control_type][2] = maxValue;
		ShowEmptyMessageIfNecessary();

}

function SliderRefineProduct(product,control_type,minValue,maxValue)
{
	if(product[2])
	{ // currently visible
		if(typeof(product[3][control_type])=='undefined' || typeof(product[3][control_type][0])=='undefined'|| Math.floor(product[3][control_type][0][1]<minValue) || Math.floor(product[3][control_type][0][1])>maxValue)
		{// product is now outside of the slider min and max
			// vote to hide this product
			product[5][control_type]--;
		}
	}
	DetermineVisibility(product);
}

function  SliderExpandProduct(product,control_type,minValue,maxValue)
{
	if(!product[2])
	{ // currently invisible
		if(filters[control_type][1]==minValue && filters[control_type][2]==maxValue)
		{		
			product[5][control_type]++;
		}
		else if(typeof(product[3][control_type])!='undefined' && typeof(product[3][control_type][0])!='undefined' && Math.floor(product[3][control_type][0][1])>=minValue && Math.floor(product[3][control_type][0][1])<=maxValue)
		{// product is now inside of the slider min and max
			// vote to show this product
			product[5][control_type]++;
		}
	}
	DetermineVisibility(product);

}

throw_slide_event = true;

function build_slider(slider_id,min,max)
{
    jQuery("#slider_" + slider_id).slider({ min:min,max:max,steps:max-min, range: true,
change: function(e,ui) { 		
		if(throw_slide_event)
		{ // hack when moving slider programatically when loading spectackles
			SliderFilterChanged(slider_id,this); 
		}
		},

		slide: function(e, ui) {
		
			if(slider_id!='price')
			{
				
				minIndex = jQuery("#slider_" + slider_id).slider("value",0)
				maxIndex = jQuery("#slider_" + slider_id).slider("value",1)
				minValue = filters[slider_id][0][minIndex]
				maxValue = filters[slider_id][0][maxIndex]
				jQuery('#min_callout_'+ slider_id).css('left', ui.handle.css('left')).text(minValue[1]);
				jQuery('#max_callout_'+ slider_id).css('left', ui.handle.css('left')).text(maxValue[1]);
			}
			else
			{
		
				minIndex = jQuery("#slider_" + slider_id).slider("value",0)
				maxIndex = jQuery("#slider_" + slider_id).slider("value",1)
				
				minValue =  minIndex;
				maxValue = maxIndex;
				jQuery('#min_callout_'+ slider_id).css('left', ui.handle.css('left')).text("$" + minValue);
				jQuery('#max_callout_'+ slider_id).css('left', ui.handle.css('left')).text("$" + maxValue);
				
			
			}
		}
})

}


SAVE_SPECTACKLE = 1;
SEND_TO_A_FRIEND = 2;
BOOKMARK_SPECTACKLE = 3;

function DocumentReady(existing_spectackle)
 {
// set up check box filters
 jQuery('.unordered_filter_attribute').click(function(){
					CheckBoxFilterChanged(this);
				});
// make sure check boxes are correct, as if the user has refreshed the checks will be wrong
		jQuery('.all_checkbox').each(function() {
			this.checked = true;
		});				
		jQuery('.regular_checkbox').each(function() {
			this.checked = false;
		});			
	
							

				// build sliders and check nox
	build_slider("price",0.0,0.0)
	jQuery.facebox.settings.overlay = true
	jQuery.facebox.settings.opacity = 0.5
	
		 jQuery('#show_control_4368').click(function(){
				jQuery('#control_4368').show('slow');
				jQuery('#show_control_4368').html('');
			});
			
		  jQuery('#hide_control_4368').click(function(){
				jQuery('#control_4368').hide('slow');
				jQuery('#show_control_4368').html("Select options");
			});
		
			
		 
			build_slider(4373,0,
			3)
		
	
	 jQuery('a[rel*=box]').facebox() ;
	
	// comparison star handlers
	jQuery(".compare-check").click(function(){
			if(jQuery(this).hasClass('compare-checked'))
			{
				jQuery(this).addClass('compare-check');
				jQuery(this).removeClass('compare-checked')
			}
			else
			{
				jQuery(this).addClass('compare-checked');
				jQuery(this).removeClass('compare-check')
			}
			jQuery(this.hash).trigger("click");
			product_id = this.id.split('_')[1];
			if(products[product_order[product_id]][4]==true)
			{
				products[product_order[product_id]][4]=false;
			}
			else
			{
				products[product_order[product_id]][4]=true;
			}
			return false;
		});
	
	
	jQuery("#save_spectackle").click(function(){
		SaveSpectackle(existing_spectackle,SAVE_SPECTACKLE);
		
	});
	
	jQuery("#send_to_a_friend").click(function(){
		SaveSpectackle(existing_spectackle,SEND_TO_A_FRIEND);
		
	});
	
	jQuery("#bookmark_spectackle").click(function(){
			SaveSpectackle(existing_spectackle,BOOKMARK_SPECTACKLE);
			
	});
	
	jQuery("#show_more_filters").click(function(){
			jQuery(".hidden_filter").fadeIn();
			jQuery("#show_more_filters").fadeOut();			
	});
	
	jQuery("#hide_more_filters").click(function(){
			jQuery(".hidden_filter").fadeOut();
			jQuery("#show_more_filters").fadeIn();			
	});
	
            var container = jQuery('div.spectackleScrollbarGallery');
            var ul = jQuery('#scrollbar_box', container);
            
            var itemsWidth = ul.innerWidth() - container.outerWidth();
            var itemScrollRatio = ul.innerWidth() / (container.outerWidth());
            jQuery('.spectackleScrollbar', container).scrollbar({
                min: 0,
                max: itemsWidth,
                handle: '.spectackleHandle',
                stop: function (event, ui) {
                    ul.animate({'left' : ui.value * -1 }, 450);
                },
                slide: function (event, ui) {
                    ul.css('left', ui.value * -1 );
                }
            });		

		LoadProductPageIfNecessary();
		
}

function LoadComplete()
{
	jQuery("#loading_message").hide();
	jQuery("#spec_filters").show();
}

var tipHTML = "<div class='tip_popup'><h2>You've found Spectackler - The spec comparison engine</h2><p>Spectackler lets you to quickly filter and sort BestBuy products according to the features you want. You searched for the product below, but close this box and you can compare it to all products in the xFront Projectors category. See a video on how to use it <a href='/posts/8-Screencast'>here</a>.</p></div>"

function LoadProductPageIfNecessary()
{
	productId = getQueryVariable("product_id")
	if(productId != null)
	{
		jQuery.get('/products/'+productId+'?show_tip=true', function(data) {
    					jQuery.facebox(data)
						jQuery("#tip").html(tipHTML);
						LoadComplete();
					})
	}
	else
	{
		LoadComplete();
	}
}




function CompareProducts()
{

		url_string = "/products/compare?";
		starred_count = 0;
		for(i=0;i<products.length;i++)
		{
			if(products[i][4]==true)
			{
				url_string = url_string + "products[]=" + products[i][1] + "&";
				starred_count++;
			}
	
		}
		if(starred_count>0)
		{
			url_string = url_string + "category_id=32";
			window.location = url_string;
		}
		else
		{
			alert("Please select some products to compare");
		}
	
}


function SaveSpectackle(existing_spectackle,action)
{


		filters_json_data = jQuery.toJSON(filters);	
	starred_products = new Object();
	for(i=0;i<products.length;i++)
	{
		if(products[i][4]==true)
		{
			starred_products[products[i][1]]=true;
		
		}
	
	}
		products_json_data = jQuery.toJSON(starred_products);
	
			if(existing_spectackle==0 || action == SEND_TO_A_FRIEND || action == BOOKMARK_SPECTACKLE)
			{
				json_url = '/saved_spectackles/create_json';
			}	
			else
			{
			
					json_url =  '/saved_spectackles/update_json/' + existing_spectackle;	
			}
			jQuery.post(json_url,{category_id:32,filters:filters_json_data,products:products_json_data,sort_field:sortBy,sort_ascending:sortAscending},function(data)
		{
			jQuery.facebox(function() {
				if(action == SAVE_SPECTACKLE)
				{
					jQuery.get('/saved_spectackles/edit/'+data + '?nolayout=true', function(data) {
    					jQuery.facebox(data)
					})
				}
				else if(action == SEND_TO_A_FRIEND)
				{
					jQuery.get('/saved_spectackles/send_to_a_friend/'+data + '?nolayout=true', function(data) {
    					jQuery.facebox(data)
					})
				}
				else if(action == BOOKMARK_SPECTACKLE)
				{
					jQuery.get('/saved_spectackles/bookmark/'+data + '?nolayout=true', function(data) {
					    					jQuery.facebox(data)
					})
				}
					})  ;
		}, "json");
		


}

//
// filters - list of filters on this page
//	filters[attribute type id][0] - ordered list of attribute values
//		- [0] attribute magnitude
//		- [1] attribute name
//  filters[attribute type id][1] - previous min slider value
//  filters[attribute type id][2] - previous max slider value
//  filters[attribute type id][3] - whether 'all' is selected
//  filters[attribute type id][4] - type of filter
//  filters[attribute type id][5] - hash of attribute values with visibility boolean
//  filters[attribute type id][6] - slider min slider value
//  filters[attribute type id][7] - slider max slider value
filters ={
"price" : 
	[
	[
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
		[0.0,0.0],
	
	],
	0.0,
	0.0,
	1,3,[""],
		0.0,
	0.0,
	]
,

	
				4368 : 
	    			[
						[
						[0.000,"000:1 ",0],
						
						[3000.000,"30 ",0],
						
						],
						0.0,
						3000.0,
						1,
						1,
						
						{
						
						0.0:[0,"000:1"]
						
						
						,
						
						3000.0:[0,"30"]
						
						},
						0.0,
						3000.0						
					]
				
		,
				4373 : 
	    			[
						[
						[100.000,"1 component video ",0],
						
						[100.000," 1 S-video ",0],
						
						[100.000," 1 composite ",0],
						
						[100.000," 1 PC ",0],
						
						],
						100.0,
						100.0,
						1,
						3,
						
						{
						
						100.0:[0,"1 component video"]
						
						
						,
						
						100.0:[0," 1 S-video"]
						
						
						,
						
						100.0:[0," 1 composite"]
						
						
						,
						
						100.0:[0," 1 PC"]
						
						},
						100.0,
						100.0						
					]
				
		
}


// products[i][0] - name
// products[i][1] - product id
// products[i][2] - boolean as to whether the product was shown last time
// products[i][3] - hash of the product attributes
// products[i][4] - is the product starred?
// products[i][5] - hash of visibility from controls
products = 
[
	
	[
		"Mitsubishi LCD Home Theater Projector","7450",true,
			{

				"price":[[2499.98,2499.98]]

			},false,{0:[null]}
	]
	
];


	products[0][5]["price"] = 1;
	
		products[0][5]["4361"] = 1;
		products[0][3]["4361"] = [];		
	
		products[0][5]["4362"] = 1;
		products[0][3]["4362"] = [];		
	
		products[0][5]["4363"] = 1;
		products[0][3]["4363"] = [];		
	
		products[0][5]["4364"] = 1;
		products[0][3]["4364"] = [];		
	
		products[0][5]["4365"] = 1;
		products[0][3]["4365"] = [];		
	
		products[0][5]["4366"] = 1;
		products[0][3]["4366"] = [];		
	
		products[0][5]["4367"] = 1;
		products[0][3]["4367"] = [];		
	
		products[0][5]["4368"] = 1;
		products[0][3]["4368"] = [];		
	
		products[0][5]["4369"] = 1;
		products[0][3]["4369"] = [];		
	
		products[0][5]["4370"] = 1;
		products[0][3]["4370"] = [];		
	
		products[0][5]["4371"] = 1;
		products[0][3]["4371"] = [];		
	
		products[0][5]["4372"] = 1;
		products[0][3]["4372"] = [];		
	
		products[0][5]["4373"] = 1;
		products[0][3]["4373"] = [];		
	
		products[0][5]["4374"] = 1;
		products[0][3]["4374"] = [];		
	
		products[0][5]["4375"] = 1;
		products[0][3]["4375"] = [];		
	
		products[0][5]["4376"] = 1;
		products[0][3]["4376"] = [];		
	
		products[0][5]["4377"] = 1;
		products[0][3]["4377"] = [];		
	
		products[0][5]["4378"] = 1;
		products[0][3]["4378"] = [];		
	
	
		products[0][3]["4361"][0]=[20054,964968000.0];
		products[0][3]["4361"]["964968000"]=[20054,964968000.0];

		
		products[0][3]["4362"][0]=[20055,934797000.0];
		products[0][3]["4362"]["934797000"]=[20055,934797000.0];

		
		products[0][3]["4363"][0]=[20056,5000.0];
		products[0][3]["4363"]["5000"]=[20056,5000.0];

		
		products[0][3]["4364"][0]=[20057,140.0];
		products[0][3]["4364"]["140"]=[20057,140.0];

		
		products[0][3]["4365"][0]=[20058,19201100.0];
		products[0][3]["4365"]["19201100"]=[20058,19201100.0];

		
		products[0][3]["4366"][0]=[20059,19201100.0];
		products[0][3]["4366"]["19201100"]=[20059,19201100.0];

		
		products[0][3]["4367"][0]=[20060,1600.0];
		products[0][3]["4367"]["1600"]=[20060,1600.0];

		
		products[0][3]["4368"][0]=[20061,3000.0];
		products[0][3]["4368"]["3000"]=[20061,3000.0];

		
		products[0][3]["4368"][0]=[20062,0.0];
		products[0][3]["4368"]["0"]=[20062,0.0];

		
		products[0][3]["4369"][0]=[20063,17000.0];
		products[0][3]["4369"]["17000"]=[20063,17000.0];

		
		products[0][3]["4370"][0]=[20064,1061740000.0];
		products[0][3]["4370"]["1061740000"]=[20064,1061740000.0];

		
		products[0][3]["4371"][0]=[20065,977472000.0];
		products[0][3]["4371"]["977472000"]=[20065,977472000.0];

		
		products[0][3]["4372"][0]=[20066,908168000.0];
		products[0][3]["4372"]["908168000"]=[20066,908168000.0];

		
		products[0][3]["4373"][0]=[20070,100.0];
		products[0][3]["4373"]["100.0"]=[20070,100.0];

		
		products[0][3]["4373"][0]=[20068,100.0];
		products[0][3]["4373"]["100.0"]=[20068,100.0];

		
		products[0][3]["4373"][0]=[20069,100.0];
		products[0][3]["4373"]["100.0"]=[20069,100.0];

		
		products[0][3]["4373"][0]=[20067,100.0];
		products[0][3]["4373"]["100.0"]=[20067,100.0];

		
		products[0][3]["4374"][0]=[20071,1105620000.0];
		products[0][3]["4374"]["1105620000"]=[20071,1105620000.0];

		
		products[0][3]["4375"][0]=[20072,977472000.0];
		products[0][3]["4375"]["977472000"]=[20072,977472000.0];

		
		products[0][3]["4376"][0]=[20073,1105620000.0];
		products[0][3]["4376"]["1105620000"]=[20073,1105620000.0];

		
		products[0][3]["4377"][0]=[20074,1105620000.0];
		products[0][3]["4377"]["1105620000"]=[20074,1105620000.0];

		
		products[0][3]["4378"][0]=[20075,977472000.0];
		products[0][3]["4378"]["977472000"]=[20075,977472000.0];

		


// product_order is a single array with the current product order defined in it
product_order = {
	
	7450 : 0
		
	
};
