window.defaultStatus = "PTS Papier-Trocknungs-Service";

/* ------------------------------------------------- */
/* Define design of website, inclusive navigation    */
/* Parameter: 1 or 2 = 1- or 2-column text area      */
/* ------------------------------------------------- */

function DesignOfWebsite(textcolumns)
{
  if   (textcolumns == 2) 
       { columnspan  = ''; 
         columnwidth = 'width=480'; 
       } 
  else { columnspan  = 'colspan=3'; 
         columnwidth = 'width=705'; 
       }
  document.write('<body style="background-image:url(images/_icon-top.jpg); background-repeat:no-repeat; background-attachment:fixed;">');

  document.write('<map name="icons">');
  document.write('<area shape=rect coords=" 4, 0, 66,39" href="index.html" alt="zur Startseite" title="zur Startseite">');
  document.write('<area shape=rect coords="67, 0, 91,39" href="map.html"   alt="Sitemap"        title="Sitemap">');
  document.write('<area shape=rect coords="92, 0,116,39" href="javascript:showTooltip(\'print.html\',\'250\');" alt="Hinweis zum optimalen Druck der Seite" title="Hinweis zum optimalen Druck der Seite">');
  document.write('<area shape=rect coords="131,0,154,39" href="http://del.icio.us/post?v=4&noui&jump=close&url=www.papier-trocknung.de&title=Papiertrocknung und Schimmelsanierung" alt="Lesezeichen bei del.icio.us setzen" title="Lesezeichen bei del.icio.us setzen" target="_blank">');
  document.write('<area shape=rect coords="155,0,178,39" href="http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk=www.papier-trocknung.de&title=Papiertrocknung und Schimmelsanierung" alt="Lesezeichen bei Google setzen" title="Lesezeichen bei Google setzen" target="_blank">');
  document.write('<area shape=rect coords="179,0,202,39" href="http://linkarena.com/bookmarks/addlink/?url=www.papier-trocknung.de&title=Papiertrocknung und Schimmelsanierung&desc=Papiertrocknung und Schimmelsanierung&tags=Aktenrettung Papiertrocknung Schimmelsanierung" alt="Lesezeichen bei LinkAREANA setzen" title="Lesezeichen bei LinkAREANA setzen" target="_blank">');
  document.write('</map>');

  document.write('<a name="top"></a>'); /* note 1 */
  document.write('<table width="1004" height="100%" cellpadding="0" cellspacing="0" valign="top" border="0">'); /* note 2 + 3 */
  document.write('<colgroup> <col width="211"> <col width="68"> <col width="480"> <col width="40"> <col width="185"> <col width="20"> </colgroup>');

  // 1. TR: header with claim and logo
  document.write('<tr valign="top">');
  document.write('<td colspan="6" height="88" valign="top"><a href="index.html"><img src="images/_papier-trocknungs-service.gif" width="1004" height="88" alt="HOME bzw. Einstiegsseite" border="0"></a><br></td></tr>');
  
  // 2. TR: picture stripe with 2 menu items
  document.write('<tr valign="top">');
  document.write('<td colspan="6" background="images/_aktenrettung.jpg" height="140" valign="top">');
  document.write('<img src="images/_blank.gif" width="5" height="60" alt="" border="0"><br>');
  showMenu("unternehmen");
  showMenu("galerie");
  document.write('</td></tr>');

  // 3. TR - 1. TD: menu items + top icon
  document.write('<tr valign="top">');
  document.write('<td width="211" background="images/_blank.gif" onClick="self.location.href=\'#top\'" height="100%" valign="top">');
  showMenu("massnahmen");
  showMenu("schimmel");
  showMenu("rechtliches");
  showMenu("contact");
  document.write('<br><img src="images/m_home-sitemap.gif" name="icons" usemap="#icons" width="211" height="40" alt="" border="0">');
  document.write('</td>');

  // Preload menu images for onmouseover
  if (document.images)
     { m_unternehmen_over = newImage("images/m_unternehmen-over.jpg");
       m_massnahmen_over = newImage("images/m_massnahmen-over.gif");
       m_schimmel_over = newImage("images/m_schimmel-over.gif");
       m_galerie_over = newImage("images/m_galerie-over.gif");
       m_rechtliches_over = newImage("images/m_rechtliches-over.gif");
       m_contact_over = newImage("images/m_contact-over.gif");
       preloadFlag = true;
     }

  // 3.TR - 2.TD: 1- or 2-column text area
  document.write('<td><img src="images/_blank.gif" width="68" height="1" alt="" border="0"></td>');
  document.write('<td ' + columnspan + columnwidth + ' height="100%">');
  if   (columnspan == '')
       { document.write('<img src="images/_blank.gif" width="480" height="53" alt="" border="0"><br>'); }
  else { document.write('<img src="images/_blank.gif" width="705" height="53" alt="" border="0"><br>'); }
}

