function setDefaultValues() {
  Widget.elem.customData['type'] = 'h1';
  Widget.elem.customData['currentValues'] = [
    {name: 'Color', type: 'color', value: '#000000'},
    {name: 'Font', type: 'combobox', value: 'Arial - Helvetica - sans-serif,Arial - Helvetica - sans-serif,Arial Black - Gadget - sans-serif,Comic Sans MS - cursive,Courier New - Courier - monospace,Geneva - Arial - Helvetica - sans-serif,Georgia - Times New Roman - Times - serif,Impact - Charcoal - sans-serif,Lucinda Sans Unicode - Lucinda Grande - sans-serif,Palatino Linotype - Book Antiqua - Palatino - serif,Tahoma - Geneva - sans-serif,Times New Roman - Times - serif,Trebuchet MS - Helvetica - sans-serif,Verdana - Arial - Helvetica - sans-serif'},   
    {name: 'Size', type: 'number', value: '18'},
    {name: 'Line height', type: 'text', value: ''},
    {name: 'Weight', type: 'combobox', value: 'bold,normal,bold'},
    {name: 'Style', type: 'combobox', value: 'normal,normal,italic,oblique'},
    {name: 'Text', type: 'text', value: 'Heading 1'}
  ];

}

function applyCurrentValues() {
  var values = Widget.elem.customData['currentValues'];
  var e = Widget.GetObjectByName('h1');
  
  e.pathAttributes.fillColor = values[0].value; 
  e.font = values[1].value.split(' - ')[0];
  e.fontsize = parseInt(values[2].value);
  e.bold = (values[4].value.split(',')[0].toLowerCase() == 'bold');
  e.italic = (values[5].value.split(',')[0].toLowerCase() == 'italic' || values[5].value.split(',')[0].toLowerCase() == 'oblique');
  e.textChars = (values[6].value.length <= 0 ? 'Heading 1' : values[6].value);

  Widget.elem.customData['html'] = '<h1>' + e.textChars + '</h1>';
  Widget.elem.customData['css'] = 	"\tcolor: "+values[0].value+
									";\n\tfont-family: "+values[1].value.split(',')[0].replace(/ - /g,", ")+
									";\n\tfont-size: "+parseInt(values[2].value)+"px"+
									";\n\tline-height: "+values[3].value+
									";\n\tfont-weight: "+values[4].value.split(',')[0]+
									";\n\tfont-style: "+values[5].value.split(',')[0]+";\n";
}

switch(Widget.opCode) {
  case 1: setDefaultValues(); break;
  case 2: applyCurrentValues(); break;
}