function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;

function img(img){
	url = "/images.php?id="+img;
	if (img=="big/plan_assisi.jpg"){
		width="689";
		height="330";
	} else if (img=="map.gif"){
		width = "400";
		height = "281";
	} else {
		width = "500";
		height = "400";
	}
	newwindow=window.open(url,name,'height='+height+',width='+width);
	if (window.focus) {newwindow.focus()}
}

var MM_contentVersion = 6;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < words.length; ++i)
	    {
		if (isNaN(parseInt(words[i])))
		continue;
		var MM_PluginVersion = words[i]; 
	    }
	var fl = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('fl = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
	document.write('</SCR' + 'IPT\> \n');
}
	
function mf(f,x,w,h,bg,e) {
	if (fl){
		var specialchar = new Array('ä','ö','ü','Ä','Ö','Ü','ß','ê','è','é','"');
		var specialcharutf8 = new Array('%C3%A4','%C3%B6','%C3%BC','%C3%84','%C3%96','%C3%9C','%C3%9F','%C3%AA','%C3%A8','%C3%A9','\"');
		for (i=0;i<specialchar.length;i++){
			x = x.replace(specialchar[i], specialcharutf8[i]);
		}	
		document.write('<div id="flashcontent"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"');
		document.write('codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+w+'" height="'+h+'">');
		if (f=="flash/main_movie.swf"){
			document.write('<param name="movie" value="'+f+''+x+'"><param name="bgcolor" value="'+bg+'"><param name="quality" value="high"><param name="scale" value="noscale"><param name="wmode" value="transparent"><param name="align" value="left">');		
		} else {
			document.write('<param name="movie" value="'+f+''+x+'"><param name="bgcolor" value="'+bg+'"><param name="quality" value="high"><param name="scale" value="noscale"><param name="wmode" value="transparent">');	
		}
		document.write('<embed src="'+f+''+x+'" quality="high" scale="noscale" width="'+w+'" height="'+h+'" bgcolor="'+bg+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent">');
		document.write('</object></div>');
	} else {
		f = f.replace(".swf",".jpg");
		document.write("<img src=\"/images"+f+"\" border=0 width=425 height=230 alt=\"\" />");
/*		if (f=="flash/main_movie.swf"){
			document.write("<img src=\"images\/img_main.jpg\" border=0 width=489 height=254>");
		} else {
			x = x.replace("?txt=","");
			//document.write("<b>"+x+"</b>");		
		}*/
	}
}