/* JavaScript-Content created by hurra! (hurra.cc) - a CMS by futuresign.com /*

/* JavaScript-Content rendered by hurra! (hurra.cc) - SiteType aut_de_xhtml*/
//flashintegration
function AC_AddExtension(src, ext)
{
  if (src.indexOf('?') != -1)
    return src.replace(/\?/, ext+'?'); 
  else
    return src + ext;
}
function AC_Generateobj(objAttrs, params, embedAttrs) 
{ 
  var str = '<object ';
  for (var i in objAttrs)
    str += i + '="' + objAttrs[i] + '" ';
  str += '>';
  for (var i in params)
    str += '<param name="' + i + '" value="' + params[i] + '" /> ';
  str += '<embed ';
  for (var i in embedAttrs)
    str += i + '="' + embedAttrs[i] + '" ';
  str += ' ></embed></object>';
  document.write(str);
}
//fusi extension Set_AC_FL_RunContent_GET(?get=xx); is to use, before calling AC_FL_RunContent
var AC_FL_RunContent_GET = '';
function Set_AC_FL_RunContent_GET(get){AC_FL_RunContent_GET = get;}
function AC_SW_GetSWFObjectForMoz(name)
{
	var embeds = document.getElementsByTagName("embed");
	for(var i = 0; i < embeds.length; i++)
	{
		if(embeds[i].name == name){return embeds[i];}
	}
	return false;
}
//end fusi extension
function AC_FL_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".swf"+AC_FL_RunContent_GET, "movie", "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
     , "application/x-shockwave-flash"
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}

