function farbig(i,t1,t2)
{
 
 var pa = String(document.location);
  
//alert (pa);

 if (pa.substr(pa.length - 15,15)!='museum/main.htm' && pa.substr(pa.length - 16,16)!='museum/index.htm' && pa !='http://www1.troisdorf.de/museum/') 
 {
  document.getElementById("untertitel").innerHTML = "<span class='weiss'>" + t1 + "</span><br/>" + t2 + "<br/>";
 }
 else
 { 
    var img0;

        img0 = document.getElementById("img2").src;
    document.getElementById("img2").src = img0.replace("fa","sw");
	
        img0 = document.getElementById("img3").src;
    document.getElementById("img3").src = img0.replace("fa","sw");

	img0 = document.getElementById("img4").src;
    document.getElementById("img4").src = img0.replace("fa","sw");

	img0 = document.getElementById("img5").src;
    document.getElementById("img5").src = img0.replace("fa","sw");

	img0 = document.getElementById("img6").src;
    document.getElementById("img6").src = img0.replace("fa","sw");

	img0 = document.getElementById("img7").src;
    document.getElementById("img7").src = img0.replace("fa","sw");

	img0 = document.getElementById("img8").src;
    document.getElementById("img8").src = img0.replace("fa","sw");
 }

 var img_a;
 
 img_a = document.getElementById("img"+i).src;
 
 document.getElementById("img"+i).src = img_a.replace("sw","fa"); 
 
 
}


function schwarzweiss(i)
{
 var img0 = document.getElementById("img"+i).src;
 
 document.getElementById("img"+i).src = img0.replace("fa","sw"); 
 document.getElementById("untertitel").innerHTML = "<span class='weiss'></span><br/><br/>";
}

function zufall_image()
{
var s = String(document.location); // alert(s);

if (s.substr(s.length - 15,15)=='museum/main.htm' || s.substr(s.length - 16,16)=='museum/index.htm' || s=='http://www1.troisdorf.de/museum/')
{
    var i = 0;
    bild = new Array(2);

    while (i<9)
	{
		a = 10*(Math.random());
		bild[0] = Math.round(a);
		a = 10*(Math.random());
		bild[1] = Math.round(a);
	
		//alert(bild[0]+" "+bild[1]);
		
		if ( bild[0] != bild[1] && bild[0] <= 8 && bild[1] <= 8 && bild[0] >= 2 && bild[1] >= 2) 
		{
			farbig0(bild[0]);
			farbig1(bild[1]);
			break;
		}
   	
		i++;	
	}
}
else
{
	//alert(s.substr(s.length - 15,15));

}
}

function farbig0(i)
{
 var img0 = document.getElementById("img"+i).src;
 
 document.getElementById("img"+i).src = img0.replace("sw","fa"); 
  
}
function farbig1(i)
{
 var img0 = document.getElementById("img"+i).src;
 
 document.getElementById("img"+i).src = img0.replace("sw","fa"); 
}

