
/*/////////////////////////////////////////////////////////////////////////////////
                    loadComplete (wird vor </body> aufgerufen)
/////////////////////////////////////////////////////////////////////////////////*/
/**
 * @projectDescription wird vor &lt;/body&gt; aufgerufen,	Beinhaltet die Anweisungen die beim onLoad ausgeführt werden sollen.
 */
function loadComplete(lang){
	parseExternalLinks();
	parseHeadline('h3', '/flash/headline_top.swf', 'flashh_links', 0, '', '', document.getElementById('content_links'));
	parseHeadline('h3', '/flash/headline.swf', 'flashh_urlaub', 0, '', '', document.getElementById('urlaub_links'));
	parseHeadline('h3', '/flash/headline_top.swf', 'flashh_start', 0, '', '', document.getElementById('content_start'));
	parseHeadline('h3', '/flash/headline_top.swf', 'flashh_start', 0, '', '', document.getElementById('top'));
	parseHeadline('h3', '/flash/headline_top.swf', 'flashh_start', 0, '', '', document.getElementById('top2'));
	parseHeadline('h3', '/flash/headline_top.swf', 'flashh_top', 0, '', '', document.getElementById('top_anfrage'));
	parseHeadline('h3', '/flash/headline_bottom.swf', 'flashh_bottom', 0, '', '', document.getElementById('bottom_anfrage'));
	parseHeadline('h3', '/flash/headline.swf', 'flashh_sub', 0, '', '', document.getElementById('subnav'));
	parseAnfrage(lang);
	if(document.getElementById('top_image')){
		parseContentImg(document.getElementById('top_image'));
	}
	if(document.getElementById('bildergalerie')){
		parseBildergalerie(document.getElementById('bildergalerie'));
	}
	/* Hier die Anweisungen einfügen */
}

/*/////////////////////////////////////////////////////////////////////////////////
                                       popup
	öffnet ein neuse Fenster,
	obj = Link der das Fenster öffnet
	w = Breite des Fensters
	h = Höhe des Fensters
/////////////////////////////////////////////////////////////////////////////////*/
/**
 * @projectDescription öffnet ein neues Browserfenster falls möglich, ansonsten wird die url des Links direkt aufgerufen.
 * @param {LinkObject} obj
 * @param {Breite} w
 * @param {Hoehe} h
 * @return {Boolean}
 */

function popup(obj,w,h) {
	var url = (obj.getAttribute) ? obj.getAttribute('href') : obj.href;
	if (!url) return true;
	if(w && h){
		var args = 'width='+w+',height='+h+',resizable=yes';
	}
	else{
		var args = 'resizable=yes,hotkeys=yes,location=yes,menubar=yes,scrollbars=yes,status=yes,toolbar=yes';
	}
	pop = window.open(url,'',args);
	return (pop) ? false : true;
}

/*/////////////////////////////////////////////////////////////////////////////////
                                 parseExternalLinks
	öffnet Links mit target="_blank" oder rel="external" in einem neuen Fenster
/////////////////////////////////////////////////////////////////////////////////*/
/**
 * @projectDescription öffnet Links mit target="_blank" oder rel="external" in einem neuen Fenster (sollte in der loadComplete-Funktion aufgerufen werden)
 */
function parseExternalLinks(){
	for(i=0; i<document.getElementsByTagName("a").length; i++){
		zwobj = document.getElementsByTagName("a")[i];
		if((zwobj.getAttribute) ? zwobj.getAttribute('rel') == "external" : zwobj.rel == "external"){
			zwobj.onclick = function(){
				return popup(this);	
			}
		}else if((zwobj.getAttribute) ? (zwobj.getAttribute('target') == "_blank") : (zwobj.target == "_blank")){
			zwobj.onclick = function(){ return popup(this); }
			zwobj.target="";
		}
	}
}

/*/////////////////////////////////////////////////////////////////////////////////
                                      Ajax
	getNewHttpObject() giebt ein neues Ajax-Objekt zurück
	getsrc(url,elementContainer) füllte den elementContainer mit dem Quellcode von 
	der angegebenen url
/////////////////////////////////////////////////////////////////////////////////*/
/**
 * @projectDescription giebt ein neues Ajax-Objekt zurück
 * @return {XMLHttpRequest}
 */
