 var sInitColor;

 function callColorDlg(src,vl){
  if(sInitColor == null)
   var sColor = dlgHelper.ChooseColorDlg();
  else
   var sColor = dlgHelper.ChooseColorDlg(sInitColor);

  sColor = sColor.toString(16);
  if (sColor.length < 6) {
   var sTempString = "000000".substring(0,6-sColor.length);
   sColor = sTempString.concat(sColor);
  }

  document.all[src].style.backgroundColor = '#' + sColor;
  document.all[vl].value = sColor;
  sInitColor = sColor;
 }