// +++ AJAX +++
// globale Instanz von XMLHttpRequest
var xmlHttp = false;
 
//XMLHttpRequest-Instanz erstellen
//... für Internet Explorer
try {
    xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
} catch(e) {
    try {
        xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
    } catch(e) {
        xmlHttp  = false;
    }
}
//... für Mozilla, Opera, Safari usw.
if (!xmlHttp  && typeof XMLHttpRequest != 'undefined') {
    xmlHttp = new XMLHttpRequest();
} 


// SCHLIESSE LAYER
function closelayer()
{
	var box=document.getElementById("sub");
	var node=document.getElementById("hidbox");
	box.removeChild(node);
}

function popup(url)
{

			var box=document.getElementById("sub");
			var node=document.getElementById("hidbox");

			if(node)
			{
			box.removeChild(node);
			}

	if(url==1)
	{
		url = "site/impressum.php";
	}

	var ref = document.getElementById("sub");
	var wstr = "<div id='hidbox'></div>";
	ref.innerHTML+=wstr;

		if (xmlHttp)
		{
			xmlHttp.open('GET',url, true);
			xmlHttp.onreadystatechange = function () 
				{
					if (xmlHttp.readyState == 4) 
					{
					             document.getElementById("hidbox").innerHTML = xmlHttp.responseText;
					}
				};
			xmlHttp.send(null);
		}


}

function karte()
{
			var box=document.getElementById("sub");
			var node=document.getElementById("hidbox");

			if(node)
			{
			box.removeChild(node);
			}

	document.getElementById("sub_img").style.visibility = "visible";
	document.getElementById("sub_img").innerHTML = "<img src=img/karte.jpg>";
}

// ** JS SCRIPT MENU ** //
var listMenu = new FSMenu('listMenu', true, 'display', 'block', 'none');

listMenu.animations[listMenu.animations.length] = FSMenu.animFade;
listMenu.animations[listMenu.animations.length] = FSMenu.animSwipeDown;

var arrow = null;
if (document.createElement && document.documentElement)
{
 arrow = document.createElement('span');
 arrow.appendChild(document.createTextNode('>'));
 // Feel free to replace the above two lines with these for a small arrow image...
 //arrow = document.createElement('img');
 //arrow.src = 'arrow.gif';
 //arrow.style.borderWidth = '0';
 arrow.className = 'subind';
}
addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", arrow)'));