
function handleError(sMessage, sUrl, sLine) {
	return true;
}

window.onerror = handleError;

/*
var hasFlash=function()
{
    var a=6;
    if(navigator.appVersion.indexOf("MSIE")!=-1&&navigator.appVersion.indexOf("Windows")>-1)
    {
        document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & '+a+'))) \n</script\> \n');
        if(window.hasFlash!=null)return window.hasFlash
    }
    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
}
*/
 
    var hasFlash = function() {
        var a = 6;
        if (navigator.appVersion.indexOf("MSIE") != -1 && navigator.appVersion.indexOf("Windows") > -1) {
            document.write('<script language="VBScript"\> \non error resume next \nhasFlash = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & ' + a + '))) \n</script\> \n');
            if (window.hasFlash != null) {
                return window.hasFlash
            }
        }

        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;
            // (Doppelstellige Flash-Version z.B. 10.0.1 || Einstellige Flash-Version z.B. 8.0.1) >= 6
            if ((parseInt(b.substring(b.indexOf(".") - 2, b.indexOf("."))) >= a) || (parseInt(b.charAt(b.indexOf(".") - 1)) >= a))
                return true;
        }
        return false
    }

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 = myObj.offsetHeight;
			
// FLASH AUSGABE

//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/suedtirol_com/swf/boxtitle.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/suedtirol_com/swf/boxt'
 +'itle.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) {
//if (document.getElementsByTagName) {
	replaceHeading("h2");
	replaceHeading("h1");
}


function openNewWindow(u) {
	newWindow=window.open(u);
} 

