function handleError()
{
	return true;
}

window.onerror = handleError;

function hasFlash()
{
    var a=6;
    if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1)
    {
		document.write('<script language="VBScript"\> \non error resume next \nhasFlashApp = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');
        if(window.hasFlashApp!=null)return window.hasFlashApp
    }
    if(navigator.mimeTypes&&navigator.mimeTypes["application/x-shockwave-flash"]&&navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin)
    {
        var b=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description;
        return parseInt(b.charAt(b.indexOf(".")-1))>=a
    }
	
    return false
}


function replace(string,text,by) {
// Replaces text with by in string
    var strLength = string.length, txtLength = text.length;
    if ((strLength == 0) || (txtLength == 0)) return string;

    var i = string.indexOf(text);
    if ((!i) && (text != string.substring(0,txtLength))) return string;
    if (i == -1) return string;

    var newstr = string.substring(0,i) + by;

    if (i+txtLength < strLength)
        newstr += replace(string.substring(i+txtLength,strLength),text,by);

    return newstr;
}


function convert2(text) {
    text = replace(text,'%C4','&Auml;');	
    text = replace(text,'%D6','&Ouml;');
    text = replace(text,'%DC','&Uuml;');	
    text = replace(text,'%DF','&szlig;');	
    text = replace(text,'%E4','&auml;');	
    text = replace(text,'%E9','&eacute;');
    text = replace(text,'%F6','&ouml;');
    text = replace(text,'%FC','&uuml;');		
	return text;
}


function replaceHeading(htmltag) {

	for(var i = 0; i < document.getElementsByTagName(htmltag).length; i++) {
	
		//alert(document.getElementsByTagName("H2")[i].outerHTML);
		//alert(document.getElementsByTagName("H2")[i].childNodes.length);
		myValue = document.getElementsByTagName(htmltag)[i].innerHTML;
		//myOuter = document.getElementsByTagName(htmltag)[i].outerHTML;
		
		//alert (myValue);
		/*
		var regExp=/<span[^>]*>/gi;
		myValue = myValue.replace(regExp,"[B]");
		
		var regExp=/<\/span>/gi;
		myValue = myValue.replace(regExp,"[/B]");
		
		var regExp=/<b>/gi;
		myValue = myValue.replace(regExp,"[B]");
		
		var regExp=/<\/b>/gi;
		myValue = myValue.replace(regExp,"[/B]");
		
		var regExp=/<strong>/gi;
		myValue = myValue.replace(regExp,"[B]");
		
		var regExp=/<\/strong>/gi;
		myValue = myValue.replace(regExp,"[/B]");
		*/	
		
		/*
		var regExp=/<[^>]*>/gi;
		myValue = myValue.replace(regExp,"");
		
		var regExp=/\">/gi;
		myValue = myValue.replace(regExp,"");
		*/
		
		//alert(myValue);
		
		if (myValue != undefined) {
			//document.getElementsByTagName("H2")[i].outerHTML = 
			if (document.getElementsByTagName(htmltag)[i].className.indexOf("flash") != -1) {
			
				myObj = document.getElementsByTagName(htmltag)[i];
				myParent = myObj.parentNode;
			
				width = myObj.offsetWidth;
				height = "50";
			
// FLASH AUSGABE


//myValue= convert(myValue);

myValue = escape(myValue);

myValue= convert2(myValue);
//alert(myValue);
myFlash = ('<object classid="clsid:d27cdb6e-ae6d'
 +'-11cf-96b8-444553540000" codebase="http://fpdownlo'
 +'ad.macromedia.com/pub/shockwave/cabs/flash/swflash'
 +'.cab#version=6,0,0,0" width="' + width + '" height="' + height + '" id="'
 +'boxtitle" align="middle"> <param name="allowScrip'
 +'tAccess" value="sameDomain" /> <param name="wmode" value="transparent" /> <param name="movie'
 +'" value="/_static/swf/headline.swf" /><param name="FlashVars" value="title=' + myValue + '" /> <param name="quality" v'
 +'alue="high" /> <param name="scale" value="noscale' 
 +'" /> <param name="salign" value="lt" /> <param n'
 +'ame="bgcolor" value="#91A80C" /> <embed src="/_static/swf/'
 +'headline.swf" FlashVars="title=' + myValue + '" quality="high" wmode="transparent" scale="noscale" salign="l'
 +'t" bgcolor="#91A80C" width="' + width + '" height="' + height + '" name='
 +'"boxtitle" align="middle" allowScriptAccess="sameD'
 +'omain" type="application/x-shockwave-flash" plugin'
 +'spage="http://www.macromedia.com/go/getflashplayer'
 +'" /> </object>');


// FLASH AUSGABE
				

				
				replaceDiv = document.createElement('div');
				replaceDiv.innerHTML = myFlash;
				replaceDiv.style.margin = "0px 0px 0px 0px";
				replaceDiv.style.padding = "0px 0px 0px 0px";
				
				myParent.replaceChild(replaceDiv, myObj);
				
				i--;
				
			}
		}
	
	}
	
}

       

if (hasFlash() && document.getElementsByTagName) {
	replaceHeading("h2");
	replaceHeading("h1");
}