
// ###############################################
// ##  Javascript-Funktionen fuer das Template  ##
// ###############################################

var closediv = "";

function pop601 (url)
{
        window.open(url,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=450,height=350,top=150,left=200')
}

function pop600 (url)
{
    window.open(url,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=630,height=500,top=150,left=200')
}
function pop400 (url)
{
    window.open(url,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=400,height=400,top=150,left=200')
}

function showMe(what)
{
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera 5")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6
  if (this.ie == 1){
    var isNetscape6 = false;
    var isNetscape = false;
  }
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  if (this.ns6 == 1) {
    var isNetscape6 = true;
    var isNetscape = true;
  }
  this.ns4=(document.layers && !this.dom)?1:0;
  if (this.ns4 == 1) {
    var isNetscape6 = false;
    var isNetscape = true;
  }
  if (!(isNetscape)) {
    var a = document.all[what].style.display;
    if (a == 'none') {
      if (closediv == "") {
        closediv = what;
      } else {
        document.all[closediv].style.display = 'none';
        closediv = what;
      }
      document.all[what].style.display  = '';
    } else {
      document.all[what].style.display = 'none';
    }
  } else {
    if (!(isNetscape6)) {
      var a = document.layers[what].style.display;
      if (a == 'none') {
        if (closediv == "") {
          closediv = what;
        } else {
          document.layers[closediv].style.display = 'none';
          closediv = what;
        }
        document.layers[what].style.display = '';
      } else {
        document.layers[what].style.display = 'none';
      }
    } else {
      var a = document.getElementById(what).style.display;
      if (a == 'none') {
        if (closediv == "") {
          closediv = what;
        } else {
          document.getElementById(closediv).style.display = 'none';
          closediv = what;
        }
        document.getElementById(what).style.display = '';
      } else {
        document.getElementById(what).style.display = 'none';
        document.getElementById(what).setAttribute("valign", "top");
        document.getElementById(what).setAttribute("height", "0");
      }
      }
  }
}

function showMeStoreFront(what)
{
  this.ver=navigator.appVersion
  this.agent=navigator.userAgent
  this.dom=document.getElementById?1:0
  this.opera5=this.agent.indexOf("Opera 5")>-1
  this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
  this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
  this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
  this.ie=this.ie4||this.ie5||this.ie6
  if (this.ie == 1) {
    var isNetscape6 = false;
    var isNetscape = false;
  }
  this.mac=this.agent.indexOf("Mac")>-1
  this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
  if (this.ns6 == 1) {
    var isNetscape6 = true;
    var isNetscape = true;
  }
  this.ns4=(document.layers && !this.dom)?1:0;
  if (this.ns4 == 1) {
    var isNetscape6 = false;
    var isNetscape = true;
  }
  if(!(isNetscape)) {
    var a = document.all[what].style.display;
    if (a == 'none') {
      document.all[what].style.display  = '';
    } else {
      document.all[what].style.display = 'none';
    }
  } else {
    if (!(isNetscape6)) {
      var a = document.layers[what].style.display;
      if (a == 'none') {
        document.layers[what].style.display = '';
      } else {
        document.layers[what].style.display = 'none';
      }
    } else {
      var a = document.getElementById(what).style.display;
      if (a == 'none') {
        document.getElementById(what).style.display = '';
      } else {
        document.getElementById(what).style.display = 'none';
        document.getElementById(what).setAttribute("valign", "top");
        document.getElementById(what).setAttribute("height", "0");
      }
    }
  }
}

oldClk = ""

function hiMe(cls)
{
  var me = window.event.srcElement;
  if (event.srcElement.onmouseout) {
    if (oldClk == me) {
      me.className = 'button';
    } else {
      me.className = cls;
    }
  } else {
    me.className = cls;
  }
  return true;
}

// #######################
// ##  eWax Funktionen  ##
// #######################

function getEwaxUri()  {
    return "https://" + location.hostname + "/ewax";
}

function ewaxpopup()  {
    var uri = getEwaxUri();
    var windowName = "ewax";
    var attrSpec = "";
    var top = 10;
    var width = 920;
    if (width > screen.width)  {
        width = screen.width;
    }
    var left = Math.floor((screen.width - width) / 2);
    var height = Math.floor(screen.height * .85);

    var attrMap = new Array();
    attrMap["dependent"]    = "yes";
    attrMap["height"]       = height;
    attrMap["hotkeys"]      = "no";
    attrMap["left"]         = left;
    attrMap["location"]     = "no";
    attrMap["menubar"]      = "no";
    attrMap["resizable"]    = "yes";
    attrMap["scrollbars"]   = "yes";
    attrMap["status"]       = "yes";
    attrMap["toolbar"]      = "no";
    attrMap["top"]          = top;
    attrMap["width"]        = width;
    for (var attrName in attrMap)  {
        var attrValue = attrMap[attrName];
        attrSpec += attrName + "=" + attrValue + ",";
    }

    var popup = window.open(uri, windowName, attrSpec);
    popup.focus();
    return;
}

