<!--
history.go(1);

function round(number,X)
{
	X = (!X ? 2 : X);
	return Math.round(number*Math.pow(10,X))/Math.pow(10,X);
}

var privateprices = new Object();
privateprices["1"] = 0.30;
privateprices["2"] = 0.30;
privateprices["3"] = 0.50;
privateprices["4"] = 0.50;
privateprices["5"] = 0.50;
privateprices["6"] = 0.50;
privateprices["7"] = 0.60;
privateprices["8"] = 0.50;
privateprices["9"] = 0.60;
privateprices["10"] = 0.50;
privateprices["11"] = 0.60;
privateprices["12"] = 0.50;
privateprices["13"] = 0.50;
privateprices["14"] = 0.50;
privateprices["15"] = 0.50;
privateprices["16"] = 0.50;
privateprices["17"] = 0.50;
privateprices["18"] = 0.50;
privateprices["19"] = 0.50;
privateprices["20"] = 0.50;
privateprices["21"] = 0.50;
privateprices["22"] = 0.50;
privateprices["23"] = 0.50;
privateprices["24"] = 0.50;
privateprices["25"] = 0.50;
privateprices["26"] = 0.50;
privateprices["27"] = 0.60;
privateprices["28"] = 0.50;
privateprices["29"] = 0.50;
privateprices["30"] = 0.50;
privateprices["31"] = 0.50;
privateprices["32"] = 0.50;
privateprices["33"] = 0.50;
privateprices["34"] = 0.50;
privateprices["35"] = 0.50;
privateprices["36"] = 0.50;

var pubprices = new Object();
pubprices["1"] = 0.50;
pubprices["2"] = 0.50;
pubprices["3"] = 0.80;
pubprices["4"] = 0.80;
pubprices["5"] = 0.80;
pubprices["6"] = 1.00;
pubprices["7"] = 1.50;
pubprices["8"] = 1.00;
pubprices["9"] = 1.50;
pubprices["10"] = 1.00;
pubprices["11"] = 1.50;
pubprices["12"] = 1.00;
pubprices["13"] = 1.00;
pubprices["14"] = 1.50;
pubprices["15"] = 1.50;
pubprices["16"] = 0.80;
pubprices["17"] = 0.80;
pubprices["18"] = 0.80;
pubprices["19"] = 0.80;
pubprices["20"] = 0.80;
pubprices["21"] = 1.00;
pubprices["22"] = 1.00;
pubprices["23"] = 1.00;
pubprices["24"] = 1.00;
pubprices["25"] = 1.00;
pubprices["26"] = 1.00;
pubprices["27"] = 1.00;
pubprices["28"] = 0.80;
pubprices["29"] = 1.00;
pubprices["30"] = 0.80;
pubprices["31"] = 1.00;
pubprices["32"] = 0.80;
pubprices["33"] = 1.00;
pubprices["34"] = 0.80;
pubprices["35"] = 0.80;
pubprices["36"] = 0.80;

var minplayers = new Object();
minplayers["1"] = 16;
minplayers["2"] = 16;
minplayers["3"] = 10;
minplayers["4"] = 10;
minplayers["5"] = 10;
minplayers["6"] = 10;
minplayers["7"] = 10;
minplayers["8"] = 10;
minplayers["9"] = 10;
minplayers["10"] = 10;
minplayers["11"] = 10;
minplayers["12"] = 10;
minplayers["13"] = 10;
minplayers["14"] = 10;
minplayers["15"] = 10;
minplayers["16"] = 10;
minplayers["17"] = 10;
minplayers["18"] = 10;
minplayers["19"] = 10;
minplayers["20"] = 10;
minplayers["21"] = 10;
minplayers["22"] = 10;
minplayers["23"] = 10;
minplayers["24"] = 10;
minplayers["25"] = 10;
minplayers["26"] = 10;
minplayers["27"] = 10;
minplayers["28"] = 10;
minplayers["29"] = 10;
minplayers["30"] = 10;
minplayers["31"] = 10;
minplayers["32"] = 10;
minplayers["33"] = 10;
minplayers["34"] = 10;
minplayers["35"] = 10;
minplayers["36"] = 10;