function getNewHttpObject() {
    var objType = false;
    try {
        objType = new ActiveXObject('Msxml2.XMLHTTP');
    } catch(e) {
        try {
            objType = new ActiveXObject('Microsoft.XMLHTTP');
        } catch(e) {
            objType = new XMLHttpRequest();
        }
    }
    return objType;
}
/**
 * @projectDescription füllte den elementContainer mit dem Quellcode von url
 * @param {String} url
 * @param {id} elementContainer
 */
function getsrc(url,elementContainer){
	document.getElementById(elementContainer).innerHTML = '<blink>Loading...<\/blink>';
	var theHttpRequest = getNewHttpObject();
	theHttpRequest.onreadystatechange = function() {processAXAH(elementContainer);};
	theHttpRequest.open("GET", url);
	theHttpRequest.send(false);
	function processAXAH(elementContainer){
	   if (theHttpRequest.readyState == 4) {
		   if (theHttpRequest.status == 200) {
			   document.getElementById(elementContainer).innerHTML = theHttpRequest.responseText;
		   } else {
			   document.getElementById(elementContainer).innerHTML="<p><span class='redtxt'>Error!<\/span> HTTP request return the following status message:&nbsp;" + theHttpRequest.statusText +"<\/p>";
		   }
	   }
	}			
}

/*/////////////////////////////////////////////////////////////////////////////////
                                    JS Kalender
	Beispiel:
		kalender = new Calender(document.getElementById('jscalender'), 'de');
		kalender.callBackFunction = function(tag,monat,jahr){
			document.forms[0].vdd.value = tag;
			document.forms[0].vmm.value = monat;
			document.forms[0].vyy.value = jahr;
			kalender.hide();
		}
	callBackFunction wird aufgerufen wenn auf ein Datum geklickt wird
/////////////////////////////////////////////////////////////////////////////////*/
/**
 * @projectDescription JS Kalender, callBackFunction wird aufgerufen wenn auf ein Item geklickt wird
 * @param {String} obref
 * @param {String} lang
 */
