// Sweet Function that Expands/Collapses

function showLog() {
  var d = document;
  if (d.getElementById('fullt').style.display == "none") {
    d.getElementById('sum').style.display = "none";
    d.getElementById('fullt').style.display = "";
  } else {
    d.getElementById('fullt').style.display = "none";
    d.getElementById('sum').style.display = "";
  }
}

function iFrameHeight(obj) {
  aID = obj.id;

  // if contentDocument exists, W3C compliant (Mozilla)
  if (document.getElementById(aID).contentDocument){
     obj.height = document.getElementById(aID).contentDocument.body.scrollHeight;
  } else {
   // IE
     obj.style.height = document.frames[aID].document.body.scrollHeight;
  }
}




//PNG transparent
 function correctPNG()  { // correctly handle PNG transparency in Win IE 5.5 or higher.
        for(var i=0; i<document.images.length; i++)  {
          var img = document.images[i]
          var imgName = img.src.toUpperCase()
          if (imgName.substring(imgName.length-3, imgName.length) == "PNG")  {
            var imgID = (img.id) ? "id='" + img.id + "' " : ""
            var imgClass = (img.className) ? "class='" + img.className + "' " : ""
            var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
            var imgStyle = "display:inline-block;" + img.style.cssText
            if (img.align == "left") imgStyle = "float:left;" + imgStyle
            if (img.align == "right") imgStyle = "float:right;" + imgStyle
            if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
            var strNewHTML = "<span " + imgID + imgClass + imgTitle
            + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
            + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
            + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
            img.outerHTML = strNewHTML
            i = i-1
          }
        }
      }
     



 function popUp(mypage,myname,w,h,scroll)  {
       LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;
       TopPosition = (screen.height) ? (screen.height-h)/2 : 0;
       settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable';
       win = window.open(mypage,myname,settings);
     }
     
     
     

// Set the cookie.
// SetCookie('your_cookie_name', 'your_cookie_value', exp);
function SetCookie (meincookie, meinwert) {  
  var a = new Date();
  a = new Date(a.getTime() +2*60*60*24*365);
  document.cookie = meincookie+'='+meinwert+'; expires='+a.toGMTString()+';';
}


function fill_form() {
var Stueckgutsortierung;
var Trolleylose_Technik;
var Trolleytechnik;
var Manuelle_Technik;
var IT_Gesamtloesungen;

  var alleCookies = document.cookie;
  var cookieArr = alleCookies.split("; ");

  for(var i=0;i<cookieArr.length;i++) {
    eval(cookieArr[i].split("=")[0]+'=true; ');
  }


  if (Stueckgutsortierung != undefined) {
    document.info_form.Stueckgutsortierung.checked = true;
  }

  if (Trolleylose_Technik  != undefined) {
    document.info_form.Trolleylose_Technik.checked = true;
  }

  if (Trolleytechnik  != undefined) {
    document.info_form.Trolleytechnik.checked = true;
  }

  if (Manuelle_Technik  != undefined) {
    document.info_form.Manuelle_Technik.checked = true;
  }

  if (IT_Gesamtloesungen   != undefined) {
    document.info_form.IT_Gesamtloesungen.checked = true;
  }

  
}




