var c1 = new Array('250','500','1000','2000','3000','4000','5000','6000','7000','8000','10000','12500','15000','17500','20000','25000','30000','40000','50000','75000','100000');

var c2 = new Array('2:2:2:2:2:3:3:3:3:3',
										'2:3:3:4:4:4:4:4:4:5',
									 '3:4:5:6:6:7:7:7:7:7',
									 '5:8:10:11:12:13:13:14:14:14',
									 '7:12:15:16:18:18:19:20:20:21',
									 '10:16:19:22:24:25:25:27:27:28',
									 '12:20:24:27:29:31:32:33:33:34',
									 '14:24:28:33:35:37:37:39:41:41',
									 '17:27:34:38:41:42:46:46:47:48',
									 '20:32:38:44:48:49:50:51:53:54',
									 '24:39:47:54:58:62:64:66:67:68',
									 '30:48:61:68:73:78:80:81:82:85',
									 '37:57:70:81:87:92:94:99:102:104',
									 '42:68:84:95:100:110:111:113:116:118',
									 '48:77:95:107:115:120:127:131:133:136',
									 '60:96:122:133:146:156:159:162:165:171',
									 '73:114:141:163:174:184:188:194:197:201',
									 '95:156:188:217:231:243:249:257:266:271',
									 '120:192:238:267:290:305:312:322:330:337',
									 '177:292:357:403:432:455:470:485:491:508',
									 '239:387:475:515:542:562:583:593:620:633');

//==================================================================================================
function alkoinzenske(y)
{
	var x=parseInt(y);
	if((document.cela_forma.checbox_alko.checked) & (document.cela_forma.checbox_zenske.checked))
		return x+=Math.round(x*0.26);
	if((document.cela_forma.checbox_alko.checked) || (document.cela_forma.checbox_zenske.checked))
		return x+=Math.round(x*0.13);
	else
		return x;
}
//==================================================================================================
function zapis(element)
{

	var st_ljudi=element.value;
	var izbrani_index;
	
	for(var x=0;x<21;x++)
	{
		if(c1[x]==st_ljudi)
		izbrani_index=x;
	}
	
	var wcji=" ";
	wcji=(c2[izbrani_index]);
	var wcji_polje=wcji.split(':');
	
	var t = document.getElementsByName('oknox');
	
	for(var i=0;i<10;i++)
	{
		t[i].value=alkoinzenske(wcji_polje[i]);
	}
}
//==================================================================================================
function izbira()
{
	var meni = document.getElementById('meni');
	zapis(meni);
}

function Popup(url, h, w, title) {
var poph = + h + 40 
var popw = + w + 15
if(screen.width){
  var winl = (screen.width-w)/2;
  var wint = (screen.height-h)/2;
  }else{winl = 0;wint =0;}
  if (winl < 0) winl = 0;
  if (wint < 0) wint = 0;
disp = window.open("","pop","height=" + poph + ",width=" + popw + ",left=" + winl + ",top=" + wint + "");
var content = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><HTML>';
content += '<HEAD>';
content += '<title>Vigrad</title>';
content += '</HEAD>';
content += '<BODY style="margin: 5px; padding: 0px;" link="#262626" alink="#262626" vlink="#262626" bgcolor="#EBF2F3">';
content += '<div align="center"><table width="' + w + '" border="0" cellpadding="0" cellspacing="0"><tr><td colspan="2"><a href="#" onClick="self.close()"><img style="border: 1px solid #525252" src="' + "images/" + url + '" height="' + h + '" width="' + w + '" border="0" alt="' + title + '" /></a></td></tr>';
content += '<tr><td valign="top" align="left"><font style="font-family: Tahoma; font-size: 11px;"><b>' + title + '</b></font></td><td valign="top" align="right"><font style="font-family: Tahoma; font-size: 11px;"><a href="#" onClick="self.close()">Zapri okno</a></font></td></tr></table>';
content += '</div></BODY></HTML>';
disp.document.write(content);
disp.document.close();
}