function Calender(obref, lang){
	var self = this;
	this.obref = obref;
	this.day_names_l = new Array();
	this.month_names_l = new Array();
	this.day_names_l['de'] = new Array('Mo','Di','Mi','Do','Fr','Sa','So');
	this.month_names_l['de'] = new Array('Jänner','Februar','März','April','Mai','Juni','Juli','August','September','Oktober','November','Dezember');
	this.day_names_l['en'] = new Array('Mo','Tu','We','Th','Fr','Sa','Su');
	this.month_names_l['en'] = new Array('January','February','March','April','May','June','July','August','September','October','November','December');	
	this.day_names_l['fr'] = new Array('Lu','Ma','Me','Je','Ve','Sa','Di');
	this.month_names_l['fr'] = new Array('Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre');
	this.day_names_l['it'] = new Array('Lun','Mar','Mer','Gio','Ven','Sab','Dom');
	this.month_names_l['it'] = new Array('gennaio','febbraio','marzo','aprile','maggio','giugno','luglio','agosto','settembre','ottobre','novembre','dicembre');
	this.day_names = this.day_names_l[lang];
	this.month_names = this.month_names_l[lang];
	this.days = new Array();
	/**
	 * @projectDescription initialisiert den Kalender und befüllt den Container mit HTML-Code
	 */
	this.init = function(){
		html_output = '<div class="jsc_head"><a class="jsc_back" href="javascript:void(0);">&laquo;</a><h2></h2><a class="jsc_next" href="javascript:void(0);">&raquo;</a></div>\n';
		html_output += '<div class="jsc_body">\n';
		for(i=0;i<7;i++){
			html_output += '<span>' + self.day_names[i] + '</span>\n';
		}
		zw=0;
		for(i=0;i<41;i++){
			zw++;
			if(zw==6 || zw==7){
				html_output += '<a href="javascript:void(0);" class="jsc_special"></a>\n';
			}
			else{
				html_output += '<a href="javascript:void(0);"></a>\n';
			}
			if(zw==7){
				zw=0;
			}
		}
		html_output += '<a class="jsc_close" href="javascript:void(0);">x</a>\n';
		html_output += '</div>';
		self.obref.innerHTML = html_output;
		self.obref.getElementsByTagName('a')[self.obref.getElementsByTagName('a').length-1].onclick = function(){
			self.hide();
		}
		self.obref.getElementsByTagName('a')[0].onclick = function(){
			if(self.akt_month>1){
				self.setDate(self.akt_month-1, self.akt_year);
			}
			else{
				self.setDate(12, self.akt_year-1);
			}
		}
		self.obref.getElementsByTagName('a')[1].onclick = function(){
			if(self.akt_month<12){
				self.setDate(self.akt_month+1, self.akt_year);
			}
			else{
				self.setDate(1, self.akt_year+1);
			}
		}
		for(i=2;i<43;i++){
			self.obref.getElementsByTagName('a')[i].onclick = function(){
				self.itemOnClick(this);
			}
		}
		zw = new Date();
	}
	/**
	 * @projectDescription blendet den Kalender ein
	 */
	this.show = function(){
		self.obref.style.display = 'block';
	}
	/**
	 * @projectDescription blendet den Kalender aus
	 */
	this.hide = function(){
		self.obref.style.display = 'none';	
	}
	/**
	 * @projectDescription setzt Monat und Jahr
	 */
	this.setDate = function(month, year){
		self.akt_month = month;
		self.akt_year = year;
		blankdays = new Date(year,month-1,1).getDay();
		blankdays += -1;
		if(blankdays<0){
			blankdays=6;
		}
		for(i=27;month-1==new Date(year,month-1,i).getMonth();i++){
			maxdays = i;
		}
		for(i=0;i<blankdays+1;i++){
			self.days[i] = '';
		}
		for(i=i-1;i<maxdays+blankdays;i++){
			self.days[i] = i-blankdays+1;
		}
		for(;i<41;i++){
			self.days[i] = '';
		}
		self.aktualHTML();
	}
	/**
	 * @projectDescription aktualisiert den HTML-Code des Kalenders
	 */
	this.aktualHTML = function(){
		self.obref.getElementsByTagName('h2')[0].innerHTML = self.month_names[self.akt_month-1] + ' ' + self.akt_year;
		for(i=0;i<self.days.length;i++){
			self.obref.getElementsByTagName('a')[i+2].innerHTML = self.days[i];
			self.obref.getElementsByTagName('a')[i+2].className = self.obref.getElementsByTagName('a')[i+2].className.replace(/jsc_blank/gi, '');
			if(self.days[i]==""){
				self.obref.getElementsByTagName('a')[i+2].className += " jsc_blank";
			}
		}
	}
	/**
	 * @projectDescription wird aufgerufen wenn ein Item ausgewält wird
	 * @param {Object} obj
	 */
	this.itemOnClick = function(obj){
		if(obj.innerHTML!=''){
			self.callBackFunction(obj.innerHTML*1,self.akt_month,self.akt_year);
		}
	}
	this.hide();
	this.init();
	self.setDate(zw.getMonth()+1,zw.getFullYear());
}


function parseRezept(object, lang){
	zh2=0;
	if(typeof lang == 'undefined') {
		lang = global_lang;
	}
	if(lang=="en"){
		txt_einbl = "show details";
		txt_ausbl = "hide details";
	}
	else if(lang=="it"){
		txt_einbl = "mostra dettagli";
		txt_ausbl = "nascondi dettagli";
	}
	if(lang=="fr"){
		txt_einbl = "show details";
		txt_ausbl = "hide details";
	}	
	else{
		txt_einbl = "details einblenden";
		txt_ausbl = "details ausblenden";		
	}

	for(i=0; i<object.childNodes.length; i++){
		if(object.childNodes[i].nodeName.toLowerCase() == "h3"){
			object.childNodes[i].className += " closed";
			object.childNodes[i].number = zh2;
			object.childNodes[i].innerHTML = '<a href="javascript:void(0);"><span>' + txt_einbl + '</span>' + object.childNodes[i].innerHTML + '</a>';
			object.childNodes[i].getElementsByTagName("a")[0].onclick = function(){
				if(document.getElementById("divtipp_" + this.parentNode.number).className == "closed"){
					document.getElementById("divtipp_" + this.parentNode.number).className = "opened";
					this.className = "opened";
					this.getElementsByTagName("span")[0].innerHTML = txt_ausbl;
				}
				else{
					document.getElementById("divtipp_" + this.parentNode.number).className = "closed";
					this.getElementsByTagName("span")[0].innerHTML = txt_einbl;
					this.className = "";
				}
				this.blur();
			}
			zh2++;
		}
		else if(object.childNodes[i].nodeName.toLowerCase() == "div"){
			object.childNodes[i].className = "closed";
			object.childNodes[i].number = zh2-1;
			object.childNodes[i].id = "divtipp_" + (zh2-1);
		}
	}
}


