function mOvr01()
{
	document.getElementById('order_form').style.backgroundColor = '#ffffff'; 
	document.getElementById('order_form').style.color = '#ad9218'; 
	//this.style.backgroundColor='#000000';
}
function mOut01()
{ 
	//this.style.backgroundColor='#ad9218';
	document.getElementById('order_form').style.backgroundColor = '#ad9218'; 
	document.getElementById('order_form').style.color = '#ffffff'; 
}


function redirect01()
{
	var indice = document.form_01.lang.selectedIndex;
	
	//formul.miSelect.value
	
	//document.getElementById("myselect").options[0].value //accesses value attribute of 1st option
//document.getElementById("myselect").options[3].text //accesses text of 1st option

	//var path = 'resellers-get-to-know/';
	var path = './';

	switch( indice )
	{
		case 1: //EN
		{
			window.location = path + 'en/main.html';
			break;
		}
		case 2: //DE
		{
			window.location = path + 'de/main.html';
			break;
		}
		case 3: //PL
		{
			window.location = path + 'pl/main.html';
			break;
		}
		case 4: //RS
		{
			window.location = path + 'ru/main.html';
			break;
		}
	}
}

function getElems()
{
	//alert('getElemns...');
	
	var a1 = new Array();
	var ee = document.form_01.elements;
	
	for( i=0; i < ee.length; i++ )
	{
		e = 	ee[ i ];
		if( e.type == 'checkbox' )
			a1[ e.name ] =  e.checked;
		else if( e.type == 'radio' )
		{
			if( e.checked )
				a1[ e.name ] =  e.value;
		}
		else
			a1[ e.name ] =  e.value;
	}
	return a1;
}

function getLang()
{
	var url = location.pathname;
	var lang01 = 'en';
	
	if( url.indexOf( '/de/') != -1 )
		lang01 = 'de';
	if( url.indexOf( '/pl/') != -1 )
		lang01 = 'pl';
	if( url.indexOf( '/ru/') != -1 )
		lang01 = 'ru';
	
	return lang01;
}

function onSubmit01()
{
		var a1 = getElems();
		
		var res = xajax.call( 'validateForm', { parameters: [ a1 ], mode:'synchronous' } );

	  if( res )
		 	res = xajax.call( 'sendEmail', { parameters: [ a1 ], mode:'synchronous' } );
	  	
	  if( res )
	  	window.location = '../'+getLang()+'/thanks.html';
}

function onCalculateImport(){ xajax.call( 'calculateImport', { parameters: [ getElems() ] } ); }
