
var activeLayer = '';

function updatePrice() {
	var key = '';

	for (i=1; i<6; i++) {
		var o = document.getElementById('p'+i);

		if (o!=null && typeof(o)=='object') {
			if (key!='') {key += '_';}
			key += o.value;
		}
	}

	var o = document.getElementById('divPrice');

	if (o!=null && typeof(o)=='object') {
		var s = '';

		s += '<table width="280" border="0" cellpadding="0" cellspacing="0">';
		s += '<tr>';
		s += '<td align="left"><span style="font-size:10pt; font-family: Arial; color: #000000;">'+gui_order+' '+items[key][1]+'</span></td>';
		s += '<td align="right"><span style="font-size:10pt; font-family: Arial; color: #000000;">';
		if (separate_vat) {
			s += gui_net+' '+items[key][3]+' </span></td></tr>';
			s += '<tr><td>&nbsp;</td><td align="right"><span style="font-size:10pt; font-family:Arial; color: #000000; font-weight: bold;">'+gui_gross+' '+items[key][4]+' </span></td></tr>';
		} else {
			s += gui_price+' '+items[key][2]+' </span></td></tr>';
		}

		if (items[key][5]!='') {
			s += '<tr>';
			s += '<td colspan="2" align="right"><a href="'+items[key][5]+'">'+gui_add_normal+'</a></td>';
			s += '</tr>';
		}
		s += '</table>';

		o.innerHTML = s;
	}
}

function switchLayer(id) {
  if (activeLayer!='' && activeLayer!=id) {
    obj = document.getElementById(activeLayer);
    if (typeof(obj)=='object') {
      obj.style.display = 'none';
      obj.style.visibility = 'hidden';
    }
  }
  obj = document.getElementById(id);
  if (typeof(obj)=='object') {
    if (obj.style.visibility=='visible') {
      obj.style.display = 'none';
      obj.style.visibility = 'hidden';
      activeLayer = '';
    } else {
      obj.style.display = 'block';
      obj.style.visibility = 'visible';
      activeLayer = id;
    }
  }
}

function submitNation() {
	if (document.frmSel.sys_nation.value.substring(0,6)!='extern') {
		document.frmSel.sys_sel_action.value='nation';
		document.frmSel.submit();
	} else {
		var x = window.open(document.frmSel.sys_nation.value.substring(7,document.frmSel.sys_nation.value.length), 'extern');
	}
}

function submitsearch(ev) {
	if (document.frmSel.sys_search.value!='') {
		if (navigator.appName=='Netscape') {
			if (ev.which==13) {document.frmSel.submit();}
		} else if (navigator.appName=='Microsoft Internet Explorer') {
			if (window.event.keyCode==13) {document.frmSel.submit();}
		}
	}
}

function checkagb() {
  if (document.agbfrm.agb.checked) {
    document.agbfrm.submit();
  } else {
    alert(gui_agbmsg);
  }
}