function sh(id,action){
	if (action=="show"){document.getElementById(id).style.display="block";} 
	else {document.getElementById(id).style.display="none";}
}



function parseAnfrage(lang){
	if(document.getElementById('top_anfrage')){
		kalender1 = new Calender(document.getElementById('q_jscalender1'),lang);
		kalender1.callBackFunction = function(tag,monat,jahr){
			document.getElementById('top_anfrage').getElementsByTagName('form')[0].anreise.value = tag+'.'+monat+'.'+jahr;
			kalender1.hide();
		}
		kalender2 = new Calender(document.getElementById('q_jscalender2'),lang);
		kalender2.callBackFunction = function(tag,monat,jahr){
			document.getElementById('top_anfrage').getElementsByTagName('form')[0].abreise.value = tag+'.'+monat+'.'+jahr;
			kalender2.hide();
		}
		document.getElementById('top_anfrage').getElementsByTagName('input')[0].autocomplete = 'off';
		document.getElementById('top_anfrage').getElementsByTagName('input')[0].onfocus = function(){
			kalender1.show();
			kalender2.hide();
		}
		document.getElementById('top_anfrage').getElementsByTagName('input')[1].autocomplete = 'off';
		document.getElementById('top_anfrage').getElementsByTagName('input')[1].onfocus = function(){
			kalender2.show();
			kalender1.hide();
		}
	}
if(document.getElementById('bottom_anfrage')){
		kalender3 = new Calender(document.getElementById('q_jscalender3'),lang);
		kalender3.callBackFunction = function(tag,monat,jahr){
			document.getElementById('bottom_anfrage').getElementsByTagName('form')[0].anreise.value = tag+'.'+monat+'.'+jahr;
			kalender3.hide();
		}
		kalender4 = new Calender(document.getElementById('q_jscalender4'),lang);
		kalender4.callBackFunction = function(tag,monat,jahr){
			document.getElementById('bottom_anfrage').getElementsByTagName('form')[0].abreise.value = tag+'.'+monat+'.'+jahr;
			kalender4.hide();
		}
		document.getElementById('bottom_anfrage').getElementsByTagName('input')[0].autocomplete = 'off';
		document.getElementById('bottom_anfrage').getElementsByTagName('input')[0].onfocus = function(){
			kalender3.show();
			kalender4.hide();
		}
		document.getElementById('bottom_anfrage').getElementsByTagName('input')[1].autocomplete = 'off';
		document.getElementById('bottom_anfrage').getElementsByTagName('input')[1].onfocus = function(){
			kalender4.show();
			kalender3.hide();
		}
	}
}
/*/////////////////////////////////////////////////////////////
                          Flash Check
/////////////////////////////////////////////////////////////*/
<!--
// -----------------------------------------------------------------------------
// Globals
// Major version of Flash required
var requiredMajorVersion = 8;
// Minor version of Flash required
var requiredMinorVersion = 0;
// Minor version of Flash required
var requiredRevision = 0;
// the version of javascript supported
var jsVersion = 1.0;
// -----------------------------------------------------------------------------
// -->

document.write('<script language="VBScript" type="text/vbscript"\> \n');
document.write('// Visual basic helper required to detect Flash Player ActiveX control version information\n');
document.write('Function VBGetSwfVer(i)\n');
document.write('  on error resume next\n');
document.write('  Dim swControl, swVersion\n');
document.write('  swVersion = 0\n');
document.write('  set swControl = CreateObject("ShockwaveFlash.ShockwaveFlash." + CStr(i))\n');
document.write('  if (IsObject(swControl)) then\n');
document.write('    swVersion = swControl.GetVariable("$version")\n');
document.write('  end if\n');
document.write('  VBGetSwfVer = swVersion\n');
document.write('End Function\n');
document.write('//\n ');
document.write('</script\>');

<!-- // Detect Client Browser type

