

	function outRow(obj)
	{
		obj.style.backgroundColor = '';
	}
	
	
	function overRow(obj)
	{
		obj.style.backgroundColor = '#205809';
	}

	function addField()
	{
		var end = $('produkty_tbl');
		var ID = $('next_id').value * 1 + 1;
		$('next_id').value = ID;

		if (navigator.appName != 'Microsoft Internet Explorer')
		{
			
	    var tr = document.createElement('tr');
	    end.appendChild(tr);
		
		  var td1 = document.createElement('td');
	    tr.appendChild(td1);
		  var td2 = document.createElement('td');
	    tr.appendChild(td2);
		  var td3 = document.createElement('td');
	    tr.appendChild(td3);

	    var input1 = document.createElement('input');
	    input1.className='text';
	    input1.setAttribute('type', 'text');
	    input1.setAttribute('class', 'prod_text');
	    input1.setAttribute('id', 'prod_name_'+ID);
	    input1.setAttribute('name', 'prod_name['+ID+']');
	    td1.appendChild(input1);
	    
	    var input2 = document.createElement('input');
	    input2.className='text';
	    input2.setAttribute('type', 'text');
	    input2.setAttribute('class', 'prod_text');
	    input2.setAttribute('name', 'prod_pcs['+ID+']');
	    td2.appendChild(input2);
	    
	    var input3 = document.createElement('input');
	    input3.className='text';
	    input3.setAttribute('type', 'text');
	    input3.setAttribute('class', 'prod_text');
	    input3.setAttribute('name', 'prod_price['+ID+']');
	    td3.appendChild(input3);
		
			 $('nazev_'+ID).focus();
		}
		else
		{
    	var HTML = 
    	'<table>' +
    	'<tr> ' +
    	'<td><input type="text" name="prod_name[' + ID + ']" value="" class="prod_text"/></td>' +
    	'<td><input type="text" name="prod_pcs[' + ID + ']" value="" class="prod_text"/></td>' +
    	'<td><input type="text" name="prod_price[' + ID + ']" value="" class="prod_text"/></td>' +
    	'</tr>' +
    	'</table>';
    
    	$('produkty_tbl1').insertAdjacentHTML("beforeBegin", HTML);
		}
		
	}
	
	function checkDelivery()
	{
		if($('same_delivery').checked)
			$('delivery_box').style.display = 'none';
		else
			$('delivery_box').style.display = 'block';
		
	}
 
  function mailLink(part_1, part_2)
  {
    location.href='mailto:'+part_1 + '@' + part_2;
  }
