 e = ' &euro;';
 nb = '&nbsp;';
 
 function setRes(rId) {
  if (rId != '') {
   v1 = trackbar.getObject(rId).leftValue;
   ih(rId+'IdVal', dl(ch(rId)*v1)+e);

   if (rId != 'sum') {
    v2 = trackbar.getObject(rId+'Y').leftValue;
    ih(rId+'1IdVal', dl(ch(rId)*Math.round(v1*v2*12*0.01)));
	 ih(rId+'YIdVal', nb + dl(ch(rId)*v2));

	if (rId == 'sach') {
	 ih(rId+'4IdVal', dl(ch(rId)*Math.round(v1*v2*12*0.09)));
	}
	else {
	 ih(rId+'4IdVal', dl(ch(rId)*Math.round(v1*v2*12*0.04)));
	}
   }
   else { ih(rId+'4IdVal', dl(ch(rId)*Math.round(v1*0.04))+e); }
   

  }

/*
  p1 = Math.round(ch('verm')*trackbar.getObject('verm').leftValue*trackbar.getObject('vermY').leftValue*12*0.01)+
		Math.round(ch('gold')*trackbar.getObject('gold').leftValue*trackbar.getObject('goldY').leftValue*12*0.01)+
//		Math.round(ch('inv')*trackbar.getObject('inv').leftValue*trackbar.getObject('invY').leftValue*12*0.01)+
//		Math.round(ch('sach')*trackbar.getObject('sach').leftValue*trackbar.getObject('sachY').leftValue*12*0.01)+
		ch('sum')*trackbar.getObject('sum').leftValue*0.04;
//  ih('tot1IdVal', dl(p1));
  
  p4 = Math.round(ch('verm')*trackbar.getObject('verm').leftValue*trackbar.getObject('vermY').leftValue*12*0.04)+
		Math.round(ch('gold')*trackbar.getObject('gold').leftValue*trackbar.getObject('goldY').leftValue*12*0.04)+
//		Math.round(ch('inv')*trackbar.getObject('inv').leftValue*trackbar.getObject('invY').leftValue*12*0.04)+
//		Math.round(ch('sach')*trackbar.getObject('sach').leftValue*trackbar.getObject('sachY').leftValue*12*0.09)+
		ch('sum')*trackbar.getObject('sum').leftValue*0.04;
//  ih('tot4IdVal', dl(p4));
*/
 }
 
 function ch(chId) {
  return 1;
//  if (eval('document.form1.'+chId+'Check.checked')) { return 1; }
//  else { return 0; }
 }

/*
//function sc_init() {
 trackbar.getObject('sum').init({
	onMove : function() {
	 setRes('sum');
	},
	dual : false, // two intervals
	width : 320, // px
	leftLimit : 1000, // unit of value
	leftValue : 10000, // unit of value
	rightLimit : 50000, // unit of value
	rightValue : 0, // unit of value
	roundUp: 100,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "sumId");
 
 trackbar.getObject('verm').init({
	onMove : function() { 
	 setRes('verm');
	},
	dual : false, // two intervals
	width : 200, // px
	leftLimit : 34, // unit of value
	leftValue : 50, // unit of value
	rightLimit : 74, // unit of value
	rightValue : 0, // unit of value
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "vermId");


 trackbar.getObject('vermY').init({
	onMove : function() {
	 setRes('verm');
	},
	dual : false, // two intervals
	width : 70, // px
	leftLimit : 7, // unit of value
	leftValue : 20, // unit of value
	rightLimit : 31, // unit of value
	rightValue : 0, // unit of value
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "vermYId");
*/

 trackbar.getObject('gold').init({
	onMove : function() {
	 setRes('gold');
	},
	dual : false, // two intervals
	width : 200, // px
	leftLimit : 50, // unit of value
	leftValue : 100, // unit of value
	rightLimit : 500, // unit of value
	rightValue : 0, // unit of value
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "goldId");
 
 trackbar.getObject('goldY').init({
	onMove : function() {
	 setRes('gold');
	},
	dual : false, // two intervals
	width : 70, // px
	leftLimit : 10, // unit of value
	leftValue : 20, // unit of value
	rightLimit : 35, // unit of value
	rightValue : 0, // unit of value
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "goldYId");

/*
 trackbar.getObject('inv').init({
	onMove : function() {
	 setRes('inv');
	},
	dual : false, 
	width : 200,
	leftLimit : 50,
	leftValue : 100,
	rightLimit : 500,
	rightValue : 0,
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "invId");
 
 trackbar.getObject('invY').init({
	onMove : function() { 
	 setRes('inv');
	},
	dual : false,
	width : 70,
	leftLimit : 10,
	leftValue : 20,
	rightLimit : 35,
	rightValue : 0,
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "invYId");
 */
/*
 trackbar.getObject('sach').init({
	onMove : function() {
	 setRes('sach');
	},
	dual : false, 
	width : 200,
	leftLimit : 50,
	leftValue : 100,
	rightLimit : 500,
	rightValue : 0,
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "sachId");
 
 trackbar.getObject('sachY').init({
	onMove : function() { 
	 setRes('sach');
	},
	dual : false,
	width : 70,
	leftLimit : 10,
	leftValue : 20,
	rightLimit : 30,
	rightValue : 0,
	roundUp: 1,
	clearLimits : true,
	clearValues : true,
	hehe : ":-)"
 }, 
 "sachYId");
*/