function AC_SW_RunContent(){
  var ret = 
    AC_GetArgs
    (  arguments, ".dcr", "src", "clsid:166B1BCA-3F9C-11CF-8075-444553540000"
     , null
    );
  AC_Generateobj(ret.objAttrs, ret.params, ret.embedAttrs);
}
function AC_GetArgs(args, ext, srcParamName, classid, mimeType){
  var ret = new Object();
  ret.embedAttrs = new Object();
  ret.params = new Object();
  ret.objAttrs = new Object();
  for (var i=0; i < args.length; i=i+2){
    var currArg = args[i].toLowerCase();    
    switch (currArg){	
      case "classid":
        break;
      case "pluginspage":
        ret.embedAttrs[args[i]] = args[i+1];
        break;
      case "src":
      case "movie":	
        args[i+1] = AC_AddExtension(args[i+1], ext);
        ret.embedAttrs["src"] = args[i+1];
        ret.params[srcParamName] = args[i+1];
        break;
      case "onafterupdate":
      case "onbeforeupdate":
      case "onblur":
      case "oncellchange":
      case "onclick":
      case "ondblClick":
      case "ondrag":
      case "ondragend":
      case "ondragenter":
      case "ondragleave":
      case "ondragover":
      case "ondrop":
      case "onfinish":
      case "onfocus":
      case "onhelp":
      case "onmousedown":
      case "onmouseup":
      case "onmouseover":
      case "onmousemove":
      case "onmouseout":
      case "onkeypress":
      case "onkeydown":
      case "onkeyup":
      case "onload":
      case "onlosecapture":
      case "onpropertychange":
      case "onreadystatechange":
      case "onrowsdelete":
      case "onrowenter":
      case "onrowexit":
      case "onrowsinserted":
      case "onstart":
      case "onscroll":
      case "onbeforeeditfocus":
      case "onactivate":
      case "onbeforedeactivate":
      case "ondeactivate":
      case "type":
      case "codebase":
        ret.objAttrs[args[i]] = args[i+1];
        break;
      case "width":
      case "height":
      case "align":
      case "vspace": 
      case "hspace":
      case "class":
      case "title":
      case "accesskey":
      case "name":
	  	ret.embedAttrs[args[i]] = args[i+1];//mozilla bug - cant catche the Element - have to use AC_SW_GetSWFObjectForMoz(name) if you need the Object
      case "id":
	  	ret.objAttrs[args[i]] = args[i+1];
      case "tabindex":
        ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
        break;
      default:
        ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
    }
  }
  ret.objAttrs["classid"] = classid;
  if (mimeType) ret.embedAttrs["type"] = mimeType;
  return ret;
}
//flashintegration end
//reitermenü
function FlagMenu(flagId, numberOfFlags, activeFlag)
{
	this.flagId = flagId;
	this.numberOfFlags = numberOfFlags;
	this.activeFlag = activeFlag;
	this.additionalLeft = 110;
	this.activateFlag = function(No)
	{
		document.getElementById(this.flagId+'Text'+this.activeFlag).className="inActive";
		var aFlag = document.getElementById(this.flagId+'ActiveFlag');
		var visibleChild = null;
		if(No == 1 && No == this.numberOfFlags){var visibleChild = 0;}
		else if(No > 1 && No == this.numberOfFlags){var visibleChild = 1;}
		else if(No == 1 && No < this.numberOfFlags){var visibleChild = 2;}
		else if(No > 1 && No < this.numberOfFlags){var visibleChild = 3;}
		for(var i = 0; i < aFlag.childNodes.length; i++)
		{
			if(i != visibleChild)
			{
				aFlag.childNodes[i].style.display='none';
			}
			else
			{
				aFlag.childNodes[i].style.display='block';
			}
		}
		aFlag.style.left = (No-1)*this.additionalLeft+'px';
		document.getElementById(this.flagId+'Text'+No).className="active";
		this.activeFlag = No;
	}
}
//reitermenü ende
//eventhanlder
function addEvent( obj, type, fn )
{
   if (obj.addEventListener) {
      obj.addEventListener( type, fn, false );
   } else if (obj.attachEvent) {
      obj["e"+type+fn] = fn;
      obj[type+fn] = function() { obj["e"+type+fn]( window.event ); }
      obj.attachEvent( "on"+type, obj[type+fn] );
   }
}
function removeEvent( obj, type, fn )
{
   if (obj.removeEventListener) {
      obj.removeEventListener( type, fn, false );
   } else if (obj.detachEvent) {
      obj.detachEvent( "on"+type, obj[type+fn] );
      obj[type+fn] = null;
      obj["e"+type+fn] = null;
   }
}
//eventhandler end
//Hilfsfunktionen
function get_child_by_classname(obj, name)
{
	for(var i = 0; i < obj.childNodes.length; i++)
	{
		if(obj.childNodes[i].className == name){return obj.childNodes[i];}
	}
	return false;
}
//Hilfsfunktionen ende
function Element(object)
{
	this.object = object;
	this.re = new RegExp("px", "gi");

	this.clearStyleValue = function(value)
	{
		var value = value.replace(this.re, "");
		return parseInt(value);
	}
	this.return_width = function(){	return this.clearStyleValue(this.object.style.width);}
	this.return_height = function(){ return this.clearStyleValue(this.object.style.height);	}
	this.return_top = function(){	return this.clearStyleValue(this.object.style.top); }
	this.return_left = function(){ return this.clearStyleValue(this.object.style.left);	}
	this.change_width = function(changeValue){ this.object.style.width = (this.return_width() + changeValue)+"px"; }
	this.set_width = function(changeValue){ this.object.style.width = changeValue+"px";	}
	this.change_height = function(changeValue){ this.object.style.height = (this.return_height() + changeValue)+"px"; }
	this.set_height = function(changeValue){ this.object.style.height = changeValue+"px"; }
	this.change_top = function(changeValue){ this.object.style.top = (this.return_top() + changeValue)+"px"; }
	this.set_top = function(changeValue){ this.object.style.top = changeValue+"px"; }
	this.change_left = function(changeValue){ this.object.style.left = (this.return_left() + changeValue)+"px"; }
	this.set_left = function(changeValue){ this.object.style.left = changeValue+"px"; }
	this.show = function(){ this.object.style.display = "block"; }
	this.show_inline = function(){ this.object.style.display = "inline"; }
	this.hide = function(){ this.object.style.display = "none"; }
	this.return_offsetHeight = function(){ return this.object.offsetHeight; }
	this.return_offsetWidth = function(){ return this.object.offsetWidth; }
	this.setAlpha = function(value)
	{
		this.object.style.filter = 'alpha(opacity='+value+')';
		this.object.style.opacity = value/100;
	}
	this.show_hide = function()
	{
		if(this.object.style.display == 'block') { this.object.style.display = 'none'; return 'none';}
		else if(this.object.style.display == 'none') { this.object.style.display = 'block'; return 'block';}
	}
	this.set_src = function(src){ this.object.src = src; }
	this.changeHTML = function(txt){ this.object.innerHTML = txt; }
	this.return_absolute_pos = function()
	{
		var obj = this.object;
		var pos = new Object();
		pos.top = 0;
		pos.left = 0;
		while(obj && obj.nodeName.toLowerCase() != 'body')
		{
			pos.top += obj.offsetTop;
			pos.left += obj.offsetLeft;
			obj = obj.offsetParent;
		}
		return pos;
	}
}
//http request
var requestQue = new HttpRequestQue();
function HttpRequestQue()
{
	this.List = new Array();
	this.requestAddWork = false;
	
	this.add = function(http)
	{
		var index = this.List.length;
		this.List[index] = new Http(http.url, http.onreadyst, http.method, http.body, http.headers, http.sync);
		this.List[index].onreadyst = http.onreadyst;
		this.send();
	}
	
	this.send = function()
	{
		if(this.requestAddWork === false)
		{
			if(this.List.length>0)
			{
				this.requestAddWork = true;
				this.List[0].doRequest();
			}
		}
	}
	
	this.requExecuted = function()
	{
		var cacheList = new Array();
		for (var i = 0; i < (this.List.length - 1); i ++)
		{
			cacheList[i] = this.List[i+1];
		}
		this.List = cacheList;
		cacheList = null;
		this.requestAddWork = false;
		this.send();
	}
}
var request = null;
function Http(url, onreadyst, method, body, headers, sync)
{
	this.url = url;
	this.onreadyst = onreadyst || function(){};
	this.method = method || 'GET';
	this.body = body || null;
	this.headers = headers || false;
	this.sync = sync || true;
	this.abortReq = false;
	this.req = (window.XMLHttpRequest)
		?
		new XMLHttpRequest()
		:
		((window.ActiveXObject)
		?
		new ActiveXObject("Microsoft.XMLHTTP")
		:
		false
		);
	this.doRequest = function()
	{
		this.req.open(this.method,this.url,this.sync);
		if (this.headers)
		{
			for (var i = 0; i < this.headers.length; i += 2)
			{
				this.req.setRequestHeader(
					this.headers[i], this.headers[i+1]
				);
			}
		}
		this.req.onreadystatechange = this.onreadyst;
		this.req.send(this.body);
	}
}
//http request end