var maxplayers = new Object();
maxplayers["1"] = 100;
maxplayers["2"] = 100;
maxplayers["3"] = 64;
maxplayers["4"] = 64;
maxplayers["5"] = 64;
maxplayers["6"] = 64;
maxplayers["7"] = 64;
maxplayers["8"] = 64;
maxplayers["9"] = 64;
maxplayers["10"] = 64;
maxplayers["11"] = 64;
maxplayers["12"] = 64;
maxplayers["13"] = 64;
maxplayers["14"] = 64;
maxplayers["15"] = 64;
maxplayers["16"] = 64;
maxplayers["17"] = 64;
maxplayers["18"] = 64;
maxplayers["19"] = 64;
maxplayers["20"] = 64;
maxplayers["21"] = 64;
maxplayers["22"] = 64;
maxplayers["23"] = 64;
maxplayers["24"] = 64;
maxplayers["25"] = 64;
maxplayers["26"] = 64;
maxplayers["27"] = 64;
maxplayers["28"] = 64;
maxplayers["29"] = 64;
maxplayers["30"] = 64;
maxplayers["31"] = 64;
maxplayers["32"] = 64;
maxplayers["33"] = 64;
maxplayers["34"] = 64;
maxplayers["35"] = 64;
maxplayers["36"] = 64;

var public_only = new Object();
public_only["1"] = 0;
public_only["2"] = 0;
public_only["3"] = 0;
public_only["4"] = 0;
public_only["5"] = 0;
public_only["6"] = 0;
public_only["7"] = 0;
public_only["8"] = 0;
public_only["9"] = 0;
public_only["10"] = 0;
public_only["11"] = 0;
public_only["12"] = 0;
public_only["13"] = 0;
public_only["14"] = 0;
public_only["15"] = 0;
public_only["16"] = 0;
public_only["17"] = 0;
public_only["18"] = 0;
public_only["19"] = 0;
public_only["20"] = 0;
public_only["21"] = 0;
public_only["22"] = 0;
public_only["23"] = 0;
public_only["24"] = 0;
public_only["25"] = 0;
public_only["26"] = 0;
public_only["27"] = 0;
public_only["28"] = 0;
public_only["29"] = 0;
public_only["30"] = 0;
public_only["31"] = 0;
public_only["32"] = 0;
public_only["33"] = 0;
public_only["34"] = 0;
public_only["35"] = 0;
public_only["36"] = 0;

function changeGame()
{
	f = document.orderprices;

	if( f.game[f.game.selectedIndex].value == 0 )
	{
		f.totalprice.value = '';
		f.price.value = '';

		f.slots.options.length = 0;
		f.slots.options[0] = new Option( "---- players", 0 );

		f.pub.options.length = 0;
		f.pub.options[0] = new Option( "---------", 0 );

		return;
	}

	f.slots.options.length = 0;
	$game_id = f.game[f.game.selectedIndex].value;
	$numoptions = ( maxplayers[$game_id] - minplayers[$game_id] ) / 2 + 1;

	for ($i=0; $i < $numoptions; $i++)
	{
		$value = minplayers[$game_id] + $i * 2;
		$text = $value + " players";
		f.slots.options[$i] = new Option( $text, $value );
	}

	f.pub.options.length = 0;
	f.pub.options[0] = new Option( "Private", 1 );
	if ( !public_only[$game_id] )
	f.pub.options[1] = new Option( "Public", 0 );

	changeSlots();
}

function changeSlots()
{
    f = document.orderprices;
    changePrice();
}

function changePrice()
{
	var iPrice = 0;
	f = document.orderprices;
	if (f.game.selectedIndex == 0)
	{
		f.price.value = '';
		f.totalprice.value = '';
	}
	else
	{
		iPrice = ( f.slots[f.slots.selectedIndex].value ) * pubprices[f.game[f.game.selectedIndex].value];
		iPeriod = f.period[f.period.selectedIndex].value;
		
		if (f.pub[f.pub.selectedIndex].value == 1)
		{
			iPrice = ( f.slots[f.slots.selectedIndex].value ) * privateprices[f.game[f.game.selectedIndex].value];
			iPeriod = f.period[f.period.selectedIndex].value;			
		}

		iPrice = round(iPrice);
		iTotal = iPeriod * iPrice;
		f.price.value = iPrice;
		f.totalprice.value = round(iTotal);
	}
}
//-->