//tortic:webfxlayout.js
/* set up browser checks */

// check browsers
var ua    = navigator.userAgent;
var opera = /opera [56789]|opera\/[56789]/i.test(ua);
var ie    = !opera && /msie [56789]/i.test(ua);         // preventing opera to be identified as ie
var moz   = !opera && /mozilla\/[56789]/i.test(ua);     // preventing opera to be identified as mz
/* end browser checks */

/* Do includes */

//var host = "tortic.to.ohost.de"
var host = "tortic.piranho.de"
var hostlaenge = host.length
var urll = window.location.href;
var pos = urll.indexOf("tortic");
pathToRoot1 = urll.substring(0,pos+hostlaenge);
//alert(pathToRoot1);

//Favicon
document.write('<link rel="shortcut icon" type="image/x-icon" href="' + pathToRoot1 + '/menu/edelweis.ico" />');

if (ie)
 document.write('<script type="text/javascript" src="' + pathToRoot1 + '/menu/cssexpr.js"><\/script>');
document.write('<link type="text/css" rel="StyleSheet" href="' + pathToRoot1 + '/menu/webfxlayout.css">');
document.write('<link type="text/css" rel="StyleSheet" href="' + pathToRoot1 + '/menu/xmenu.css">');
//document.write('<link type="text/css" rel="StyleSheet" href="' + pathToRoot1 + '/menu/xmenu.css"><\/script>');
document.write('<script type="text/javascript" src="' + pathToRoot1 + '/menu/xmenu.js"><\/script>');
document.write('<script type="text/javascript" src="' + pathToRoot1 +  '/menu/menu.js"><\/script>');

/* end includes */

webfxLayout =
{
 writeTitle : function (s, s2)
 {
  document.write("<div id='webfx-title-background'></div>");
  if (opera)
  {
   document.write("<nobr><h1 id='webfx-title' style='top:9px;'>" + s + "</h1></nobr>");
  }
  else
  {
   document.write("<nobr><h1 id='webfx-title'>" + s + "</h1></nobr>");
  }
  if (s2 == null)
   s2 = "tortic's Homepage&nbsp;";
  if (opera)
  {
   document.write("<nobr><span id='webfx-sub-title' style='top:46px;'>" + s2 + "</span></nobr>");
  }
  else
  {
   document.write("<nobr><span id='webfx-sub-title'>" + s2 + "</span></nobr>");
  }
 },

 writeMainTitle : function ()
 {
  this.writeTitle("tortic's Homepage&nbsp;", "");
 },

 writeTopMenuBar : function ()
 {
  document.write("<div id='webfx-menu-bar-1'></div>");
  if (opera)
  {
   document.write("<style>.webfx-menu-bar a {padding-top:3px;}</style>");
   document.write("<div id='webfx-menu-bar-2' style='height:2px;'></div>");
  }
  else
   document.write("<div id='webfx-menu-bar-2'></div>");
   document.write("<div id='webfx-menu-bar'>");// div is closed in writeBottomMenuBar
  },

 writeBottomMenuBar : function ()
 {
  document.write("</div>");
  if (opera)
   document.write("<div id='webfx-menu-bar-3' style='height:0px;'></div>");
  else
   document.write("<div id='webfx-menu-bar-3'></div>");
  document.write("<div id='webfx-menu-bar-4'></div>");
  document.write("<div id='webfx-menu-bar-5'></div>");
 },

 writeMenu : function ()
 {
  if (ie || moz || opera)
  {
   if (ie)
    simplifyCSSExpression();
   webfxMenuImagePath = pathToRoot1 + "/menu/";
   this.writeTopMenuBar();
   document.write(webfxMenuBar);
   this.writeBottomMenuBar();
  }
  else
  {
   document.write(
    "<div id='webfx-menu-bar'>&nbsp;" + "<a href='/'>Home</a> " +
    "<a href='" + pathToRoot1 + "?action=sitemap'>Site Map</a> " +
    "<a href='/webboard'>WebFX Webboard</a> " + "</div>" +
    "<p class='warning' style='width: 500px'>" +
    "This site will look much better in a browser that supports " +
    "<a href='http://www.webstandards.org/upgrade/' " +
    "title='Download a browser that complies with Web standards.'>" +
    "web standards</a>, " +
    "but it is accessible to any browser or Internet device." +        "</p>");
   }
 },

 writeDesignedByEdger : function ()
 {
  if (ie && document.body.currentStyle && document.body.currentStyle.writingMode != null)
// IE55+
   document.write("<div id='webfx-about'>Diese Seite wurde erstellt von " +
    "<a href='mailto:t_puschmann@hotmail.com'>Torsten Puschmann</a>.</div>");
 }
};


if (ie && window.attachEvent)
{
 window.attachEvent("onload", function ()
 {
  var scrollBorderColor        = "rgb(120,172,255)";
  var scrollFaceColor   = "rgb(234,242,255)";
  with (document.body.style)
  {
   scrollbarDarkShadowColor = scrollBorderColor;
   scrollbar3dLightColor    = scrollBorderColor;
   scrollbarArrowColor      = "black";
   scrollbarBaseColor       = scrollFaceColor;
   scrollbarFaceColor       = scrollFaceColor;
   scrollbarHighlightColor  = scrollFaceColor;
   scrollbarShadowColor     = scrollFaceColor;
   scrollbarTrackColor      = "white";
  }
 });
}

function fusszeile(breitencode)
{
var breite = (breitencode != undefined)?breitencode:1000;
var fusszeile1 = "<hr style=\"margin-top: 15px;\">\n";
fusszeile1 = fusszeile1 + "<table width='" + breite + "'>\n";
fusszeile1 = fusszeile1 + "<tr style=\"background-color:#FFFFFF\"><td>"
fusszeile1 = fusszeile1 + "Diese Seite wurde erstellt von <a href=\"mailto:t_puschmann@hotmail.com\">Torsten Puschmann</a>.\n";
fusszeile1 = fusszeile1 + "</td><td align=center>\n";
fusszeile1 = fusszeile1 + "</td><td align=right>\n";
fusszeile1 = fusszeile1 + "Aktualisiert am <span class=\"date\">\n";
var Datumanzeige =  document.lastModified;
fusszeile1 = fusszeile1 +  Datumanzeige.slice(3,5)+"."+Datumanzeige.slice(0,2)+"."+Datumanzeige.slice(6,19)+"\n";
fusszeile1 = fusszeile1 + "</td></tr>\n";
fusszeile1 = fusszeile1 + "</table>\n";
document.all.fusszeile2.innerHTML = fusszeile1
}
