function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


function cssjs(a,o,c1,c2)
{
	switch (a){
		case 'swap':
			o.className=!cssjs('check',o,c1)?o.className.replace(c2,c1):o.className.replace(c1,c2);
		break;
		case 'add':
			if(!cssjs('check',o,c1)){o.className+=o.className?' '+c1:c1;}
		break;
		case 'remove':
			var rep=o.className.match(' '+c1)?' '+c1:c1;
			o.className=o.className.replace(rep,'');
		break;
		case 'check':
			return new RegExp('\\b'+c1+'\\b').test(o.className)
		break;
	}
}

// Als Übergabeparameter wird die bildquelle, breite, höhe, format und ob danach bzw. davor ein weiteres Bild angesteuert wird, übergeben
	
	function FotoWindow(bildurl,b,h,f,fvor,fnach,o1,o2) {
		
		var eigenschaften,sbreite,shoehe;

		
		// stellt die Bildschirmabmessungen fest
		var ns6 = (!document.all && document.getElementById);
		var ie4 = (document.all);
		var ns4 = (document.layers);
	
		if(ns6||ns4) {
			sbreite = innerWidth;
			shoehe = innerHeight;
			winhoehe = outerHeight;
		}
		else if(ie4) {
			sbreite = document.body.clientWidth;
			shoehe = document.body.clientHeight;
		}
	
		x = 35;
		y = (winhoehe-shoehe)+180;
		
		
		var hx = parseInt(h) + 25;
	
		eigenschaften="left="+x+",top="+y+",screenX="+x+",screenY="+y+",width="+b+",height="+hx+",menubar=no,toolbar=no";
	
		fenster=window.open("","anzeigebild",eigenschaften);
		fenster.focus();
		fenster.document.open();
		
		with (fenster) {
			document.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"\n');
			document.write('"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">\n');
			document.write('<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de"><head>\n');
			document.write('<title>Trio Sorrentino<\/title>\n');
			document.write('<link href="..\/css\/aig_popup.css" rel="stylesheet" type="text\/css" \/>\n');
			document.write('<\/head>\n');
			document.write('<body>\n');
//			document.write('<center>\n');
			if (f="q") {
				document.write('<img src="'+ bildurl +'" class="quer" alt="" \/>\n');
			} else {
				document.write('<img src="'+ bildurl +'" class="hoch" alt="" \/>\n');
			}
//			document.write('<\/center>\n');
			document.write('<div id="navigation">\n');
			if (fvor!="") { document.write('<a href="#"><img src="..\/images\/pfeil_links.gif" width="10" height="10" alt="zur&uuml;ck" \/><\/a>\n'); }
			if (fnach!="") { document.write('<a href="#"><img src="..\/images\/pfeil_rechts.gif" width="10" height="10" alt="vor" \/><\/a>\n'); }
			document.write('<\/div>\n');		  
			document.write('<\/body><\/html>\n');
			fenster.document.close();
		}
	}
