var StandartOptions = function() {
	this.title = true;
	this.logo = true;
	this.bigIntro = true;
	//this.middleMenu = true;
	this.stepMenu = true;
	this.footer = true;
	this.data = null;
	this.html = [];
	this.ids = [];
}

StandartOptions.prototype.getData = function() {
	if (this.data !== null) {
		if (Configurator.onlyData === false) this.ini();
		return;
	}
	var params = [];
	params.push('market='+Configurator.marketID);
	params.push('region='+Configurator.regionID);
	params.push('sv='+Car.svID);
	params.push('gear='+Car.gearboxID);
	params.push('engine='+Car.engineID);
	params.push('car='+Car.modelID);
	params.push('mc='+Car.mc);
	params.push('roof=0');
	params.push('lng='+Configurator.language);
	params.push('marketID='+Configurator.marketID);
	params.push('fromVDI='+ Configurator.fromVDI);
	//alert(params.join('&'));
	ajax('/en/daction/step1/', 'Configurator.standartOptions.getDataHandler('+ Configurator.onlyData +')', params.join('&'));
}


StandartOptions.prototype.getDataHandler = function(onlyData) {
//	document.body.innerHTML = '<pre>'+ajaxReq.responseText;
//	return;
	if (this.data === null) this.data = getXML();
	try {
		eval(this.data['std_rims']['txt']);
	} catch(e) {
		alert('Unable to load standart rims data.');
		throw e;
		return;
	}
	Car.rims = std_rims;
	if (onlyData === false) this.ini();
}

StandartOptions.prototype.ini = function() {
	this.html = [];

	this.html.push('<table align="center" class="content"><tr><td class="content_cell">');
	this.html.push(Interface.showStepButtons());

	/*this.html.push('<table class="basic_conf">');
	this.html.push('<tr><td class="blue_bold" nowrap="nowrap">'+Interface.translate('engine')+'</td>');
	this.html.push('<td><b>'+ Configurator.matrix.getEngineById() +'</b></td></tr>');
	this.html.push('<tr><td class="blue_bold" nowrap="nowrap">'+Interface.translate('trans')+'</td>');
	this.html.push('<td><b>'+ Configurator.matrix.getGearboxById() +'</b></td></tr>');
	this.html.push('<tr><td class="blue_bold" nowrap="nowrap">'+Interface.translate('sv')+'</td>');
	this.html.push('<td><b>'+ Car.sv +'</b></td></tr>');
	this.html.push('</table>');*/

	this.html.push('<table><tr><td><br><br>');

	try {
		eval(this.data['xOpt']['txt']);
	} catch(e) {
		alert('Unable to load options data.');
		throw e;
		return;
	}

	try {
		this.ids = eval(this.data['ids']['txt']);
	} catch(e) {
		alert('Unable to load options data.');
		throw e;
		return;
	}
	// MSRP Price
	//Price.MSRP = parseInt(eval(this.data['price']['txt']), 10);

	var so = sv_main.length;
	this.html.push('<table><tr valign="bottom"><td class="big_title h40" colspan="2" valign="top">');
	this.html.push(Interface.translate('eq_for')+' '+Car.sv+'</td></tr><tr valign="top"><td width="50%">');
	for(var i = 0; i < so; ++i) {
		if(i == Math.round(so/2)) this.html.push('</td><td>');
		this.html.push('<table width="100%"><tr valign="top"><td class="w10" style="padding: 0 0 0 10px; margin: 0"><img src="/_/dot.gif" alt="dot" style="margin-top: 4px;"/></td>');
		this.html.push('<td style="padding: 0; margin: 0">'+sv_main[i]+'</td></tr></table>');
	}
	this.html.push('</td></tr></table>');

	this.html.push('</tr></table></td>');
	this.html.push(Interface.showRightMenu());
	this.html.push('</tr></table>');

	$('content').innerHTML = this.html.join('');
	Interface.loading(true);
}
