function formatNumber(mezo)
{
	szam=mezo.value;
	ujszam=szam.replace(/ /g,'');
	uj='';
	szamlalo=1;
	if (isNaN(ujszam))
		mezo.value=szam.substr(0,szam.length-1);
	else
	{
		szam=ujszam;
		for (i=szam.length-1;i>=0;--i)
		{
			ch=szam.substr(i,1);        //IE nem ismeri a szam[i] string elem formtumot!!!!!!
			uj=ch+uj;
			if (szamlalo==3)
			{
				uj=' '+uj;
				szamlalo=0;
			}
			szamlalo+=1;
				
		}
		mezo.value=uj;   
	}
}

function kepCsere(img)
{
	document.getElementById('nagykep').innerHTML='<img border=0 src='+img+' width=353>';
}
function nagykepCsere(nkep, mid, kid)
{
	ujkep='<img border=0 src="http://automery.hu/gallery/model_'+mid+'/'+kid+' width=358>';
	document.getElementById(nkep).innerHTML=ujkep;
}
function flashCsere(id,img,h)
{
	ujkep='<a href="http://automery.hu/gallery/model_'+id+'/flash/'+img+'" style="display:block;width:366px;height:'+h+'px" id="player"></a>'+
			'<script>'+
			'flowplayer("player", "img/flowplayer-3.1.1.swf");'+
		'</script>';
	document.getElementById('nagykep_fl').innerHTML=ujkep;
}
function checkModell(marka)
{
	if (marka=='hyundai')
	{
		document.location.target='_blank';
	    document.location.href='http://www.hyundai.hu/automery';
 }
}