var isIE  = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
var isWin = (navigator.appVersion.toLowerCase().indexOf("win") != -1) ? true : false;
var isOpera = (navigator.userAgent.indexOf("Opera") != -1) ? true : false;
jsVersion = 1.1;
// JavaScript helper required to detect Flash Player PlugIn version information
function JSGetSwfVer(i){
	// NS/Opera version >= 3 check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		if (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) {
			var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
      		var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description;
			descArray = flashDescription.split(" ");
			tempArrayMajor = descArray[2].split(".");
			versionMajor = tempArrayMajor[0];
			versionMinor = tempArrayMajor[1];
			if ( descArray[3] != "" ) {
				tempArrayMinor = descArray[3].split("r");
			} else {
				tempArrayMinor = descArray[4].split("r");
			}
      		versionRevision = tempArrayMinor[1] > 0 ? tempArrayMinor[1] : 0;
            flashVer = versionMajor + "." + versionMinor + "." + versionRevision;
      	} else {
			flashVer = -1;
		}
	}
	// MSN/WebTV 2.6 supports Flash 4
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.6") != -1) flashVer = 4;
	// WebTV 2.5 supports Flash 3
	else if (navigator.userAgent.toLowerCase().indexOf("webtv/2.5") != -1) flashVer = 3;
	// older WebTV supports Flash 2
	else if (navigator.userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 2;
	// Cant detect in all other cases
	else {
		
		flashVer = -1;
	}
	return flashVer;
} 

// When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available
function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision) 
{

 	reqVer = parseFloat(reqMajorVer + "." + reqRevision);
   	// loop backwards through the versions until we find the newest version	
	
	for (i=25;i>0;i--) {	
		
		if (isIE && isWin && !isOpera) {
			versionStr = VBGetSwfVer(i);
			
		} else {
			versionStr = JSGetSwfVer(i);		
		}
		
		
		if (versionStr == -1 ) { 
			return false;
		} else if (versionStr != 0) {
			if(isIE && isWin && !isOpera) {
				tempArray         = versionStr.split(" ");
				tempString        = tempArray[1];
				versionArray      = tempString .split(",");				
			} else {
				versionArray      = versionStr.split(".");
			}
			versionMajor      = versionArray[0];
			versionMinor      = versionArray[1];
			versionRevision   = versionArray[2];
			
			versionString     = versionMajor + "." + versionRevision;   // 7.0r24 == 7.24
			versionNum        = parseFloat(versionString);
        	// is the major.revision >= requested major.revision AND the minor version >= requested minor
			if ( (versionMajor > reqMajorVer) && (versionNum >= reqVer) ) {
				return true;
			} else {
				return ((versionNum >= reqVer && versionMinor >= reqMinorVer) ? true : false );	
			}
		}
	}	
}

// Version check based upon the values entered above in "Globals"
var fl = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

/*/////////////////////////////////////////////////////////////
                     Draw Flash Funktion
/////////////////////////////////////////////////////////////*/
/*
Aufruf:
drawFlash(pfad, width, height, wmode, bgcolor, id, alt, rw);

pfad = der Pfad zur .swf Datei
width,height = Breite und Höhe
wmode = wmode-Eigenschaf des Flash Objekts
bgcolor = Hintergrundfarbe
id = die id des <object> Tag
alt = HTML-Code der zurückgegeben wird wenn Flash nicht aktiv ist
rw = true wenn das Flash object per document.write geschrieben werden soll.
*/
/**
 * @projectDescription giebt den Quellcode für ein Flash-Object zurück oder schreibt es per document.write ins Dokument.
 * @param {String} pfad
 * @param {Int} width
 * @param {Int} height
 * @param {String} wmode
 * @param {String} bgcolor
 * @param {String} id
 * @param {String} alt
 * @param {Boolean} rw
 * @return {String}
 */
function drawFlash(pfad, width, height, wmode, bgcolor, id, alt, rw){
	ausgabe = "";
	if(fl){
		params = false;
		if(pfad.indexOf("?") != -1){
			params = pfad.split("?")[1];
			pfad = pfad.split("?")[0];
		}
		ausgabe += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" name="flash" width="' + width + '" id="' + id + '" height="' + height + '" align="middle">';
		ausgabe += '<param name="allowScriptAccess" value="sameDomain" />';
		if(wmode!=""){ausgabe += '<param name="wmode" value="' + wmode + '" />';}
		if(bgcolor!=""){ausgabe += '<param name="bgcolor" value="' + bgcolor + '" />';}
		if(params){ausgabe += '<param name="flashvars" value="' + params + '" />';}
		ausgabe += '<param name="movie" value="' + pfad + '" /><param name="menu" value="false" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />';
		ausgabe += '<embed src="' + pfad + '" width="' + width + '" height="' + height + '"';
		if(wmode!=""){ausgabe += ' wmode="' + wmode + '"';}
		if(bgcolor!=""){ausgabe += ' bgcolor="' + bgcolor + '"';}
		if(params){ausgabe += ' flashvars="' + params + '"';}
		ausgabe += ' menu="false" align="middle" quality="high" bgcolor="#ffffff" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" name="flash" />';
		ausgabe += '</object>';
	}
	else{
		ausgabe += alt;
	}
	if(rw){
		document.write(ausgabe);
	}
	return ausgabe;
}