/* ------------------------------------------------- */
/* Show main and its submenu                         */
/* (main and submenu html-file has to follow the     */
/* conventions: main.html and main_submenu.html)     */
/* ------------------------------------------------- */

function showMenu(menu)
{ var str;

  if   (locContains(menu))
       { var img = "images/m_" + menu + "-over.gif"; str = ''; } 
  else { var img = "images/m_" + menu + ".gif"; str = 'style="display:none"'; }

 	var temp = new String(window.location.href);
  if   ( (temp.indexOf("index") != -1) || (temp.indexOf("html") == -1) ) 
       { if (menu == "massnahmen") img = "images/m_massnahmen-index.gif";
         if (menu == "schimmel")   img = "images/m_schimmel-index.gif";
       }

  document.write('<a href="' + menu + '.html"><img name="m_' + menu + '" src="' + img + '" alt="" width="211" height="40" border="0"></a><br>');

  // show or hide submenu, depending on variable str
  var massnahmenSub0 = 'Was Sie jetzt tun sollten'; 
  var massnahmenSub1 = 'Richtig verpacken'; 
  var massnahmenSub2 = 'Das Trocknungsprinzip'; 
  var massnahmenSub3 = 'Schutz Ihrer Daten'; 
  var massnahmenSub4 = 'Unsere AGB'; 
  var schimmelSub0   = 'Was Sie jetzt tun sollten'; 
  var schimmelSub1   = 'Schimmelsanierung'; 
  var schimmelSub2   = 'Schimmelabt&ouml;tung'; 
  var schimmelSub3   = 'Schimmelreinigung'; 
  var schimmelSub4   = 'Gesundheitsgefahr'; 

  if (menu == "massnahmen")
     { document.write('<div id="div_massnahmen"' + str + '>');
       if   (locContains('massnahmen.html'))
            { document.write('<a href="massnahmen.html" class="naviactive" title="">' + massnahmenSub0 + '</a><br>'); }
       else { document.write('<a href="massnahmen.html" class="navi" title="">' + massnahmenSub0 + '</a><br>'); }
       if   (locContains('_verpacken'))
            { document.write('<a href="massnahmen_verpacken.html" class="naviactive" title="">' + massnahmenSub1 + '</a><br>'); }
       else { document.write('<a href="massnahmen_verpacken.html" class="navi" title="">' + massnahmenSub1 + '</a><br>'); }
       if   (locContains('prinzip'))
            { document.write('<a href="massnahmen_trocknungsprinzip.html" class="naviactive" title="">' + massnahmenSub2 + '</a><br>'); }
       else { document.write('<a href="massnahmen_trocknungsprinzip.html" class="navi" title="">' + massnahmenSub2 + '</a><br>'); }
       if   (locContains('_datenschutz'))
            { document.write('<a href="massnahmen_datenschutz.html" class="naviactive" title="">' + massnahmenSub3 + '</a><br>'); }
       else { document.write('<a href="massnahmen_datenschutz.html" class="navi" title="">' + massnahmenSub3 + '</a><br>'); }
       if   (locContains('_agb'))
            { document.write('<a href="massnahmen_agb.html" class="naviactive" title="">' + massnahmenSub4 + '</a><br>'); }
       else { document.write('<a href="massnahmen_agb.html" class="navi" title="">' + massnahmenSub4 + '</a><br>'); }
       document.write('<span class="spacing5">&nbsp;</span></div>');
     }
  if (menu == "schimmel")
     { document.write('<div id="div_schimmel"' + str + '>');
       if   (locContains('schimmel.html'))
            { document.write('<a href="schimmel.html" class="naviactive" title="">' + schimmelSub0 + '</a><br>'); }
       else { document.write('<a href="schimmel.html" class="navi" title="">' + schimmelSub0 + '</a><br>'); }
       if   (locContains('_sanierung'))
            { document.write('<a href="schimmel_sanierung.html" class="naviactive" title="">' + schimmelSub1 + '</a><br>'); }
       else { document.write('<a href="schimmel_sanierung.html" class="navi" title="">' + schimmelSub1 + '</a><br>'); }
       if   (locContains('_abtoetung'))
            { document.write('<a href="schimmel_abtoetung.html" class="naviactive" title="">' + schimmelSub2 + '</a><br>'); }
       else { document.write('<a href="schimmel_abtoetung.html" class="navi" title="">' + schimmelSub2 + '</a><br>'); }
       if   (locContains('_reinigung'))
            { document.write('<a href="schimmel_reinigung.html" class="naviactive" title="">' + schimmelSub3 + '</a><br>'); }
       else { document.write('<a href="schimmel_reinigung.html" class="navi" title="">' + schimmelSub3 + '</a><br>'); }
       if   (locContains('_gesundheitsgefahr'))
            { document.write('<a href="schimmel_gesundheitsgefahr.html" class="naviactive" title="">' + schimmelSub4 + '</a><br>'); }
       else { document.write('<a href="schimmel_gesundheitsgefahr.html" class="navi" title="">' + schimmelSub4 + '</a><br>'); }
       document.write('<span class="spacing5">&nbsp;</span></div>');
     }
}


