function rowToForm (row, modelid)
{
	document.getElementById('action_input').value='edit_model';
	row.firstChild.firstChild.nextSibling.onclick = '';
	row.firstChild.firstChild.checked = true;
	row.firstChild.firstChild.disabled = true;
	var input = document.createElement('input');
	input.type="hidden";
	input.name="model_"+modelid;
	input.value="true";
	row.appendChild(input);
	var tds = row.getElementsByTagName('td');
	tds[1].innerHTML = '<input type="text" name="model_'+modelid+'_name" value="'+tds[1].firstChild.innerHTML+'" class="input_85" onchange="this.style.backgroundColor=\'#ffff88\';">';
	tds[3].innerHTML = '<input type="text" name="model_'+modelid+'_size" value="'+/(.*)/.exec(tds[3].innerHTML)[1]+'" class="input_30" onchange="this.style.backgroundColor=\'#ffff88\';">';
	tds[4].innerHTML = '<input type="text" name="model_'+modelid+'_confsize" value="'+tds[4].innerHTML+'" class="input_30" onchange="this.style.backgroundColor=\'#ffff88\';">';
	var size = /(.*)\/(.*)\/(.*)/.exec(tds[5].innerHTML);
	tds[5].innerHTML = '<input type="text" name="model_'+modelid+'_sizeTop" value="'+size[1]+'" class="input_30" onchange="this.style.backgroundColor=\'#ffff88\';">/'+
	'<input type="text" name="model_'+modelid+'_sizeMid" value="'+size[2]+'" class="input_30" onchange="this.style.backgroundColor=\'#ffff88\';">/'+
	'<input type="text" name="model_'+modelid+'_sizeBot" value="'+size[3]+'" class="input_30" onchange="this.style.backgroundColor=\'#ffff88\'">';
	tds[6].innerHTML = '<input type="text" name="model_'+modelid+'_sizeShoes" value="'+tds[6].innerHTML+'" class="input_30" onchange="this.style.backgroundColor=\'#ffff88\';">';
	tds[7].innerHTML = '<input type="text" name="model_'+modelid+'_colorHair" value="'+tds[7].innerHTML+'" class="input_85" onchange="this.style.backgroundColor=\'#ffff88\';">';
	tds[8].innerHTML = '<input type="text" name="model_'+modelid+'_colorEyes" value="'+tds[8].innerHTML+'" class="input_85" onchange="this.style.backgroundColor=\'#ffff88\';">';
}
Ê
