// JavaScript Document

var strExec;

function execJS(node) 
{
	/* Element auf Javascript überprüfen, und falls nötig ausführen */
	var bSaf = (navigator.userAgent.indexOf('Safari') != -1);
	var bOpera = (navigator.userAgent.indexOf('Opera') != -1);
	var bMoz = (navigator.appName == 'Netscape');
	var st = node.getElementsByTagName('script'); 
		
	for(var i=0;i<st.length; i++) 
	{ 
		if (bSaf) 
		{ 
			strExec = st[i].innerHTML; 
		} else if (bOpera) { 
			strExec = st[i].text; 
		} else if (bMoz) { 
			strExec = st[i].textContent; 
		} else { 
			strExec = st[i].text; 
		} 
		try { eval(strExec); } 
		catch(e) { alert(e);}
	}
	
}


var xmlHttp = null;
/**
 * XMLHttpRequest 
 * there is to try to open a file without the site is updated.
 * @param url 				: file-directory or file-domain, which is called.
 * @param elementContainer	: this is the field (e.g. a DIV Tag) in HTML where the file is placed. 
 * The full list of the readyState values is as follows:
 * 0 (uninitialized)
 * 1 (loading)
 * 2 (loaded)
 * 3 (interactive)
 * 4 (complete)
 */
function getCONTENT(url,elementContainer)
{
	var pEl = document.getElementById(elementContainer).parentNode.parentNode;
	if (typeof XMLHttpRequest != 'undefined') {
		xmlHttp = new XMLHttpRequest();
	}
	if (!xmlHttp) {
		// Internet Explorer 6 and older
		try {
			xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
		} catch(e) {
			try {
				xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
			} catch(e) {
				xmlHttp  = null;
			}
		}
	}
	if (xmlHttp) {
		xmlHttp.open('GET', url , true); // alte Methode
		//xmlHttp.open('GET', url , false);
		xmlHttp.onreadystatechange = function () {
			if (xmlHttp.readyState == 1) {
				document.getElementById(elementContainer).innerHTML = "<p><font class='Wait' style='font-variant:small-caps; font-size:16pt; color:#FFFFFF; text-decoration:blink;'>die Details werden abgerufen...</font></p>";
			}
			if (xmlHttp.readyState == 4) {
				document.getElementById(elementContainer).innerHTML = xmlHttp.responseText;
			}
		};
		xmlHttp.send(null);
	}
}

/**
 * Call the method / functioin getCONTENT and show the field 'DIV tag'
 * @param eLURL			: file-directory or file-domain, which is called.
 * @param elContainer	: this is the field (e.g. a DIV Tag) in HTML where the file is placed. 
 * @param clsEle		: parent field of @param elContainer to close
 */
function showAndCallContent(elURL,elContainer,clsEle)
{
	document.getElementById(clsEle).style.display='inline';
	document.getElementById(elContainer).innerHTML='';
	getCONTENT(elURL,elContainer);
}
function hideDetail(clsEle)
{
	document.getElementById(clsEle).style.display='none';
}
function changeBigImg(x_coordinate)
{
	document.getElementById('big_img_container').style.marginLeft = "-"+parseInt(x_coordinate)+"px";
}