/*/////////////////////////////////////////////////////////////
                      Flash Headlines
/////////////////////////////////////////////////////////////*/
/*
aus:
<h1>Headline</h1>
wird
<div class="classname">//Flash-headline//</div>

Aufruf:
parseHeadline(tag, fhsrc, cssclass, rotations, bgcolor, bordercolor, object);

tag = Tagname der durchgeparst wird
fhsrc = Flash-File für Headline
cssclass = CSS-Klasse für den Div-Layer der um das Flash liegt
width,height,color,fsize => werden aus den CSS-Styles ausgelesen
rotation = Rotationswinkel
bgcolor = Hintergrundfarbe ("" für keine)
bordercolor = Rahmenfarbe ("" für keine)
object = das Objekt in dem die Headlines ersetzt werden
*/
/**
 * @projectDescription ersetzt alle angegebenen Tags durch eine Flash-Headline die sich im object befinden.
 * @param {String} tag
 * @param {String} fhsrc
 * @param {String} cssclass
 * @param {Int} rotations
 * @param {color} bgcolor
 * @param {color} bordercolor
 * @param {HTMLElement} object
 * @return {true}
 */function parseHeadline(tag, fhsrc, cssclass, rotations, bgcolor, bordercolor, object){
	if(!object){
		return false;
	}
	for(i=0; object.getElementsByTagName(tag).length>0; i=i){
		akth1 = object.getElementsByTagName(tag)[0];
		zw = document.createElement("div");
		zw.className = cssclass;
		fh_content = akth1.innerHTML.replace(/&/g, "&amp;").replace(/&amp;/g, "%26").replace(/\n/g, "").replace(/\t/g, "");
		akth1.parentNode.replaceChild(zw, akth1);
		color = getCurrentStyle(zw, 'color');
		if(color.indexOf('#')==0 && color.length==7){
			color = color.substr(1, 6);
		}
		else if(color.indexOf('#')==0 && color.length==4){
			color = color.substr(1, 1)+color.substr(1, 1)+color.substr(2, 1)+color.substr(2, 1)+color.substr(3, 1)+color.substr(3, 1);
		}
		else if(color.indexOf('rgb')==0){
			zwcolor = color.substr(4,color.length-5).split(",");
			zwcolor[0] = (zwcolor[0]*1).toString(16);
			zwcolor[1] = (zwcolor[1]*1).toString(16);
			zwcolor[2] = (zwcolor[2]*1).toString(16);
			if(zwcolor[0].length<2){zwcolor[0] = '0' + zwcolor[0];}
			if(zwcolor[1].length<2){zwcolor[1] = '0' + zwcolor[1];}
			if(zwcolor[2].length<2){zwcolor[2] = '0' + zwcolor[2];}
			color = zwcolor[0]+zwcolor[1]+zwcolor[2];
		}
		height = zw.offsetHeight-((getCurrentStyle(zw, 'padding-top').replace(/px/g,'')*1)+(getCurrentStyle(zw, 'padding-bottom').replace(/px/g,'')*1));
		width = zw.offsetWidth-((getCurrentStyle(zw, 'padding-left').replace(/px/g,'')*1)+(getCurrentStyle(zw, 'padding-right').replace(/px/g,'')*1));
		if((getCurrentStyle(zw, 'border-top-width').replace(/px/g,'')*1)+""!="NaN"){		
			height = height-(getCurrentStyle(zw, 'border-top-width').replace(/px/g,'')*1);
		}
		if((getCurrentStyle(zw, 'border-bottom-width').replace(/px/g,'')*1)+""!="NaN"){		
			height = height-(getCurrentStyle(zw, 'border-bottom-width').replace(/px/g,'')*1);
		}
		if((getCurrentStyle(zw, 'border-left-width').replace(/px/g,'')*1)+""!="NaN"){		
			width = width-(getCurrentStyle(zw, 'border-left-width').replace(/px/g,'')*1);
		}
		if((getCurrentStyle(zw, 'border-right-width').replace(/px/g,'')*1)+""!="NaN"){		
			width = width-(getCurrentStyle(zw, 'border-right-width').replace(/px/g,'')*1);
		}
		fsize = getCurrentStyle(zw, 'font-size').replace(/px/g,'');
		zw.innerHTML = drawFlash(fhsrc + "?txt=" + fh_content + "&txtmaxwidth=" + width + "&txtcolor=" + color + "&fsize=" + fsize + "&txtrotation=" + rotations + "&txtbgcolor=" + bgcolor + "&txtbordercolor=" + bordercolor, width, height, "transparent", "", "", "", false);
	}
	return true;
}
function getCurrentStyle(obj, prop){  // Gibt den Wert des abgefragten CSS-Wertes zurück
	if(document.defaultView && document.defaultView.getComputedStyle){
		if(document.defaultView.getComputedStyle(obj,"").getPropertyValue(prop)){
			return document.defaultView.getComputedStyle(obj,"").getPropertyValue(prop);
		}
		return "";
	}
	else if(window.getComputedStyle){
		if(window.getComputedStyle(obj,"").getPropertyValue(prop)){
			return window.getComputedStyle(obj,"").getPropertyValue(prop);
		}
		return "";
	}
	else if(obj.currentStyle){
		if(obj.currentStyle.getAttribute(prop.replace(/\-/g, ""))){
			return obj.currentStyle.getAttribute(prop.replace(/\-/g, ""));
		}
		return "";
	}
	else{
		if(obj.style.getAttribute(prop.replace(/\-/g, ""))){
			return obj.style.getAttribute(prop.replace(/\-/g, ""));
		}
		return "";
	}
}
function parseContentImg(image){
	zwl = document.createElement('a');
	image.appendChild(zwl);
	zwl.innerHTML = "";
	zwl.href = image.getElementsByTagName('img')[0].name;
	zwl.className = "top_image_link";
	zwl.onclick = function(){
		if(fl){
			showContentImgBig(this.parentNode.getElementsByTagName('img')[0].name);
			return false;
		}
		else{
			this.blur();
			return popup(this);
		}
	};
};
function showContentImgBig(isrc){
	if(!document.getElementById('flashimgwrapper')){
		zwdiv = document.createElement('div');
		document.body.appendChild(zwdiv);
		zwdiv.id = "flashimgwrapper";
		zwdiv.style.position = "absolute";
		zwdiv.style.background = "url(/nav/inv.gif)";
		zwdiv.style.top = "0";
		zwdiv.style.left = "0";
		zwdiv.style.width = "100%";
		zwdiv.style.height = "100%";
	}
	else{
		zwdiv=document.getElementById('flashimgwrapper');
	}
	zwdiv.style.display = "block";
	dih = drawFlash('/flash/imgbig.swf?imgsrc='+isrc, '100%', '100%', 'transparent', '', '', '', false);
	zwdiv.innerHTML = dih;
	zwdiv.onclick = function(){
		setTimeout(function(a) { return function() { a.style.display = "none"; } } (this), 300);
	};
};
function deleteBigImgWrapper(){
	document.getElementById('flashimgwrapper').style.display = "none";
};
function parseBildergalerie(imgwrapper){
	imgwrapper = imgwrapper;
	zwdiv = document.createElement('div');
	imgwrapper.appendChild(zwdiv);
	zwdiv.id = "bildergalerie_detail";
	zwdiv.style.display = "none";
	zwdiv.innerHTML = '<img>';
	for(i=0;i<imgwrapper.getElementsByTagName('a').length;i++){
		imgwrapper.getElementsByTagName('a')[i].onmouseover = function(){
			setBildergalerieBild(this.name);
		}
		imgwrapper.getElementsByTagName('a')[i].onmouseout = function(){
			hideBildergalerieBild();
		}
		imgwrapper.getElementsByTagName('a')[i].onclick = function(){
			this.blur();
			return false;
		}
	}
};
function setBildergalerieBild(isrc){
	zwdiv = document.getElementById('bildergalerie_detail');
	zwdiv.style.display = "block";
	zwdiv.getElementsByTagName('img')[0].src = isrc;
};
function hideBildergalerieBild(){
	zwdiv = document.getElementById('bildergalerie_detail');
	zwdiv.style.display = "none";
};
