function galeryja_pop(as,as2,as3, car_id, scrol,ta,fullurl) 
{
	//alert('TESTUOJAMA');	
	var mxd_url=HTTP_HEADER+"/palnai.php?lang="+as+"&type="+car_id+"";
	if (fullurl) mxd_url=ta; 
	else if (ta!=null) 
	{
		mxd_url+="#"+ta;
	}
	var name= Math.floor(Math.random()*1000);
	var papas = window.open(mxd_url,name,"toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars="+scrol+",copyhistory=0,resizable=0,width="+as2+",height="+as3+"");
}

function cal_count()
{
var i=0;
var price_all=0;
var plot_4=0;
var plot_5=0;
while(i<40)
{
++i;
	if(document.getElementById("cheked_"+i))
	if(document.getElementById("cheked_"+i).checked==true)
	{
		if(document.getElementById("hiden_ty_"+i).value==4)
		{
		plot_4=plot_4+Number(document.getElementById("hiden_"+i).value);
		}
		else if(document.getElementById("hiden_ty_"+i).value==5)
		{
		plot_5=plot_5+Number(document.getElementById("hiden_"+i).value);
		}
	}
}

/*if(document.getElementById("cheked_"+i).checked==true)
{*/
var kaina_4=document.getElementById("input_4").value.replace(",",".");
var kaina_5=document.getElementById("input_5").value.replace(",",".");
if(!Number(kaina_4))
{
kaina_4=0;
}
if(!Number(kaina_5))
{
kaina_5=0;
}
document.getElementById("all_4").innerHTML=Math.round(kaina_4 * plot_4,2);
document.getElementById("all_5").innerHTML=Math.round(kaina_5 * plot_5,2);
document.getElementById("textfield_hid_4").value=Math.round(kaina_4 * plot_4,2);
document.getElementById("textfield_hid_5").value=Math.round(kaina_5 * plot_5,2);
var price_all=Math.round(kaina_5 * plot_5,2)+Math.round(kaina_4 * plot_4,2);
document.getElementById("all_is").innerHTML=price_all;
document.getElementById("all_is_h").value=price_all;
//alert('PIRMAS'+Math.round(plot_4,1)+"   "+Math.round(plot_5,1));
if(price_all!=0)
document.getElementById("kontakt").style.display="block";
/*if(!Number(kaina))
{
kaina=0;
}
document.getElementById("input_"+i).value=kaina;
var plot=document.getElementById("hiden_"+i).value;
price_all=price_all+(kaina * plot);
document.getElementById("vat_"+i).innerHTML=Math.round(kaina * plot,2);
}
}
if(price_all!=0)
document.getElementById("kontakt").style.display="block";
document.getElementById("all_is").innerHTML=Math.round(price_all,2);*/
}