function changeInfoPicOver(picname, info_var){
   pfadstring = window.location.host;
   if(pfadstring == 'server'){
      pfadstring = "http://" + pfadstring + "/sloggahouseshop/";
   }
   pfadstringlength = pfadstring.length;
   lastslash = pfadstring.lastIndexOf("/")+1;
   navsw = window.navigator['userAgent'];

   if(pfadstringlength == lastslash){
      document['info' + picname].src = pfadstring + "/templates/sloggahouse/img/" + picname + "hover.gif";
      if(navsw.indexOf("MSIE 5.5") == -1 && navsw.indexOf("MSIE 6.0") == -1){
         document.body.style.cursor='pointer';
      }else{
         document.body.style.cursor='hand';
      }
   }else{
      pfadstring = pfadstring.substr(0,lastslash);
      document['info' + picname].src = pfadstring + "templates/sloggahouse/img/" + picname + "hover.gif";
      if(navsw.indexOf("MSIE 5.5") == -1 && navsw.indexOf("MSIE 6.0") == -1){
         document.body.style.cursor='pointer';
      }else{
         document.body.style.cursor='hand';
      }
   }
}
function changeInfoPicOut(picname, info_var){
   pfadstring = window.location.host;
   if(pfadstring == 'server'){
      pfadstring = "http://" + pfadstring + "/sloggahouseshop/";
   }
   pfadstringlength = pfadstring.length;
   lastslash = pfadstring.lastIndexOf("/")+1;

   if(pfadstringlength == lastslash){
      document['info' + picname].src = pfadstring + "/templates/sloggahouse/img/" + picname + ".gif";
      document.body.style.cursor='default';
   }else{
      pfadstring = pfadstring.substr(0,lastslash);
      document['info' + picname].src = pfadstring + "templates/sloggahouse/img/" + picname + ".gif";
      document.body.style.cursor='default';
   }
}

/******************************************************************
           AGB, Pay and Delivery Window Functions
******************************************************************/

var infoalphadiv = 0;
function alphaIEToDark(){
   //alert("Alpha IE started");
   tabletoalpha.style.filter = "Alpha(opacity="+infoalphadiv+")";

   if(navsw.indexOf("MSIE 5.5") >= 1 || navsw.indexOf("MSIE 6.0") >= 1){
      selecttohide = document.getElementById('product_options_holder');
      selecttohide.style.display = "none";
      select2tohide = document.getElementById('manufacturers_holder');
      select2tohide.style.display = "none";
   }

   if(infoalphadiv != 80){
      infoalphadiv = infoalphadiv + 20;
      setTimeout('alphaIEToDark()', 1);
   }else{
      div2toshow.style.display = "block";
   }
}
function alphaIEToLight(){
   tabletoalpha.style.filter = "Alpha(opacity="+infoalphadiv+")";
   if(infoalphadiv != 0){
      infoalphadiv = infoalphadiv - 20;
      setTimeout('alphaIEToLight()', 1);
   }else{
      divtohide.style.display = "none";
      if(navsw.indexOf("MSIE 5.5") >= 1 || navsw.indexOf("MSIE 6.0") >= 1){
         selecttoshow = document.getElementById('product_options_holder');
         selecttoshow.style.display = "block";
         select2toshow = document.getElementById('manufacturers_holder');
         select2toshow.style.display = "block";
      }
   }
}
function alphaMozToDark(){
   //alert("Alpha Mozilla started");
   tabletoalpha.style.MozOpacity = infoalphadiv;
   if(infoalphadiv < 0.8){
      infoalphadiv = infoalphadiv + 0.2;
      setTimeout('alphaMozToDark()', 1);
   }else{
      div2toshow.style.display = "block";
   }
}
function alphaMozToLight(info_var){
   tabletoalpha.style.MozOpacity = infoalphadiv;
   if(infoalphadiv > 0){
      infoalphadiv = infoalphadiv - 0.2;
      setTimeout('alphaMozToLight()', 1);
   }else{
      divtohide.style.display = "none";
   }
}

/************************* AGB *****************************/

function newInfoHolderPosition(info_var){

   divtoshow = document.getElementById('infodiv1');
   div2toshow = document.getElementById('infodiv2');

   if(document.all){
      scrollhoehe  = document[docEl].scrollTop;
      divtoshow.style.top = scrollhoehe;
      div2toshow.style.top = scrollhoehe;
   }else{
      scrollhoehe  = document[docEl].scrollTop;
      divtoshow.style.top = scrollhoehe + "px";
      div2toshow.style.top = scrollhoehe + "px";
   }


}

var docEl = (typeof document.compatMode != "undefined" && document.compatMode != "BackCompat")? "documentElement" : "body";
var table_color;
function infoGreater(info_var){
   table_bg = document.getElementById('infotable11');
   if(info_var == 1){
      table_bg.style.backgroundColor = "#FF9F00";
      info_var = "delivery";
      infotextfield = document.getElementById('info_text_field');
      infotextfield.value = "Lieferzeiten und Versandoptionen";
   }
   if(info_var == 3){
      table_bg.style.backgroundColor = "#00FF00";
      info_var = "agb";
      infotextfield = document.getElementById('info_text_field');
      infotextfield.value = "Allgemeine Geschäftsbedingungen (AGB)";
   }
   if(info_var == 9){
      table_bg.style.backgroundColor = "#00C0FF";
      info_var = "pay";
      infotextfield = document.getElementById('info_text_field');
      infotextfield.value = "Zahlungsoptionen und Bankverbindung";
   }

   divtoshow = document.getElementById('infodiv1');
   div2toshow = document.getElementById('infodiv2');
   divinfotoshow = document.getElementById('info_' + info_var + '_div');
   tabletoalpha = document.getElementById('infotable11');
   tabcontainer = document.getElementById('infotable22');
   tabtrcontainer = document.getElementById('infotd221');
   tabtdcontainer = document.getElementById('infotd2211');

   divtoshow.style.display = "block";
   divinfotoshow.style.display = "block";

   if(document.all){
      scrollhoehe  = document[docEl].scrollTop;
      divtoshow.style.top = scrollhoehe;
      div2toshow.style.top = scrollhoehe;
      //alert(scrollhoehe);
      fullwidth = document.body.offsetWidth;
      fullheight = document.body.offsetHeight;
      alphaIEToDark(info_var);
   }else{
      scrollhoehe  = document[docEl].scrollTop;
      divtoshow.style.top = scrollhoehe + "px";
      div2toshow.style.top = scrollhoehe + "px";
      //alert(scrollhoehe);
      fullwidth = window.innerWidth;
      fullheight = window.innerHeight;
      alphaMozToDark(info_var);
   }

   initInfoScreenUpdate(info_var);
   //divtoshow.style.display = "block";
}

function infoClose(){
   divtohide = document.getElementById('infodiv1');
   divtohide.style.display = "none";
   div2tohide = document.getElementById('infodiv2');
   div2tohide.style.display = "none";
   divinfotohide = document.getElementById('info_agb_div');
   divinfotohide.style.display = "none";
   divinfotohide = document.getElementById('info_pay_div');
   divinfotohide.style.display = "none";
   divinfotohide = document.getElementById('info_delivery_div');
   divinfotohide.style.display = "none";
   if(document.all){
      alphaIEToLight();
   }else{
      alphaMozToLight();
   }
}
function initInfoScreenUpdate(info_var){
   if(browserscroll == true){
      window.onscroll = newInfoHolderPosition(info_var);
   }else{
      var aktiv = window.setInterval("newInfoHolderPosition(info_var)",1);
   }
}
