
  function initialize(booth_type,booth_layout,booth)
  {
    // not used
  }

  /**
   *@desc Funktion zum Austausch der oberen Grafik
   */
  function RetrievePreviewfileTop(boothtype, boothlayout)
  {
    var res = "";
    var filename = "";
    var fileprefix = "top_";
    var filename = fileprefix + boothtype + "_" + boothlayout;
    var filepath = "mes_standkonfigurator/specialpages/konfigurator/templates/img/top/";
    
    filename = filename + "_" + actual_preview[0]["actual_panelcolor"];
    res = filepath + filename + ".jpg";
    ChangeImageById('step3_image_preview_top',res);
  }
  
  /**
   *@desc Funktion zum austausch der unteren grafik
   */
  function RetrievePreviewfileBottom(boothtype, boothlayout)
  {
    var res = "";
    var filename = "";
    var fileprefix = "bot_";
    var filename = fileprefix + boothtype + "_" + boothlayout;
    var filepath = "mes_standkonfigurator/specialpages/konfigurator/templates/img/bottom/";
    
    filename = filename + "_" + actual_preview[0]["actual_tablarposition"];  	// nicht visualisiert
    
    filename = filename + "_" + actual_preview[0]["actual_carpetcolor"];
    filename = filename + "_" + actual_preview[0]["actual_tablecolor"];
    filename = filename + "_" + actual_preview[0]["actual_chaircolor"];
    filename = filename + "_" + actual_preview[0]["actual_trashcancolor"];
    
    filename = filename + "_" + actual_preview[0]["actual_cabinposition"];		// nicht visualisiert
    filename = filename + actual_preview[0]["actual_infodesk_option"];		// visualisiert - unterstich in wert hier beinhaltet zur rückwärtskompatibilität spring summer
    
    res = filepath + filename + ".jpg";
    ChangeImageById('step3_image_preview_bottom',res);
  }

  /**
   *@desc  function for exchanging an image by its given id
   */
  function ChangeImageById(imgid,filename)
  {
    if(imageelement = document.getElementById(imgid))
    {
      imageelement.src = filename;
    }
  }
  
  /**
   *@desc
   */
  function ChangePreview(elid,eloptionid,elementid,elementkey,boothtype,boothlayout,viewpos)
  {
    if(element = document.getElementById(elid + "_" + eloptionid))
    {
      actual_preview[0][elementkey] = element.value;
      if(viewpos == "top")
        RetrievePreviewfileTop(boothtype,boothlayout);
      else
        RetrievePreviewfileBottom(boothtype,boothlayout);
    }
  }

  function IsValueInt(intvalue)
  {
    if(isNaN(intvalue) == false && intvalue >= 0)
    {
      return true;
    }
    else
    {
      return false;
    }
  }
  
  function ActivateAndFocusFormElementById(elid,msg)
  {
    if(document.getElementById('checkbox_' + elid))
    {
      chkbox_handle = document.getElementById('checkbox_' + elid);
      if(chkbox_handle.checked)
      {
        if(document.getElementById(elid))
        {
          elhandle = document.getElementById(elid);
          elhandle.readOnly = false;
          elhandle.className = "";
          alert(msg);
          setTimeout("fieldFocus('" + elid + "')", 100 );
          
        }
      }
      else
      {
        if(document.getElementById(elid))
        {
          elhandle = document.getElementById(elid);
          elhandle.readOnly = true;
          elhandle.className = "readonly";
        }
      
      }
    }
  }
  
  function SelectAndFocusFormElementById(elid,msg)
  {
    if(document.getElementById(elid))
    {
      alert(msg);
      elhandle = document.getElementById(elid);
      setTimeout("fieldFocus('" + elid + "')", 100 );
    }
  }
  
  function fieldFocus(elid) {
    if(elhandle = document.getElementById(elid))
    {
	  elhandle.focus();
	  elhandle.select();
    }
  }
  
  function ChangePanelTextCounter(value)
  {
    tmpvalue = value.replace(/ /,"");
    if(elcounter = document.getElementById("baseset_panel_text_length"))
    {
      elcounter.value = tmpvalue.length;
    }
  }
  
  function CalculateCharsLimit(value,limit)
  {
    res = false;
    
    tmpvalue = value.replace(/ /,"");
    
    if(tmpvalue.length > limit)
    {
      /* res = tmpvalue.length - limit; */
      
      res = true;
    }
    return res;
  }
  
  function EnableExportButtons()
  {
    if(document.getElementById('button_export_pdf'))
    {
    
    }
    
    if(document.getElementById('button_export_mail'))
    {
    
    }
  }