/* ----------------------------------------------------- */
/* Add footer to main content column                     */
/* (you can add additional text in the html page, but    */
/* without <p>, i.e. write only the text after calling   */
/* Footer();)                                            */
/* ----------------------------------------------------- */

function Footer(spacing)
{ 
  if   (spacing == 0) spacing = '85';
  // document.write('<p class="footer" style="margin-top:' + spacing + 'px"><a href="legal.html" class="footer">Rechtliche Hinweise und Datenschutz</a>&nbsp;&nbsp;<span class="blue">&bull;</span>&nbsp;&nbsp;<a href="http://www.mmb.de" class="footer">Web-Design by</a>');
  document.write('<p class="footer" style="margin-top:' + spacing + 'px"><a href="legal.html" class="footer">Rechtliche Hinweise und Datenschutz</a>');
}


/* ----------------------------------------------------- */
/* Finalize footer text, close main content cell and     */
/* open small content cell                               */
/* ----------------------------------------------------- */

function SmallColumn()
{ 
  document.write('</p>');
  // 3.TR - 3.-4.TD: close main content cell | spacer | open sub content cell
  document.write('</td>');
  if   (columnspan == '')
       { document.write('<td width="40" height="100%" valign="top"><img src="images/_blank.gif" width="40" height="1" alt="" border="0"><br></td>');
         document.write('<td width="185" height="100%" valign="top"><img src="images/_blank.gif" width="185" height="32" alt="" border="0"><br>');
       }
}


/* ----------------------------------------------------- */
/* Closes website                                        */
/* ----------------------------------------------------- */

function EndOfWebsite()
{ 
  // 3.TR - 5.TD: close 4.TD, spacer, close 3.TR, close table and website
  if   (columnspan == '') { document.write('</td>'); }
  document.write('<td width="20" height="100%" valign="top"><img src="images/_blank.gif" width="20" height="1" alt="" border="0"></td></tr></table></body></html>');
}


