var is_small=true;
function id(cid) { return document.getElementById(cid); }
function trim(a) { return a.replace(/(^\s+)|(\s+$)/g,''); }
function popup(url,w,h) {
	var popupwnd=window.open(url,'popupwnd','toolbar=no,scrollbars=yes,location=no,directories=no,status=no,menubar=no,fullscreen=no,width='+w+'px,height='+h+'px,top='+(screen.height-h)/2+',left='+(screen.width-w)/2+'');
	if (popupwnd) { popupwnd.focus(); }
	return false;
}
function form_param_submit() {
	$('#form_param').submit();
	return false;
}
function form_param_reset() {
	$("#form_param input").attr("checked", false);
	$('#motokod').val('');
	return false;
}
function change_big4(a) {
	id('pic4big').src='/graphics/4_moto_big_'+a+'.gif';
	return true;
}
function change_small4(a) {
	id('pic4small').src='/graphics/4_moto_small_'+a+'.gif';
	return true;
}
function pic_resize() {
	is_small=!is_small;
	if (is_small) {
		id('pic').className='pic_small';
	} else {
		id('pic').className='pic_big';
	}
	return true;
}
function rotate() {
	var rnd=Math.floor(4*Math.random())+1;
	if (rnd==roter) {
		rnd++;
		if (rnd==5) { rnd=1; }
	} else {
		roter=rnd;
	}
	id('td_bigpic').className='td_bigpic_'+rnd;
	setTimeout('rotate()',30000);
	return false;
}