function show_first(id, count) {

		if (div = document.getElementById(id)) {
		
			for(i=1;i<=count;i++) {
				var temp = 'first_'+i;
				if(id != temp) {
					document.getElementById('first_'+i).style.display = 'none';
				}
			}
			
			if (div.style.display == "none") 
			{
				div.style.display = '';
			} else {
				div.style.display = 'none';
			}
		}
}

function show_second(id, count) {
		
		for(i=1;i<=count;i++) {
			var temp = 'second_'+i;
			if(id != temp) {
				if(document.getElementById('second_'+i) != null) {
					document.getElementById('second_'+i).style.display = 'none';
				}
			}
		}
		
		if (div = document.getElementById(id)) {
			if (div.style.display == "none") 
			{
				div.style.display = '';
			} else {
				div.style.display = 'none';
			}
		}
}

function change1img(img) {

		var image = document.getElementById('product_image_big');

		var tmp = '<img style="border: 4px solid #C77F69; padding: 2px;" border="0" src="/resizer.php?img=';

		tmp += img;

		tmp += '&w=206&h=317" alt="&nbsp;" />';

		

		image.innerHTML = tmp;

		

}

function get_price(price, element, amount) {
	var final_price = document.getElementById(price).innerHTML * amount.value;
	
	document.getElementById('last_'+element).innerHTML = final_price.toFixed(2);
	
	var elements_count = document.getElementById('elements').value;
	
	last_price = 0;
	
	for (i=1;i<=elements_count;i++) {
		last_price = parseFloat(document.getElementById('last_'+i).innerHTML) + last_price;
	}
	
	document.getElementById('all_price').innerHTML = last_price.toFixed(2);
	
	
	
}





