// Standard - JavaScript - Elemente für jede Seite von www.brandl-muc.de
// (c) by Matthaeus Brandl (matthaeus.nospam (at) brandl-muc.de)

// Browser - Identifizierung
navigator_IE = ((document.all) && (window.offscreenBuffering)) ? true : false;					// Internetexplorer
navigator_N4 = ((document.captureEvents) && (!document.getElementById)) ? true : false;				// Nescape4
navigator_MZ = ((document.getElementById) && (!document.all) && (document.documentElement)) ? true : false;	// Mozilla (Firefox oder Netscape 6)
navigator_OP = ((document.getElementById) && (navigator.userAgent.indexOf("Opera") != -1)) ? true : false;	// Opera
navigator_FF = ((navigator_MZ && navigator.userAgent.indexOf("Firefox") != -1)) ? true : false;			// Mozilla Firefox
navigator_N6 = ((navigator_MZ && navigator.userAgent.indexOf("Netscape") != -1)) ? true : false;		// Mozilla Netscape

// Konstanten
var brandlmuc = "o3C2?5=\\>F4]56";

// Rotation des übergebenen Character Codes
// innerhalb des eMail-relevanten Zeichensatzes um 180°
// Zeichen 33 - 126 (94 Zeichen)
function rot47(chr_in)
{
 return ((chr_in + 14) % 94) + 33;
}

// Rotiert die einzelnen Zeichen eines String nacheinander
function crypt(str_in)
{
 var str_out = "";
 var chr = 0;

 for (var i=0; i < str_in.length; i++)
 {
  str_out = str_out + "&#" + rot47(str_in.charCodeAt(i)) + ";" ;
 }
 return str_out;
}

function dec2htm(ret)
{
 for (var i=0; i < ret.length; i++)
 {
  if (ret.charCodeAt(i) == 92)
  {
   ret = ret.slice(0, i) + "\\\\" + ret.slice(i+1, ret.length);
   i++;
  }
 }
 return ret;
}

function eMailTo(add)
{
 add = crypt(add + brandlmuc);
 document.write("<a href=\"mailto:" + add + "\" title=\"" + add + "\" onMouseOver=\"window.status='" +
 add + "'; return true;\" onMouseOut=\"window.status=''; return true;\">");
}

function eMail_Xeno(add)
{
 add = crypt(add);
 document.write("<a href=\"mailto:" + add + "\" title=\"" + add + "\" onMouseOver=\"window.status='" + add
  + "'; return true;\" onMouseOut=\"window.status=''; return true;\">"); 
}

// Frames-Kontrolle von http://www.brandl-muc.de
if (top.frames.length > 1 )
     window.location.href = "http://www.brandl-muc.de/index.htm?"+window.location.href;

// und Übername des Frame-<title> in den Browser-<title>
//if (top.hauptframe.document.title != "Viewer")
//{
//top.document.title = top.hauptframe.document.title + " (DPSG Perlach)";
//}