/* ------------------------------------------------- */
/* Utilities                                         */
/* ------------------------------------------------- */

// global variables
// ....................................
var preloadFlag = false;
var columnspan;
var columnwidth;

// Sub-function for preloadImages
// ....................................
function newImage(arg)
{ if (document.images)
     { rslt = new Image();
       rslt.src = arg;
       return rslt;
     }
}
function changeImages()
{ if (document.images && (preloadFlag == true))
     { for (var i=0; i<changeImages.arguments.length; i+=2)
           { document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; }
     }
}

// Does URL contains certain string (=strSubstr)? 
// ....................................
function locContains(strSubstr)
{ var strHREF = new String(window.location.href);
  strHREF = strHREF.toLowerCase();
  if   (strHREF.indexOf(strSubstr) != -1) 
       { return true; }
  else { return false; }
}

// Print mail address
// ....................................
function liame(address,re,content,tip)
{ var str = "<a href=\"mailto:";
  if (re!="") { var re1 = "?subject=" + re; } else { var re1 = ""; }
  if (content!="") { var content1 = "&body=" + content; } else { var content1 = ""; }
  if (tip!="") { var tip1 = " title=\"" + tip + "\""; } else { var tip1 = ""; }
  document.write(str + address + '@papier-trocknung.de' + re1 + content1 + '"' + tip1 + '>' + address + '@papier-trocknung.de</a>');
}

// Tooltip
// ....................................
function showTooltip(file,size)
{ size1 = "width=300,height=" + size + ",resizable=yes,location=no,menubar=no,scrollbars=no,toolbar=no,top=20,left=20,screenX=20,screenY=20";
  newWindow = window.open(file,"tipp",size1);
  newWindow.focus();
}

// Display/hide (toogle) content in a <div>
// 1. argument 0:   Image to indicate open and close (can be empty '' if no image should be used)
// 1. argument 1:   This div will be hidden/displayed (toogle function)
// 2. argument 2-x: All these divs will be hidden
// ....................................
function showDiv(args)
{ 
  var imgDown = "images/_arrow-down.gif";
  var imgUp = "images/_arrow-up.gif";
  var arrow = new Image(16, 11); // width, height
  var img = showDiv.arguments[0] + 'IMG';

  // Hide resp. display div which is passed as arguments 0
  var element = document.getElementById(showDiv.arguments[0]);
  if   (element.style.display == "none")   // if div is hidded, display it now and define new image
       { arrow.src = imgUp;
         element.style.display = "block";  // if div is display, hide it now and define new image
       } 
  else { arrow.src = imgDown;
         element.style.display = "none"; 
       }
  if   (typeof(document.images[img]) !== "undefined") document.images[img].src = arrow.src; // change to new image

  // Hide all other divs which are passed as arguments 1 - x
  // Error message at 1st statement of for: There is a div which is not defined!
  for (var i=1; i < showDiv.arguments.length; i++)
      { document.getElementById(showDiv.arguments[i]).style.display = "none";
        arrow = new Image(16, 11);
        img = showDiv.arguments[i] + 'IMG';
        arrow.src = imgDown;
        document.images[img].src = arrow.src;
      }
}

// Return to index.html
// ....................................
function returnIndex(dir)
{ var str1 = "locat";
  var str2 = "ion.repl";
  var str3 = "ace('";
  var str4 = "inde";
  var str5 = "x.html')";
  eval(str1+str2+str3+dir+str4+str5);
}


/* -------------------------------------------------
Note 1:  only necessary for NS
Note 2:  Table width = 1004 px (+ 20px for scrollbar = 1024px). 
         If set to 100% and screen resolution is different to 1024, 
         then content will be pressed or stretched
Note 3:  6 columns: menu 211px (spacer=36, menu=175) + spacer=68
         + main text 480px, spacer 40px, sub text 185px + spacer 20px
------------------------------------------------- */

