<script type="text/javascript">
function some_function() {
	var checked = document.dataform.invoice.checked;
	if(checked){
		$("#cname_row").show();
		$("#caddress_row").show();
		$("#nip_row").show();
	}else{
		$("#cname_row").hide();
		$("#caddress_row").hide();
		$("#nip_row").hide();	
	}
  	

}
$(document).ready(function() {
	$("#cname_row").hide();
	$("#caddress_row").hide();
	$("#nip_row").hide();

 });
</script> 
<div class="zamowienie_left">
	<h3><?=ucfirst($this->site['zamowienie']);?></>:</h3>
	<table>
	<?php   
		echo '<tr><td><h3 class="blue">'.ucfirst($this->site['puffa']).'/'.$this->site['fotel'].' '.$parent['title'].':</h3></td><td><a href="/files/img/products/'.$parent['photo'].'" rel="shadowbox[zamowienie]"><img src="/files/img/products/min/'.$parent['photo'].'" alt=""/></a></td></tr>';
		echo '<tr><td><h3 class="blue">Cover '.$child['title'].':</h3></td><td><a href="/files/img/products/'.$child['photo'].'" rel="shadowbox[zamowienie]"><img src="/files/img/products/min/'.$child['photo'].'" alt=""/></a></td></tr>';
	?>
	<tr><td><h3 class="green"><?=ucfirst($this->site['cena_kompletu']);?>:</h3></td><td><h3 class="green"><?=$complet['complet_price'];?></h3></td></tr>
	</table>
	<?php
		$tablica = explode('/', $_SERVER['HTTP_REFERER']);
		echo '<a href="/'.$tablica[3].'/'.$parent['friendlyurl'].'-'.$parent['idproducts'].'.html"><< '.$this->site['powrot'].'</a>';
	?>
</div>
<div class="zamowienie_right">
	<table>
	<?php 
		$js = 'onClick="some_function()"';
		echo validation_errors(); 
		echo form_open($tablica[3].'/order-'.$idparent.'-'.$idchild.'.php', array('name' => 'dataform'));
		echo '<tr><td>'.ucfirst($this->site['ilosc']).':</td><td>'.form_input(array('name'=>'count', 'value'=>set_value('count'))).'</td></tr>';
		echo '<tr><td>'.ucfirst($this->site['imie']).':</td><td>'.form_input(array('name'=>'fname', 'value'=>set_value('fname'))).'</td></tr>';
		echo '<tr><td>'.ucfirst($this->site['nazwisko']).':</td><td>'.form_input(array('name'=>'sname', 'value'=>set_value('sname'))).'</td></tr>';
		echo '<tr><td>Email:</td><td>'.form_input(array('name'=>'email', 'value'=>set_value('email'))).'</td></tr>';
		echo '<tr><td>'.ucfirst($this->site['telefon']).':</td><td>'.form_input(array('name'=>'phone', 'value'=>set_value('phone'))).'</td></tr>';
		echo '<tr><td>'.ucfirst($this->site['adres_dostawy']).':</td><td>'.form_textarea(array('name'=>'address','value'=>set_value('address'),'rows'=>'5', 'cols'=>'30')).'</td></tr>';
		echo '<tr><td>'.ucfirst($this->site['wiadomosc']).':</td><td>'.form_textarea(array('name'=>'additional_data','value'=>set_value('additional_data'),'rows'=>'5', 'cols'=>'30')).'</td></tr>';
		echo '<tr><td>'.ucfirst($this->site['faktura']).':</td><td>'.form_checkbox('invoice', 'accept', FALSE, $js).'</td></tr>';
		echo '<tr id="cname_row"><td>'.ucfirst($this->site['firma']).':</td><td>'.form_input(array('name'=>'cname', 'value'=>set_value('cname'))).'</td></tr>';
		echo '<tr id="caddress_row"><td>'.ucfirst($this->site['adres_firmy']).':</td><td>'.form_input(array('name'=>'caddress', 'value'=>set_value('caddress'))).'</td></tr>';
		echo '<tr id="nip_row"><td>NIP:</td><td>'.form_input(array('name'=>'nip', 'value'=>set_value('nip'))).'</td></tr>';
		echo '<tr><td></td><td>'.form_submit(array('name'=>'submit', 'value'=>ucfirst($this->site['zamow']),'class'=>'zamow')).'</td></tr>';
	
	?>
	</table>
</div>
			