var TkFragmentLogo = Class.create();
TkFragmentLogo.prototype = {
  initialize: function(container, id, assetPath, options) {
    this.container = container;
    this.id = id;
    this.assetPath = tkRootCMS + assetPath;
    this.options = {
      company: tkCompany,
      intranet: tkIntranet
    };
    Object.extend(this.options, options || {});
  },

  write: function() {
    var list = [];
    list.push('<div id="' + this.id + '">');
    list.push(  '<table cellspacing="0" cellpadding="0" style="width: auto;">');
    list.push(  '<tbody>');
    if (this.options.company == 'mtkl') {
      list.push('<tr>');
      list.push(  '<td>');
      list.push(    '<a href="' + tkRoot + '">');
      list.push(      '<img style="border: none;" src="' + this.assetPath + 'image/mtkl.gif" alt="MTK Logistics" />');
      list.push(    '</a>');
      list.push(  '</td>');
      list.push('</tr>');
    } else {
      list.push('<tr>');
      // if (this.options.company != 'tkmna' && this.options.company != 'tkxa') {
        // list.push('<td rowspan="2">');
    	// list.push(  '<a href="' + tkRoot + '">');
    	// list.push(    '<img style="border: none;" src="' + this.assetPath + 'image/services-company.gif" alt="A ThyssenKrupp Services company" />');
    	// list.push(  '</a>');
    	// list.push('</td>');
      // }
      list.push('<td>');
      list.push(  '<a href="' + tkRoot + '">');
      if (this.options.company == 'tkxa' || this.options.company == 'tmxa' || this.options.company == 'aerospace') {
        list.push(  '<img style="border: none;" src="' + this.assetPath + 'image/tkaerospace.gif" alt="ThyssenKrupp Aerospace" />');
      } else {
        list.push(  '<img style="border: none;" src="' + this.assetPath + 'image/materials.gif" alt="ThyssenKrupp Materials NA" />');
      }
      list.push(  '</a>');
      list.push('</td>');
      if (this.options.intranet) {
        list.push('<td rowspan="2" style="vertical-align: top;">');
        list.push(  '<a href="' + tkRoot + '">');
        list.push(    '<img style="border: none;" src="' + this.assetPath + 'image/intranet.gif" alt="Intranet" />');
        list.push(  '</a>');
        list.push('</td>');
      }
      list.push('</tr>');
      if (this.options.company != 'tkmna' && this.options.company != 'tkxa') { 
        list.push('<tr>');
        list.push(  '<td>');
        list.push(    '<a href="' + tkRoot + '">');
        list.push(      '<img style="border: none;" src="' + this.assetPath + 'image/' + this.options.company + '.gif" alt="ThyssenKrupp" />');
        list.push(    '</a>');
        list.push(  '</td>');
        list.push('</tr>');
      }
    }
    list.push(  '</tbody>');
    list.push(  '</table>');
    list.push('</div>');
    list.each(function(html) { document.write(html) });
  }
}
